#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 **);
int /*<<< orphan*/ fatal_error(char *, char *);
int int4(unsigned char *);
double scaled2dbl(int, int);
int axes_earth(unsigned char **sec, double *major, double *minor) {
  int table_3_2;
  unsigned char *p;
  int factor, value;
  p = code_table_3_2_location(sec);
  if (p == NULL)
    fatal_error("radius_earth: code_table 3.2 is unknown", "");
  table_3_2 = *p;
  *major = *minor = 6367.47 * 1000.0;
  if (table_3_2 == 0)
    *major = *minor = 6367.47 * 1000.0;
  else if (table_3_2 == 1) {
    if (((int)(sec[3][5])) == 101)
      fatal_error("Grid defintion 101 does not support user-defined radius",
                  "");
    factor = ((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127));
    value = int4(p + 2);
    *major = *minor = scaled2dbl(factor, value);
  } else if (table_3_2 == 2) {
    *major = 6378.160 * 1000.0;
    *minor = 6356.775 * 1000.0;
  } else if (table_3_2 == 3 || table_3_2 == 7) {
    if (((int)(sec[3][5])) == 101)
      fatal_error(
          "Grid defintion 101 does not support user-defined major/minor axes",
          "");
    factor = ((p[6] & 0x80) ? -(int)(p[6] & 127) : (int)(p[6] & 127));
    value = int4(p + 7);
    *major = scaled2dbl(factor, value);
    factor = ((p[11] & 0x80) ? -(int)(p[11] & 127) : (int)(p[11] & 127));
    value = int4(p + 12);
    *minor = scaled2dbl(factor, value);
    if (table_3_2 == 3) {
      *major *= 1000.0;
      *minor *= 1000.0;
    }
  } else if (table_3_2 == 4) {
    *major = 6378.137 * 1000.0;
    *minor = 6356.752140 * 1000.0;
  } else if (table_3_2 == 5) {
    *major = 6378.137 * 1000.0;
    *minor = 6356.752245 * 1000.0;
  } else if (table_3_2 == 6)
    *major = *minor = 6371.2290 * 1000.0;
  else if (table_3_2 == 8)
    *major = *minor = 6371.200 * 1000.0;
  else if (table_3_2 == 9) {
    *major = 6377563.396;
    *minor = 6356256.909;
  }
  return 0;
}


