#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 */
unsigned char *code_table_3_2_location(unsigned char **);
double fabs(double);
scalar_t__ floor(double);
int /*<<< orphan*/ int_char(int, unsigned char *);
int /*<<< orphan*/ uint_char(int, unsigned char *);
unsigned char *sec3_mercator(double lad, int nx, double x0, double dx,
                             double xn, int ny, double y0, double dy, double yn,
                             unsigned char **old_sec) {
  static unsigned char gds[100];
  unsigned char *p;
  int i;
  if (x0 < 0)
    x0 += 360.0;
  uint_char(72, gds);
  gds[4] = 3;
  gds[5] = 0;
  uint_char(nx * ny, gds + 6);
  gds[10] = 0;
  gds[11] = 0;
  gds[12] = 0;
  gds[13] = 10;
  if (old_sec == NULL) {
    gds[14] = 6;
    gds[15] = 0;
    uint_char(0, gds + 16);
    gds[20] = 0;
    uint_char(0, gds + 21);
    gds[25] = 0;
    uint_char(0, gds + 26);
  } else {
    p = code_table_3_2_location(old_sec);
    for (i = 0; i < 16; i++)
      gds[14 + i] = p[i];
  }
  uint_char(nx, gds + 30);
  uint_char(ny, gds + 34);
  int_char((int)floor(y0 * 1.0e6 + 0.5), gds + 38);
  uint_char((int)floor(x0 * 1.0e6 + 0.5), gds + 42);
  int_char((int)floor(lad * 1.0e6 + 0.5), gds + 47);
  int_char((int)floor(yn * 1.0e6 + 0.5), gds + 51);
  if (xn > 360.0)
    xn -= 360.0;
  if (xn < 0.0)
    xn += 360.0;
  uint_char((int)floor(xn * 1.0e6 + 0.5), gds + 55);
  int_char(0, gds + 60);
  int_char((int)floor(fabs(dx) * 1000.0 + 0.5), gds + 64);
  int_char((int)floor(fabs(dy) * 1000.0 + 0.5), gds + 68);
  gds[46] = 32 + 16;
  gds[59] = 0;
  if (dx < 0.0)
    gds[59] |= 128;
  if (dy > 0.0)
    gds[59] |= 64;
  return gds;
}


