blob: 2f1327c3e90fedec979d00295304464feb9372bb [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 320
OpName %main "main"
OpName %merge_i1_i1_i1_ "merge(i1;i1;i1;"
OpName %from "from"
OpName %mid "mid"
OpName %to "to"
OpName %mergeSort_ "mergeSort("
OpName %k "k"
OpName %i "i"
OpName %j "j"
OpName %data "data"
OpName %temp "temp"
OpName %i_0 "i"
OpName %low "low"
OpName %high "high"
OpName %m "m"
OpName %i_1 "i"
OpName %from_0 "from"
OpName %mid_0 "mid"
OpName %to_0 "to"
OpName %param "param"
OpName %param_0 "param"
OpName %param_1 "param"
OpName %i_2 "i"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %_ ""
OpName %j_0 "j"
OpName %gl_FragCoord "gl_FragCoord"
OpName %grey "grey"
OpName %_GLF_color "_GLF_color"
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%32 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%35 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_int_uint_10 = OpTypeArray %int %uint_10
%_ptr_Private__arr_int_uint_10 = OpTypePointer Private %_arr_int_uint_10
%data = OpVariable %_ptr_Private__arr_int_uint_10 Private
%_ptr_Private_int = OpTypePointer Private %int
%temp = OpVariable %_ptr_Private__arr_int_uint_10 Private
%int_10 = OpConstant %int 10
%int_0 = OpConstant %int 0
%int_9 = OpConstant %int 9
%int_2 = OpConstant %int 2
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_4 = OpConstant %int 4
%int_3 = OpConstant %int 3
%int_n1 = OpConstant %int -1
%int_n2 = OpConstant %int -2
%int_n3 = OpConstant %int -3
%int_n4 = OpConstant %int -4
%int_n5 = OpConstant %int -5
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%uint_1 = OpConstant %uint 1
%_ptr_Input_float = OpTypePointer Input %float
%int_30 = OpConstant %int 30
%_ptr_Function_float = OpTypePointer Function %float
%float_0_5 = OpConstant %float 0.5
%float_10 = OpConstant %float 10
%int_60 = OpConstant %int 60
%int_90 = OpConstant %int 90
%int_120 = OpConstant %int 120
%int_150 = OpConstant %int 150
%int_180 = OpConstant %int 180
%int_5 = OpConstant %int 5
%int_210 = OpConstant %int 210
%int_6 = OpConstant %int 6
%int_240 = OpConstant %int 240
%int_7 = OpConstant %int 7
%int_270 = OpConstant %int 270
%int_8 = OpConstant %int 8
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%int_0_0 = OpConstant %int 0
%true = OpConstantTrue %bool
%false = OpConstantFalse %bool
%float_0 = OpConstant %float 0
%main = OpFunction %void None %32
%86 = OpLabel
%i_2 = OpVariable %_ptr_Function_int Function
%j_0 = OpVariable %_ptr_Function_int Function
%grey = OpVariable %_ptr_Function_float Function
%87 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
%88 = OpLoad %float %87
%89 = OpConvertFToS %int %88
OpStore %i_2 %89
OpBranch %90
%90 = OpLabel
OpLoopMerge %91 %92 None
OpBranch %93
%93 = OpLabel
%94 = OpLoad %int %i_2
OpSelectionMerge %95 None
OpSwitch %94 %95 0 %96 1 %97 2 %98 3 %99 4 %100 5 %101 6 %102 7 %103 8 %104 9 %105
%96 = OpLabel
%106 = OpLoad %int %i_2
%107 = OpAccessChain %_ptr_Private_int %data %106
OpStore %107 %int_4
OpBranch %95
%97 = OpLabel
%108 = OpLoad %int %i_2
%109 = OpAccessChain %_ptr_Private_int %data %108
OpStore %109 %int_3
OpBranch %95
%98 = OpLabel
%110 = OpLoad %int %i_2
%111 = OpAccessChain %_ptr_Private_int %data %110
OpStore %111 %int_2
OpBranch %95
%99 = OpLabel
%112 = OpLoad %int %i_2
%113 = OpAccessChain %_ptr_Private_int %data %112
OpStore %113 %int_1
OpBranch %95
%100 = OpLabel
%114 = OpLoad %int %i_2
%115 = OpAccessChain %_ptr_Private_int %data %114
OpStore %115 %int_0
OpBranch %95
%101 = OpLabel
%116 = OpLoad %int %i_2
%117 = OpAccessChain %_ptr_Private_int %data %116
OpStore %117 %int_n1
OpBranch %95
%102 = OpLabel
%118 = OpLoad %int %i_2
%119 = OpAccessChain %_ptr_Private_int %data %118
OpStore %119 %int_n2
OpBranch %95
%103 = OpLabel
%120 = OpLoad %int %i_2
%121 = OpAccessChain %_ptr_Private_int %data %120
OpStore %121 %int_n3
OpBranch %95
%104 = OpLabel
%122 = OpLoad %int %i_2
%123 = OpAccessChain %_ptr_Private_int %data %122
OpStore %123 %int_n4
OpBranch %95
%105 = OpLabel
%124 = OpLoad %int %i_2
%125 = OpAccessChain %_ptr_Private_int %data %124
OpStore %125 %int_n5
OpBranch %95
%95 = OpLabel
%126 = OpLoad %int %i_2
%127 = OpIAdd %int %126 %int_1
OpStore %i_2 %127
OpBranch %92
%92 = OpLabel
%128 = OpLoad %int %i_2
%129 = OpSLessThan %bool %128 %int_10
OpBranchConditional %129 %90 %91
%91 = OpLabel
OpStore %j_0 %int_0
OpBranch %130
%130 = OpLabel
OpLoopMerge %131 %132 None
OpBranch %133
%133 = OpLabel
%134 = OpLoad %int %j_0
%135 = OpSLessThan %bool %134 %int_10
OpBranchConditional %135 %136 %131
%136 = OpLabel
%137 = OpLoad %int %j_0
%138 = OpLoad %int %j_0
%139 = OpAccessChain %_ptr_Private_int %data %138
%140 = OpLoad %int %139
%141 = OpAccessChain %_ptr_Private_int %temp %137
OpStore %141 %140
OpBranch %132
%132 = OpLabel
%142 = OpLoad %int %j_0
%143 = OpIAdd %int %142 %int_1
OpStore %j_0 %143
OpBranch %130
%131 = OpLabel
%144 = OpFunctionCall %void %mergeSort_
%145 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%146 = OpLoad %float %145
%147 = OpConvertFToS %int %146
%148 = OpSLessThan %bool %147 %int_30
OpSelectionMerge %149 None
OpBranchConditional %148 %150 %151
%150 = OpLabel
%152 = OpAccessChain %_ptr_Private_int %data %int_0
%153 = OpLoad %int %152
%154 = OpConvertSToF %float %153
%155 = OpFDiv %float %154 %float_10
%156 = OpFAdd %float %float_0_5 %155
OpStore %grey %156
OpBranch %149
%151 = OpLabel
%157 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%158 = OpLoad %float %157
%159 = OpConvertFToS %int %158
%160 = OpSLessThan %bool %159 %int_60
OpSelectionMerge %161 None
OpBranchConditional %160 %162 %163
%162 = OpLabel
%164 = OpAccessChain %_ptr_Private_int %data %int_1
%165 = OpLoad %int %164
%166 = OpConvertSToF %float %165
%167 = OpFDiv %float %166 %float_10
%168 = OpFAdd %float %float_0_5 %167
OpStore %grey %168
OpBranch %161
%163 = OpLabel
%169 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%170 = OpLoad %float %169
%171 = OpConvertFToS %int %170
%172 = OpSLessThan %bool %171 %int_90
OpSelectionMerge %173 None
OpBranchConditional %172 %174 %175
%174 = OpLabel
%176 = OpAccessChain %_ptr_Private_int %data %int_2
%177 = OpLoad %int %176
%178 = OpConvertSToF %float %177
%179 = OpFDiv %float %178 %float_10
%180 = OpFAdd %float %float_0_5 %179
OpStore %grey %180
OpBranch %173
%175 = OpLabel
%181 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%182 = OpLoad %float %181
%183 = OpConvertFToS %int %182
%184 = OpSLessThan %bool %183 %int_120
OpSelectionMerge %185 None
OpBranchConditional %184 %186 %187
%186 = OpLabel
%188 = OpAccessChain %_ptr_Private_int %data %int_3
%189 = OpLoad %int %188
%190 = OpConvertSToF %float %189
%191 = OpFDiv %float %190 %float_10
%192 = OpFAdd %float %float_0_5 %191
OpStore %grey %192
OpBranch %185
%187 = OpLabel
%193 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%194 = OpLoad %float %193
%195 = OpConvertFToS %int %194
%196 = OpSLessThan %bool %195 %int_150
OpSelectionMerge %197 None
OpBranchConditional %196 %198 %199
%198 = OpLabel
OpKill
%199 = OpLabel
%200 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%201 = OpLoad %float %200
%202 = OpConvertFToS %int %201
%203 = OpSLessThan %bool %202 %int_180
OpSelectionMerge %204 None
OpBranchConditional %203 %205 %206
%205 = OpLabel
%207 = OpAccessChain %_ptr_Private_int %data %int_5
%208 = OpLoad %int %207
%209 = OpConvertSToF %float %208
%210 = OpFDiv %float %209 %float_10
%211 = OpFAdd %float %float_0_5 %210
OpStore %grey %211
OpBranch %204
%206 = OpLabel
%212 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%213 = OpLoad %float %212
%214 = OpConvertFToS %int %213
%215 = OpSLessThan %bool %214 %int_210
OpSelectionMerge %216 None
OpBranchConditional %215 %217 %218
%217 = OpLabel
%219 = OpAccessChain %_ptr_Private_int %data %int_6
%220 = OpLoad %int %219
%221 = OpConvertSToF %float %220
%222 = OpFDiv %float %221 %float_10
%223 = OpFAdd %float %float_0_5 %222
OpStore %grey %223
OpBranch %216
%218 = OpLabel
%224 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%225 = OpLoad %float %224
%226 = OpConvertFToS %int %225
%227 = OpSLessThan %bool %226 %int_240
OpSelectionMerge %228 None
OpBranchConditional %227 %229 %230
%229 = OpLabel
%231 = OpAccessChain %_ptr_Private_int %data %int_7
%232 = OpLoad %int %231
%233 = OpConvertSToF %float %232
%234 = OpFDiv %float %233 %float_10
%235 = OpFAdd %float %float_0_5 %234
OpStore %grey %235
OpBranch %228
%230 = OpLabel
%236 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%237 = OpLoad %float %236
%238 = OpConvertFToS %int %237
%239 = OpSLessThan %bool %238 %int_270
OpSelectionMerge %240 None
OpBranchConditional %239 %241 %242
%241 = OpLabel
%243 = OpAccessChain %_ptr_Private_int %data %int_8
%244 = OpLoad %int %243
%245 = OpConvertSToF %float %244
%246 = OpFDiv %float %245 %float_10
%247 = OpFAdd %float %float_0_5 %246
OpStore %grey %247
OpBranch %240
%242 = OpLabel
OpKill
%240 = OpLabel
OpBranch %228
%228 = OpLabel
OpBranch %216
%216 = OpLabel
OpBranch %204
%204 = OpLabel
OpBranch %197
%197 = OpLabel
OpBranch %185
%185 = OpLabel
OpBranch %173
%173 = OpLabel
OpBranch %161
%161 = OpLabel
OpBranch %149
%149 = OpLabel
%248 = OpLoad %float %grey
%249 = OpCompositeConstruct %v3float %248 %248 %248
%250 = OpCompositeExtract %float %249 0
%251 = OpCompositeExtract %float %249 1
%252 = OpCompositeExtract %float %249 2
%253 = OpCompositeConstruct %v4float %250 %251 %252 %float_1
OpStore %_GLF_color %253
OpReturn
OpFunctionEnd
%merge_i1_i1_i1_ = OpFunction %void None %35
%from = OpFunctionParameter %_ptr_Function_int
%mid = OpFunctionParameter %_ptr_Function_int
%to = OpFunctionParameter %_ptr_Function_int
%254 = OpLabel
%k = OpVariable %_ptr_Function_int Function
%i = OpVariable %_ptr_Function_int Function
%j = OpVariable %_ptr_Function_int Function
%i_0 = OpVariable %_ptr_Function_int Function
%255 = OpLoad %int %from
OpStore %k %255
%256 = OpLoad %int %from
OpStore %i %256
%257 = OpLoad %int %mid
%258 = OpIAdd %int %257 %int_1
OpStore %j %258
OpBranch %259
%259 = OpLabel
%260 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%261 = OpLoad %float %260
%262 = OpFOrdGreaterThanEqual %bool %float_1 %261
OpLoopMerge %263 %264 None
OpBranchConditional %262 %265 %264
%265 = OpLabel
%266 = OpLoad %int %i
%267 = OpLoad %int %mid
%268 = OpSLessThanEqual %bool %266 %267
%269 = OpLoad %int %j
%270 = OpLoad %int %to
%271 = OpSLessThanEqual %bool %269 %270
%272 = OpLogicalAnd %bool %268 %271
OpBranchConditional %272 %273 %263
%273 = OpLabel
%274 = OpLoad %int %i
%275 = OpAccessChain %_ptr_Private_int %data %274
%276 = OpLoad %int %275
%277 = OpLoad %int %j
%278 = OpAccessChain %_ptr_Private_int %data %277
%279 = OpLoad %int %278
%280 = OpSLessThan %bool %276 %279
OpBranch %281
%281 = OpLabel
OpSelectionMerge %282 None
OpBranchConditional %280 %283 %284
%283 = OpLabel
%285 = OpLoad %int %k
OpBranch %282
%284 = OpLabel
%286 = OpCopyObject %int %int_0_0
OpBranch %282
%282 = OpLabel
%287 = OpPhi %int %285 %283 %286 %284
%288 = OpIAdd %int %287 %int_1
OpBranch %289
%289 = OpLabel
OpSelectionMerge %290 None
OpBranchConditional %280 %291 %290
%291 = OpLabel
OpStore %k %288
%292 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%293 = OpLoad %float %292
%294 = OpFUnordGreaterThan %bool %float_1 %293
OpBranchConditional %294 %290 %264
%290 = OpLabel
OpBranch %295
%295 = OpLabel
%296 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
%297 = OpLoad %float %296
%298 = OpFOrdGreaterThanEqual %bool %297 %float_0
OpBranchConditional %298 %299 %264
%299 = OpLabel
%300 = OpCopyObject %int %int_0_0
OpBranch %301
%301 = OpLabel
OpSelectionMerge %302 None
OpBranchConditional %280 %303 %304
%303 = OpLabel
%305 = OpLoad %int %i
OpBranch %302
%304 = OpLabel
%306 = OpCopyObject %int %int_0_0
OpBranch %302
%302 = OpLabel
%307 = OpPhi %int %305 %303 %306 %304
OpBranch %308
%308 = OpLabel
%309 = OpSelect %int %280 %307 %300
%310 = OpIAdd %int %309 %int_1
OpSelectionMerge %311 None
OpBranchConditional %280 %312 %311
%312 = OpLabel
OpStore %i %310
OpBranch %311
%311 = OpLabel
%313 = OpAccessChain %_ptr_Private_int %data %309
OpBranch %314
%314 = OpLabel
%315 = OpCopyObject %int %int_0_0
OpBranch %316
%316 = OpLabel
OpSelectionMerge %317 None
OpBranchConditional %280 %318 %319
%318 = OpLabel
%320 = OpLoad %int %313
%321 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
%322 = OpLoad %float %321
%323 = OpFUnordGreaterThan %bool %float_0 %322
OpBranchConditional %323 %264 %317
%319 = OpLabel
%324 = OpCopyObject %int %int_0_0
%325 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
%326 = OpLoad %float %325
%327 = OpFUnordGreaterThanEqual %bool %326 %float_0
OpBranchConditional %327 %317 %264
%317 = OpLabel
%328 = OpPhi %int %320 %318 %324 %319
OpBranch %329
%329 = OpLabel
%330 = OpSelect %int %280 %328 %315
%331 = OpAccessChain %_ptr_Private_int %temp %287
OpSelectionMerge %332 None
OpBranchConditional %280 %333 %332
%333 = OpLabel
OpStore %331 %330
OpBranch %332
%332 = OpLabel
OpBranch %334
%334 = OpLabel
OpSelectionMerge %335 None
OpBranchConditional %280 %336 %337
%337 = OpLabel
%338 = OpLoad %int %k
OpBranch %335
%336 = OpLabel
%339 = OpCopyObject %int %int_0_0
OpBranch %335
%335 = OpLabel
%340 = OpPhi %int %338 %337 %339 %336
%341 = OpIAdd %int %340 %int_1
OpSelectionMerge %342 None
OpBranchConditional %280 %342 %343
%343 = OpLabel
OpStore %k %341
OpBranch %342
%342 = OpLabel
%344 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%345 = OpLoad %float %344
%346 = OpFUnordGreaterThan %bool %float_1 %345
OpBranchConditional %346 %347 %264
%347 = OpLabel
OpSelectionMerge %348 None
OpBranchConditional %280 %349 %350
%350 = OpLabel
%351 = OpLoad %int %j
OpBranch %348
%349 = OpLabel
%352 = OpCopyObject %int %int_0_0
OpBranch %348
%348 = OpLabel
%353 = OpPhi %int %351 %350 %352 %349
OpBranch %354
%354 = OpLabel
%355 = OpCopyObject %int %int_0_0
OpBranch %356
%356 = OpLabel
%357 = OpSelect %int %280 %355 %353
%358 = OpIAdd %int %357 %int_1
OpSelectionMerge %359 None
OpBranchConditional %280 %359 %360
%360 = OpLabel
OpStore %j %358
OpBranch %359
%359 = OpLabel
%361 = OpAccessChain %_ptr_Private_int %data %357
OpSelectionMerge %362 None
OpBranchConditional %280 %363 %364
%364 = OpLabel
%365 = OpLoad %int %361
OpBranch %362
%363 = OpLabel
%366 = OpCopyObject %int %int_0_0
OpBranch %362
%362 = OpLabel
%367 = OpPhi %int %365 %364 %366 %363
%368 = OpAccessChain %_ptr_Private_int %temp %340
OpSelectionMerge %369 None
OpBranchConditional %280 %369 %370
%370 = OpLabel
OpStore %368 %367
OpBranch %369
%369 = OpLabel
OpBranch %371
%371 = OpLabel
OpBranch %264
%264 = OpLabel
OpBranch %259
%263 = OpLabel
OpBranch %372
%372 = OpLabel
OpLoopMerge %373 %374 None
OpBranch %375
%375 = OpLabel
%376 = OpLoad %int %i
%377 = OpSLessThan %bool %376 %int_10
%378 = OpLoad %int %i
%379 = OpLoad %int %mid
%380 = OpSLessThanEqual %bool %378 %379
%381 = OpLogicalAnd %bool %377 %380
OpBranchConditional %381 %382 %373
%382 = OpLabel
%383 = OpLoad %int %k
%384 = OpIAdd %int %383 %int_1
OpStore %k %384
%385 = OpLoad %int %i
%386 = OpIAdd %int %385 %int_1
OpStore %i %386
%387 = OpAccessChain %_ptr_Private_int %data %385
%388 = OpLoad %int %387
%389 = OpAccessChain %_ptr_Private_int %temp %383
OpStore %389 %388
OpBranch %374
%374 = OpLabel
OpBranch %372
%373 = OpLabel
%390 = OpLoad %int %from
OpStore %i_0 %390
OpBranch %391
%391 = OpLabel
OpLoopMerge %392 %393 None
OpBranch %394
%394 = OpLabel
%395 = OpLoad %int %i_0
%396 = OpLoad %int %to
%397 = OpSLessThanEqual %bool %395 %396
OpBranchConditional %397 %398 %392
%398 = OpLabel
%399 = OpLoad %int %i_0
%400 = OpLoad %int %i_0
%401 = OpAccessChain %_ptr_Private_int %temp %400
%402 = OpLoad %int %401
%403 = OpAccessChain %_ptr_Private_int %data %399
OpStore %403 %402
OpBranch %393
%393 = OpLabel
%404 = OpLoad %int %i_0
%405 = OpIAdd %int %404 %int_1
OpStore %i_0 %405
OpBranch %391
%392 = OpLabel
OpReturn
OpFunctionEnd
%mergeSort_ = OpFunction %void None %32
%406 = OpLabel
%low = OpVariable %_ptr_Function_int Function
%high = OpVariable %_ptr_Function_int Function
%m = OpVariable %_ptr_Function_int Function
%i_1 = OpVariable %_ptr_Function_int Function
%from_0 = OpVariable %_ptr_Function_int Function
%mid_0 = OpVariable %_ptr_Function_int Function
%to_0 = OpVariable %_ptr_Function_int Function
%param = OpVariable %_ptr_Function_int Function
%param_0 = OpVariable %_ptr_Function_int Function
%param_1 = OpVariable %_ptr_Function_int Function
OpStore %low %int_0
OpStore %high %int_9
OpStore %m %int_1
OpBranch %407
%407 = OpLabel
OpLoopMerge %408 %409 None
OpBranch %410
%410 = OpLabel
%411 = OpLoad %int %m
%412 = OpLoad %int %high
%413 = OpSLessThanEqual %bool %411 %412
OpBranchConditional %413 %414 %408
%414 = OpLabel
%415 = OpLoad %int %low
OpStore %i_1 %415
OpBranch %416
%416 = OpLabel
OpLoopMerge %417 %418 None
OpBranch %419
%419 = OpLabel
%420 = OpLoad %int %i_1
%421 = OpLoad %int %high
%422 = OpSLessThan %bool %420 %421
OpBranchConditional %422 %423 %417
%423 = OpLabel
%424 = OpLoad %int %i_1
OpStore %from_0 %424
%425 = OpLoad %int %i_1
%426 = OpLoad %int %m
%427 = OpIAdd %int %425 %426
%428 = OpISub %int %427 %int_1
OpStore %mid_0 %428
%429 = OpLoad %int %i_1
%430 = OpLoad %int %m
%431 = OpIMul %int %int_2 %430
%432 = OpIAdd %int %429 %431
%433 = OpISub %int %432 %int_1
%434 = OpLoad %int %high
%435 = OpExtInst %int %1 SMin %433 %434
OpStore %to_0 %435
%436 = OpLoad %int %from_0
OpStore %param %436
%437 = OpLoad %int %mid_0
OpStore %param_0 %437
%438 = OpLoad %int %to_0
OpStore %param_1 %438
%439 = OpFunctionCall %void %merge_i1_i1_i1_ %param %param_0 %param_1
OpBranch %418
%418 = OpLabel
%440 = OpLoad %int %m
%441 = OpIMul %int %int_2 %440
%442 = OpLoad %int %i_1
%443 = OpIAdd %int %442 %441
OpStore %i_1 %443
OpBranch %416
%417 = OpLabel
OpBranch %409
%409 = OpLabel
%444 = OpLoad %int %m
%445 = OpIMul %int %int_2 %444
OpStore %m %445
OpBranch %407
%408 = OpLabel
OpReturn
OpFunctionEnd