#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double atan2(double, double);
unsigned char *calloc(int, int);
double cos(double);
double sin(double);
double sqrt(double);
unsigned char *fishEyeNB(unsigned char *img, int xs, int ys, int *nc, int *nl) {
  unsigned char *res = NULL;
  int i, j;
  double r, R, a, x, y, rr;
  res = calloc(xs * ys, sizeof(unsigned char));
  R = sqrt((double)((ys / 2) * (ys / 2)));
  for (i = 0; i < ys; i++)
    for (j = 0; j < xs; j++) {
      r = sqrt(
          (double)((i - ys / 2) * (i - ys / 2) + (j - xs / 2) * (j - xs / 2)));
      a = atan2((double)(i - ys / 2), (double)(j - xs / 2));
      rr = r * r / R;
      x = (double)xs * 0.5 + rr * cos(a);
      y = (double)ys * 0.5 + rr * sin(a);
      if (y < 0)
        y = 0;
      else if (y > ys - 1)
        y = ys - 1;
      if (x < 0)
        x = 0;
      else if (x > xs - 1)
        x = xs - 1;
      if (r < R)
        res[i * xs + j] = img[(int)y * xs + (int)x];
    }
  *nl = ys;
  *nc = xs;
  return res;
}


x86 assembly (clang, -O0):
<fishEyeNB>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0xc(%rbp),%edi
imul   -0x10(%rbp),%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x64(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1453 <fishEyeNB+0x303>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1440 <fishEyeNB+0x2f0>
mov    -0x2c(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xa0(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x9c(%rbp)
mov    -0x2c(%rbp),%ecx
mov    -0x10(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x9c(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x94(%rbp)
mov    -0x30(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
sub    %eax,%ecx
mov    -0x30(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    -0x98(%rbp),%edx
mov    %eax,%esi
mov    -0x94(%rbp),%eax
sub    %esi,%edx
imul   %edx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0x30(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8c(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1060 <cos@plt>
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xcf6(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xcb2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    1376 <fishEyeNB+0x226>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    13a3 <fishEyeNB+0x253>
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jbe    139e <fishEyeNB+0x24e>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    13a3 <fishEyeNB+0x253>
xorps  %xmm0,%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    13be <fishEyeNB+0x26e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    13eb <fishEyeNB+0x29b>
movsd  -0x50(%rbp),%xmm0
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jbe    13e6 <fishEyeNB+0x296>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    13eb <fishEyeNB+0x29b>
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    142d <fishEyeNB+0x2dd>
mov    -0x8(%rbp),%rax
cvttsd2si -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cvttsd2si -0x50(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1432 <fishEyeNB+0x2e2>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11d3 <fishEyeNB+0x83>
jmp    1445 <fishEyeNB+0x2f5>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11c0 <fishEyeNB+0x70>
mov    -0x10(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fishEyeNB>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r8,0x50(%rsp)
mov    %rcx,0x58(%rsp)
mov    %edx,%ebx
mov    %rdi,0x70(%rsp)
mov    %edx,%edi
mov    %rsi,0x8(%rsp)
imul   %esi,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %ebx,%ecx
shr    $0x1f,%ecx
add    %ebx,%ecx
sar    %ecx
mov    %ecx,0x2c(%rsp)
imul   %ecx,%ecx
cvtsi2sd %ecx,%xmm0
mov    %rax,0x30(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11af <fishEyeNB+0x5f>
sqrtsd %xmm0,%xmm0
jmp    11b4 <fishEyeNB+0x64>
call   1070 <sqrt@plt>
movsd  %xmm0,0x18(%rsp)
mov    %rbx,0x38(%rsp)
test   %ebx,%ebx
jle    13c3 <fishEyeNB+0x273>
mov    0x8(%rsp),%rdx
mov    %edx,%ebx
shr    $0x1f,%ebx
add    %edx,%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mov    0x38(%rsp),%rcx
cvtsi2sd %ecx,%xmm2
sar    %ebx
lea    -0x1(%rcx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x48(%rsp)
neg    %ebx
lea    -0x1(%rdx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x40(%rsp)
movslq %edx,%rax
mov    %ecx,%ecx
mov    %rcx,0x60(%rsp)
mov    %rax,0x68(%rsp)
mov    %eax,%r14d
xor    %eax,%eax
mov    %rax,0x10(%rsp)
movsd  0xdd8(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x80(%rsp)
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x78(%rsp)
mov    0x30(%rsp),%rbp
jmp    1271 <fishEyeNB+0x121>
cs nopw 0x0(%rax,%rax,1)
mov    0x10(%rsp),%rcx
add    $0x1,%rcx
add    0x68(%rsp),%rbp
mov    %rcx,%rax
mov    %rcx,0x10(%rsp)
cmp    0x60(%rsp),%rcx
je     13c3 <fishEyeNB+0x273>
cmpl   $0x0,0x8(%rsp)
jle    1250 <fishEyeNB+0x100>
mov    0x10(%rsp),%rax
mov    %eax,%r13d
sub    0x2c(%rsp),%r13d
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
movsd  %xmm0,0x88(%rsp)
imul   %r13d,%r13d
xor    %r12d,%r12d
jmp    12a9 <fishEyeNB+0x159>
nop
add    $0x1,%r12
cmp    %r12,%r14
je     1250 <fishEyeNB+0x100>
lea    (%rbx,%r12,1),%r15
mov    %r15d,%eax
imul   %r15d,%eax
add    %r13d,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd 0xd42(%rip),%xmm0
jb     12d0 <fishEyeNB+0x180>
sqrtsd %xmm0,%xmm0
jmp    12d5 <fishEyeNB+0x185>
xchg   %ax,%ax
call   1070 <sqrt@plt>
movsd  %xmm0,0x20(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
movsd  0x88(%rsp),%xmm0
call   1030 <atan2@plt>
movsd  %xmm0,0x90(%rsp)
movsd  0x20(%rsp),%xmm1
mulsd  %xmm1,%xmm1
divsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x98(%rsp)
call   1060 <cos@plt>
movsd  %xmm0,0xa0(%rsp)
movsd  0x90(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x98(%rsp),%xmm3
mulsd  %xmm3,%xmm0
addsd  0x78(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
xorpd  %xmm2,%xmm2
ja     1362 <fishEyeNB+0x212>
ucomisd 0x48(%rsp),%xmm0
movapd %xmm0,%xmm2
jbe    1362 <fishEyeNB+0x212>
movsd  0x48(%rsp),%xmm2
mulsd  0xa0(%rsp),%xmm3
addsd  0x80(%rsp),%xmm3
ucomisd %xmm3,%xmm1
ja     138c <fishEyeNB+0x23c>
ucomisd 0x40(%rsp),%xmm3
movapd %xmm3,%xmm1
jbe    138c <fishEyeNB+0x23c>
movsd  0x40(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
ucomisd 0x20(%rsp),%xmm0
jbe    12a0 <fishEyeNB+0x150>
cvttsd2si %xmm2,%eax
imul   0x8(%rsp),%eax
cvttsd2si %xmm1,%ecx
add    %eax,%ecx
movslq %ecx,%rax
mov    0x70(%rsp),%rcx
movzbl (%rcx,%rax,1),%eax
mov    %al,0x0(%rbp,%r12,1)
jmp    12a0 <fishEyeNB+0x150>
mov    0x50(%rsp),%rax
mov    0x38(%rsp),%rcx
mov    %ecx,(%rax)
mov    0x58(%rsp),%rax
mov    0x8(%rsp),%rcx
mov    %ecx,(%rax)
mov    0x30(%rsp),%rax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define noalias i8* @fishEyeNB(i8* nocapture %0, i32 %1, i32 %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = mul nsw i32 %2, %1
%7 = tail call i8* @calloc(i32 %6, i32 1)
%8 = sdiv i32 %2, 2
%9 = mul nsw i32 %8, %8
%10 = sitofp i32 %9 to double
%11 = tail call double @sqrt(double %10)
%12 = icmp sgt i32 %2, 0
br i1 %12, label %13, label %80
13: ; preds = %5
%14 = icmp sgt i32 %1, 0
%15 = sdiv i32 %1, -2
%16 = sitofp i32 %1 to double
%17 = sitofp i32 %2 to double
%18 = add nsw i32 %2, -1
%19 = sitofp i32 %18 to double
%20 = add nsw i32 %1, -1
%21 = sitofp i32 %20 to double
%22 = sext i32 %1 to i64
%23 = zext i32 %2 to i64
%24 = zext i32 %1 to i64
br label %25
25: ; preds = %13, %77
%26 = phi i64 [ 0, %13 ], [ %78, %77 ]
br i1 %14, label %27, label %77
27: ; preds = %25
%28 = trunc i64 %26 to i32
%29 = sub i32 %28, %8
%30 = mul nsw i32 %29, %29
%31 = sitofp i32 %29 to double
%32 = mul nsw i64 %26, %22
br label %33
33: ; preds = %27, %74
%34 = phi i64 [ 0, %27 ], [ %75, %74 ]
%35 = trunc i64 %34 to i32
%36 = add i32 %15, %35
%37 = mul nsw i32 %36, %36
%38 = add nuw nsw i32 %37, %30
%39 = sitofp i32 %38 to double
%40 = tail call double @sqrt(double %39)
%41 = sitofp i32 %36 to double
%42 = tail call double @atan2(double %31, double %41)
%43 = fmul double %40, %40
%44 = fdiv double %43, %11
%45 = tail call double @cos(double %42)
%46 = fmul double %44, %45
%47 = tail call double @llvm.fmuladd.f64(double %16, double 5.000000e-01, double %46)
%48 = tail call double @sin(double %42)
%49 = fmul double %44, %48
%50 = tail call double @llvm.fmuladd.f64(double %17, double 5.000000e-01, double %49)
%51 = fcmp olt double %50, 0.000000e+00
br i1 %51, label %55, label %52
52: ; preds = %33
%53 = fcmp ogt double %50, %19
br i1 %53, label %54, label %55
54: ; preds = %52
br label %55
55: ; preds = %33, %52, %54
%56 = phi double [ %19, %54 ], [ %50, %52 ], [ 0.000000e+00, %33 ]
%57 = fcmp olt double %47, 0.000000e+00
br i1 %57, label %61, label %58
58: ; preds = %55
%59 = fcmp ogt double %47, %21
br i1 %59, label %60, label %61
60: ; preds = %58
br label %61
61: ; preds = %55, %58, %60
%62 = phi double [ %21, %60 ], [ %47, %58 ], [ 0.000000e+00, %55 ]
%63 = fcmp olt double %40, %11
br i1 %63, label %64, label %74
64: ; preds = %61
%65 = fptosi double %56 to i32
%66 = mul nsw i32 %65, %1
%67 = fptosi double %62 to i32
%68 = add nsw i32 %66, %67
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %0, i64 %69
%71 = load i8, i8* %70
%72 = add nsw i64 %34, %32
%73 = getelementptr inbounds i8, i8* %7, i64 %72
store i8 %71, i8* %73
br label %74
74: ; preds = %61, %64
%75 = add nuw nsw i64 %34, 1
%76 = icmp eq i64 %75, %24
br i1 %76, label %77, label %33
77: ; preds = %74, %25
%78 = add nuw nsw i64 %26, 1
%79 = icmp eq i64 %78, %23
br i1 %79, label %80, label %25
80: ; preds = %77, %5
store i32 %2, i32* %4
store i32 %1, i32* %3
ret i8* %7
}