x86 assembly (clang, -O0):
<sec3_mercator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    %esi,-0x2c(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
mov    %rdx,-0x50(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1195 <sec3_mercator+0x55>
movsd  0xe75(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x48,%edi
lea    0x2eaf(%rip),%rsi
call   1030 <uint_char@plt>
movb   $0x3,0x2ea7(%rip)
movb   $0x0,0x2ea1(%rip)
mov    -0xc(%rbp),%edi
imul   -0x2c(%rbp),%edi
lea    0x2e8e(%rip),%rsi
add    $0x6,%rsi
call   1030 <uint_char@plt>
movb   $0x0,0x2e88(%rip)
movb   $0x0,0x2e82(%rip)
movb   $0x0,0x2e7c(%rip)
movb   $0xa,0x2e76(%rip)
cmpq   $0x0,-0x50(%rbp)
jne    1249 <sec3_mercator+0x109>
movb   $0x6,0x2e65(%rip)
movb   $0x0,0x2e5f(%rip)
xor    %edi,%edi
lea    0x2e47(%rip),%rsi
add    $0x10,%rsi
call   1030 <uint_char@plt>
movb   $0x0,0x2e4b(%rip)
xor    %edi,%edi
lea    0x2e2e(%rip),%rsi
add    $0x15,%rsi
call   1030 <uint_char@plt>
movb   $0x0,0x2e37(%rip)
xor    %edi,%edi
lea    0x2e15(%rip),%rsi
add    $0x1a,%rsi
call   1030 <uint_char@plt>
jmp    1298 <sec3_mercator+0x158>
mov    -0x50(%rbp),%rdi
call   1040 <code_table_3_2_location@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
cmpl   $0x10,-0x5c(%rbp)
jge    1293 <sec3_mercator+0x153>
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x5c(%rbp),%eax
add    $0xe,%eax
movslq %eax,%rcx
lea    0x2dce(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    125d <sec3_mercator+0x11d>
jmp    1298 <sec3_mercator+0x158>
mov    -0xc(%rbp),%edi
lea    0x2dae(%rip),%rsi
add    $0x1e,%rsi
call   1030 <uint_char@plt>
mov    -0x2c(%rbp),%edi
lea    0x2d9b(%rip),%rsi
add    $0x22,%rsi
call   1030 <uint_char@plt>
movsd  -0x38(%rbp),%xmm0
movsd  0xd3d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd39(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2d67(%rip),%rsi
add    $0x26,%rsi
call   1050 <int_char@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xd09(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd05(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2d33(%rip),%rsi
add    $0x2a,%rsi
call   1030 <uint_char@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xcd5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcd1(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2cff(%rip),%rsi
add    $0x2f,%rsi
call   1050 <int_char@plt>
movsd  -0x48(%rbp),%xmm0
movsd  0xca1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc9d(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2ccb(%rip),%rsi
add    $0x33,%rsi
call   1050 <int_char@plt>
movsd  -0x28(%rbp),%xmm0
movsd  0xc65(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13bb <sec3_mercator+0x27b>
movsd  -0x28(%rbp),%xmm0
movsd  0xc4e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    13db <sec3_mercator+0x29b>
movsd  0xc2f(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xc20(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc1c(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2c4a(%rip),%rsi
add    $0x37,%rsi
call   1030 <uint_char@plt>
xor    %edi,%edi
lea    0x2c38(%rip),%rsi
add    $0x3c,%rsi
call   1050 <int_char@plt>
movsd  -0x20(%rbp),%xmm0
movaps 0xbf3(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xbdf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbcb(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2bf9(%rip),%rsi
add    $0x40,%rsi
call   1050 <int_char@plt>
movsd  -0x40(%rbp),%xmm0
movaps 0xbb4(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xba0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb8c(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%edi
lea    0x2bba(%rip),%rsi
add    $0x44,%rsi
call   1050 <int_char@plt>
movb   $0x30,0x2bd8(%rip)
movb   $0x0,0x2bde(%rip)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    14cd <sec3_mercator+0x38d>
movzbl 0x2bc9(%rip),%eax
or     $0x80,%eax
mov    %al,0x2bbe(%rip)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    14ef <sec3_mercator+0x3af>
movzbl 0x2ba5(%rip),%eax
or     $0x40,%eax
mov    %al,0x2b9c(%rip)
lea    0x2b5a(%rip),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec3_mercator>:
push   %rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    %rdx,%rbp
movsd  %xmm6,0x28(%rsp)
movaps %xmm5,0x40(%rsp)
movsd  %xmm4,0x18(%rsp)
mov    %esi,%r14d
movaps %xmm3,0x50(%rsp)
movaps %xmm2,0x30(%rsp)
movaps %xmm1,(%rsp)
mov    %edi,%ebx
movsd  %xmm0,0x20(%rsp)
lea    0x2ed4(%rip),%rsi
mov    $0x48,%edi
call   1030 <uint_char@plt>
movw   $0x3,0x2ec5(%rip)
mov    %r14d,%edi
imul   %ebx,%edi
lea    0x2eba(%rip),%rsi
call   1030 <uint_char@plt>
movl   $0xa000000,0x2eaf(%rip)
test   %rbp,%rbp
je     124d <sec3_mercator+0x10d>
mov    %rbp,%rdi
call   1040 <code_table_3_2_location@plt>
mov    (%rax),%cl
mov    %cl,0x2e9a(%rip)
mov    0x1(%rax),%cl
mov    %cl,0x2e92(%rip)
mov    0x2(%rax),%cl
mov    %cl,0x2e8a(%rip)
mov    0x3(%rax),%cl
mov    %cl,0x2e82(%rip)
mov    0x4(%rax),%cl
mov    %cl,0x2e7a(%rip)
mov    0x5(%rax),%cl
mov    %cl,0x2e72(%rip)
mov    0x6(%rax),%cl
mov    %cl,0x2e6a(%rip)
mov    0x7(%rax),%cl
mov    %cl,0x2e62(%rip)
mov    0x8(%rax),%cl
mov    %cl,0x2e5a(%rip)
mov    0x9(%rax),%cl
mov    %cl,0x2e52(%rip)
mov    0xa(%rax),%cl
mov    %cl,0x2e4a(%rip)
mov    0xb(%rax),%cl
mov    %cl,0x2e42(%rip)
mov    0xc(%rax),%cl
mov    %cl,0x2e3a(%rip)
mov    0xd(%rax),%cl
mov    %cl,0x2e32(%rip)
mov    0xe(%rax),%cl
mov    %cl,0x2e2a(%rip)
mov    0xf(%rax),%al
mov    %al,0x2e22(%rip)
jmp    128e <sec3_mercator+0x14e>
movw   $0x6,0x2e08(%rip)
lea    0x2e03(%rip),%rsi
xor    %edi,%edi
call   1030 <uint_char@plt>
movb   $0x0,0x2df9(%rip)
lea    0x2df3(%rip),%rsi
xor    %edi,%edi
call   1030 <uint_char@plt>
movb   $0x0,0x2de9(%rip)
lea    0x2de3(%rip),%rsi
xor    %edi,%edi
call   1030 <uint_char@plt>
movsd  0xd6a(%rip),%xmm1
movapd (%rsp),%xmm2
movapd %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
movapd %xmm2,%xmm3
cmpltsd %xmm1,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,(%rsp)
lea    0x2da6(%rip),%rsi
mov    %ebx,%edi
call   1030 <uint_char@plt>
lea    0x2d7a(%rip),%rbx
lea    0x2d95(%rip),%rsi
mov    %r14d,%edi
call   1030 <uint_char@plt>
movsd  0x18(%rsp),%xmm0
mulsd  0xd15(%rip),%xmm0
addsd  0xd15(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2d6f(%rip),%rsi
mov    %eax,%edi
call   1050 <int_char@plt>
movapd (%rsp),%xmm0
mulsd  0xced(%rip),%xmm0
addsd  0xced(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2d4b(%rip),%rsi
mov    %eax,%edi
call   1030 <uint_char@plt>
movsd  0x20(%rsp),%xmm0
mulsd  0xcc4(%rip),%xmm0
addsd  0xcc4(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2d27(%rip),%rsi
mov    %eax,%edi
call   1050 <int_char@plt>
movsd  0x28(%rsp),%xmm0
mulsd  0xc9b(%rip),%xmm0
addsd  0xc9b(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2d02(%rip),%rsi
mov    %eax,%edi
call   1050 <int_char@plt>
movsd  0xc88(%rip),%xmm0
movapd 0x50(%rsp),%xmm2
addsd  %xmm2,%xmm0
movsd  0xc5e(%rip),%xmm3
movapd %xmm3,%xmm1
cmpltsd %xmm2,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
movapd %xmm3,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm1,%xmm0
cmpltsd 0xc5c(%rip),%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
mulsd  0xc28(%rip),%xmm0
addsd  0xc28(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2c93(%rip),%rsi
mov    %eax,%edi
call   1030 <uint_char@plt>
lea    0x2c8a(%rip),%rsi
xor    %edi,%edi
call   1050 <int_char@plt>
movapd 0x30(%rsp),%xmm0
andpd  0xc19(%rip),%xmm0
mulsd  0xc01(%rip),%xmm0
addsd  0xbe9(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2c5d(%rip),%rsi
mov    %eax,%edi
call   1050 <int_char@plt>
movapd 0xbee(%rip),%xmm0
andpd  0x40(%rsp),%xmm0
mulsd  0xbd0(%rip),%xmm0
addsd  0xbb8(%rip),%xmm0
call   1060 <floor@plt>
lea    0x2c30(%rip),%rsi
mov    %eax,%edi
call   1050 <int_char@plt>
movb   $0x30,0x2c0c(%rip)
xorpd  %xmm0,%xmm0
ucomisd 0x30(%rsp),%xmm0
seta   %al
shl    $0x7,%al
lea    0x40(%rax),%ecx
movapd 0x40(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movzbl %al,%eax
movzbl %cl,%ecx
cmovbe %eax,%ecx
mov    %cl,0x2bed(%rip)
mov    %rbx,%rax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@sec3_mercator.gds = internal global [100 x i8] zeroinitializer
define i8* @sec3_mercator(double %0, i32 %1, double %2, double %3, double %4, i32 %5, double %6, double %7, double %8, i8** %9) {
%11 = alloca double
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca i8**
%21 = alloca i8*
%22 = alloca i32
store double %0, double* %11
store i32 %1, i32* %12
store double %2, double* %13
store double %3, double* %14
store double %4, double* %15
store i32 %5, i32* %16
store double %6, double* %17
store double %7, double* %18
store double %8, double* %19
store i8** %9, i8*** %20
%23 = load double, double* %13
%24 = fcmp olt double %23, 0.000000e+00
br i1 %24, label %25, label %28
25: ; preds = %10
%26 = load double, double* %13
%27 = fadd double %26, 3.600000e+02
store double %27, double* %13
br label %28
28: ; preds = %25, %10
%29 = call i32 @uint_char(i32 72, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 0))
store i8 3, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 4)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 5)
%30 = load i32, i32* %12
%31 = load i32, i32* %16
%32 = mul nsw i32 %30, %31
%33 = call i32 @uint_char(i32 %32, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 6))
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 10)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 11)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 12)
store i8 10, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 13)
%34 = load i8**, i8*** %20
%35 = icmp eq i8** %34, null
br i1 %35, label %36, label %40
36: ; preds = %28
store i8 6, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 14)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 15)
%37 = call i32 @uint_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 16))
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 20)
%38 = call i32 @uint_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 21))
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 25)
%39 = call i32 @uint_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 26))
br label %60
40: ; preds = %28
%41 = load i8**, i8*** %20
%42 = call i8* @code_table_3_2_location(i8** %41)
store i8* %42, i8** %21
store i32 0, i32* %22
br label %43
43: ; preds = %56, %40
%44 = load i32, i32* %22
%45 = icmp slt i32 %44, 16
br i1 %45, label %46, label %59
46: ; preds = %43
%47 = load i8*, i8** %21
%48 = load i32, i32* %22
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %47, i64 %49
%51 = load i8, i8* %50
%52 = load i32, i32* %22
%53 = add nsw i32 14, %52
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 %54
store i8 %51, i8* %55
br label %56
56: ; preds = %46
%57 = load i32, i32* %22
%58 = add nsw i32 %57, 1
store i32 %58, i32* %22
br label %43
59: ; preds = %43
br label %60
60: ; preds = %59, %36
%61 = load i32, i32* %12
%62 = call i32 @uint_char(i32 %61, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 30))
%63 = load i32, i32* %16
%64 = call i32 @uint_char(i32 %63, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 34))
%65 = load double, double* %17
%66 = call double @llvm.fmuladd.f64(double %65, double 1.000000e+06, double 5.000000e-01)
%67 = call i64 @floor(double %66)
%68 = trunc i64 %67 to i32
%69 = call i32 @int_char(i32 %68, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 38))
%70 = load double, double* %13
%71 = call double @llvm.fmuladd.f64(double %70, double 1.000000e+06, double 5.000000e-01)
%72 = call i64 @floor(double %71)
%73 = trunc i64 %72 to i32
%74 = call i32 @uint_char(i32 %73, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 42))
%75 = load double, double* %11
%76 = call double @llvm.fmuladd.f64(double %75, double 1.000000e+06, double 5.000000e-01)
%77 = call i64 @floor(double %76)
%78 = trunc i64 %77 to i32
%79 = call i32 @int_char(i32 %78, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 47))
%80 = load double, double* %19
%81 = call double @llvm.fmuladd.f64(double %80, double 1.000000e+06, double 5.000000e-01)
%82 = call i64 @floor(double %81)
%83 = trunc i64 %82 to i32
%84 = call i32 @int_char(i32 %83, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 51))
%85 = load double, double* %15
%86 = fcmp ogt double %85, 3.600000e+02
br i1 %86, label %87, label %90
87: ; preds = %60
%88 = load double, double* %15
%89 = fsub double %88, 3.600000e+02
store double %89, double* %15
br label %90
90: ; preds = %87, %60
%91 = load double, double* %15
%92 = fcmp olt double %91, 0.000000e+00
br i1 %92, label %93, label %96
93: ; preds = %90
%94 = load double, double* %15
%95 = fadd double %94, 3.600000e+02
store double %95, double* %15
br label %96
96: ; preds = %93, %90
%97 = load double, double* %15
%98 = call double @llvm.fmuladd.f64(double %97, double 1.000000e+06, double 5.000000e-01)
%99 = call i64 @floor(double %98)
%100 = trunc i64 %99 to i32
%101 = call i32 @uint_char(i32 %100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 55))
%102 = call i32 @int_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 60))
%103 = load double, double* %14
%104 = call double @llvm.fabs.f64(double %103)
%105 = call double @llvm.fmuladd.f64(double %104, double 1.000000e+03, double 5.000000e-01)
%106 = call i64 @floor(double %105)
%107 = trunc i64 %106 to i32
%108 = call i32 @int_char(i32 %107, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 64))
%109 = load double, double* %18
%110 = call double @llvm.fabs.f64(double %109)
%111 = call double @llvm.fmuladd.f64(double %110, double 1.000000e+03, double 5.000000e-01)
%112 = call i64 @floor(double %111)
%113 = trunc i64 %112 to i32
%114 = call i32 @int_char(i32 %113, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 68))
store i8 48, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 46)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 59)
%115 = load double, double* %14
%116 = fcmp olt double %115, 0.000000e+00
br i1 %116, label %117, label %122
117: ; preds = %96
%118 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 59)
%119 = zext i8 %118 to i32
%120 = or i32 %119, 128
%121 = trunc i32 %120 to i8
store i8 %121, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 59)
br label %122
122: ; preds = %117, %96
%123 = load double, double* %18
%124 = fcmp ogt double %123, 0.000000e+00
br i1 %124, label %125, label %130
125: ; preds = %122
%126 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 59)
%127 = zext i8 %126 to i32
%128 = or i32 %127, 64
%129 = trunc i32 %128 to i8
store i8 %129, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 59)
br label %130
130: ; preds = %125, %122
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 0)
}