x86 assembly (clang, -O0):
<axes_earth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <code_table_3_2_location@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117f <axes_earth+0x3f>
lea    0xee5(%rip),%rdi
lea    0xf05(%rip),%rsi
call   1050 <fatal_error@plt>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xe6b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe5b(%rip),%xmm0
movsd  %xmm0,(%rax)
cmpl   $0x0,-0x1c(%rbp)
jne    11d8 <axes_earth+0x98>
mov    -0x18(%rbp),%rax
movsd  0xe41(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe31(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14f3 <axes_earth+0x3b3>
cmpl   $0x1,-0x1c(%rbp)
jne    127b <axes_earth+0x13b>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
movzbl 0x5(%rax),%eax
cmp    $0x65,%eax
jne    120a <axes_earth+0xca>
lea    0xe82(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1050 <fatal_error@plt>
mov    -0x28(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1237 <axes_earth+0xf7>
mov    -0x28(%rbp),%rax
movzbl 0x1(%rax),%ecx
and    $0x7f,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x34(%rbp)
jmp    1245 <axes_earth+0x105>
mov    -0x28(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0x7f,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x2,%rdi
call   1030 <int4@plt>
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1060 <scaled2dbl@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14ee <axes_earth+0x3ae>
cmpl   $0x2,-0x1c(%rbp)
jne    12aa <axes_earth+0x16a>
mov    -0x10(%rbp),%rax
movsd  0xdbf(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xda7(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14e9 <axes_earth+0x3a9>
cmpl   $0x3,-0x1c(%rbp)
je     12be <axes_earth+0x17e>
cmpl   $0x7,-0x1c(%rbp)
jne    13e5 <axes_earth+0x2a5>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
movzbl 0x5(%rax),%eax
cmp    $0x65,%eax
jne    12e6 <axes_earth+0x1a6>
lea    0xdde(%rip),%rdi
lea    0xd9e(%rip),%rsi
call   1050 <fatal_error@plt>
mov    -0x28(%rbp),%rax
movzbl 0x6(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1313 <axes_earth+0x1d3>
mov    -0x28(%rbp),%rax
movzbl 0x6(%rax),%ecx
and    $0x7f,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x38(%rbp)
jmp    1321 <axes_earth+0x1e1>
mov    -0x28(%rbp),%rax
movzbl 0x6(%rax),%eax
and    $0x7f,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x7,%rdi
call   1030 <int4@plt>
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1060 <scaled2dbl@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movzbl 0xb(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1377 <axes_earth+0x237>
mov    -0x28(%rbp),%rax
movzbl 0xb(%rax),%ecx
and    $0x7f,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
jmp    1385 <axes_earth+0x245>
mov    -0x28(%rbp),%rax
movzbl 0xb(%rax),%eax
and    $0x7f,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
add    $0xc,%rdi
call   1030 <int4@plt>
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1060 <scaled2dbl@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x3,-0x1c(%rbp)
jne    13e0 <axes_earth+0x2a0>
mov    -0x10(%rbp),%rax
movsd  0xc7c(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xc68(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    14e4 <axes_earth+0x3a4>
cmpl   $0x4,-0x1c(%rbp)
jne    1414 <axes_earth+0x2d4>
mov    -0x10(%rbp),%rax
movsd  0xc35(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xc2d(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14df <axes_earth+0x39f>
cmpl   $0x5,-0x1c(%rbp)
jne    1443 <axes_earth+0x303>
mov    -0x10(%rbp),%rax
movsd  0xc06(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xbee(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14da <axes_earth+0x39a>
cmpl   $0x6,-0x1c(%rbp)
jne    1472 <axes_earth+0x332>
mov    -0x18(%rbp),%rax
movsd  0xbc7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xbb7(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14d5 <axes_earth+0x395>
cmpl   $0x8,-0x1c(%rbp)
jne    14a1 <axes_earth+0x361>
mov    -0x18(%rbp),%rax
movsd  0xb90(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xb80(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14d0 <axes_earth+0x390>
cmpl   $0x9,-0x1c(%rbp)
jne    14cb <axes_earth+0x38b>
mov    -0x10(%rbp),%rax
movsd  0xb59(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xb41(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    14d0 <axes_earth+0x390>
jmp    14d5 <axes_earth+0x395>
jmp    14da <axes_earth+0x39a>
jmp    14df <axes_earth+0x39f>
jmp    14e4 <axes_earth+0x3a4>
jmp    14e9 <axes_earth+0x3a9>
jmp    14ee <axes_earth+0x3ae>
jmp    14f3 <axes_earth+0x3b3>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<axes_earth>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
call   1040 <code_table_3_2_location@plt>
mov    %rax,%r13
test   %rax,%rax
jne    1174 <axes_earth+0x34>
lea    0xeb8(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1050 <fatal_error@plt>
mov    0x0(%r13),%bl
movabs $0x41584a3b80000000,%rax
4a 58 41
mov    %rax,(%r14)
mov    %rax,(%r15)
cmp    $0x2,%bl
je     11a1 <axes_earth+0x61>
cmp    $0x1,%bl
je     11c0 <axes_earth+0x80>
test   %bl,%bl
jne    1215 <axes_earth+0xd5>
mov    %rax,(%r14)
mov    %rax,(%r15)
jmp    12bb <axes_earth+0x17b>
movabs $0x415854ac00000000,%rax
54 58 41
mov    %rax,(%r15)
movabs $0x41583fc9c0000000,%rax
3f 58 41
mov    %rax,(%r14)
jmp    12bb <axes_earth+0x17b>
mov    0x18(%r12),%rax
cmpb   $0x65,0x5(%rax)
jne    11de <axes_earth+0x9e>
lea    0xe76(%rip),%rdi
lea    0xe6e(%rip),%rsi
call   1050 <fatal_error@plt>
movzbl 0x1(%r13),%eax
mov    %eax,%ecx
and    $0x7f,%ecx
mov    %ecx,%ebp
neg    %ebp
test   $0x80,%al
cmove  %ecx,%ebp
add    $0x2,%r13
mov    %r13,%rdi
call   1030 <int4@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <scaled2dbl@plt>
movsd  %xmm0,(%r14)
movsd  %xmm0,(%r15)
jmp    12bb <axes_earth+0x17b>
mov    %ebx,%eax
and    $0xfb,%al
cmp    $0x3,%al
jne    12cc <axes_earth+0x18c>
mov    0x18(%r12),%rax
cmpb   $0x65,0x5(%rax)
jne    123f <axes_earth+0xff>
lea    0xe4d(%rip),%rdi
lea    0xe0d(%rip),%rsi
call   1050 <fatal_error@plt>
movzbl 0x6(%r13),%eax
mov    %eax,%ecx
and    $0x7f,%ecx
mov    %ecx,%ebp
neg    %ebp
test   $0x80,%al
cmove  %ecx,%ebp
lea    0x7(%r13),%rdi
call   1030 <int4@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <scaled2dbl@plt>
movsd  %xmm0,(%r15)
movzbl 0xb(%r13),%eax
mov    %eax,%ecx
and    $0x7f,%ecx
mov    %ecx,%ebp
neg    %ebp
test   $0x80,%al
cmove  %ecx,%ebp
add    $0xc,%r13
mov    %r13,%rdi
call   1030 <int4@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <scaled2dbl@plt>
movsd  %xmm0,(%r14)
cmp    $0x3,%bl
jne    12bb <axes_earth+0x17b>
movsd  0xd5d(%rip),%xmm0
movsd  (%r15),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
mulsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0xfc,%bl
cmp    $0x5,%bl
ja     12bb <axes_earth+0x17b>
movzbl %bl,%eax
lea    0xd2a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movabs $0x415854a640000000,%rax
54 58 41
mov    %rax,(%r15)
movabs $0x41583fc408f5c28f,%rax
3f 58 41
jmp    11b8 <axes_earth+0x78>
movabs $0x415854a640000000,%rax
54 58 41
mov    %rax,(%r15)
movabs $0x41583fc40fae147b,%rax
3f 58 41
jmp    11b8 <axes_earth+0x78>
movabs $0x41584de740000000,%rax
4d 58 41
jmp    1196 <axes_earth+0x56>
movabs $0x41584de000000000,%rax
4d 58 41
jmp    1196 <axes_earth+0x56>
movabs $0x41585416d9581062,%rax
54 58 41
mov    %rax,(%r15)
movabs $0x41583f483a2d0e56,%rax
3f 58 41
jmp    11b8 <axes_earth+0x78>

LLVM IR (-O0):
@.str = [40 x i8] c"radius_earth: code_table 3.2 is unknown\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [56 x i8] c"Grid defintion 101 does not support user-defined radius\00"
@.str.3 = [66 x i8] c"Grid defintion 101 does not support user-defined major/minor axes\00"
define i32 @axes_earth(i8** %0, double* %1, double* %2) {
%4 = alloca i8**
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8** %0, i8*** %4
store double* %1, double** %5
store double* %2, double** %6
%11 = load i8**, i8*** %4
%12 = call i8* @code_table_3_2_location(i8** %11)
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = call i32 @fatal_error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %3
%18 = load i8*, i8** %8
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
store i32 %20, i32* %7
%21 = load double*, double** %6
store double 6.367470e+06, double* %21
%22 = load double*, double** %5
store double 6.367470e+06, double* %22
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %17
%26 = load double*, double** %6
store double 6.367470e+06, double* %26
%27 = load double*, double** %5
store double 6.367470e+06, double* %27
br label %198
28: ; preds = %17
%29 = load i32, i32* %7
%30 = icmp eq i32 %29, 1
br i1 %30, label %31, label %71
31: ; preds = %28
%32 = load i8**, i8*** %4
%33 = getelementptr inbounds i8*, i8** %32, i64 3
%34 = load i8*, i8** %33
%35 = getelementptr inbounds i8, i8* %34, i64 5
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = icmp eq i32 %37, 101
br i1 %38, label %39, label %41
39: ; preds = %31
%40 = call i32 @fatal_error(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %41
41: ; preds = %39, %31
%42 = load i8*, i8** %8
%43 = getelementptr inbounds i8, i8* %42, i64 1
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = and i32 %45, 128
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %55
48: ; preds = %41
%49 = load i8*, i8** %8
%50 = getelementptr inbounds i8, i8* %49, i64 1
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = and i32 %52, 127
%54 = sub nsw i32 0, %53
br label %61
55: ; preds = %41
%56 = load i8*, i8** %8
%57 = getelementptr inbounds i8, i8* %56, i64 1
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = and i32 %59, 127
br label %61
61: ; preds = %55, %48
%62 = phi i32 [ %54, %48 ], [ %60, %55 ]
store i32 %62, i32* %9
%63 = load i8*, i8** %8
%64 = getelementptr inbounds i8, i8* %63, i64 2
%65 = call i32 @int4(i8* %64)
store i32 %65, i32* %10
%66 = load i32, i32* %9
%67 = load i32, i32* %10
%68 = call double @scaled2dbl(i32 %66, i32 %67)
%69 = load double*, double** %6
store double %68, double* %69
%70 = load double*, double** %5
store double %68, double* %70
br label %197
71: ; preds = %28
%72 = load i32, i32* %7
%73 = icmp eq i32 %72, 2
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = load double*, double** %5
store double 6.378160e+06, double* %75
%76 = load double*, double** %6
store double 0x41583FC9C0000000, double* %76
br label %196
77: ; preds = %71
%78 = load i32, i32* %7
%79 = icmp eq i32 %78, 3
br i1 %79, label %83, label %80
80: ; preds = %77
%81 = load i32, i32* %7
%82 = icmp eq i32 %81, 7
br i1 %82, label %83, label %160
83: ; preds = %80, %77
%84 = load i8**, i8*** %4
%85 = getelementptr inbounds i8*, i8** %84, i64 3
%86 = load i8*, i8** %85
%87 = getelementptr inbounds i8, i8* %86, i64 5
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = icmp eq i32 %89, 101
br i1 %90, label %91, label %93
91: ; preds = %83
%92 = call i32 @fatal_error(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %93
93: ; preds = %91, %83
%94 = load i8*, i8** %8
%95 = getelementptr inbounds i8, i8* %94, i64 6
%96 = load i8, i8* %95
%97 = zext i8 %96 to i32
%98 = and i32 %97, 128
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %107
100: ; preds = %93
%101 = load i8*, i8** %8
%102 = getelementptr inbounds i8, i8* %101, i64 6
%103 = load i8, i8* %102
%104 = zext i8 %103 to i32
%105 = and i32 %104, 127
%106 = sub nsw i32 0, %105
br label %113
107: ; preds = %93
%108 = load i8*, i8** %8
%109 = getelementptr inbounds i8, i8* %108, i64 6
%110 = load i8, i8* %109
%111 = zext i8 %110 to i32
%112 = and i32 %111, 127
br label %113
113: ; preds = %107, %100
%114 = phi i32 [ %106, %100 ], [ %112, %107 ]
store i32 %114, i32* %9
%115 = load i8*, i8** %8
%116 = getelementptr inbounds i8, i8* %115, i64 7
%117 = call i32 @int4(i8* %116)
store i32 %117, i32* %10
%118 = load i32, i32* %9
%119 = load i32, i32* %10
%120 = call double @scaled2dbl(i32 %118, i32 %119)
%121 = load double*, double** %5
store double %120, double* %121
%122 = load i8*, i8** %8
%123 = getelementptr inbounds i8, i8* %122, i64 11
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = and i32 %125, 128
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %135
128: ; preds = %113
%129 = load i8*, i8** %8
%130 = getelementptr inbounds i8, i8* %129, i64 11
%131 = load i8, i8* %130
%132 = zext i8 %131 to i32
%133 = and i32 %132, 127
%134 = sub nsw i32 0, %133
br label %141
135: ; preds = %113
%136 = load i8*, i8** %8
%137 = getelementptr inbounds i8, i8* %136, i64 11
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = and i32 %139, 127
br label %141
141: ; preds = %135, %128
%142 = phi i32 [ %134, %128 ], [ %140, %135 ]
store i32 %142, i32* %9
%143 = load i8*, i8** %8
%144 = getelementptr inbounds i8, i8* %143, i64 12
%145 = call i32 @int4(i8* %144)
store i32 %145, i32* %10
%146 = load i32, i32* %9
%147 = load i32, i32* %10
%148 = call double @scaled2dbl(i32 %146, i32 %147)
%149 = load double*, double** %6
store double %148, double* %149
%150 = load i32, i32* %7
%151 = icmp eq i32 %150, 3
br i1 %151, label %152, label %159
152: ; preds = %141
%153 = load double*, double** %5
%154 = load double, double* %153
%155 = fmul double %154, 1.000000e+03
store double %155, double* %153
%156 = load double*, double** %6
%157 = load double, double* %156
%158 = fmul double %157, 1.000000e+03
store double %158, double* %156
br label %159
159: ; preds = %152, %141
br label %195
160: ; preds = %80
%161 = load i32, i32* %7
%162 = icmp eq i32 %161, 4
br i1 %162, label %163, label %166
163: ; preds = %160
%164 = load double*, double** %5
store double 0x415854A640000000, double* %164
%165 = load double*, double** %6
store double 0x41583FC408F5C28F, double* %165
br label %194
166: ; preds = %160
%167 = load i32, i32* %7
%168 = icmp eq i32 %167, 5
br i1 %168, label %169, label %172
169: ; preds = %166
%170 = load double*, double** %5
store double 0x415854A640000000, double* %170
%171 = load double*, double** %6
store double 0x41583FC40FAE147B, double* %171
br label %193
172: ; preds = %166
%173 = load i32, i32* %7
%174 = icmp eq i32 %173, 6
br i1 %174, label %175, label %178
175: ; preds = %172
%176 = load double*, double** %6
store double 0x41584DE740000000, double* %176
%177 = load double*, double** %5
store double 0x41584DE740000000, double* %177
br label %192
178: ; preds = %172
%179 = load i32, i32* %7
%180 = icmp eq i32 %179, 8
br i1 %180, label %181, label %184
181: ; preds = %178
%182 = load double*, double** %6
store double 6.371200e+06, double* %182
%183 = load double*, double** %5
store double 6.371200e+06, double* %183
br label %191
184: ; preds = %178
%185 = load i32, i32* %7
%186 = icmp eq i32 %185, 9
br i1 %186, label %187, label %190
187: ; preds = %184
%188 = load double*, double** %5
store double 0x41585416D9581062, double* %188
%189 = load double*, double** %6
store double 0x41583F483A2D0E56, double* %189
br label %190
190: ; preds = %187, %184
br label %191
191: ; preds = %190, %181
br label %192
192: ; preds = %191, %175
br label %193
193: ; preds = %192, %169
br label %194
194: ; preds = %193, %163
br label %195
195: ; preds = %194, %159
br label %196
196: ; preds = %195, %74
br label %197
197: ; preds = %196, %61
br label %198
198: ; preds = %197, %25
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"radius_earth: code_table 3.2 is unknown\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [56 x i8] c"Grid defintion 101 does not support user-defined radius\00"
@.str.3 = [66 x i8] c"Grid defintion 101 does not support user-defined major/minor axes\00"
define i32 @axes_earth(i8** %0, double* nocapture %1, double* nocapture %2) {
%4 = tail call i8* @code_table_3_2_location(i8** %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @fatal_error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
%9 = load i8, i8* %4
store double 6.367470e+06, double* %2
store double 6.367470e+06, double* %1
switch i8 %9, label %32 [
i8 0, label %10
i8 1, label %11
i8 2, label %31
]
10: ; preds = %8
store double 6.367470e+06, double* %2
store double 6.367470e+06, double* %1
br label %78
11: ; preds = %8
%12 = getelementptr inbounds i8*, i8** %0, i64 3
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i64 5
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 101
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = tail call i32 @fatal_error(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %11
%20 = getelementptr inbounds i8, i8* %4, i64 1
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = and i32 %22, 128
%24 = icmp eq i32 %23, 0
%25 = and i32 %22, 127
%26 = sub nsw i32 0, %25
%27 = select i1 %24, i32 %25, i32 %26
%28 = getelementptr inbounds i8, i8* %4, i64 2
%29 = tail call i32 @int4(i8* %28)
%30 = tail call double @scaled2dbl(i32 %27, i32 %29)
store double %30, double* %2
store double %30, double* %1
br label %78
31: ; preds = %8
store double 6.378160e+06, double* %1
store double 0x41583FC9C0000000, double* %2
br label %78
32: ; preds = %8
%33 = icmp eq i8 %9, 3
%34 = and i8 %9, -5
%35 = icmp eq i8 %34, 3
br i1 %35, label %36, label %72
36: ; preds = %32
%37 = getelementptr inbounds i8*, i8** %0, i64 3
%38 = load i8*, i8** %37
%39 = getelementptr inbounds i8, i8* %38, i64 5
%40 = load i8, i8* %39
%41 = icmp eq i8 %40, 101
br i1 %41, label %42, label %44
42: ; preds = %36
%43 = tail call i32 @fatal_error(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %44
44: ; preds = %42, %36
%45 = getelementptr inbounds i8, i8* %4, i64 6
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = and i32 %47, 128
%49 = icmp eq i32 %48, 0
%50 = and i32 %47, 127
%51 = sub nsw i32 0, %50
%52 = select i1 %49, i32 %50, i32 %51
%53 = getelementptr inbounds i8, i8* %4, i64 7
%54 = tail call i32 @int4(i8* %53)
%55 = tail call double @scaled2dbl(i32 %52, i32 %54)
store double %55, double* %1
%56 = getelementptr inbounds i8, i8* %4, i64 11
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = and i32 %58, 128
%60 = icmp eq i32 %59, 0
%61 = and i32 %58, 127
%62 = sub nsw i32 0, %61
%63 = select i1 %60, i32 %61, i32 %62
%64 = getelementptr inbounds i8, i8* %4, i64 12
%65 = tail call i32 @int4(i8* %64)
%66 = tail call double @scaled2dbl(i32 %63, i32 %65)
store double %66, double* %2
br i1 %33, label %67, label %78
67: ; preds = %44
%68 = load double, double* %1
%69 = fmul double %68, 1.000000e+03
store double %69, double* %1
%70 = load double, double* %2
%71 = fmul double %70, 1.000000e+03
store double %71, double* %2
br label %78
72: ; preds = %32
switch i8 %9, label %78 [
i8 4, label %73
i8 5, label %74
i8 6, label %75
i8 8, label %76
i8 9, label %77
]
73: ; preds = %72
store double 0x415854A640000000, double* %1
store double 0x41583FC408F5C28F, double* %2
br label %78
74: ; preds = %72
store double 0x415854A640000000, double* %1
store double 0x41583FC40FAE147B, double* %2
br label %78
75: ; preds = %72
store double 0x41584DE740000000, double* %2
store double 0x41584DE740000000, double* %1
br label %78
76: ; preds = %72
store double 6.371200e+06, double* %2
store double 6.371200e+06, double* %1
br label %78
77: ; preds = %72
store double 0x41585416D9581062, double* %1
store double 0x41583F483A2D0E56, double* %2
br label %78
78: ; preds = %72, %19, %67, %44, %74, %76, %77, %75, %73, %31, %10
ret i32 0
}