void diamond_square() {
  int i, j, left, right, top, bottom;
  float max_perturbation = 30.0;
  float mag = 0.8;
  int width = 32;
  while (width > 0) {
    for (i = 0; i < 32 / width; i++) {
      for (j = 0; j < 32 / width; j++) {
        left = i * width;
        right = (i + 1) * width;
        top = j * width;
        bottom = (j + 1) * width;
        diamond_step(left, right, bottom, top, max_perturbation);
      }
    }
    for (i = 0; i < (32 / width); i++) {
      for (j = 0; j < (32 / width) + 1; j++) {
        left = (i)*width;
        right = (i + 1) * width;
        top = (j - 0.5) * width;
        bottom = (j + 0.5) * width;
        square_step(left, right, bottom, top, max_perturbation);
      }
    }
    for (i = 0; i < (32 / width) + 1; i++) {
      for (j = 0; j < (32 / width); j++) {
        left = (i - 0.5) * width;
        right = (i + 0.5) * width;
        top = (j)*width;
        bottom = (j + 1) * width;
        square_step(left, right, bottom, top, max_perturbation);
      }
    }
    max_perturbation = max_perturbation * mag;
    width /= 2;
  }
}


x86 assembly (clang, -O0):
<diamond_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  0xed4(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movl   $0x20,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    13e4 <diamond_square+0x2c4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x20,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    %ecx,%eax
jge    1204 <diamond_square+0xe4>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x20,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jge    11f1 <diamond_square+0xd1>
mov    -0x4(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <diamond_step@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <diamond_square+0x5d>
jmp    11f6 <diamond_square+0xd6>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <diamond_square+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    $0x20,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
cmp    %ecx,%eax
jge    12e3 <diamond_square+0x1c3>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    $0x20,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12d0 <diamond_square+0x1b0>
mov    -0x4(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xd97(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xd76(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <square_step@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    122e <diamond_square+0x10e>
jmp    12d5 <diamond_square+0x1b5>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    120b <diamond_square+0xeb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    $0x20,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13c2 <diamond_square+0x2a2>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    $0x20,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
cmp    %ecx,%eax
jge    13af <diamond_square+0x28f>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xccf(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xcae(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <square_step@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1310 <diamond_square+0x1f0>
jmp    13b4 <diamond_square+0x294>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12ea <diamond_square+0x1ca>
movss  -0x1c(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
jmp    1149 <diamond_square+0x29>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diamond_square>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movss  0xeca(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    $0x20,%r12d
jmp    117c <diamond_square+0x5c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  0xc(%rsp),%xmm0
mulss  0xea6(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r12d,%eax
shr    $0x1f,%eax
add    %r12d,%eax
sar    %eax
cmp    $0x1,%r12d
mov    %eax,%r12d
jle    1355 <diamond_square+0x235>
mov    $0x20,%eax
xor    %edx,%edx
idiv   %r12d
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movsd  %xmm0,0x20(%rsp)
test   %eax,%eax
mov    %rax,0x10(%rsp)
jle    12ae <diamond_square+0x18e>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
xor    %r13d,%r13d
movsd  %xmm0,0x18(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13d,%r15d
imul   %r12d,%r15d
add    $0x1,%r13d
mov    %r13d,%r14d
imul   %r12d,%r14d
xor    %ecx,%ecx
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    (%r12,%rcx,1),%ebx
mov    %r15d,%edi
mov    %r14d,%esi
mov    %ebx,%edx
mov    $0x1,%al
call   1030 <diamond_step@plt>
movsd  0x18(%rsp),%xmm0
mov    %ebx,%ecx
add    $0xffffffff,%ebp
jne    11e0 <diamond_square+0xc0>
mov    0x10(%rsp),%rax
cmp    %eax,%r13d
jne    11c0 <diamond_square+0xa0>
test   %eax,%eax
movsd  0xdf4(%rip),%xmm2
movsd  0xdf4(%rip),%xmm3
movsd  0x20(%rsp),%xmm4
jle    12ae <diamond_square+0x18e>
lea    0x1(%rax),%r15d
xor    %r13d,%r13d
nop
mov    %r13d,%ebp
imul   %r12d,%ebp
add    $0x1,%r13d
mov    %r13d,%ebx
imul   %r12d,%ebx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm5,%xmm5
cvtsi2sd %r14d,%xmm5
movapd %xmm5,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm4,%xmm1
cvttsd2si %xmm1,%ecx
addsd  %xmm3,%xmm5
mulsd  %xmm4,%xmm5
cvttsd2si %xmm5,%edx
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%al
call   1040 <square_step@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm4
movsd  0xd7d(%rip),%xmm3
movsd  0xd6d(%rip),%xmm2
add    $0x1,%r14d
cmp    %r14d,%r15d
jne    1250 <diamond_square+0x130>
mov    0x10(%rsp),%rax
cmp    %eax,%r13d
jne    1230 <diamond_square+0x110>
test   %eax,%eax
js     1150 <diamond_square+0x30>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
xor    %r13d,%r13d
movsd  %xmm0,0x18(%rsp)
jmp    12e5 <diamond_square+0x1c5>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r13),%ecx
mov    0x10(%rsp),%rax
cmp    %eax,%r13d
mov    %ecx,%r13d
je     1150 <diamond_square+0x30>
test   %eax,%eax
je     12d0 <diamond_square+0x1b0>
xorps  %xmm3,%xmm3
cvtsi2sd %r13d,%xmm3
movapd %xmm3,%xmm1
addsd  0xd0b(%rip),%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%r15d
addsd  0xcfc(%rip),%xmm3
mulsd  %xmm2,%xmm3
cvttsd2si %xmm3,%r14d
xor    %ecx,%ecx
mov    0x10(%rsp),%rax
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    (%r12,%rcx,1),%ebx
mov    %r15d,%edi
mov    %r14d,%esi
mov    %ebx,%edx
mov    $0x1,%al
call   1040 <square_step@plt>
movsd  0x18(%rsp),%xmm0
mov    %ebx,%ecx
add    $0xffffffff,%ebp
jne    1330 <diamond_square+0x210>
jmp    12d0 <diamond_square+0x1b0>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @diamond_square() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca i32
store float 3.000000e+01, float* %7
store float 0x3FE99999A0000000, float* %8
store i32 32, i32* %9
br label %10
10: ; preds = %152, %0
%11 = load i32, i32* %9
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %158
13: ; preds = %10
store i32 0, i32* %1
br label %14
14: ; preds = %51, %13
%15 = load i32, i32* %1
%16 = load i32, i32* %9
%17 = sdiv i32 32, %16
%18 = icmp slt i32 %15, %17
br i1 %18, label %19, label %54
19: ; preds = %14
store i32 0, i32* %2
br label %20
20: ; preds = %47, %19
%21 = load i32, i32* %2
%22 = load i32, i32* %9
%23 = sdiv i32 32, %22
%24 = icmp slt i32 %21, %23
br i1 %24, label %25, label %50
25: ; preds = %20
%26 = load i32, i32* %1
%27 = load i32, i32* %9
%28 = mul nsw i32 %26, %27
store i32 %28, i32* %3
%29 = load i32, i32* %1
%30 = add nsw i32 %29, 1
%31 = load i32, i32* %9
%32 = mul nsw i32 %30, %31
store i32 %32, i32* %4
%33 = load i32, i32* %2
%34 = load i32, i32* %9
%35 = mul nsw i32 %33, %34
store i32 %35, i32* %5
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
%38 = load i32, i32* %9
%39 = mul nsw i32 %37, %38
store i32 %39, i32* %6
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = load i32, i32* %6
%43 = load i32, i32* %5
%44 = load float, float* %7
%45 = fpext float %44 to double
%46 = call i32 (i32, i32, i32, i32, double, ...) bitcast (i32 (...)* @diamond_step to i32 (i32, i32, i32, i32, double, ...)*)(i32 %40, i32 %41, i32 %42, i32 %43, double %45)
br label %47
47: ; preds = %25
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %20
50: ; preds = %20
br label %51
51: ; preds = %50
%52 = load i32, i32* %1
%53 = add nsw i32 %52, 1
store i32 %53, i32* %1
br label %14
54: ; preds = %14
store i32 0, i32* %1
br label %55
55: ; preds = %100, %54
%56 = load i32, i32* %1
%57 = load i32, i32* %9
%58 = sdiv i32 32, %57
%59 = icmp slt i32 %56, %58
br i1 %59, label %60, label %103
60: ; preds = %55
store i32 0, i32* %2
br label %61
61: ; preds = %96, %60
%62 = load i32, i32* %2
%63 = load i32, i32* %9
%64 = sdiv i32 32, %63
%65 = add nsw i32 %64, 1
%66 = icmp slt i32 %62, %65
br i1 %66, label %67, label %99
67: ; preds = %61
%68 = load i32, i32* %1
%69 = load i32, i32* %9
%70 = mul nsw i32 %68, %69
store i32 %70, i32* %3
%71 = load i32, i32* %1
%72 = add nsw i32 %71, 1
%73 = load i32, i32* %9
%74 = mul nsw i32 %72, %73
store i32 %74, i32* %4
%75 = load i32, i32* %2
%76 = sitofp i32 %75 to double
%77 = fsub double %76, 5.000000e-01
%78 = load i32, i32* %9
%79 = sitofp i32 %78 to double
%80 = fmul double %77, %79
%81 = fptosi double %80 to i32
store i32 %81, i32* %5
%82 = load i32, i32* %2
%83 = sitofp i32 %82 to double
%84 = fadd double %83, 5.000000e-01
%85 = load i32, i32* %9
%86 = sitofp i32 %85 to double
%87 = fmul double %84, %86
%88 = fptosi double %87 to i32
store i32 %88, i32* %6
%89 = load i32, i32* %3
%90 = load i32, i32* %4
%91 = load i32, i32* %6
%92 = load i32, i32* %5
%93 = load float, float* %7
%94 = fpext float %93 to double
%95 = call i32 (i32, i32, i32, i32, double, ...) bitcast (i32 (...)* @square_step to i32 (i32, i32, i32, i32, double, ...)*)(i32 %89, i32 %90, i32 %91, i32 %92, double %94)
br label %96
96: ; preds = %67
%97 = load i32, i32* %2
%98 = add nsw i32 %97, 1
store i32 %98, i32* %2
br label %61
99: ; preds = %61
br label %100
100: ; preds = %99
%101 = load i32, i32* %1
%102 = add nsw i32 %101, 1
store i32 %102, i32* %1
br label %55
103: ; preds = %55
store i32 0, i32* %1
br label %104
104: ; preds = %149, %103
%105 = load i32, i32* %1
%106 = load i32, i32* %9
%107 = sdiv i32 32, %106
%108 = add nsw i32 %107, 1
%109 = icmp slt i32 %105, %108
br i1 %109, label %110, label %152
110: ; preds = %104
store i32 0, i32* %2
br label %111
111: ; preds = %145, %110
%112 = load i32, i32* %2
%113 = load i32, i32* %9
%114 = sdiv i32 32, %113
%115 = icmp slt i32 %112, %114
br i1 %115, label %116, label %148
116: ; preds = %111
%117 = load i32, i32* %1
%118 = sitofp i32 %117 to double
%119 = fsub double %118, 5.000000e-01
%120 = load i32, i32* %9
%121 = sitofp i32 %120 to double
%122 = fmul double %119, %121
%123 = fptosi double %122 to i32
store i32 %123, i32* %3
%124 = load i32, i32* %1
%125 = sitofp i32 %124 to double
%126 = fadd double %125, 5.000000e-01
%127 = load i32, i32* %9
%128 = sitofp i32 %127 to double
%129 = fmul double %126, %128
%130 = fptosi double %129 to i32
store i32 %130, i32* %4
%131 = load i32, i32* %2
%132 = load i32, i32* %9
%133 = mul nsw i32 %131, %132
store i32 %133, i32* %5
%134 = load i32, i32* %2
%135 = add nsw i32 %134, 1
%136 = load i32, i32* %9
%137 = mul nsw i32 %135, %136
store i32 %137, i32* %6
%138 = load i32, i32* %3
%139 = load i32, i32* %4
%140 = load i32, i32* %6
%141 = load i32, i32* %5
%142 = load float, float* %7
%143 = fpext float %142 to double
%144 = call i32 (i32, i32, i32, i32, double, ...) bitcast (i32 (...)* @square_step to i32 (i32, i32, i32, i32, double, ...)*)(i32 %138, i32 %139, i32 %140, i32 %141, double %143)
br label %145
145: ; preds = %116
%146 = load i32, i32* %2
%147 = add nsw i32 %146, 1
store i32 %147, i32* %2
br label %111
148: ; preds = %111
br label %149
149: ; preds = %148
%150 = load i32, i32* %1
%151 = add nsw i32 %150, 1
store i32 %151, i32* %1
br label %104
152: ; preds = %104
%153 = load float, float* %7
%154 = load float, float* %8
%155 = fmul float %153, %154
store float %155, float* %7
%156 = load i32, i32* %9
%157 = sdiv i32 %156, 2
store i32 %157, i32* %9
br label %10
158: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @diamond_square() {
br label %1
1: ; preds = %0, %71
%2 = phi i32 [ 32, %0 ], [ %73, %71 ]
%3 = phi float [ 3.000000e+01, %0 ], [ %72, %71 ]
%4 = sdiv i32 32, %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %26
6: ; preds = %1
%7 = fpext float %3 to double
br label %12
8: ; preds = %24
br i1 %5, label %9, label %26
9: ; preds = %8
%10 = sitofp i32 %2 to double
%11 = fpext float %3 to double
br label %32
12: ; preds = %24, %6
%13 = phi i32 [ 0, %6 ], [ %15, %24 ]
%14 = mul nsw i32 %13, %2
%15 = add nuw nsw i32 %13, 1
%16 = mul nsw i32 %15, %2
br label %17
17: ; preds = %12, %17
%18 = phi i32 [ 0, %12 ], [ %20, %17 ]
%19 = mul nsw i32 %18, %2
%20 = add nuw nsw i32 %18, 1
%21 = mul nsw i32 %20, %2
%22 = tail call i32 (i32, i32, i32, i32, double, ...) bitcast (i32 (...)* @diamond_step to i32 (i32, i32, i32, i32, double, ...)*)(i32 %14, i32 %16, i32 %21, i32 %19, double %7)
%23 = icmp eq i32 %20, %4
br i1 %23, label %24, label %17
24: ; preds = %17
%25 = icmp eq i32 %15, %4
br i1 %25, label %8, label %12
26: ; preds = %49, %1, %8
%27 = icmp slt i32 %4, 0
br i1 %27, label %71, label %28
28: ; preds = %26
%29 = icmp eq i32 %4, 0
%30 = sitofp i32 %2 to double
%31 = fpext float %3 to double
br label %51
32: ; preds = %49, %9
%33 = phi i32 [ 0, %9 ], [ %35, %49 ]
%34 = mul nsw i32 %33, %2
%35 = add nuw nsw i32 %33, 1
%36 = mul nsw i32 %35, %2
br label %37
37: ; preds = %32, %37
%38 = phi i32 [ 0, %32 ], [ %47, %37 ]
%39 = sitofp i32 %38 to double
%40 = fadd double %39, -5.000000e-01
%41 = fmul double %40, %10
%42 = fptosi double %41 to i32
%43 = fadd double %39, 5.000000e-01
%44 = fmul double %43, %10
%45 = fptosi double %44 to i32
%46 = tail call i32 (i32, i32, i32, i32, double, ...) bitcast (i32 (...)* @square_step to i32 (i32, i32, i32, i32, double, ...)*)(i32 %34, i32 %36, i32 %45, i32 %42, double %11)
%47 = add nuw i32 %38, 1
%48 = icmp eq i32 %38, %4
br i1 %48, label %49, label %37
49: ; preds = %37
%50 = icmp eq i32 %35, %4
br i1 %50, label %26, label %32
51: ; preds = %28, %68
%52 = phi i32 [ 0, %28 ], [ %69, %68 ]
br i1 %29, label %68, label %53
53: ; preds = %51
%54 = sitofp i32 %52 to double
%55 = fadd double %54, -5.000000e-01
%56 = fmul double %55, %30
%57 = fptosi double %56 to i32
%58 = fadd double %54, 5.000000e-01
%59 = fmul double %58, %30
%60 = fptosi double %59 to i32
br label %61
61: ; preds = %53, %61
%62 = phi i32 [ 0, %53 ], [ %64, %61 ]
%63 = mul nsw i32 %62, %2
%64 = add nuw nsw i32 %62, 1
%65 = mul nsw i32 %64, %2
%66 = tail call i32 (i32, i32, i32, i32, double, ...) bitcast (i32 (...)* @square_step to i32 (i32, i32, i32, i32, double, ...)*)(i32 %57, i32 %60, i32 %65, i32 %63, double %31)
%67 = icmp eq i32 %64, %4
br i1 %67, label %68, label %61
68: ; preds = %61, %51
%69 = add nuw i32 %52, 1
%70 = icmp eq i32 %52, %4
br i1 %70, label %71, label %51
71: ; preds = %68, %26
%72 = fmul float %3, 0x3FE99999A0000000
%73 = sdiv i32 %2, 2
%74 = icmp sgt i32 %2, 1
br i1 %74, label %1, label %75
75: ; preds = %71
ret void
}