#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 */
int /*<<< orphan*/ MAG_Error(int);
int acos(double);
int MAG_GetUTMParameters(double Latitude, double Longitude, int *Zone,
                         char *Hemisphere, double *CentralMeridian) {
  long Lat_Degrees;
  long Long_Degrees;
  long temp_zone;
  int Error_Code = 0;
  if ((Latitude < ((-80.5) * (((2) * (acos(0.0))) / 180.0L))) ||
      (Latitude > ((84.5) * (((2) * (acos(0.0))) / 180.0L)))) {
    MAG_Error(23);
    Error_Code = 1;
  }
  if ((Longitude < -((2) * (acos(0.0)))) ||
      (Longitude > (2 * ((2) * (acos(0.0)))))) {
    MAG_Error(24);
    Error_Code = 1;
  }
  if (!Error_Code) {
    if (Longitude < 0)
      Longitude += (2 * ((2) * (acos(0.0)))) + 1.0e-10;
    Lat_Degrees = (long)(Latitude * 180.0 / ((2) * (acos(0.0))));
    Long_Degrees = (long)(Longitude * 180.0 / ((2) * (acos(0.0))));
    if (Longitude < ((2) * (acos(0.0))))
      temp_zone =
          (long)(31 + ((Longitude * 180.0 / ((2) * (acos(0.0)))) / 6.0));
    else
      temp_zone =
          (long)(((Longitude * 180.0 / ((2) * (acos(0.0)))) / 6.0) - 29);
    if (temp_zone > 60)
      temp_zone = 1;
    if ((Lat_Degrees > 55) && (Lat_Degrees < 64) && (Long_Degrees > -1) &&
        (Long_Degrees < 3))
      temp_zone = 31;
    if ((Lat_Degrees > 55) && (Lat_Degrees < 64) && (Long_Degrees > 2) &&
        (Long_Degrees < 12))
      temp_zone = 32;
    if ((Lat_Degrees > 71) && (Long_Degrees > -1) && (Long_Degrees < 9))
      temp_zone = 31;
    if ((Lat_Degrees > 71) && (Long_Degrees > 8) && (Long_Degrees < 21))
      temp_zone = 33;
    if ((Lat_Degrees > 71) && (Long_Degrees > 20) && (Long_Degrees < 33))
      temp_zone = 35;
    if ((Lat_Degrees > 71) && (Long_Degrees > 32) && (Long_Degrees < 42))
      temp_zone = 37;
    if (!Error_Code) {
      if (temp_zone >= 31)
        *CentralMeridian = (6 * temp_zone - 183) * ((2) * (acos(0.0))) / 180.0;
      else
        *CentralMeridian = (6 * temp_zone + 177) * ((2) * (acos(0.0))) / 180.0;
      *Zone = temp_zone;
      if (Latitude < 0)
        *Hemisphere = 'S';
      else
        *Hemisphere = 'N';
    }
  }
  return (Error_Code);
}