LLVM IR (-O2):
@sec3_mercator.gds = internal global [100 x i8] zeroinitializer
define i8* @sec3_mercator(double %0, i32 %1, double %2, double %3, double %4, i32 %5, double %6, double %7, double %8, i8** %9) {
%11 = tail call i32 @uint_char(i32 72, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 0))
store i8 3, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 4)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 5)
%12 = mul nsw i32 %5, %1
%13 = tail call i32 @uint_char(i32 %12, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 6))
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 10)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 11)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 12)
store i8 10, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 13)
%14 = icmp eq i8** %9, null
br i1 %14, label %15, label %19
15: ; preds = %10
store i8 6, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 14)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 15)
%16 = tail call i32 @uint_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 16))
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 20)
%17 = tail call i32 @uint_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 21))
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 25)
%18 = tail call i32 @uint_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 26))
br label %52
19: ; preds = %10
%20 = tail call i8* @code_table_3_2_location(i8** %9)
%21 = load i8, i8* %20
store i8 %21, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 14)
%22 = getelementptr inbounds i8, i8* %20, i64 1
%23 = load i8, i8* %22
store i8 %23, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 15)
%24 = getelementptr inbounds i8, i8* %20, i64 2
%25 = load i8, i8* %24
store i8 %25, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 16)
%26 = getelementptr inbounds i8, i8* %20, i64 3
%27 = load i8, i8* %26
store i8 %27, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 17)
%28 = getelementptr inbounds i8, i8* %20, i64 4
%29 = load i8, i8* %28
store i8 %29, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 18)
%30 = getelementptr inbounds i8, i8* %20, i64 5
%31 = load i8, i8* %30
store i8 %31, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 19)
%32 = getelementptr inbounds i8, i8* %20, i64 6
%33 = load i8, i8* %32
store i8 %33, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 20)
%34 = getelementptr inbounds i8, i8* %20, i64 7
%35 = load i8, i8* %34
store i8 %35, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 21)
%36 = getelementptr inbounds i8, i8* %20, i64 8
%37 = load i8, i8* %36
store i8 %37, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 22)
%38 = getelementptr inbounds i8, i8* %20, i64 9
%39 = load i8, i8* %38
store i8 %39, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 23)
%40 = getelementptr inbounds i8, i8* %20, i64 10
%41 = load i8, i8* %40
store i8 %41, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 24)
%42 = getelementptr inbounds i8, i8* %20, i64 11
%43 = load i8, i8* %42
store i8 %43, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 25)
%44 = getelementptr inbounds i8, i8* %20, i64 12
%45 = load i8, i8* %44
store i8 %45, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 26)
%46 = getelementptr inbounds i8, i8* %20, i64 13
%47 = load i8, i8* %46
store i8 %47, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 27)
%48 = getelementptr inbounds i8, i8* %20, i64 14
%49 = load i8, i8* %48
store i8 %49, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 28)
%50 = getelementptr inbounds i8, i8* %20, i64 15
%51 = load i8, i8* %50
store i8 %51, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 29)
br label %52
52: ; preds = %19, %15
%53 = fcmp olt double %2, 0.000000e+00
%54 = fadd double %2, 3.600000e+02
%55 = select i1 %53, double %54, double %2
%56 = tail call i32 @uint_char(i32 %1, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 30))
%57 = tail call i32 @uint_char(i32 %5, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 34))
%58 = tail call double @llvm.fmuladd.f64(double %6, double 1.000000e+06, double 5.000000e-01)
%59 = tail call i64 @floor(double %58)
%60 = trunc i64 %59 to i32
%61 = tail call i32 @int_char(i32 %60, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 38))
%62 = tail call double @llvm.fmuladd.f64(double %55, double 1.000000e+06, double 5.000000e-01)
%63 = tail call i64 @floor(double %62)
%64 = trunc i64 %63 to i32
%65 = tail call i32 @uint_char(i32 %64, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 42))
%66 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+06, double 5.000000e-01)
%67 = tail call i64 @floor(double %66)
%68 = trunc i64 %67 to i32
%69 = tail call i32 @int_char(i32 %68, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 47))
%70 = tail call double @llvm.fmuladd.f64(double %8, double 1.000000e+06, double 5.000000e-01)
%71 = tail call i64 @floor(double %70)
%72 = trunc i64 %71 to i32
%73 = tail call i32 @int_char(i32 %72, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 51))
%74 = fcmp ogt double %4, 3.600000e+02
%75 = fadd double %4, -3.600000e+02
%76 = select i1 %74, double %75, double %4
%77 = fcmp olt double %76, 0.000000e+00
%78 = fadd double %76, 3.600000e+02
%79 = select i1 %77, double %78, double %76
%80 = tail call double @llvm.fmuladd.f64(double %79, double 1.000000e+06, double 5.000000e-01)
%81 = tail call i64 @floor(double %80)
%82 = trunc i64 %81 to i32
%83 = tail call i32 @uint_char(i32 %82, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 55))
%84 = tail call i32 @int_char(i32 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 60))
%85 = tail call double @llvm.fabs.f64(double %3)
%86 = tail call double @llvm.fmuladd.f64(double %85, double 1.000000e+03, double 5.000000e-01)
%87 = tail call i64 @floor(double %86)
%88 = trunc i64 %87 to i32
%89 = tail call i32 @int_char(i32 %88, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 64))
%90 = tail call double @llvm.fabs.f64(double %7)
%91 = tail call double @llvm.fmuladd.f64(double %90, double 1.000000e+03, double 5.000000e-01)
%92 = tail call i64 @floor(double %91)
%93 = trunc i64 %92 to i32
%94 = tail call i32 @int_char(i32 %93, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 68))
store i8 48, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 46)
%95 = fcmp olt double %3, 0.000000e+00
%96 = select i1 %95, i8 -128, i8 0
%97 = fcmp ogt double %7, 0.000000e+00
%98 = or i8 %96, 64
%99 = select i1 %97, i8 %98, i8 %96
store i8 %99, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 59)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @sec3_mercator.gds, i64 0, i64 0)
}