#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*/ abort();
int /*<<< orphan*/ input_float(float *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ vis5d_get_ctx_projection(int, int *, float *);
int /*<<< orphan*/ vis5d_get_size(int, int *, int *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/);
void prompt_for_projection_args(int index, int proj, float projargs[]) {
  int current_proj;
  vis5d_get_ctx_projection(index, &current_proj, projargs);
  printf("Enter projection parameters, press Return for (default)\n");
  switch (proj) {
  case 0:
    printf("Generic projection (no units):\n");
    printf("   North Bound (%g): ", projargs[0]);
    input_float(&projargs[0]);
    printf("   West Bound (%g): ", projargs[1]);
    input_float(&projargs[1]);
    printf("   Row Increment (%g): ", projargs[2]);
    input_float(&projargs[2]);
    printf("   Column Increment (%g): ", projargs[3]);
    input_float(&projargs[3]);
    break;
  case 1:
    printf("Cylindrical Equidistant projection:\n");
    printf("   North Bound Latitude (degrees) (%g): ", projargs[0]);
    input_float(&projargs[0]);
    printf("   West Bound Longitude (degrees) (%g): ", projargs[1]);
    input_float(&projargs[1]);
    printf("   Row Increment (degrees) (%g): ", projargs[2]);
    input_float(&projargs[2]);
    printf("   Column Increment (degrees) (%g): ", projargs[3]);
    input_float(&projargs[3]);
    break;
  case 2:
    if (current_proj != 2) {
      int nr, nc;
      vis5d_get_size(index, &nr, &nc, 0, 0, 0, 0, 0, 0);
      projargs[0] = 70.0;
      projargs[1] = 20.0;
      projargs[2] = -nr;
      projargs[3] = nc / 2;
      projargs[4] = 90.0;
      projargs[5] = 100.0;
    }
    printf("Lambert Conformal projection:\n");
    printf("   Standard Latitude 1 (degrees) (%g): ", projargs[0]);
    input_float(&projargs[0]);
    printf("   Standard Latitude 2 (degrees) (%g): ", projargs[1]);
    input_float(&projargs[1]);
    printf("   North/South Pole row (%g): ", projargs[2]);
    input_float(&projargs[2]);
    printf("   North/South Pole column (%g): ", projargs[3]);
    input_float(&projargs[3]);
    printf("   Central longitude (degrees) (%g): ", projargs[4]);
    input_float(&projargs[4]);
    printf("   Column increment (km) (%g): ", projargs[5]);
    input_float(&projargs[5]);
    break;
  case 3:
    if (current_proj != 3) {
      int nr, nc;
      vis5d_get_size(index, &nr, &nc, 0, 0, 0, 0, 0, 0);
      projargs[0] = 90.0;
      projargs[1] = 0.0;
      projargs[2] = nr / 2.0;
      projargs[3] = nc / 2.0;
      projargs[4] = 500.0;
    }
    printf("Stereographic:\n");
    printf("  Center Latitude (degrees) (%g): ", projargs[0]);
    input_float(&projargs[0]);
    printf("  Center Longitude (degrees) (%g): ", projargs[1]);
    input_float(&projargs[1]);
    printf("  Center Row (%g): ", projargs[2]);
    input_float(&projargs[2]);
    printf("  Center Column (%g): ", projargs[3]);
    input_float(&projargs[3]);
    printf("  Column spacing (km) (%g): ", projargs[4]);
    input_float(&projargs[4]);
    break;
  case 4:
    printf("Rotated Equidistant projection:\n");
    printf("  Latitude on rotated globe of grid row 0 (degrees) (%g): ",
           projargs[0]);
    input_float(&projargs[0]);
    printf("  Longitude on rotated globe of grid column 0 (degrees)");
    printf(" (%g): ", projargs[1]);
    input_float(&projargs[1]);
    printf("   Row Increment on rotated globe (degrees) (%g): ", projargs[2]);
    input_float(&projargs[2]);
    printf("   Column Increment on rotated globe (degrees) (%g): ",
           projargs[3]);
    input_float(&projargs[3]);
    printf("  Earth Latitude of (0, 0) on rotated globe (degrees) (%g): ",
           projargs[4]);
    input_float(&projargs[4]);
    printf("  Earth Longitude of (0, 0) on rotated globe (degrees) (%g): ",
           projargs[5]);
    input_float(&projargs[5]);
    printf("   Clockwise rotation of rotated globe (degrees) (%g): ",
           projargs[6]);
    input_float(&projargs[6]);
    break;
  case 20:
  case 21:
    if (proj == 20) {
      printf("Cylindrical projection of rectangular grid:\n");
    } else {
      printf("Spherical projection of rectangular grid:\n");
    }
    printf("   North Bound Latitude (degrees) (%g): ", projargs[0]);
    input_float(&projargs[0]);
    printf("   West Bound Longitude (degrees) (%g): ", projargs[1]);
    input_float(&projargs[1]);
    printf("   Row Increment (degrees) (%g): ", projargs[2]);
    input_float(&projargs[2]);
    printf("   Column Increment (degrees) (%g): ", projargs[3]);
    input_float(&projargs[3]);
    break;
  default:
    abort();
  }
}


x86 assembly (clang, -O0):
<prompt_for_projection_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rsi
call   1060 <vis5d_get_ctx_projection@plt>
lea    0xeff(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0x15,%rax
ja     181e <prompt_for_projection_args+0x6ce>
mov    -0x30(%rbp),%rax
lea    0xe84(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf0b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xefd(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeea(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeda(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
call   1070 <input_float@plt>
jmp    1825 <prompt_for_projection_args+0x6d5>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee6(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
call   1070 <input_float@plt>
jmp    1825 <prompt_for_projection_args+0x6d5>
cmpl   $0x2,-0x14(%rbp)
je     13a8 <prompt_for_projection_args+0x258>
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1050 <vis5d_get_size@plt>
mov    -0x10(%rbp),%rax
movss  0xcc9(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0xcb5(%rip),%xmm0
movss  %xmm0,0x4(%rax)
xor    %eax,%eax
sub    -0x18(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x10(%rbp),%rax
movss  0xc72(%rip),%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movss  0xc65(%rip),%xmm0
movss  %xmm0,0x14(%rax)
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe43(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe47(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe47(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe3e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe38(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe36(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x14,%rdi
call   1070 <input_float@plt>
jmp    1825 <prompt_for_projection_args+0x6d5>
cmpl   $0x3,-0x14(%rbp)
je     1549 <prompt_for_projection_args+0x3f9>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1050 <vis5d_get_size@plt>
mov    -0x10(%rbp),%rax
movss  0xb18(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
cvtsi2sdl -0x20(%rbp),%xmm0
movsd  0xb0f(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  0xaf1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x10(%rbp),%rax
movss  0xabc(%rip),%xmm0
movss  %xmm0,0x10(%rax)
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd89(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd88(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd84(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd70(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd5f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1070 <input_float@plt>
jmp    1825 <prompt_for_projection_args+0x6d5>
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd63(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <input_float@plt>
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd08(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd7c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd87(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd95(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdaa(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x14,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x18(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdc0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x18,%rdi
call   1070 <input_float@plt>
jmp    1825 <prompt_for_projection_args+0x6d5>
cmpl   $0x14,-0x8(%rbp)
jne    1770 <prompt_for_projection_args+0x620>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    177e <prompt_for_projection_args+0x62e>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x9c3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x9c8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x9c9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <input_float@plt>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x9c3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
call   1070 <input_float@plt>
jmp    1825 <prompt_for_projection_args+0x6d5>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_for_projection_args>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r13
mov    %esi,%ebx
mov    %edi,%ebp
lea    0x24(%rsp),%rsi
call   1070 <vis5d_get_ctx_projection@plt>
lea    0x12c6(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x15,%ebx
ja     1589 <prompt_for_projection_args+0x429>
lea    0x1313(%rip),%rdi
mov    %ebx,%eax
lea    0xe64(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1397(%rip),%rdi
call   1040 <puts@plt>
lea    0xee3(%rip),%rax
mov    %rax,0x18(%rsp)
mov    $0x3,%ebp
lea    0xeba(%rip),%rax
mov    %rax,0x10(%rsp)
mov    $0x2,%r14d
lea    0xe93(%rip),%r12
mov    $0x1,%r15d
lea    0xe70(%rip),%rdi
jmp    14e4 <prompt_for_projection_args+0x384>
lea    0x132b(%rip),%rdi
jmp    14a8 <prompt_for_projection_args+0x348>
cmpl   $0x2,0x24(%rsp)
je     1275 <prompt_for_projection_args+0x115>
sub    $0x8,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %ebx,%ebx
mov    %ebp,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1060 <vis5d_get_size@plt>
add    $0x20,%rsp
movabs $0x41a00000428c0000,%rax
mov    %rax,0x0(%r13)
sub    0xc(%rsp),%ebx
cvtsi2ss %ebx,%xmm0
movss  %xmm0,0x8(%r13)
mov    0x8(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
movss  %xmm0,0xc(%r13)
movabs $0x42c8000042b40000,%rax
mov    %rax,0x10(%r13)
lea    0x128d(%rip),%rdi
call   1040 <puts@plt>
movss  0x0(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec5(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r13,%rdi
call   1080 <input_float@plt>
lea    0x4(%r13),%rbx
movss  0x4(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec9(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
lea    0x8(%r13),%rbx
lea    0xf3e(%rip),%rax
mov    %rax,0x18(%rsp)
mov    $0x5,%ebp
lea    0xf07(%rip),%rax
mov    %rax,0x10(%rsp)
mov    $0x4,%r14d
lea    0xed3(%rip),%r12
mov    $0x3,%r15d
lea    0xea7(%rip),%rdi
jmp    14e7 <prompt_for_projection_args+0x387>
cmpl   $0x3,0x24(%rsp)
je     1376 <prompt_for_projection_args+0x216>
sub    $0x8,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %ebp,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1060 <vis5d_get_size@plt>
add    $0x20,%rsp
movq   $0x42b40000,0x0(%r13)
42
cvtsi2sdl 0xc(%rsp),%xmm0
movsd  0xcb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%r13)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%r13)
movl   $0x43fa0000,0x10(%r13)
43
lea    0x117d(%rip),%rdi
call   1040 <puts@plt>
movss  0x0(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r13,%rdi
call   1080 <input_float@plt>
lea    0x4(%r13),%rbx
lea    0xef3(%rip),%rax
mov    %rax,0x18(%rsp)
mov    $0x4,%ebp
lea    0xecb(%rip),%rax
mov    %rax,0x10(%rsp)
mov    $0x3,%r14d
lea    0xea5(%rip),%r12
mov    $0x2,%r15d
lea    0xe74(%rip),%rdi
jmp    14e7 <prompt_for_projection_args+0x387>
lea    0x10f1(%rip),%rdi
call   1040 <puts@plt>
movss  0x0(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebe(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r13,%rdi
call   1080 <input_float@plt>
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x4(%r13),%rbx
movss  0x4(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe84(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
lea    0x8(%r13),%rbx
movss  0x8(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xedb(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
lea    0xc(%r13),%rbx
lea    0xfa5(%rip),%rax
mov    %rax,0x18(%rsp)
mov    $0x6,%ebp
lea    0xf56(%rip),%rax
mov    %rax,0x10(%rsp)
mov    $0x5,%r14d
lea    0xf07(%rip),%r12
mov    $0x4,%r15d
lea    0xec4(%rip),%rdi
jmp    14e7 <prompt_for_projection_args+0x387>
lea    0xfdc(%rip),%rdi
call   1040 <puts@plt>
lea    0xc7e(%rip),%rax
mov    %rax,0x18(%rsp)
mov    $0x3,%ebp
lea    0xc4b(%rip),%rax
mov    %rax,0x10(%rsp)
mov    $0x2,%r14d
lea    0xc10(%rip),%r12
mov    $0x1,%r15d
lea    0xbda(%rip),%rdi
mov    %r13,%rbx
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
lea    0x0(,%r15,4),%rbx
add    %r13,%rbx
movss  0x0(%r13,%r15,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
lea    0x0(,%r14,4),%rbx
add    %r13,%rbx
movss  0x0(%r13,%r14,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x10(%rsp),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
lea    0x0(,%rbp,4),%rbx
add    %r13,%rbx
movss  0x0(%r13,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rsp),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1080 <input_float@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"Enter projection parameters, press Return for (default)\0A\00"
@.str.1 = [32 x i8] c"Generic projection (no units):\0A\00"
@.str.2 = [22 x i8] c" North Bound (%g): \00"
@.str.3 = [21 x i8] c" West Bound (%g): \00"
@.str.4 = [24 x i8] c" Row Increment (%g): \00"
@.str.5 = [27 x i8] c" Column Increment (%g): \00"
@.str.6 = [37 x i8] c"Cylindrical Equidistant projection:\0A\00"
@.str.7 = [41 x i8] c" North Bound Latitude (degrees) (%g): \00"
@.str.8 = [41 x i8] c" West Bound Longitude (degrees) (%g): \00"
@.str.9 = [34 x i8] c" Row Increment (degrees) (%g): \00"
@.str.10 = [37 x i8] c" Column Increment (degrees) (%g): \00"
@.str.11 = [31 x i8] c"Lambert Conformal projection:\0A\00"
@.str.12 = [40 x i8] c" Standard Latitude 1 (degrees) (%g): \00"
@.str.13 = [40 x i8] c" Standard Latitude 2 (degrees) (%g): \00"
@.str.14 = [31 x i8] c" North/South Pole row (%g): \00"
@.str.15 = [34 x i8] c" North/South Pole column (%g): \00"
@.str.16 = [38 x i8] c" Central longitude (degrees) (%g): \00"
@.str.17 = [32 x i8] c" Column increment (km) (%g): \00"
@.str.18 = [16 x i8] c"Stereographic:\0A\00"
@.str.19 = [35 x i8] c" Center Latitude (degrees) (%g): \00"
@.str.20 = [36 x i8] c" Center Longitude (degrees) (%g): \00"
@.str.21 = [20 x i8] c" Center Row (%g): \00"
@.str.22 = [23 x i8] c" Center Column (%g): \00"
@.str.23 = [29 x i8] c" Column spacing (km) (%g): \00"
@.str.24 = [33 x i8] c"Rotated Equidistant projection:\0A\00"
@.str.25 = [59 x i8] c" Latitude on rotated globe of grid row 0 (degrees) (%g): \00"
@.str.26 = [56 x i8] c" Longitude on rotated globe of grid column 0 (degrees)\00"
@.str.27 = [8 x i8] c" (%g): \00"
@.str.28 = [51 x i8] c" Row Increment on rotated globe (degrees) (%g): \00"
@.str.29 = [54 x i8] c" Column Increment on rotated globe (degrees) (%g): \00"
@.str.30 = [61 x i8] c" Earth Latitude of (0, 0) on rotated globe (degrees) (%g): \00"
@.str.31 = [62 x i8] c" Earth Longitude of (0, 0) on rotated globe (degrees) (%g): \00"
@.str.32 = [56 x i8] c" Clockwise rotation of rotated globe (degrees) (%g): \00"
@.str.33 = [45 x i8] c"Cylindrical projection of rectangular grid:\0A\00"
@.str.34 = [43 x i8] c"Spherical projection of rectangular grid:\0A\00"
define void @prompt_for_projection_args(i32 %0, i32 %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store float* %2, float** %6
%12 = load i32, i32* %4
%13 = load float*, float** %6
%14 = call i32 @vis5d_get_ctx_projection(i32 %12, i32* %7, float* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %5
switch i32 %16, label %324 [
i32 0, label %17
i32 1, label %51
i32 2, label %85
i32 3, label %159
i32 4, label %225
i32 20, label %284
i32 21, label %284
]
17: ; preds = %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 0
%21 = load float, float* %20
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %22)
%24 = load float*, float** %6
%25 = getelementptr inbounds float, float* %24, i64 0
%26 = call i32 @input_float(float* %25)
%27 = load float*, float** %6
%28 = getelementptr inbounds float, float* %27, i64 1
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), double %30)
%32 = load float*, float** %6
%33 = getelementptr inbounds float, float* %32, i64 1
%34 = call i32 @input_float(float* %33)
%35 = load float*, float** %6
%36 = getelementptr inbounds float, float* %35, i64 2
%37 = load float, float* %36
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), double %38)
%40 = load float*, float** %6
%41 = getelementptr inbounds float, float* %40, i64 2
%42 = call i32 @input_float(float* %41)
%43 = load float*, float** %6
%44 = getelementptr inbounds float, float* %43, i64 3
%45 = load float, float* %44
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %46)
%48 = load float*, float** %6
%49 = getelementptr inbounds float, float* %48, i64 3
%50 = call i32 @input_float(float* %49)
br label %326
51: ; preds = %3
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%53 = load float*, float** %6
%54 = getelementptr inbounds float, float* %53, i64 0
%55 = load float, float* %54
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %56)
%58 = load float*, float** %6
%59 = getelementptr inbounds float, float* %58, i64 0
%60 = call i32 @input_float(float* %59)
%61 = load float*, float** %6
%62 = getelementptr inbounds float, float* %61, i64 1
%63 = load float, float* %62
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), double %64)
%66 = load float*, float** %6
%67 = getelementptr inbounds float, float* %66, i64 1
%68 = call i32 @input_float(float* %67)
%69 = load float*, float** %6
%70 = getelementptr inbounds float, float* %69, i64 2
%71 = load float, float* %70
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), double %72)
%74 = load float*, float** %6
%75 = getelementptr inbounds float, float* %74, i64 2
%76 = call i32 @input_float(float* %75)
%77 = load float*, float** %6
%78 = getelementptr inbounds float, float* %77, i64 3
%79 = load float, float* %78
%80 = fpext float %79 to double
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), double %80)
%82 = load float*, float** %6
%83 = getelementptr inbounds float, float* %82, i64 3
%84 = call i32 @input_float(float* %83)
br label %326
85: ; preds = %3
%86 = load i32, i32* %7
%87 = icmp ne i32 %86, 2
br i1 %87, label %88, label %109
88: ; preds = %85
%89 = load i32, i32* %4
%90 = call i32 @vis5d_get_size(i32 %89, i32* %8, i32* %9, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%91 = load float*, float** %6
%92 = getelementptr inbounds float, float* %91, i64 0
store float 7.000000e+01, float* %92
%93 = load float*, float** %6
%94 = getelementptr inbounds float, float* %93, i64 1
store float 2.000000e+01, float* %94
%95 = load i32, i32* %8
%96 = sub nsw i32 0, %95
%97 = sitofp i32 %96 to float
%98 = load float*, float** %6
%99 = getelementptr inbounds float, float* %98, i64 2
store float %97, float* %99
%100 = load i32, i32* %9
%101 = sdiv i32 %100, 2
%102 = sitofp i32 %101 to float
%103 = load float*, float** %6
%104 = getelementptr inbounds float, float* %103, i64 3
store float %102, float* %104
%105 = load float*, float** %6
%106 = getelementptr inbounds float, float* %105, i64 4
store float 9.000000e+01, float* %106
%107 = load float*, float** %6
%108 = getelementptr inbounds float, float* %107, i64 5
store float 1.000000e+02, float* %108
br label %109
109: ; preds = %88, %85
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%111 = load float*, float** %6
%112 = getelementptr inbounds float, float* %111, i64 0
%113 = load float, float* %112
%114 = fpext float %113 to double
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), double %114)
%116 = load float*, float** %6
%117 = getelementptr inbounds float, float* %116, i64 0
%118 = call i32 @input_float(float* %117)
%119 = load float*, float** %6
%120 = getelementptr inbounds float, float* %119, i64 1
%121 = load float, float* %120
%122 = fpext float %121 to double
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0), double %122)
%124 = load float*, float** %6
%125 = getelementptr inbounds float, float* %124, i64 1
%126 = call i32 @input_float(float* %125)
%127 = load float*, float** %6
%128 = getelementptr inbounds float, float* %127, i64 2
%129 = load float, float* %128
%130 = fpext float %129 to double
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), double %130)
%132 = load float*, float** %6
%133 = getelementptr inbounds float, float* %132, i64 2
%134 = call i32 @input_float(float* %133)
%135 = load float*, float** %6
%136 = getelementptr inbounds float, float* %135, i64 3
%137 = load float, float* %136
%138 = fpext float %137 to double
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), double %138)
%140 = load float*, float** %6
%141 = getelementptr inbounds float, float* %140, i64 3
%142 = call i32 @input_float(float* %141)
%143 = load float*, float** %6
%144 = getelementptr inbounds float, float* %143, i64 4
%145 = load float, float* %144
%146 = fpext float %145 to double
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.16, i64 0, i64 0), double %146)
%148 = load float*, float** %6
%149 = getelementptr inbounds float, float* %148, i64 4
%150 = call i32 @input_float(float* %149)
%151 = load float*, float** %6
%152 = getelementptr inbounds float, float* %151, i64 5
%153 = load float, float* %152
%154 = fpext float %153 to double
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0), double %154)
%156 = load float*, float** %6
%157 = getelementptr inbounds float, float* %156, i64 5
%158 = call i32 @input_float(float* %157)
br label %326
159: ; preds = %3
%160 = load i32, i32* %7
%161 = icmp ne i32 %160, 3
br i1 %161, label %162, label %183
162: ; preds = %159
%163 = load i32, i32* %4
%164 = call i32 @vis5d_get_size(i32 %163, i32* %10, i32* %11, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%165 = load float*, float** %6
%166 = getelementptr inbounds float, float* %165, i64 0
store float 9.000000e+01, float* %166
%167 = load float*, float** %6
%168 = getelementptr inbounds float, float* %167, i64 1
store float 0.000000e+00, float* %168
%169 = load i32, i32* %10
%170 = sitofp i32 %169 to double
%171 = fdiv double %170, 2.000000e+00
%172 = fptrunc double %171 to float
%173 = load float*, float** %6
%174 = getelementptr inbounds float, float* %173, i64 2
store float %172, float* %174
%175 = load i32, i32* %11
%176 = sitofp i32 %175 to double
%177 = fdiv double %176, 2.000000e+00
%178 = fptrunc double %177 to float
%179 = load float*, float** %6
%180 = getelementptr inbounds float, float* %179, i64 3
store float %178, float* %180
%181 = load float*, float** %6
%182 = getelementptr inbounds float, float* %181, i64 4
store float 5.000000e+02, float* %182
br label %183
183: ; preds = %162, %159
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
%185 = load float*, float** %6
%186 = getelementptr inbounds float, float* %185, i64 0
%187 = load float, float* %186
%188 = fpext float %187 to double
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.19, i64 0, i64 0), double %188)
%190 = load float*, float** %6
%191 = getelementptr inbounds float, float* %190, i64 0
%192 = call i32 @input_float(float* %191)
%193 = load float*, float** %6
%194 = getelementptr inbounds float, float* %193, i64 1
%195 = load float, float* %194
%196 = fpext float %195 to double
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), double %196)
%198 = load float*, float** %6
%199 = getelementptr inbounds float, float* %198, i64 1
%200 = call i32 @input_float(float* %199)
%201 = load float*, float** %6
%202 = getelementptr inbounds float, float* %201, i64 2
%203 = load float, float* %202
%204 = fpext float %203 to double
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), double %204)
%206 = load float*, float** %6
%207 = getelementptr inbounds float, float* %206, i64 2
%208 = call i32 @input_float(float* %207)
%209 = load float*, float** %6
%210 = getelementptr inbounds float, float* %209, i64 3
%211 = load float, float* %210
%212 = fpext float %211 to double
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0), double %212)
%214 = load float*, float** %6
%215 = getelementptr inbounds float, float* %214, i64 3
%216 = call i32 @input_float(float* %215)
%217 = load float*, float** %6
%218 = getelementptr inbounds float, float* %217, i64 4
%219 = load float, float* %218
%220 = fpext float %219 to double
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0), double %220)
%222 = load float*, float** %6
%223 = getelementptr inbounds float, float* %222, i64 4
%224 = call i32 @input_float(float* %223)
br label %326
225: ; preds = %3
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0))
%227 = load float*, float** %6
%228 = getelementptr inbounds float, float* %227, i64 0
%229 = load float, float* %228
%230 = fpext float %229 to double
%231 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.25, i64 0, i64 0), double %230)
%232 = load float*, float** %6
%233 = getelementptr inbounds float, float* %232, i64 0
%234 = call i32 @input_float(float* %233)
%235 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.26, i64 0, i64 0))
%236 = load float*, float** %6
%237 = getelementptr inbounds float, float* %236, i64 1
%238 = load float, float* %237
%239 = fpext float %238 to double
%240 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i64 0, i64 0), double %239)
%241 = load float*, float** %6
%242 = getelementptr inbounds float, float* %241, i64 1
%243 = call i32 @input_float(float* %242)
%244 = load float*, float** %6
%245 = getelementptr inbounds float, float* %244, i64 2
%246 = load float, float* %245
%247 = fpext float %246 to double
%248 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.28, i64 0, i64 0), double %247)
%249 = load float*, float** %6
%250 = getelementptr inbounds float, float* %249, i64 2
%251 = call i32 @input_float(float* %250)
%252 = load float*, float** %6
%253 = getelementptr inbounds float, float* %252, i64 3
%254 = load float, float* %253
%255 = fpext float %254 to double
%256 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.29, i64 0, i64 0), double %255)
%257 = load float*, float** %6
%258 = getelementptr inbounds float, float* %257, i64 3
%259 = call i32 @input_float(float* %258)
%260 = load float*, float** %6
%261 = getelementptr inbounds float, float* %260, i64 4
%262 = load float, float* %261
%263 = fpext float %262 to double
%264 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.30, i64 0, i64 0), double %263)
%265 = load float*, float** %6
%266 = getelementptr inbounds float, float* %265, i64 4
%267 = call i32 @input_float(float* %266)
%268 = load float*, float** %6
%269 = getelementptr inbounds float, float* %268, i64 5
%270 = load float, float* %269
%271 = fpext float %270 to double
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.31, i64 0, i64 0), double %271)
%273 = load float*, float** %6
%274 = getelementptr inbounds float, float* %273, i64 5
%275 = call i32 @input_float(float* %274)
%276 = load float*, float** %6
%277 = getelementptr inbounds float, float* %276, i64 6
%278 = load float, float* %277
%279 = fpext float %278 to double
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.32, i64 0, i64 0), double %279)
%281 = load float*, float** %6
%282 = getelementptr inbounds float, float* %281, i64 6
%283 = call i32 @input_float(float* %282)
br label %326
284: ; preds = %3, %3
%285 = load i32, i32* %5
%286 = icmp eq i32 %285, 20
br i1 %286, label %287, label %289
287: ; preds = %284
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.33, i64 0, i64 0))
br label %291
289: ; preds = %284
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.34, i64 0, i64 0))
br label %291
291: ; preds = %289, %287
%292 = load float*, float** %6
%293 = getelementptr inbounds float, float* %292, i64 0
%294 = load float, float* %293
%295 = fpext float %294 to double
%296 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %295)
%297 = load float*, float** %6
%298 = getelementptr inbounds float, float* %297, i64 0
%299 = call i32 @input_float(float* %298)
%300 = load float*, float** %6
%301 = getelementptr inbounds float, float* %300, i64 1
%302 = load float, float* %301
%303 = fpext float %302 to double
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), double %303)
%305 = load float*, float** %6
%306 = getelementptr inbounds float, float* %305, i64 1
%307 = call i32 @input_float(float* %306)
%308 = load float*, float** %6
%309 = getelementptr inbounds float, float* %308, i64 2
%310 = load float, float* %309
%311 = fpext float %310 to double
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), double %311)
%313 = load float*, float** %6
%314 = getelementptr inbounds float, float* %313, i64 2
%315 = call i32 @input_float(float* %314)
%316 = load float*, float** %6
%317 = getelementptr inbounds float, float* %316, i64 3
%318 = load float, float* %317
%319 = fpext float %318 to double
%320 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), double %319)
%321 = load float*, float** %6
%322 = getelementptr inbounds float, float* %321, i64 3
%323 = call i32 @input_float(float* %322)
br label %326
324: ; preds = %3
%325 = call i32 (...) @abort()
unreachable
326: ; preds = %291, %225, %183, %109, %51, %17
ret void
}

