| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 128 |
| ; 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 "zero" |
| OpName %x_8 "x_8" |
| OpName %x_GLF_color "x_GLF_color" |
| OpName %main_1 "main_1" |
| OpName %x_52 "x_52" |
| OpName %x_17 "x_17" |
| OpName %x_18 "x_18" |
| OpName %x_16 "x_16" |
| OpName %Array "Array" |
| OpMemberName %Array 0 "values" |
| OpName %param "param" |
| OpName %x_20 "x_20" |
| OpName %x_21_phi "x_21_phi" |
| OpName %x_23_1 "x_23_1" |
| OpName %x_20_phi "x_20_phi" |
| OpName %x_67_phi "x_67_phi" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "x_GLF_color_1" |
| OpName %main_inner "main_inner" |
| OpName %main "main" |
| OpName %func_struct_Array_i1_2_1_ "func_struct_Array_i1_2_1_" |
| OpName %a "a" |
| OpName %x_74 "x_74" |
| OpName %x_13 "x_13" |
| OpName %x_14 "x_14" |
| OpName %x_76_phi "x_76_phi" |
| OpName %x_15_phi "x_15_phi" |
| OpName %x_81 "x_81" |
| OpName %x_81_phi "x_81_phi" |
| OpName %x_14_phi "x_14_phi" |
| OpName %x_91_phi "x_91_phi" |
| OpDecorate %x_GLF_color_1_1 Location 0 |
| OpDecorate %buf0 Block |
| OpMemberDecorate %buf0 0 Offset 0 |
| OpDecorate %x_8 NonWritable |
| OpDecorate %x_8 DescriptorSet 0 |
| OpDecorate %x_8 Binding 0 |
| OpDecorate %_arr_int_uint_2 ArrayStride 4 |
| OpMemberDecorate %Array 0 Offset 0 |
| 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_8 = 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 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %20 = OpConstantNull %bool |
| %_ptr_Function_int = OpTypePointer Function %int |
| %23 = OpConstantNull %int |
| %uint = OpTypeInt 32 0 |
| %uint_2 = OpConstant %uint 2 |
| %_arr_int_uint_2 = OpTypeArray %int %uint_2 |
| %_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2 |
| %30 = OpConstantNull %_arr_int_uint_2 |
| %Array = OpTypeStruct %_arr_int_uint_2 |
| %_ptr_Function_Array = OpTypePointer Function %Array |
| %34 = OpConstantNull %Array |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| %int_0 = OpConstant %int 0 |
| %true = OpConstantTrue %bool |
| %int_42 = OpConstant %int 42 |
| %float_1 = OpConstant %float 1 |
| %float_0 = OpConstant %float 0 |
| %77 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 |
| %78 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| %main_out = OpTypeStruct %v4float |
| %79 = OpTypeFunction %main_out |
| %90 = OpTypeFunction %int %_ptr_Function_Array |
| %main_1 = OpFunction %void None %12 |
| %15 = OpLabel |
| %x_52 = OpVariable %_ptr_Function_bool Function %20 |
| %x_17 = OpVariable %_ptr_Function_int Function %23 |
| %x_18 = OpVariable %_ptr_Function_int Function %23 |
| %x_16 = OpVariable %_ptr_Function__arr_int_uint_2 Function %30 |
| %param = OpVariable %_ptr_Function_Array Function %34 |
| %x_20 = OpVariable %_ptr_Function_int Function %23 |
| %x_21_phi = OpVariable %_ptr_Function_int Function %23 |
| %x_23_1 = OpVariable %_ptr_Function__arr_int_uint_2 Function %30 |
| %x_20_phi = OpVariable %_ptr_Function_int Function %23 |
| %x_67_phi = OpVariable %_ptr_Function_bool Function %20 |
| OpStore %x_52 %false |
| %39 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 |
| %40 = OpLoad %int %39 |
| %41 = OpLoad %_arr_int_uint_2 %x_16 |
| OpStore %x_23_1 %41 |
| %43 = OpAccessChain %_ptr_Function_int %x_23_1 %uint_0 |
| OpStore %43 %40 |
| %44 = OpLoad %_arr_int_uint_2 %x_23_1 |
| OpStore %x_16 %44 |
| %45 = OpLoad %_arr_int_uint_2 %x_16 |
| %46 = OpCompositeConstruct %Array %45 |
| OpStore %param %46 |
| OpStore %x_52 %false |
| OpBranch %47 |
| %47 = OpLabel |
| OpLoopMerge %48 %49 None |
| OpBranch %50 |
| %50 = OpLabel |
| OpBranch %53 |
| %53 = OpLabel |
| OpLoopMerge %54 %55 None |
| OpBranch %56 |
| %56 = OpLabel |
| %57 = OpAccessChain %_ptr_Function_int %param %uint_0 %40 |
| %58 = OpLoad %int %57 |
| %60 = OpIEqual %bool %58 %int_0 |
| OpSelectionMerge %61 None |
| OpBranchConditional %60 %62 %61 |
| %62 = OpLabel |
| OpStore %x_52 %true |
| OpStore %x_17 %int_42 |
| OpStore %x_20_phi %int_42 |
| OpStore %x_67_phi %true |
| OpBranch %54 |
| %61 = OpLabel |
| OpStore %x_20_phi %int_0 |
| OpStore %x_67_phi %false |
| OpBranch %54 |
| %55 = OpLabel |
| OpBranch %53 |
| %54 = OpLabel |
| %65 = OpLoad %int %x_20_phi |
| OpStore %x_20 %65 |
| %66 = OpLoad %bool %x_67_phi |
| %67 = OpLoad %int %x_20 |
| OpStore %x_21_phi %67 |
| OpSelectionMerge %68 None |
| OpBranchConditional %66 %69 %68 |
| %69 = OpLabel |
| OpBranch %48 |
| %68 = OpLabel |
| OpStore %x_52 %true |
| OpStore %x_17 %int_42 |
| OpStore %x_21_phi %int_42 |
| OpBranch %48 |
| %49 = OpLabel |
| OpBranch %47 |
| %48 = OpLabel |
| %70 = OpLoad %int %x_21_phi |
| OpStore %x_18 %70 |
| %71 = OpIEqual %bool %70 %int_42 |
| OpSelectionMerge %72 None |
| OpBranchConditional %71 %73 %74 |
| %73 = OpLabel |
| OpStore %x_GLF_color %77 |
| OpBranch %72 |
| %74 = OpLabel |
| OpStore %x_GLF_color %78 |
| OpBranch %72 |
| %72 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %79 |
| %82 = OpLabel |
| %83 = OpFunctionCall %void %main_1 |
| %84 = OpLoad %v4float %x_GLF_color |
| %85 = OpCompositeConstruct %main_out %84 |
| OpReturnValue %85 |
| OpFunctionEnd |
| %main = OpFunction %void None %12 |
| %87 = OpLabel |
| %88 = OpFunctionCall %main_out %main_inner |
| %89 = OpCompositeExtract %v4float %88 0 |
| OpStore %x_GLF_color_1_1 %89 |
| OpReturn |
| OpFunctionEnd |
| %func_struct_Array_i1_2_1_ = OpFunction %int None %90 |
| %a = OpFunctionParameter %_ptr_Function_Array |
| %93 = OpLabel |
| %x_74 = OpVariable %_ptr_Function_bool Function %20 |
| %x_13 = OpVariable %_ptr_Function_int Function %23 |
| %x_14 = OpVariable %_ptr_Function_int Function %23 |
| %x_76_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_15_phi = OpVariable %_ptr_Function_int Function %23 |
| %x_81 = OpVariable %_ptr_Function_bool Function %20 |
| %x_81_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_14_phi = OpVariable %_ptr_Function_int Function %23 |
| %x_91_phi = OpVariable %_ptr_Function_bool Function %20 |
| OpStore %x_74 %false |
| OpStore %x_76_phi %false |
| OpBranch %99 |
| %99 = OpLabel |
| OpLoopMerge %100 %101 None |
| OpBranch %102 |
| %102 = OpLabel |
| %107 = OpLoad %bool %x_76_phi |
| OpStore %x_81_phi %107 |
| OpBranch %108 |
| %108 = OpLabel |
| OpLoopMerge %109 %110 None |
| OpBranch %111 |
| %111 = OpLabel |
| %112 = OpLoad %bool %x_81_phi |
| OpStore %x_81 %112 |
| %113 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 |
| %114 = OpLoad %int %113 |
| %116 = OpAccessChain %_ptr_Function_int %a %uint_0 %114 |
| %117 = OpLoad %int %116 |
| %118 = OpIEqual %bool %117 %int_0 |
| OpSelectionMerge %119 None |
| OpBranchConditional %118 %120 %119 |
| %120 = OpLabel |
| OpStore %x_74 %true |
| OpStore %x_13 %int_42 |
| OpStore %x_14_phi %int_42 |
| OpStore %x_91_phi %true |
| OpBranch %109 |
| %119 = OpLabel |
| OpStore %x_14_phi %int_0 |
| %121 = OpLoad %bool %x_81 |
| OpStore %x_91_phi %121 |
| OpBranch %109 |
| %110 = OpLabel |
| OpStore %x_81_phi %false |
| OpBranch %108 |
| %109 = OpLabel |
| %122 = OpLoad %int %x_14_phi |
| OpStore %x_14 %122 |
| %123 = OpLoad %bool %x_91_phi |
| %124 = OpLoad %int %x_14 |
| OpStore %x_15_phi %124 |
| OpSelectionMerge %125 None |
| OpBranchConditional %123 %126 %125 |
| %126 = OpLabel |
| OpBranch %100 |
| %125 = OpLabel |
| OpStore %x_74 %true |
| OpStore %x_13 %int_42 |
| OpStore %x_15_phi %int_42 |
| OpBranch %100 |
| %101 = OpLabel |
| OpStore %x_76_phi %false |
| OpBranch %99 |
| %100 = OpLabel |
| %127 = OpLoad %int %x_15_phi |
| OpReturnValue %127 |
| OpFunctionEnd |