x86 assembly (clang, -O0):
<MAG_GetUTMParameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movl   $0x0,-0x44(%rbp)
fldl   -0x8(%rbp)
fstpt  -0x58(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
fldt   -0x58(%rbp)
add    %eax,%eax
mov    %eax,-0x48(%rbp)
fildl  -0x48(%rbp)
flds   0xe99(%rip)
fdivrp %st,%st(1)
flds   0xe95(%rip)
fmulp  %st,%st(1)
fucomip %st(1),%st
fstp   %st(0)
ja     11ba <MAG_GetUTMParameters+0x9a>
jmp    1180 <MAG_GetUTMParameters+0x60>
fldl   -0x8(%rbp)
fstpt  -0x64(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
fldt   -0x64(%rbp)
add    %eax,%eax
mov    %eax,-0x4c(%rbp)
fildl  -0x4c(%rbp)
flds   0xe61(%rip)
fdivrp %st,%st(1)
flds   0xe61(%rip)
fmulp  %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    11cb <MAG_GetUTMParameters+0xab>
jmp    11ba <MAG_GetUTMParameters+0x9a>
mov    $0x17,%edi
call   1030 <MAG_Error@plt>
movl   $0x1,-0x44(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0x70(%rbp),%xmm1
mov    %eax,%ecx
shl    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
ja     1224 <MAG_GetUTMParameters+0x104>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0x78(%rbp),%xmm0
shl    $0x1,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1235 <MAG_GetUTMParameters+0x115>
mov    $0x18,%edi
call   1030 <MAG_Error@plt>
movl   $0x1,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    15b2 <MAG_GetUTMParameters+0x492>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1275 <MAG_GetUTMParameters+0x155>
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
shl    $0x1,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xda9(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd9b(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0x90(%rbp),%xmm0
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x30(%rbp)
movsd  0xd62(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0x88(%rbp),%xmm0
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0x80(%rbp),%xmm1
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1365 <MAG_GetUTMParameters+0x245>
movsd  0xd01(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0x98(%rbp),%xmm1
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm1
movsd  0xce1(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xcdd(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x40(%rbp)
jmp    13b6 <MAG_GetUTMParameters+0x296>
movsd  0xcab(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  -0xa0(%rbp),%xmm0
ff
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xc8b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc77(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x3c,-0x40(%rbp)
jle    13c9 <MAG_GetUTMParameters+0x2a9>
movq   $0x1,-0x40(%rbp)
cmpq   $0x37,-0x30(%rbp)
jle    13fd <MAG_GetUTMParameters+0x2dd>
cmpq   $0x40,-0x30(%rbp)
jge    13fd <MAG_GetUTMParameters+0x2dd>
cmpq   $0xffffffffffffffff,-0x38(%rbp)
jle    13fd <MAG_GetUTMParameters+0x2dd>
cmpq   $0x3,-0x38(%rbp)
jge    13fd <MAG_GetUTMParameters+0x2dd>
movq   $0x1f,-0x40(%rbp)
cmpq   $0x37,-0x30(%rbp)
jle    1431 <MAG_GetUTMParameters+0x311>
cmpq   $0x40,-0x30(%rbp)
jge    1431 <MAG_GetUTMParameters+0x311>
cmpq   $0x2,-0x38(%rbp)
jle    1431 <MAG_GetUTMParameters+0x311>
cmpq   $0xc,-0x38(%rbp)
jge    1431 <MAG_GetUTMParameters+0x311>
movq   $0x20,-0x40(%rbp)
cmpq   $0x47,-0x30(%rbp)
jle    145a <MAG_GetUTMParameters+0x33a>
cmpq   $0xffffffffffffffff,-0x38(%rbp)
jle    145a <MAG_GetUTMParameters+0x33a>
cmpq   $0x9,-0x38(%rbp)
jge    145a <MAG_GetUTMParameters+0x33a>
movq   $0x1f,-0x40(%rbp)
cmpq   $0x47,-0x30(%rbp)
jle    1483 <MAG_GetUTMParameters+0x363>
cmpq   $0x8,-0x38(%rbp)
jle    1483 <MAG_GetUTMParameters+0x363>
cmpq   $0x15,-0x38(%rbp)
jge    1483 <MAG_GetUTMParameters+0x363>
movq   $0x21,-0x40(%rbp)
cmpq   $0x47,-0x30(%rbp)
jle    14ac <MAG_GetUTMParameters+0x38c>
cmpq   $0x14,-0x38(%rbp)
jle    14ac <MAG_GetUTMParameters+0x38c>
cmpq   $0x21,-0x38(%rbp)
jge    14ac <MAG_GetUTMParameters+0x38c>
movq   $0x23,-0x40(%rbp)
cmpq   $0x47,-0x30(%rbp)
jle    14d5 <MAG_GetUTMParameters+0x3b5>
cmpq   $0x20,-0x38(%rbp)
jle    14d5 <MAG_GetUTMParameters+0x3b5>
cmpq   $0x2a,-0x38(%rbp)
jge    14d5 <MAG_GetUTMParameters+0x3b5>
movq   $0x25,-0x40(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    15ad <MAG_GetUTMParameters+0x48d>
cmpq   $0x1f,-0x40(%rbp)
jl     1535 <MAG_GetUTMParameters+0x415>
imul   $0x6,-0x40(%rbp),%rax
sub    $0xb7,%rax
mov    %rax,-0xa8(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
mov    %eax,%ecx
mov    -0xa8(%rbp),%rax
shl    $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
cvtsi2sd %rax,%xmm0
movsd  0xaf4(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    157b <MAG_GetUTMParameters+0x45b>
imul   $0x6,-0x40(%rbp),%rax
add    $0xb1,%rax
mov    %rax,-0xb0(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
mov    %eax,%ecx
mov    -0xb0(%rbp),%rax
shl    $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
cvtsi2sd %rax,%xmm0
movsd  0xaa9(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    15a1 <MAG_GetUTMParameters+0x481>
mov    -0x20(%rbp),%rax
movb   $0x53,(%rax)
jmp    15a8 <MAG_GetUTMParameters+0x488>
mov    -0x20(%rbp),%rax
movb   $0x4e,(%rax)
jmp    15ad <MAG_GetUTMParameters+0x48d>
jmp    15b2 <MAG_GetUTMParameters+0x492>
mov    -0x44(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAG_GetUTMParameters>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%r12
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x28(%rsp)
movsd  %xmm0,0x30(%rsp)
fldl   0x30(%rsp)
fstpt  0x10(%rsp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
mov    %eax,0x24(%rsp)
fildl  0x24(%rsp)
fdivs  0xe97(%rip)
fmuls  0xe95(%rip)
fldt   0x10(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
ja     11a5 <MAG_GetUTMParameters+0x85>
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
mov    %eax,0x20(%rsp)
fildl  0x20(%rsp)
fdivs  0xe6d(%rip)
fmuls  0xe6f(%rip)
mov    $0x1,%bl
fldt   0x10(%rsp)
fucomip %st(1),%st
fstp   %st(0)
jbe    11b1 <MAG_GetUTMParameters+0x91>
mov    $0x17,%edi
call   1030 <MAG_Error@plt>
xor    %ebx,%ebx
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd 0x8(%rsp),%xmm0
ja     11eb <MAG_GetUTMParameters+0xcb>
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
movsd  0x8(%rsp),%xmm1
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jbe    1209 <MAG_GetUTMParameters+0xe9>
mov    $0x18,%edi
call   1030 <MAG_Error@plt>
mov    $0x1,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%eax
test   %bl,%bl
je     11fa <MAG_GetUTMParameters+0xda>
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1247 <MAG_GetUTMParameters+0x127>
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xdd9(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
mulsd  0xdc3(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%r13
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
mov    %eax,%ebp
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xor    %ebx,%ebx
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm0
seta   %bl
add    %ebp,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xd5f(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rbp
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
divsd  0xd34(%rip),%xmm1
lea    0xd3d(%rip),%rax
addsd  (%rax,%rbx,8),%xmm1
cvttsd2si %xmm1,%rax
cmp    $0x3d,%rax
mov    $0x1,%ecx
cmovl  %rax,%rcx
mov    %r13,%rdx
and    $0xfffffffffffffff8,%rdx
cmp    $0x3,%rbp
mov    $0x1f,%eax
mov    %rcx,%rsi
cmovl  %rax,%rsi
test   %rbp,%rbp
cmovs  %rcx,%rsi
cmp    $0x38,%rdx
cmovne %rcx,%rsi
cmp    $0xc,%rbp
mov    $0x20,%ecx
cmovge %rsi,%rcx
cmp    $0x3,%rbp
cmovl  %rsi,%rcx
cmp    $0x38,%rdx
cmovne %rsi,%rcx
cmp    $0x9,%rbp
cmovge %rcx,%rax
test   %rbp,%rbp
cmovs  %rcx,%rax
cmp    $0x48,%r13
cmovl  %rcx,%rax
cmp    $0x15,%rbp
mov    $0x21,%ecx
cmovge %rax,%rcx
cmp    $0x9,%rbp
cmovl  %rax,%rcx
cmp    $0x48,%r13
cmovl  %rax,%rcx
cmp    $0x21,%rbp
mov    $0x23,%eax
cmovge %rcx,%rax
cmp    $0x15,%rbp
cmovl  %rcx,%rax
cmp    $0x48,%r13
cmovl  %rcx,%rax
cmp    $0x2a,%rbp
mov    $0x25,%ebx
cmovge %rax,%rbx
cmp    $0x21,%rbp
cmovl  %rax,%rbx
cmp    $0x48,%r13
cmovl  %rax,%rbx
cmp    $0x1f,%rbx
lea    (%rbx,%rbx,2),%rax
lea    -0xb7(%rax,%rax,1),%rcx
ff
lea    0xb1(%rax,%rax,1),%rbp
cmovge %rcx,%rbp
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
add    %eax,%eax
cltq
imul   %rbp,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  0xc20(%rip),%xmm0
movsd  %xmm0,(%r15)
mov    %ebx,(%r12)
xorpd  %xmm0,%xmm0
ucomisd 0x28(%rsp),%xmm0
jbe    1413 <MAG_GetUTMParameters+0x2f3>
movb   $0x53,(%r14)
jmp    1417 <MAG_GetUTMParameters+0x2f7>
movb   $0x4e,(%r14)
xor    %eax,%eax
jmp    11fa <MAG_GetUTMParameters+0xda>

LLVM IR (-O0):
define i32 @MAG_GetUTMParameters(double %0, double %1, i32* %2, i8* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca double*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
store double %0, double* %6
store double %1, double* %7
store i32* %2, i32** %8
store i8* %3, i8** %9
store double* %4, double** %10
store i32 0, i32* %14
%15 = load double, double* %6
%16 = fpext double %15 to x86_fp80
%17 = call i32 @acos(double 0.000000e+00)
%18 = mul nsw i32 2, %17
%19 = sitofp i32 %18 to x86_fp80
%20 = fdiv x86_fp80 %19, 0xK4006B400000000000000
%21 = fmul x86_fp80 0xKC005A100000000000000, %20
%22 = fcmp olt x86_fp80 %16, %21
br i1 %22, label %32, label %23
23: ; preds = %5
%24 = load double, double* %6
%25 = fpext double %24 to x86_fp80
%26 = call i32 @acos(double 0.000000e+00)
%27 = mul nsw i32 2, %26
%28 = sitofp i32 %27 to x86_fp80
%29 = fdiv x86_fp80 %28, 0xK4006B400000000000000
%30 = fmul x86_fp80 0xK4005A900000000000000, %29
%31 = fcmp ogt x86_fp80 %25, %30
br i1 %31, label %32, label %34
32: ; preds = %23, %5
%33 = call i32 @MAG_Error(i32 23)
store i32 1, i32* %14
br label %34
34: ; preds = %32, %23
%35 = load double, double* %7
%36 = call i32 @acos(double 0.000000e+00)
%37 = mul nsw i32 2, %36
%38 = sub nsw i32 0, %37
%39 = sitofp i32 %38 to double
%40 = fcmp olt double %35, %39
br i1 %40, label %48, label %41
41: ; preds = %34
%42 = load double, double* %7
%43 = call i32 @acos(double 0.000000e+00)
%44 = mul nsw i32 2, %43
%45 = mul nsw i32 2, %44
%46 = sitofp i32 %45 to double
%47 = fcmp ogt double %42, %46
br i1 %47, label %48, label %50
48: ; preds = %41, %34
%49 = call i32 @MAG_Error(i32 24)
store i32 1, i32* %14
br label %50
50: ; preds = %48, %41
%51 = load i32, i32* %14
%52 = icmp ne i32 %51, 0
br i1 %52, label %214, label %53
53: ; preds = %50
%54 = load double, double* %7
%55 = fcmp olt double %54, 0.000000e+00
br i1 %55, label %56, label %64
56: ; preds = %53
%57 = call i32 @acos(double 0.000000e+00)
%58 = mul nsw i32 2, %57
%59 = mul nsw i32 2, %58
%60 = sitofp i32 %59 to double
%61 = fadd double %60, 1.000000e-10
%62 = load double, double* %7
%63 = fadd double %62, %61
store double %63, double* %7
br label %64
64: ; preds = %56, %53
%65 = load double, double* %6
%66 = fmul double %65, 1.800000e+02
%67 = call i32 @acos(double 0.000000e+00)
%68 = mul nsw i32 2, %67
%69 = sitofp i32 %68 to double
%70 = fdiv double %66, %69
%71 = fptosi double %70 to i64
store i64 %71, i64* %11
%72 = load double, double* %7
%73 = fmul double %72, 1.800000e+02
%74 = call i32 @acos(double 0.000000e+00)
%75 = mul nsw i32 2, %74
%76 = sitofp i32 %75 to double
%77 = fdiv double %73, %76
%78 = fptosi double %77 to i64
store i64 %78, i64* %12
%79 = load double, double* %7
%80 = call i32 @acos(double 0.000000e+00)
%81 = mul nsw i32 2, %80
%82 = sitofp i32 %81 to double
%83 = fcmp olt double %79, %82
br i1 %83, label %84, label %94
84: ; preds = %64
%85 = load double, double* %7
%86 = fmul double %85, 1.800000e+02
%87 = call i32 @acos(double 0.000000e+00)
%88 = mul nsw i32 2, %87
%89 = sitofp i32 %88 to double
%90 = fdiv double %86, %89
%91 = fdiv double %90, 6.000000e+00
%92 = fadd double 3.100000e+01, %91
%93 = fptosi double %92 to i64
store i64 %93, i64* %13
br label %104
94: ; preds = %64
%95 = load double, double* %7
%96 = fmul double %95, 1.800000e+02
%97 = call i32 @acos(double 0.000000e+00)
%98 = mul nsw i32 2, %97
%99 = sitofp i32 %98 to double
%100 = fdiv double %96, %99
%101 = fdiv double %100, 6.000000e+00
%102 = fsub double %101, 2.900000e+01
%103 = fptosi double %102 to i64
store i64 %103, i64* %13
br label %104
104: ; preds = %94, %84
%105 = load i64, i64* %13
%106 = icmp sgt i64 %105, 60
br i1 %106, label %107, label %108
107: ; preds = %104
store i64 1, i64* %13
br label %108
108: ; preds = %107, %104
%109 = load i64, i64* %11
%110 = icmp sgt i64 %109, 55
br i1 %110, label %111, label %121
111: ; preds = %108
%112 = load i64, i64* %11
%113 = icmp slt i64 %112, 64
br i1 %113, label %114, label %121
114: ; preds = %111
%115 = load i64, i64* %12
%116 = icmp sgt i64 %115, -1
br i1 %116, label %117, label %121
117: ; preds = %114
%118 = load i64, i64* %12
%119 = icmp slt i64 %118, 3
br i1 %119, label %120, label %121
120: ; preds = %117
store i64 31, i64* %13
br label %121
121: ; preds = %120, %117, %114, %111, %108
%122 = load i64, i64* %11
%123 = icmp sgt i64 %122, 55
br i1 %123, label %124, label %134
124: ; preds = %121
%125 = load i64, i64* %11
%126 = icmp slt i64 %125, 64
br i1 %126, label %127, label %134
127: ; preds = %124
%128 = load i64, i64* %12
%129 = icmp sgt i64 %128, 2
br i1 %129, label %130, label %134
130: ; preds = %127
%131 = load i64, i64* %12
%132 = icmp slt i64 %131, 12
br i1 %132, label %133, label %134
133: ; preds = %130
store i64 32, i64* %13
br label %134
134: ; preds = %133, %130, %127, %124, %121
%135 = load i64, i64* %11
%136 = icmp sgt i64 %135, 71
br i1 %136, label %137, label %144
137: ; preds = %134
%138 = load i64, i64* %12
%139 = icmp sgt i64 %138, -1
br i1 %139, label %140, label %144
140: ; preds = %137
%141 = load i64, i64* %12
%142 = icmp slt i64 %141, 9
br i1 %142, label %143, label %144
143: ; preds = %140
store i64 31, i64* %13
br label %144
144: ; preds = %143, %140, %137, %134
%145 = load i64, i64* %11
%146 = icmp sgt i64 %145, 71
br i1 %146, label %147, label %154
147: ; preds = %144
%148 = load i64, i64* %12
%149 = icmp sgt i64 %148, 8
br i1 %149, label %150, label %154
150: ; preds = %147
%151 = load i64, i64* %12
%152 = icmp slt i64 %151, 21
br i1 %152, label %153, label %154
153: ; preds = %150
store i64 33, i64* %13
br label %154
154: ; preds = %153, %150, %147, %144
%155 = load i64, i64* %11
%156 = icmp sgt i64 %155, 71
br i1 %156, label %157, label %164
157: ; preds = %154
%158 = load i64, i64* %12
%159 = icmp sgt i64 %158, 20
br i1 %159, label %160, label %164
160: ; preds = %157
%161 = load i64, i64* %12
%162 = icmp slt i64 %161, 33
br i1 %162, label %163, label %164
163: ; preds = %160
store i64 35, i64* %13
br label %164
164: ; preds = %163, %160, %157, %154
%165 = load i64, i64* %11
%166 = icmp sgt i64 %165, 71
br i1 %166, label %167, label %174
167: ; preds = %164
%168 = load i64, i64* %12
%169 = icmp sgt i64 %168, 32
br i1 %169, label %170, label %174
170: ; preds = %167
%171 = load i64, i64* %12
%172 = icmp slt i64 %171, 42
br i1 %172, label %173, label %174
173: ; preds = %170
store i64 37, i64* %13
br label %174
174: ; preds = %173, %170, %167, %164
%175 = load i32, i32* %14
%176 = icmp ne i32 %175, 0
br i1 %176, label %213, label %177
177: ; preds = %174
%178 = load i64, i64* %13
%179 = icmp sge i64 %178, 31
br i1 %179, label %180, label %191
180: ; preds = %177
%181 = load i64, i64* %13
%182 = mul nsw i64 6, %181
%183 = sub nsw i64 %182, 183
%184 = call i32 @acos(double 0.000000e+00)
%185 = mul nsw i32 2, %184
%186 = sext i32 %185 to i64
%187 = mul nsw i64 %183, %186
%188 = sitofp i64 %187 to double
%189 = fdiv double %188, 1.800000e+02
%190 = load double*, double** %10
store double %189, double* %190
br label %202
191: ; preds = %177
%192 = load i64, i64* %13
%193 = mul nsw i64 6, %192
%194 = add nsw i64 %193, 177
%195 = call i32 @acos(double 0.000000e+00)
%196 = mul nsw i32 2, %195
%197 = sext i32 %196 to i64
%198 = mul nsw i64 %194, %197
%199 = sitofp i64 %198 to double
%200 = fdiv double %199, 1.800000e+02
%201 = load double*, double** %10
store double %200, double* %201
br label %202
202: ; preds = %191, %180
%203 = load i64, i64* %13
%204 = trunc i64 %203 to i32
%205 = load i32*, i32** %8
store i32 %204, i32* %205
%206 = load double, double* %6
%207 = fcmp olt double %206, 0.000000e+00
br i1 %207, label %208, label %210
208: ; preds = %202
%209 = load i8*, i8** %9
store i8 83, i8* %209
br label %212
210: ; preds = %202
%211 = load i8*, i8** %9
store i8 78, i8* %211
br label %212
212: ; preds = %210, %208
br label %213
213: ; preds = %212, %174
br label %214
214: ; preds = %213, %50
%215 = load i32, i32* %14
ret i32 %215
}

LLVM IR (-O2):
define i32 @MAG_GetUTMParameters(double %0, double %1, i32* nocapture writeonly %2, i8* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = fpext double %0 to x86_fp80
%7 = tail call i32 @acos(double 0.000000e+00)
%8 = shl nsw i32 %7, 1
%9 = sitofp i32 %8 to x86_fp80
%10 = fdiv x86_fp80 %9, 0xK4006B400000000000000
%11 = fmul x86_fp80 %10, 0xKC005A100000000000000
%12 = fcmp ogt x86_fp80 %11, %6
br i1 %12, label %20, label %13
13: ; preds = %5
%14 = tail call i32 @acos(double 0.000000e+00)
%15 = shl nsw i32 %14, 1
%16 = sitofp i32 %15 to x86_fp80
%17 = fdiv x86_fp80 %16, 0xK4006B400000000000000
%18 = fmul x86_fp80 %17, 0xK4005A900000000000000
%19 = fcmp olt x86_fp80 %18, %6
br i1 %19, label %20, label %22
20: ; preds = %13, %5
%21 = tail call i32 @MAG_Error(i32 23)
br label %22
22: ; preds = %20, %13
%23 = phi i1 [ false, %20 ], [ true, %13 ]
%24 = tail call i32 @acos(double 0.000000e+00)
%25 = mul i32 %24, -2
%26 = sitofp i32 %25 to double
%27 = fcmp ogt double %26, %1
br i1 %27, label %33, label %28
28: ; preds = %22
%29 = tail call i32 @acos(double 0.000000e+00)
%30 = shl nsw i32 %29, 2
%31 = sitofp i32 %30 to double
%32 = fcmp olt double %31, %1
br i1 %32, label %33, label %35
33: ; preds = %22, %28
%34 = tail call i32 @MAG_Error(i32 24)
br label %118
35: ; preds = %28
br i1 %23, label %36, label %118
36: ; preds = %35
%37 = fcmp olt double %1, 0.000000e+00
br i1 %37, label %38, label %44
38: ; preds = %36
%39 = tail call i32 @acos(double 0.000000e+00)
%40 = shl nsw i32 %39, 2
%41 = sitofp i32 %40 to double
%42 = fadd double %41, 1.000000e-10
%43 = fadd double %42, %1
br label %44
44: ; preds = %38, %36
%45 = phi double [ %43, %38 ], [ %1, %36 ]
%46 = fmul double %0, 1.800000e+02
%47 = tail call i32 @acos(double 0.000000e+00)
%48 = shl nsw i32 %47, 1
%49 = sitofp i32 %48 to double
%50 = fdiv double %46, %49
%51 = fptosi double %50 to i64
%52 = fmul double %45, 1.800000e+02
%53 = tail call i32 @acos(double 0.000000e+00)
%54 = shl nsw i32 %53, 1
%55 = sitofp i32 %54 to double
%56 = fdiv double %52, %55
%57 = fptosi double %56 to i64
%58 = tail call i32 @acos(double 0.000000e+00)
%59 = shl nsw i32 %58, 1
%60 = sitofp i32 %59 to double
%61 = fcmp olt double %45, %60
%62 = tail call i32 @acos(double 0.000000e+00)
%63 = shl nsw i32 %62, 1
%64 = sitofp i32 %63 to double
%65 = fdiv double %52, %64
%66 = fdiv double %65, 6.000000e+00
%67 = select i1 %61, double 3.100000e+01, double -2.900000e+01
%68 = fadd double %66, %67
%69 = fptosi double %68 to i64
%70 = icmp sgt i64 %69, 60
%71 = select i1 %70, i64 1, i64 %69
%72 = and i64 %51, -8
%73 = icmp eq i64 %72, 56
%74 = icmp sgt i64 %57, -1
%75 = select i1 %73, i1 %74, i1 false
%76 = icmp slt i64 %57, 3
%77 = select i1 %75, i1 %76, i1 false
%78 = select i1 %77, i64 31, i64 %71
%79 = icmp sgt i64 %57, 2
%80 = select i1 %73, i1 %79, i1 false
%81 = icmp slt i64 %57, 12
%82 = select i1 %80, i1 %81, i1 false
%83 = select i1 %82, i64 32, i64 %78
%84 = icmp sgt i64 %51, 71
%85 = select i1 %84, i1 %74, i1 false
%86 = icmp slt i64 %57, 9
%87 = select i1 %85, i1 %86, i1 false
%88 = select i1 %87, i64 31, i64 %83
%89 = icmp sgt i64 %57, 8
%90 = select i1 %84, i1 %89, i1 false
%91 = icmp slt i64 %57, 21
%92 = select i1 %90, i1 %91, i1 false
%93 = select i1 %92, i64 33, i64 %88
%94 = icmp sgt i64 %57, 20
%95 = select i1 %84, i1 %94, i1 false
%96 = icmp slt i64 %57, 33
%97 = select i1 %95, i1 %96, i1 false
%98 = select i1 %97, i64 35, i64 %93
%99 = icmp sgt i64 %57, 32
%100 = select i1 %84, i1 %99, i1 false
%101 = icmp slt i64 %57, 42
%102 = select i1 %100, i1 %101, i1 false
%103 = select i1 %102, i64 37, i64 %98
%104 = icmp sgt i64 %103, 30
%105 = select i1 %104, i64 -183, i64 177
%106 = mul nsw i64 %103, 6
%107 = add nsw i64 %106, %105
%108 = tail call i32 @acos(double 0.000000e+00)
%109 = shl nsw i32 %108, 1
%110 = sext i32 %109 to i64
%111 = mul nsw i64 %107, %110
%112 = sitofp i64 %111 to double
%113 = fdiv double %112, 1.800000e+02
store double %113, double* %4
%114 = trunc i64 %103 to i32
store i32 %114, i32* %2
%115 = fcmp olt double %0, 0.000000e+00
br i1 %115, label %116, label %117
116: ; preds = %44
store i8 83, i8* %3
br label %118
117: ; preds = %44
store i8 78, i8* %3
br label %118
118: ; preds = %33, %117, %116, %35
%119 = phi i32 [ 1, %33 ], [ 0, %117 ], [ 0, %116 ], [ 1, %35 ]
ret i32 %119
}