LLVM IR (-O2):
@.str.2 = [22 x i8] c" North Bound (%g): \00"
@.str.3 = [21 x i8] c" West Bound (%g): \00"
@.str.4 = [24 x i8] c" Row Increment (%g): \00"
@.str.5 = [27 x i8] c" Column Increment (%g): \00"
@.str.7 = [41 x i8] c" North Bound Latitude (degrees) (%g): \00"
@.str.8 = [41 x i8] c" West Bound Longitude (degrees) (%g): \00"
@.str.9 = [34 x i8] c" Row Increment (degrees) (%g): \00"
@.str.10 = [37 x i8] c" Column Increment (degrees) (%g): \00"
@.str.12 = [40 x i8] c" Standard Latitude 1 (degrees) (%g): \00"
@.str.13 = [40 x i8] c" Standard Latitude 2 (degrees) (%g): \00"
@.str.14 = [31 x i8] c" North/South Pole row (%g): \00"
@.str.15 = [34 x i8] c" North/South Pole column (%g): \00"
@.str.16 = [38 x i8] c" Central longitude (degrees) (%g): \00"
@.str.17 = [32 x i8] c" Column increment (km) (%g): \00"
@.str.19 = [35 x i8] c" Center Latitude (degrees) (%g): \00"
@.str.20 = [36 x i8] c" Center Longitude (degrees) (%g): \00"
@.str.21 = [20 x i8] c" Center Row (%g): \00"
@.str.22 = [23 x i8] c" Center Column (%g): \00"
@.str.23 = [29 x i8] c" Column spacing (km) (%g): \00"
@.str.25 = [59 x i8] c" Latitude on rotated globe of grid row 0 (degrees) (%g): \00"
@.str.26 = [56 x i8] c" Longitude on rotated globe of grid column 0 (degrees)\00"
@.str.27 = [8 x i8] c" (%g): \00"
@.str.28 = [51 x i8] c" Row Increment on rotated globe (degrees) (%g): \00"
@.str.29 = [54 x i8] c" Column Increment on rotated globe (degrees) (%g): \00"
@.str.30 = [61 x i8] c" Earth Latitude of (0, 0) on rotated globe (degrees) (%g): \00"
@.str.31 = [62 x i8] c" Earth Longitude of (0, 0) on rotated globe (degrees) (%g): \00"
@.str.32 = [56 x i8] c" Clockwise rotation of rotated globe (degrees) (%g): \00"
@str = [56 x i8] c"Enter projection parameters, press Return for (default)\00"
@str.35 = [42 x i8] c"Spherical projection of rectangular grid:\00"
@str.36 = [44 x i8] c"Cylindrical projection of rectangular grid:\00"
@str.37 = [32 x i8] c"Rotated Equidistant projection:\00"
@str.38 = [15 x i8] c"Stereographic:\00"
@str.39 = [30 x i8] c"Lambert Conformal projection:\00"
@str.40 = [36 x i8] c"Cylindrical Equidistant projection:\00"
@str.41 = [31 x i8] c"Generic projection (no units):\00"
define void @prompt_for_projection_args(i32 %0, i32 %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %4 to i8*
%10 = call i32 @vis5d_get_ctx_projection(i32 %0, i32* %4, float* %2)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
switch i32 %1, label %94 [
i32 0, label %12
i32 1, label %14
i32 2, label %16
i32 3, label %46
i32 4, label %72
i32 20, label %91
i32 21, label %90
]
12: ; preds = %3
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.41, i64 0, i64 0))
br label %96
14: ; preds = %3
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.40, i64 0, i64 0))
br label %96
16: ; preds = %3
%17 = load i32, i32* %4
%18 = icmp eq i32 %17, 2
br i1 %18, label %34, label %19
19: ; preds = %16
%20 = bitcast i32* %5 to i8*
%21 = bitcast i32* %6 to i8*
%22 = call i32 @vis5d_get_size(i32 %0, i32* %5, i32* %6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store float 7.000000e+01, float* %2
%23 = getelementptr inbounds float, float* %2, i64 1
store float 2.000000e+01, float* %23
%24 = load i32, i32* %5
%25 = sub nsw i32 0, %24
%26 = sitofp i32 %25 to float
%27 = getelementptr inbounds float, float* %2, i64 2
store float %26, float* %27
%28 = load i32, i32* %6
%29 = sdiv i32 %28, 2
%30 = sitofp i32 %29 to float
%31 = getelementptr inbounds float, float* %2, i64 3
store float %30, float* %31
%32 = getelementptr inbounds float, float* %2, i64 4
store float 9.000000e+01, float* %32
%33 = getelementptr inbounds float, float* %2, i64 5
store float 1.000000e+02, float* %33
br label %34
34: ; preds = %19, %16
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.39, i64 0, i64 0))
%36 = load float, float* %2
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), double %37)
%39 = call i32 @input_float(float* %2)
%40 = getelementptr inbounds float, float* %2, i64 1
%41 = load float, float* %40
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0), double %42)
%44 = call i32 @input_float(float* %40)
%45 = getelementptr inbounds float, float* %2, i64 2
br label %96
46: ; preds = %3
%47 = load i32, i32* %4
%48 = icmp eq i32 %47, 3
br i1 %48, label %65, label %49
49: ; preds = %46
%50 = bitcast i32* %7 to i8*
%51 = bitcast i32* %8 to i8*
%52 = call i32 @vis5d_get_size(i32 %0, i32* %7, i32* %8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store float 9.000000e+01, float* %2
%53 = getelementptr inbounds float, float* %2, i64 1
store float 0.000000e+00, float* %53
%54 = load i32, i32* %7
%55 = sitofp i32 %54 to double
%56 = fmul double %55, 5.000000e-01
%57 = fptrunc double %56 to float
%58 = getelementptr inbounds float, float* %2, i64 2
store float %57, float* %58
%59 = load i32, i32* %8
%60 = sitofp i32 %59 to double
%61 = fmul double %60, 5.000000e-01
%62 = fptrunc double %61 to float
%63 = getelementptr inbounds float, float* %2, i64 3
store float %62, float* %63
%64 = getelementptr inbounds float, float* %2, i64 4
store float 5.000000e+02, float* %64
br label %65
65: ; preds = %49, %46
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.38, i64 0, i64 0))
%67 = load float, float* %2
%68 = fpext float %67 to double
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.19, i64 0, i64 0), double %68)
%70 = call i32 @input_float(float* %2)
%71 = getelementptr inbounds float, float* %2, i64 1
br label %96
72: ; preds = %3
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.37, i64 0, i64 0))
%74 = load float, float* %2
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.25, i64 0, i64 0), double %75)
%77 = call i32 @input_float(float* %2)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.26, i64 0, i64 0))
%79 = getelementptr inbounds float, float* %2, i64 1
%80 = load float, float* %79
%81 = fpext float %80 to double
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i64 0, i64 0), double %81)
%83 = call i32 @input_float(float* %79)
%84 = getelementptr inbounds float, float* %2, i64 2
%85 = load float, float* %84
%86 = fpext float %85 to double
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.28, i64 0, i64 0), double %86)
%88 = call i32 @input_float(float* %84)
%89 = getelementptr inbounds float, float* %2, i64 3
br label %96
90: ; preds = %3
br label %91
91: ; preds = %3, %90
%92 = phi i8* [ getelementptr inbounds ([42 x i8], [42 x i8]* @str.35, i64 0, i64 0), %90 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @str.36, i64 0, i64 0), %3 ]
%93 = call i32 @puts(i8* dereferenceable(1) %92)
br label %96
94: ; preds = %3
%95 = call i32 (...) @abort()
unreachable
96: ; preds = %91, %72, %65, %34, %14, %12
%97 = phi float* [ %2, %91 ], [ %89, %72 ], [ %71, %65 ], [ %45, %34 ], [ %2, %14 ], [ %2, %12 ]
%98 = phi i8* [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), %91 ], [ getelementptr inbounds ([54 x i8], [54 x i8]* @.str.29, i64 0, i64 0), %72 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), %65 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), %34 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), %14 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), %12 ]
%99 = phi i64 [ 1, %91 ], [ 4, %72 ], [ 2, %65 ], [ 3, %34 ], [ 1, %14 ], [ 1, %12 ]
%100 = phi i8* [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), %91 ], [ getelementptr inbounds ([61 x i8], [61 x i8]* @.str.30, i64 0, i64 0), %72 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), %65 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), %34 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), %14 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), %12 ]
%101 = phi i64 [ 2, %91 ], [ 5, %72 ], [ 3, %65 ], [ 4, %34 ], [ 2, %14 ], [ 2, %12 ]
%102 = phi i8* [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), %91 ], [ getelementptr inbounds ([62 x i8], [62 x i8]* @.str.31, i64 0, i64 0), %72 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0), %65 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.16, i64 0, i64 0), %34 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), %14 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), %12 ]
%103 = phi i64 [ 3, %91 ], [ 6, %72 ], [ 4, %65 ], [ 5, %34 ], [ 3, %14 ], [ 3, %12 ]
%104 = phi i8* [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), %91 ], [ getelementptr inbounds ([56 x i8], [56 x i8]* @.str.32, i64 0, i64 0), %72 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0), %65 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0), %34 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), %14 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), %12 ]
%105 = load float, float* %97
%106 = fpext float %105 to double
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %98, double %106)
%108 = call i32 @input_float(float* %97)
%109 = getelementptr inbounds float, float* %2, i64 %99
%110 = load float, float* %109
%111 = fpext float %110 to double
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %100, double %111)
%113 = call i32 @input_float(float* %109)
%114 = getelementptr inbounds float, float* %2, i64 %101
%115 = load float, float* %114
%116 = fpext float %115 to double
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %102, double %116)
%118 = call i32 @input_float(float* %114)
%119 = getelementptr inbounds float, float* %2, i64 %103
%120 = load float, float* %119
%121 = fpext float %120 to double
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %104, double %121)
%123 = call i32 @input_float(float* %119)
ret void
}