| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 173 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %x_GLF_color_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %x_GLF_color_1_1 "x_GLF_color_1_1" |
| OpName %buf0 "buf0" |
| OpMemberName %buf0 0 "one" |
| OpName %x_10 "x_10" |
| OpName %x_GLF_color "x_GLF_color" |
| OpName %main_1 "main_1" |
| OpName %x_43 "x_43" |
| OpName %x_44 "x_44" |
| OpName %S "S" |
| OpMemberName %S 0 "a" |
| OpMemberName %S 1 "b" |
| OpMemberName %S 2 "c" |
| OpName %arr "arr" |
| OpName %param "param" |
| OpName %param_1 "param_1" |
| OpName %x_50 "x_50" |
| OpName %x_64_1 "x_64_1" |
| OpName %x_71_1 "x_71_1" |
| OpName %x_76_1 "x_76_1" |
| OpName %x_81_1 "x_81_1" |
| OpName %x_88_1 "x_88_1" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "x_GLF_color_1" |
| OpName %main_inner "main_inner" |
| OpName %main "main" |
| OpName %func_struct_S_i1_i1_i11_i1_ "func_struct_S_i1_i1_i11_i1_" |
| OpName %s "s" |
| OpName %x "x" |
| OpDecorate %x_GLF_color_1_1 Location 0 |
| OpDecorate %buf0 Block |
| OpMemberDecorate %buf0 0 Offset 0 |
| OpDecorate %x_10 NonWritable |
| OpDecorate %x_10 DescriptorSet 0 |
| OpDecorate %x_10 Binding 0 |
| OpMemberDecorate %S 0 Offset 0 |
| OpMemberDecorate %S 1 Offset 4 |
| OpMemberDecorate %S 2 Offset 8 |
| OpDecorate %_arr_S_uint_2 ArrayStride 12 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %5 = OpConstantNull %v4float |
| %x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5 |
| %int = OpTypeInt 32 1 |
| %buf0 = OpTypeStruct %int |
| %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| %x_10 = OpVariable %_ptr_Uniform_buf0 Uniform |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %x_GLF_color = OpVariable %_ptr_Private_v4float Private %5 |
| %void = OpTypeVoid |
| %12 = OpTypeFunction %void |
| %_ptr_Function_int = OpTypePointer Function %int |
| %18 = OpConstantNull %int |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %23 = OpConstantNull %bool |
| %S = OpTypeStruct %int %int %int |
| %uint = OpTypeInt 32 0 |
| %uint_2 = OpConstant %uint 2 |
| %_arr_S_uint_2 = OpTypeArray %S %uint_2 |
| %_ptr_Function__arr_S_uint_2 = OpTypePointer Function %_arr_S_uint_2 |
| %30 = OpConstantNull %_arr_S_uint_2 |
| %_ptr_Function_S = OpTypePointer Function %S |
| %33 = OpConstantNull %S |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| %int_2 = OpConstant %int 2 |
| %int_1 = OpConstant %int 1 |
| %float_0 = OpConstant %float 0 |
| %55 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| %true = OpConstantTrue %bool |
| %int_9 = OpConstant %int 9 |
| %uint_1 = OpConstant %uint 1 |
| %int_7 = OpConstant %int 7 |
| %int_12 = OpConstant %int 12 |
| %float_1 = OpConstant %float 1 |
| %115 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 |
| %main_out = OpTypeStruct %v4float |
| %116 = OpTypeFunction %main_out |
| %127 = OpTypeFunction %int %_ptr_Function_S %_ptr_Function_int |
| %main_1 = OpFunction %void None %12 |
| %15 = OpLabel |
| %x_43 = OpVariable %_ptr_Function_int Function %18 |
| %x_44 = OpVariable %_ptr_Function_bool Function %23 |
| %arr = OpVariable %_ptr_Function__arr_S_uint_2 Function %30 |
| %param = OpVariable %_ptr_Function_S Function %33 |
| %param_1 = OpVariable %_ptr_Function_int Function %18 |
| %x_50 = OpVariable %_ptr_Function_int Function %18 |
| %x_64_1 = OpVariable %_ptr_Function_S Function %33 |
| %x_71_1 = OpVariable %_ptr_Function_S Function %33 |
| %x_76_1 = OpVariable %_ptr_Function_S Function %33 |
| %x_81_1 = OpVariable %_ptr_Function_S Function %33 |
| %x_88_1 = OpVariable %_ptr_Function_S Function %33 |
| OpStore %x_44 %false |
| OpBranch %35 |
| %35 = OpLabel |
| OpLoopMerge %36 %37 None |
| OpBranch %38 |
| %38 = OpLabel |
| %42 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 |
| %43 = OpLoad %int %42 |
| OpStore %x_50 %43 |
| %44 = OpLoad %int %x_50 |
| %45 = OpAccessChain %_ptr_Function_int %arr %44 %uint_0 |
| OpStore %45 %int_2 |
| %48 = OpAccessChain %_ptr_Function_int %arr %int_1 %uint_0 |
| %49 = OpLoad %int %48 |
| %50 = OpSLessThan %bool %49 %int_1 |
| OpSelectionMerge %51 None |
| OpBranchConditional %50 %52 %53 |
| %52 = OpLabel |
| OpStore %x_GLF_color %55 |
| OpStore %x_44 %true |
| OpBranch %36 |
| %53 = OpLabel |
| %57 = OpAccessChain %_ptr_Function_S %arr %int_1 |
| %58 = OpLoad %S %57 |
| OpStore %param %58 |
| %60 = OpLoad %int %x_50 |
| %59 = OpCopyObject %int %60 |
| %61 = OpIAdd %int %int_2 %59 |
| OpStore %param_1 %61 |
| %62 = OpLoad %int %param_1 |
| %63 = OpLoad %S %param |
| OpStore %x_64_1 %63 |
| %65 = OpAccessChain %_ptr_Function_int %x_64_1 %uint_0 |
| OpStore %65 %62 |
| %66 = OpLoad %S %x_64_1 |
| OpStore %param %66 |
| %67 = OpLoad %S %param |
| %68 = OpCompositeExtract %int %67 0 |
| %69 = OpIEqual %bool %68 %int_2 |
| OpSelectionMerge %70 None |
| OpBranchConditional %69 %71 %70 |
| %71 = OpLabel |
| %72 = OpLoad %S %param |
| OpStore %x_71_1 %72 |
| %74 = OpAccessChain %_ptr_Function_int %x_71_1 %uint_0 |
| OpStore %74 %int_9 |
| %76 = OpLoad %S %x_71_1 |
| OpStore %param %76 |
| OpBranch %70 |
| %70 = OpLabel |
| %77 = OpLoad %int %param_1 |
| %78 = OpLoad %S %param |
| OpStore %x_76_1 %78 |
| %81 = OpAccessChain %_ptr_Function_int %x_76_1 %uint_1 |
| %82 = OpIAdd %int %77 %int_1 |
| OpStore %81 %82 |
| %83 = OpLoad %S %x_76_1 |
| OpStore %param %83 |
| %84 = OpLoad %int %param_1 |
| %85 = OpLoad %S %param |
| OpStore %x_81_1 %85 |
| %87 = OpAccessChain %_ptr_Function_int %x_81_1 %uint_2 |
| %88 = OpIAdd %int %84 %int_2 |
| OpStore %87 %88 |
| %89 = OpLoad %S %x_81_1 |
| OpStore %param %89 |
| %90 = OpLoad %S %param |
| %91 = OpCompositeExtract %int %90 1 |
| %92 = OpIEqual %bool %91 %int_2 |
| OpSelectionMerge %93 None |
| OpBranchConditional %92 %94 %93 |
| %94 = OpLabel |
| %95 = OpLoad %S %param |
| OpStore %x_88_1 %95 |
| %97 = OpAccessChain %_ptr_Function_int %x_88_1 %uint_1 |
| OpStore %97 %int_7 |
| %99 = OpLoad %S %x_88_1 |
| OpStore %param %99 |
| OpBranch %93 |
| %93 = OpLabel |
| %100 = OpLoad %S %param |
| %101 = OpLoad %S %param |
| %102 = OpLoad %S %param |
| %103 = OpCompositeExtract %int %100 0 |
| %104 = OpCompositeExtract %int %101 1 |
| %105 = OpIAdd %int %103 %104 |
| %106 = OpCompositeExtract %int %102 2 |
| %107 = OpIAdd %int %105 %106 |
| OpStore %x_43 %107 |
| %108 = OpLoad %int %x_43 |
| %110 = OpIEqual %bool %108 %int_12 |
| OpSelectionMerge %111 None |
| OpBranchConditional %110 %112 %113 |
| %112 = OpLabel |
| OpStore %x_GLF_color %115 |
| OpBranch %111 |
| %113 = OpLabel |
| OpStore %x_GLF_color %55 |
| OpBranch %111 |
| %111 = OpLabel |
| OpBranch %51 |
| %51 = OpLabel |
| OpStore %x_44 %true |
| OpBranch %36 |
| %37 = OpLabel |
| OpBranch %35 |
| %36 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %116 |
| %119 = OpLabel |
| %120 = OpFunctionCall %void %main_1 |
| %121 = OpLoad %v4float %x_GLF_color |
| %122 = OpCompositeConstruct %main_out %121 |
| OpReturnValue %122 |
| OpFunctionEnd |
| %main = OpFunction %void None %12 |
| %124 = OpLabel |
| %125 = OpFunctionCall %main_out %main_inner |
| %126 = OpCompositeExtract %v4float %125 0 |
| OpStore %x_GLF_color_1_1 %126 |
| OpReturn |
| OpFunctionEnd |
| %func_struct_S_i1_i1_i11_i1_ = OpFunction %int None %127 |
| %s = OpFunctionParameter %_ptr_Function_S |
| %x = OpFunctionParameter %_ptr_Function_int |
| %131 = OpLabel |
| %133 = OpLoad %int %x |
| %135 = OpAccessChain %_ptr_Function_int %s %uint_0 |
| OpStore %135 %133 |
| %137 = OpAccessChain %_ptr_Function_int %s %uint_0 |
| %138 = OpLoad %int %137 |
| %139 = OpIEqual %bool %138 %int_2 |
| OpSelectionMerge %140 None |
| OpBranchConditional %139 %141 %140 |
| %141 = OpLabel |
| %143 = OpAccessChain %_ptr_Function_int %s %uint_0 |
| OpStore %143 %int_9 |
| OpBranch %140 |
| %140 = OpLabel |
| %145 = OpLoad %int %x |
| %147 = OpAccessChain %_ptr_Function_int %s %uint_1 |
| %148 = OpIAdd %int %145 %int_1 |
| OpStore %147 %148 |
| %150 = OpLoad %int %x |
| %152 = OpAccessChain %_ptr_Function_int %s %uint_2 |
| %153 = OpIAdd %int %150 %int_2 |
| OpStore %152 %153 |
| %155 = OpAccessChain %_ptr_Function_int %s %uint_1 |
| %156 = OpLoad %int %155 |
| %157 = OpIEqual %bool %156 %int_2 |
| OpSelectionMerge %158 None |
| OpBranchConditional %157 %159 %158 |
| %159 = OpLabel |
| %161 = OpAccessChain %_ptr_Function_int %s %uint_1 |
| OpStore %161 %int_7 |
| OpBranch %158 |
| %158 = OpLabel |
| %163 = OpAccessChain %_ptr_Function_int %s %uint_0 |
| %164 = OpLoad %int %163 |
| %166 = OpAccessChain %_ptr_Function_int %s %uint_1 |
| %167 = OpLoad %int %166 |
| %169 = OpAccessChain %_ptr_Function_int %s %uint_2 |
| %170 = OpLoad %int %169 |
| %171 = OpIAdd %int %164 %167 |
| %172 = OpIAdd %int %171 %170 |
| OpReturnValue %172 |
| OpFunctionEnd |