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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double int2(unsigned char *);
int int4(unsigned char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strlen(char *);
int uint2(unsigned char *);
int uint4(unsigned char *);
int uint_n(unsigned char *, int);
int f_JMA(int mode, unsigned char **sec, float *data, unsigned int ndata,
          char *inv_out, void **local) {
  int pdt, i, nr;
  int center;
  if (mode < 0)
    return 0;
  center = ((int)((sec[1][5] << 8) + (sec[1][6])));
  if (center != 34 && center != 35)
    return 0;
  pdt = (((int)((sec[4][7] << 8) + (sec[4][8]))));
  if (pdt < 50000)
    return 0;
  if (pdt == 51022) {
    sprintf(inv_out, "site=%c%c%c%c", sec[4][24], sec[4][25], sec[4][26],
            sec[4][27]);
    inv_out += strlen(inv_out);
    if (mode >= 1) {
      sprintf(inv_out, ":site_id#=%u", uint2(sec[4] + 28));
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":site_lon=%lf:site_lat=%lf:site_elev=%.1lfm",
              int4(sec[4] + 18) * 1e-6, int4(sec[4] + 14) * 1e-6,
              int2(sec[4] + 22) * 0.1);
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":mag_dec=%.2fdeg", int2(sec[4] + 30) * 0.001);
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":freq=%ukHz", uint4(sec[4] + 32));
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":pol=%d:opn_mode=%d:reflec=%d", (int)sec[4][36],
              (int)sec[4][37], (int)sec[4][38]);
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":qc=%d:cluster_filter=%d", (int)sec[4][39],
              (int)sec[4][40]);
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":angle_elev_constant=%.2f", int2(sec[4] + 41) * 0.01);
      inv_out += strlen(inv_out);
    }
    nr = (sec[4] ? uint4(sec[4] + 0) : 0);
    nr = (nr % 4) ? -1 : (nr - 60) / 4;
    if (mode >= 1) {
      sprintf(inv_out, ":Ntheta=%d", nr);
      inv_out += strlen(inv_out);
      i = uint_n(sec[4] + 55, 3);
      if (i != 0xffffff) {
        sprintf(inv_out, ":bin_size=%dm", i);
        inv_out += strlen(inv_out);
      }
      if ((sec[4][58] != 255) || (sec[4][59] != 255)) {
        sprintf(inv_out, ":d_theta=%.1lfdeg", int2(sec[4] + 58) * 0.1);
        inv_out += strlen(inv_out);
      }
    }
    if (mode < 2) {
      sprintf(inv_out, ":ele(1)=%.2fdeg", int2(sec[4] + 60) * 0.01);
      inv_out += strlen(inv_out);
      sprintf(inv_out, ":ele(%d)=%.2fdeg", nr / 2,
              int2(sec[4] + 60 + ((nr - 1) / 2) * 4) * 0.01);
      inv_out += strlen(inv_out);
    }
    if (mode >= 2) {
      sprintf(inv_out, "\n:elevation angle(1..Ntheta)=");
      inv_out += strlen(inv_out);
      for (i = 0; i < nr; i++) {
        sprintf(inv_out, "%.2f ", int2(sec[4] + 60 + i * 4) * 0.01);
        inv_out += strlen(inv_out);
      }
      sprintf(inv_out, "\n:pulse repetion freq(1..Ntheta)=");
      inv_out += strlen(inv_out);
      for (i = 0; i < nr; i++) {
        sprintf(inv_out, "%.2f ", int2(sec[4] + 62 + i * 4) * 0.01);
        inv_out += strlen(inv_out);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<f_JMA>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    11a7 <f_JMA+0x37>
movl   $0x0,-0x4(%rbp)
jmp    18d5 <f_JMA+0x765>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movzbl 0x5(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
movzbl 0x6(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x22,-0x40(%rbp)
je     11e7 <f_JMA+0x77>
cmpl   $0x23,-0x40(%rbp)
je     11e7 <f_JMA+0x77>
movl   $0x0,-0x4(%rbp)
jmp    18d5 <f_JMA+0x765>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x7(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    0x20(%rcx),%rcx
movzbl 0x8(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0xc350,-0x34(%rbp)
jge    1220 <f_JMA+0xb0>
movl   $0x0,-0x4(%rbp)
jmp    18d5 <f_JMA+0x765>
cmpl   $0xc74e,-0x34(%rbp)
jne    18ce <f_JMA+0x75e>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x18(%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x19(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x1a(%rax),%r8d
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x1b(%rax),%r9d
lea    0xdb6(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     14fc <f_JMA+0x38c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x1c,%rdi
call   1050 <uint2@plt>
mov    -0x78(%rbp),%rdi
mov    %eax,%edx
lea    0xd74(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x12,%rdi
call   1030 <int4@plt>
cvtsi2sd %eax,%xmm0
movsd  0xd19(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0xe,%rdi
call   1030 <int4@plt>
cvtsi2sd %eax,%xmm0
movsd  0xcf3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x16,%rdi
call   1040 <int2@plt>
mov    -0x70(%rbp),%rdi
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movsd  0xcb8(%rip),%xmm3
mulsd  %xmm3,%xmm2
lea    0xcd8(%rip),%rsi
mov    $0x3,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x1e,%rdi
call   1040 <int2@plt>
mov    -0x58(%rbp),%rdi
movsd  0xc60(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xcb4(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x20,%rdi
call   1060 <uint4@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%edx
lea    0xc7f(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x24(%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x25(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x26(%rax),%r8d
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x27(%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x28(%rax),%ecx
lea    0xc16(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x29,%rdi
call   1040 <int2@plt>
mov    -0x48(%rbp),%rdi
movsd  0xb2f(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xbdf(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x20(%rax)
je     1520 <f_JMA+0x3b0>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1060 <uint4@plt>
mov    %eax,-0x7c(%rbp)
jmp    152a <f_JMA+0x3ba>
xor    %eax,%eax
mov    %eax,-0x7c(%rbp)
jmp    152a <f_JMA+0x3ba>
mov    -0x7c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1551 <f_JMA+0x3e1>
mov    $0xffffffff,%eax
mov    %eax,-0x80(%rbp)
jmp    1562 <f_JMA+0x3f2>
mov    -0x3c(%rbp),%eax
sub    $0x3c,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     167d <f_JMA+0x50d>
mov    -0x28(%rbp),%rdi
mov    -0x3c(%rbp),%edx
lea    0xb55(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x37,%rdi
mov    $0x3,%esi
call   1080 <uint_n@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0xffffff,-0x38(%rbp)
je     15f4 <f_JMA+0x484>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xb0c(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x3a(%rax),%eax
cmp    $0xff,%eax
jne    1622 <f_JMA+0x4b2>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x3b(%rax),%eax
cmp    $0xff,%eax
je     1678 <f_JMA+0x508>
mov    -0x28(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x3a,%rdi
call   1040 <int2@plt>
mov    -0x88(%rbp),%rdi
movsd  0x9c3(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xa96(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    167d <f_JMA+0x50d>
cmpl   $0x2,-0x8(%rbp)
jge    1760 <f_JMA+0x5f0>
mov    -0x28(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x3c,%rdi
call   1040 <int2@plt>
mov    -0xa0(%rbp),%rdi
movsd  0x94e(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xa43(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x3c,%rdi
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
cltq
add    %rax,%rdi
call   1040 <int2@plt>
mov    -0x98(%rbp),%rdi
mov    -0x8c(%rbp),%edx
movsd  0x8cb(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0x9d0(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     18c9 <f_JMA+0x759>
mov    -0x28(%rbp),%rdi
lea    0x9ac(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1817 <f_JMA+0x6a7>
mov    -0x28(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x3c,%rdi
mov    -0x38(%rbp),%eax
shl    $0x2,%eax
cltq
add    %rax,%rdi
call   1040 <int2@plt>
mov    -0xa8(%rbp),%rdi
movsd  0x822(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0x956(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    179c <f_JMA+0x62c>
mov    -0x28(%rbp),%rdi
lea    0x923(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    18c4 <f_JMA+0x754>
mov    -0x28(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0x3e,%rdi
mov    -0x38(%rbp),%eax
shl    $0x2,%eax
cltq
add    %rax,%rdi
call   1040 <int2@plt>
mov    -0xb0(%rbp),%rdi
movsd  0x775(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0x8a9(%rip),%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1849 <f_JMA+0x6d9>
jmp    18c9 <f_JMA+0x759>
jmp    18ce <f_JMA+0x75e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_JMA>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
test   %edi,%edi
js     151c <f_JMA+0x3ac>
mov    %rsi,%r12
mov    0x8(%rsi),%rax
movzbl 0x5(%rax),%ecx
shl    $0x8,%ecx
movzbl 0x6(%rax),%eax
and    $0xfffffffe,%eax
or     %ecx,%eax
cmp    $0x22,%eax
jne    151c <f_JMA+0x3ac>
mov    0x20(%r12),%rax
movzwl 0x7(%rax),%ecx
shl    $0x10,%ecx
bswap  %ecx
cmp    $0xc74e,%ecx
jne    151c <f_JMA+0x3ac>
mov    %r8,%rbx
mov    %edi,%r15d
movzbl 0x18(%rax),%edx
movzbl 0x19(%rax),%ecx
movzbl 0x1a(%rax),%r8d
movzbl 0x1b(%rax),%r9d
lea    0xe41(%rip),%rsi
xor    %r14d,%r14d
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
test   %r15d,%r15d
je     13b0 <f_JMA+0x240>
mov    0x20(%r12),%rdi
add    $0x1c,%rdi
call   1050 <uint2@plt>
lea    0xe16(%rip),%rsi
mov    %rbp,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbx
add    %rbp,%rbx
mov    0x20(%r12),%rdi
add    $0x12,%rdi
call   1030 <int4@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xdb4(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x20(%r12),%rdi
add    $0xe,%rdi
call   1030 <int4@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd91(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x20(%r12),%rdi
add    $0x16,%rdi
call   1040 <int2@plt>
movapd %xmm0,%xmm2
mulsd  0xd79(%rip),%xmm2
lea    0xda5(%rip),%rsi
mov    %rbx,%rdi
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x3,%al
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
mov    0x20(%r12),%rdi
add    $0x1e,%rdi
call   1040 <int2@plt>
mulsd  0xd40(%rip),%xmm0
lea    0xd90(%rip),%rsi
mov    %rbp,%rdi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbx
add    %rbp,%rbx
mov    0x20(%r12),%rdi
add    $0x20,%rdi
call   1060 <uint4@plt>
lea    0xd74(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
mov    0x20(%r12),%rax
movzbl 0x24(%rax),%edx
movzbl 0x25(%rax),%ecx
movzbl 0x26(%rax),%r8d
lea    0xd4d(%rip),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbx
add    %rbp,%rbx
mov    0x20(%r12),%rax
movzbl 0x27(%rax),%edx
movzbl 0x28(%rax),%ecx
lea    0xd3f(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
movslq %eax,%r13
add    %rbx,%r13
mov    0x20(%r12),%rdi
add    $0x29,%rdi
call   1040 <int2@plt>
mulsd  0xc87(%rip),%xmm0
lea    0xd23(%rip),%rsi
mov    %r13,%rdi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %r13,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %r13,%rbp
mov    0x20(%r12),%rdi
test   %rdi,%rdi
je     13cc <f_JMA+0x25c>
call   1060 <uint4@plt>
mov    $0xffffffff,%r14d
test   $0x3,%al
jne    13de <f_JMA+0x26e>
mov    %eax,%r14d
lea    -0x3c(%r14),%eax
add    $0xffffffc7,%r14d
test   %eax,%eax
cmovns %eax,%r14d
sar    $0x2,%r14d
test   %r15d,%r15d
je     1490 <f_JMA+0x320>
lea    0xce7(%rip),%rsi
mov    %rbp,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbx
add    %rbp,%rbx
mov    0x20(%r12),%rdi
add    $0x37,%rdi
mov    $0x3,%esi
call   1080 <uint_n@plt>
cmp    $0xffffff,%eax
je     1443 <f_JMA+0x2d3>
lea    0xcb6(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
cltq
add    %rax,%rbx
mov    0x20(%r12),%rdi
cmpb   $0xff,0x3a(%rdi)
jne    1454 <f_JMA+0x2e4>
cmpb   $0xff,0x3b(%rdi)
je     1483 <f_JMA+0x313>
add    $0x3a,%rdi
call   1040 <int2@plt>
mulsd  0xba3(%rip),%xmm0
lea    0xc82(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
cltq
add    %rax,%rbx
cmp    $0x1,%r15d
ja     152d <f_JMA+0x3bd>
mov    %rbx,%rbp
mov    0x20(%r12),%rdi
add    $0x3c,%rdi
call   1040 <int2@plt>
mulsd  0xb72(%rip),%xmm0
lea    0xc53(%rip),%rsi
mov    %rbp,%rdi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbx
add    %rbp,%rbx
mov    %r14d,%ebp
shr    $0x1f,%ebp
add    %r14d,%ebp
sar    %ebp
mov    0x20(%r12),%rax
mov    %r14d,%ecx
add    $0xffffffff,%ecx
shr    $0x1f,%ecx
add    %r14d,%ecx
add    $0xffffffff,%ecx
add    %ecx,%ecx
and    $0xfffffffc,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,1),%rdi
add    $0x3c,%rdi
call   1040 <int2@plt>
mulsd  0xb17(%rip),%xmm0
lea    0xc08(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movups 0xbfb(%rip),%xmm0
movups %xmm0,0xe(%rbx)
movupd 0xbe1(%rip),%xmm0
movupd %xmm0,(%rbx)
mov    %rbx,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
test   %r14d,%r14d
jle    1652 <f_JMA+0x4e2>
mov    %r14,0x10(%rsp)
mov    %r14d,%eax
mov    %rax,0x8(%rsp)
lea    0x0(,%rax,4),%r14
xor    %r13d,%r13d
lea    0xbc5(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rbx
mov    0x20(%r12),%rax
lea    (%rax,%r13,1),%rdi
add    $0x3c,%rdi
call   1040 <int2@plt>
mulsd  0xa7b(%rip),%xmm0
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
add    $0x4,%r13
cmp    %r13,%r14
jne    1580 <f_JMA+0x410>
movups 0xb8d(%rip),%xmm0
movups %xmm0,0x10(%rbp)
movupd 0xb71(%rip),%xmm0
movupd %xmm0,0x0(%rbp)
movw   $0x3d,0x20(%rbp)
mov    %rbp,%rdi
call   1070 <strlen@plt>
cmpl   $0x0,0x10(%rsp)
mov    0x8(%rsp),%r15
jle    151c <f_JMA+0x3ac>
cltq
add    %rax,%rbp
shl    $0x2,%r15
xor    %ebx,%ebx
lea    0xb36(%rip),%r14
nopl   0x0(%rax)
mov    0x20(%r12),%rax
lea    (%rax,%rbx,1),%rdi
add    $0x3e,%rdi
call   1040 <int2@plt>
mulsd  0x9ee(%rip),%xmm0
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
cltq
add    %rax,%rbp
add    $0x4,%rbx
cmp    %rbx,%r15
jne    1610 <f_JMA+0x4a0>
jmp    151c <f_JMA+0x3ac>
movups 0xafc(%rip),%xmm0
movups %xmm0,0x10(%rbp)
movupd 0xae0(%rip),%xmm0
movupd %xmm0,0x0(%rbp)
movw   $0x3d,0x20(%rbp)
mov    %rbp,%rdi
jmp    1517 <f_JMA+0x3a7>

LLVM IR (-O0):
@.str = [14 x i8] c"site=%c%c%c%c\00"
@.str.1 = [13 x i8] c":site_id#=%u\00"
@.str.2 = [44 x i8] c":site_lon=%lf:site_lat=%lf:site_elev=%.1lfm\00"
@.str.3 = [17 x i8] c":mag_dec=%.2fdeg\00"
@.str.4 = [12 x i8] c":freq=%ukHz\00"
@.str.5 = [30 x i8] c":pol=%d:opn_mode=%d:reflec=%d\00"
@.str.6 = [25 x i8] c":qc=%d:cluster_filter=%d\00"
@.str.7 = [26 x i8] c":angle_elev_constant=%.2f\00"
@.str.8 = [11 x i8] c":Ntheta=%d\00"
@.str.9 = [14 x i8] c":bin_size=%dm\00"
@.str.10 = [18 x i8] c":d_theta=%.1lfdeg\00"
@.str.11 = [16 x i8] c":ele(1)=%.2fdeg\00"
@.str.12 = [17 x i8] c":ele(%d)=%.2fdeg\00"
@.str.13 = [30 x i8] c"\0A:elevation angle(1..Ntheta)=\00"
@.str.14 = [6 x i8] c"%.2f \00"
@.str.15 = [34 x i8] c"\0A:pulse repetion freq(1..Ntheta)=\00"
define i32 @f_JMA(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8**
%10 = alloca float*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8**
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 %0, i32* %8
store i8** %1, i8*** %9
store float* %2, float** %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8** %5, i8*** %13
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %6
store i32 0, i32* %7
br label %411
21: ; preds = %6
%22 = load i8**, i8*** %9
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = getelementptr inbounds i8, i8* %24, i64 5
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 8
%29 = load i8**, i8*** %9
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 6
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = add nsw i32 %28, %34
store i32 %35, i32* %17
%36 = load i32, i32* %17
%37 = icmp ne i32 %36, 34
br i1 %37, label %38, label %42
38: ; preds = %21
%39 = load i32, i32* %17
%40 = icmp ne i32 %39, 35
br i1 %40, label %41, label %42
41: ; preds = %38
store i32 0, i32* %7
br label %411
42: ; preds = %38, %21
%43 = load i8**, i8*** %9
%44 = getelementptr inbounds i8*, i8** %43, i64 4
%45 = load i8*, i8** %44
%46 = getelementptr inbounds i8, i8* %45, i64 7
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = shl i32 %48, 8
%50 = load i8**, i8*** %9
%51 = getelementptr inbounds i8*, i8** %50, i64 4
%52 = load i8*, i8** %51
%53 = getelementptr inbounds i8, i8* %52, i64 8
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = add nsw i32 %49, %55
store i32 %56, i32* %14
%57 = load i32, i32* %14
%58 = icmp slt i32 %57, 50000
br i1 %58, label %59, label %60
59: ; preds = %42
store i32 0, i32* %7
br label %411
60: ; preds = %42
%61 = load i32, i32* %14
%62 = icmp eq i32 %61, 51022
br i1 %62, label %63, label %410
63: ; preds = %60
%64 = load i8*, i8** %12
%65 = load i8**, i8*** %9
%66 = getelementptr inbounds i8*, i8** %65, i64 4
%67 = load i8*, i8** %66
%68 = getelementptr inbounds i8, i8* %67, i64 24
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = load i8**, i8*** %9
%72 = getelementptr inbounds i8*, i8** %71, i64 4
%73 = load i8*, i8** %72
%74 = getelementptr inbounds i8, i8* %73, i64 25
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = load i8**, i8*** %9
%78 = getelementptr inbounds i8*, i8** %77, i64 4
%79 = load i8*, i8** %78
%80 = getelementptr inbounds i8, i8* %79, i64 26
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = load i8**, i8*** %9
%84 = getelementptr inbounds i8*, i8** %83, i64 4
%85 = load i8*, i8** %84
%86 = getelementptr inbounds i8, i8* %85, i64 27
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = call i32 (i8*, i8*, ...) @sprintf(i8* %64, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %70, i32 %76, i32 %82, i32 %88)
%90 = load i8*, i8** %12
%91 = call i32 @strlen(i8* %90)
%92 = load i8*, i8** %12
%93 = sext i32 %91 to i64
%94 = getelementptr inbounds i8, i8* %92, i64 %93
store i8* %94, i8** %12
%95 = load i32, i32* %8
%96 = icmp sge i32 %95, 1
br i1 %96, label %97, label %219
97: ; preds = %63
%98 = load i8*, i8** %12
%99 = load i8**, i8*** %9
%100 = getelementptr inbounds i8*, i8** %99, i64 4
%101 = load i8*, i8** %100
%102 = getelementptr inbounds i8, i8* %101, i64 28
%103 = call i32 @uint2(i8* %102)
%104 = call i32 (i8*, i8*, ...) @sprintf(i8* %98, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %103)
%105 = load i8*, i8** %12
%106 = call i32 @strlen(i8* %105)
%107 = load i8*, i8** %12
%108 = sext i32 %106 to i64
%109 = getelementptr inbounds i8, i8* %107, i64 %108
store i8* %109, i8** %12
%110 = load i8*, i8** %12
%111 = load i8**, i8*** %9
%112 = getelementptr inbounds i8*, i8** %111, i64 4
%113 = load i8*, i8** %112
%114 = getelementptr inbounds i8, i8* %113, i64 18
%115 = call i32 @int4(i8* %114)
%116 = sitofp i32 %115 to double
%117 = fmul double %116, 0x3EB0C6F7A0B5ED8D
%118 = load i8**, i8*** %9
%119 = getelementptr inbounds i8*, i8** %118, i64 4
%120 = load i8*, i8** %119
%121 = getelementptr inbounds i8, i8* %120, i64 14
%122 = call i32 @int4(i8* %121)
%123 = sitofp i32 %122 to double
%124 = fmul double %123, 0x3EB0C6F7A0B5ED8D
%125 = load i8**, i8*** %9
%126 = getelementptr inbounds i8*, i8** %125, i64 4
%127 = load i8*, i8** %126
%128 = getelementptr inbounds i8, i8* %127, i64 22
%129 = call double @int2(i8* %128)
%130 = fmul double %129, 1.000000e-01
%131 = call i32 (i8*, i8*, ...) @sprintf(i8* %110, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double %117, double %124, double %130)
%132 = load i8*, i8** %12
%133 = call i32 @strlen(i8* %132)
%134 = load i8*, i8** %12
%135 = sext i32 %133 to i64
%136 = getelementptr inbounds i8, i8* %134, i64 %135
store i8* %136, i8** %12
%137 = load i8*, i8** %12
%138 = load i8**, i8*** %9
%139 = getelementptr inbounds i8*, i8** %138, i64 4
%140 = load i8*, i8** %139
%141 = getelementptr inbounds i8, i8* %140, i64 30
%142 = call double @int2(i8* %141)
%143 = fmul double %142, 1.000000e-03
%144 = call i32 (i8*, i8*, ...) @sprintf(i8* %137, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %143)
%145 = load i8*, i8** %12
%146 = call i32 @strlen(i8* %145)
%147 = load i8*, i8** %12
%148 = sext i32 %146 to i64
%149 = getelementptr inbounds i8, i8* %147, i64 %148
store i8* %149, i8** %12
%150 = load i8*, i8** %12
%151 = load i8**, i8*** %9
%152 = getelementptr inbounds i8*, i8** %151, i64 4
%153 = load i8*, i8** %152
%154 = getelementptr inbounds i8, i8* %153, i64 32
%155 = call i32 @uint4(i8* %154)
%156 = call i32 (i8*, i8*, ...) @sprintf(i8* %150, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %155)
%157 = load i8*, i8** %12
%158 = call i32 @strlen(i8* %157)
%159 = load i8*, i8** %12
%160 = sext i32 %158 to i64
%161 = getelementptr inbounds i8, i8* %159, i64 %160
store i8* %161, i8** %12
%162 = load i8*, i8** %12
%163 = load i8**, i8*** %9
%164 = getelementptr inbounds i8*, i8** %163, i64 4
%165 = load i8*, i8** %164
%166 = getelementptr inbounds i8, i8* %165, i64 36
%167 = load i8, i8* %166
%168 = zext i8 %167 to i32
%169 = load i8**, i8*** %9
%170 = getelementptr inbounds i8*, i8** %169, i64 4
%171 = load i8*, i8** %170
%172 = getelementptr inbounds i8, i8* %171, i64 37
%173 = load i8, i8* %172
%174 = zext i8 %173 to i32
%175 = load i8**, i8*** %9
%176 = getelementptr inbounds i8*, i8** %175, i64 4
%177 = load i8*, i8** %176
%178 = getelementptr inbounds i8, i8* %177, i64 38
%179 = load i8, i8* %178
%180 = zext i8 %179 to i32
%181 = call i32 (i8*, i8*, ...) @sprintf(i8* %162, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %168, i32 %174, i32 %180)
%182 = load i8*, i8** %12
%183 = call i32 @strlen(i8* %182)
%184 = load i8*, i8** %12
%185 = sext i32 %183 to i64
%186 = getelementptr inbounds i8, i8* %184, i64 %185
store i8* %186, i8** %12
%187 = load i8*, i8** %12
%188 = load i8**, i8*** %9
%189 = getelementptr inbounds i8*, i8** %188, i64 4
%190 = load i8*, i8** %189
%191 = getelementptr inbounds i8, i8* %190, i64 39
%192 = load i8, i8* %191
%193 = zext i8 %192 to i32
%194 = load i8**, i8*** %9
%195 = getelementptr inbounds i8*, i8** %194, i64 4
%196 = load i8*, i8** %195
%197 = getelementptr inbounds i8, i8* %196, i64 40
%198 = load i8, i8* %197
%199 = zext i8 %198 to i32
%200 = call i32 (i8*, i8*, ...) @sprintf(i8* %187, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %193, i32 %199)
%201 = load i8*, i8** %12
%202 = call i32 @strlen(i8* %201)
%203 = load i8*, i8** %12
%204 = sext i32 %202 to i64
%205 = getelementptr inbounds i8, i8* %203, i64 %204
store i8* %205, i8** %12
%206 = load i8*, i8** %12
%207 = load i8**, i8*** %9
%208 = getelementptr inbounds i8*, i8** %207, i64 4
%209 = load i8*, i8** %208
%210 = getelementptr inbounds i8, i8* %209, i64 41
%211 = call double @int2(i8* %210)
%212 = fmul double %211, 1.000000e-02
%213 = call i32 (i8*, i8*, ...) @sprintf(i8* %206, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), double %212)
%214 = load i8*, i8** %12
%215 = call i32 @strlen(i8* %214)
%216 = load i8*, i8** %12
%217 = sext i32 %215 to i64
%218 = getelementptr inbounds i8, i8* %216, i64 %217
store i8* %218, i8** %12
br label %219
219: ; preds = %97, %63
%220 = load i8**, i8*** %9
%221 = getelementptr inbounds i8*, i8** %220, i64 4
%222 = load i8*, i8** %221
%223 = icmp ne i8* %222, null
br i1 %223, label %224, label %230
224: ; preds = %219
%225 = load i8**, i8*** %9
%226 = getelementptr inbounds i8*, i8** %225, i64 4
%227 = load i8*, i8** %226
%228 = getelementptr inbounds i8, i8* %227, i64 0
%229 = call i32 @uint4(i8* %228)
br label %231
230: ; preds = %219
br label %231
231: ; preds = %230, %224
%232 = phi i32 [ %229, %224 ], [ 0, %230 ]
store i32 %232, i32* %16
%233 = load i32, i32* %16
%234 = srem i32 %233, 4
%235 = icmp ne i32 %234, 0
br i1 %235, label %236, label %237
236: ; preds = %231
br label %241
237: ; preds = %231
%238 = load i32, i32* %16
%239 = sub nsw i32 %238, 60
%240 = sdiv i32 %239, 4
br label %241
241: ; preds = %237, %236
%242 = phi i32 [ -1, %236 ], [ %240, %237 ]
store i32 %242, i32* %16
%243 = load i32, i32* %8
%244 = icmp sge i32 %243, 1
br i1 %244, label %245, label %301
245: ; preds = %241
%246 = load i8*, i8** %12
%247 = load i32, i32* %16
%248 = call i32 (i8*, i8*, ...) @sprintf(i8* %246, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %247)
%249 = load i8*, i8** %12
%250 = call i32 @strlen(i8* %249)
%251 = load i8*, i8** %12
%252 = sext i32 %250 to i64
%253 = getelementptr inbounds i8, i8* %251, i64 %252
store i8* %253, i8** %12
%254 = load i8**, i8*** %9
%255 = getelementptr inbounds i8*, i8** %254, i64 4
%256 = load i8*, i8** %255
%257 = getelementptr inbounds i8, i8* %256, i64 55
%258 = call i32 @uint_n(i8* %257, i32 3)
store i32 %258, i32* %15
%259 = load i32, i32* %15
%260 = icmp ne i32 %259, 16777215
br i1 %260, label %261, label %270
261: ; preds = %245
%262 = load i8*, i8** %12
%263 = load i32, i32* %15
%264 = call i32 (i8*, i8*, ...) @sprintf(i8* %262, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %263)
%265 = load i8*, i8** %12
%266 = call i32 @strlen(i8* %265)
%267 = load i8*, i8** %12
%268 = sext i32 %266 to i64
%269 = getelementptr inbounds i8, i8* %267, i64 %268
store i8* %269, i8** %12
br label %270
270: ; preds = %261, %245
%271 = load i8**, i8*** %9
%272 = getelementptr inbounds i8*, i8** %271, i64 4
%273 = load i8*, i8** %272
%274 = getelementptr inbounds i8, i8* %273, i64 58
%275 = load i8, i8* %274
%276 = zext i8 %275 to i32
%277 = icmp ne i32 %276, 255
br i1 %277, label %286, label %278
278: ; preds = %270
%279 = load i8**, i8*** %9
%280 = getelementptr inbounds i8*, i8** %279, i64 4
%281 = load i8*, i8** %280
%282 = getelementptr inbounds i8, i8* %281, i64 59
%283 = load i8, i8* %282
%284 = zext i8 %283 to i32
%285 = icmp ne i32 %284, 255
br i1 %285, label %286, label %300
286: ; preds = %278, %270
%287 = load i8*, i8** %12
%288 = load i8**, i8*** %9
%289 = getelementptr inbounds i8*, i8** %288, i64 4
%290 = load i8*, i8** %289
%291 = getelementptr inbounds i8, i8* %290, i64 58
%292 = call double @int2(i8* %291)
%293 = fmul double %292, 1.000000e-01
%294 = call i32 (i8*, i8*, ...) @sprintf(i8* %287, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), double %293)
%295 = load i8*, i8** %12
%296 = call i32 @strlen(i8* %295)
%297 = load i8*, i8** %12
%298 = sext i32 %296 to i64
%299 = getelementptr inbounds i8, i8* %297, i64 %298
store i8* %299, i8** %12
br label %300
300: ; preds = %286, %278
br label %301
301: ; preds = %300, %241
%302 = load i32, i32* %8
%303 = icmp slt i32 %302, 2
br i1 %303, label %304, label %339
304: ; preds = %301
%305 = load i8*, i8** %12
%306 = load i8**, i8*** %9
%307 = getelementptr inbounds i8*, i8** %306, i64 4
%308 = load i8*, i8** %307
%309 = getelementptr inbounds i8, i8* %308, i64 60
%310 = call double @int2(i8* %309)
%311 = fmul double %310, 1.000000e-02
%312 = call i32 (i8*, i8*, ...) @sprintf(i8* %305, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), double %311)
%313 = load i8*, i8** %12
%314 = call i32 @strlen(i8* %313)
%315 = load i8*, i8** %12
%316 = sext i32 %314 to i64
%317 = getelementptr inbounds i8, i8* %315, i64 %316
store i8* %317, i8** %12
%318 = load i8*, i8** %12
%319 = load i32, i32* %16
%320 = sdiv i32 %319, 2
%321 = load i8**, i8*** %9
%322 = getelementptr inbounds i8*, i8** %321, i64 4
%323 = load i8*, i8** %322
%324 = getelementptr inbounds i8, i8* %323, i64 60
%325 = load i32, i32* %16
%326 = sub nsw i32 %325, 1
%327 = sdiv i32 %326, 2
%328 = mul nsw i32 %327, 4
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds i8, i8* %324, i64 %329
%331 = call double @int2(i8* %330)
%332 = fmul double %331, 1.000000e-02
%333 = call i32 (i8*, i8*, ...) @sprintf(i8* %318, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %320, double %332)
%334 = load i8*, i8** %12
%335 = call i32 @strlen(i8* %334)
%336 = load i8*, i8** %12
%337 = sext i32 %335 to i64
%338 = getelementptr inbounds i8, i8* %336, i64 %337
store i8* %338, i8** %12
br label %339
339: ; preds = %304, %301
%340 = load i32, i32* %8
%341 = icmp sge i32 %340, 2
br i1 %341, label %342, label %409
342: ; preds = %339
%343 = load i8*, i8** %12
%344 = call i32 (i8*, i8*, ...) @sprintf(i8* %343, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
%345 = load i8*, i8** %12
%346 = call i32 @strlen(i8* %345)
%347 = load i8*, i8** %12
%348 = sext i32 %346 to i64
%349 = getelementptr inbounds i8, i8* %347, i64 %348
store i8* %349, i8** %12
store i32 0, i32* %15
br label %350
350: ; preds = %372, %342
%351 = load i32, i32* %15
%352 = load i32, i32* %16
%353 = icmp slt i32 %351, %352
br i1 %353, label %354, label %375
354: ; preds = %350
%355 = load i8*, i8** %12
%356 = load i8**, i8*** %9
%357 = getelementptr inbounds i8*, i8** %356, i64 4
%358 = load i8*, i8** %357
%359 = getelementptr inbounds i8, i8* %358, i64 60
%360 = load i32, i32* %15
%361 = mul nsw i32 %360, 4
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds i8, i8* %359, i64 %362
%364 = call double @int2(i8* %363)
%365 = fmul double %364, 1.000000e-02
%366 = call i32 (i8*, i8*, ...) @sprintf(i8* %355, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), double %365)
%367 = load i8*, i8** %12
%368 = call i32 @strlen(i8* %367)
%369 = load i8*, i8** %12
%370 = sext i32 %368 to i64
%371 = getelementptr inbounds i8, i8* %369, i64 %370
store i8* %371, i8** %12
br label %372
372: ; preds = %354
%373 = load i32, i32* %15
%374 = add nsw i32 %373, 1
store i32 %374, i32* %15
br label %350
375: ; preds = %350
%376 = load i8*, i8** %12
%377 = call i32 (i8*, i8*, ...) @sprintf(i8* %376, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0))
%378 = load i8*, i8** %12
%379 = call i32 @strlen(i8* %378)
%380 = load i8*, i8** %12
%381 = sext i32 %379 to i64
%382 = getelementptr inbounds i8, i8* %380, i64 %381
store i8* %382, i8** %12
store i32 0, i32* %15
br label %383
383: ; preds = %405, %375
%384 = load i32, i32* %15
%385 = load i32, i32* %16
%386 = icmp slt i32 %384, %385
br i1 %386, label %387, label %408
387: ; preds = %383
%388 = load i8*, i8** %12
%389 = load i8**, i8*** %9
%390 = getelementptr inbounds i8*, i8** %389, i64 4
%391 = load i8*, i8** %390
%392 = getelementptr inbounds i8, i8* %391, i64 62
%393 = load i32, i32* %15
%394 = mul nsw i32 %393, 4
%395 = sext i32 %394 to i64
%396 = getelementptr inbounds i8, i8* %392, i64 %395
%397 = call double @int2(i8* %396)
%398 = fmul double %397, 1.000000e-02
%399 = call i32 (i8*, i8*, ...) @sprintf(i8* %388, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), double %398)
%400 = load i8*, i8** %12
%401 = call i32 @strlen(i8* %400)
%402 = load i8*, i8** %12
%403 = sext i32 %401 to i64
%404 = getelementptr inbounds i8, i8* %402, i64 %403
store i8* %404, i8** %12
br label %405
405: ; preds = %387
%406 = load i32, i32* %15
%407 = add nsw i32 %406, 1
store i32 %407, i32* %15
br label %383
408: ; preds = %383
br label %409
409: ; preds = %408, %339
br label %410
410: ; preds = %409, %60
store i32 0, i32* %7
br label %411
411: ; preds = %410, %59, %41, %20
%412 = load i32, i32* %7
ret i32 %412
}

LLVM IR (-O2):
@.str = [14 x i8] c"site=%c%c%c%c\00"
@.str.1 = [13 x i8] c":site_id#=%u\00"
@.str.2 = [44 x i8] c":site_lon=%lf:site_lat=%lf:site_elev=%.1lfm\00"
@.str.3 = [17 x i8] c":mag_dec=%.2fdeg\00"
@.str.4 = [12 x i8] c":freq=%ukHz\00"
@.str.5 = [30 x i8] c":pol=%d:opn_mode=%d:reflec=%d\00"
@.str.6 = [25 x i8] c":qc=%d:cluster_filter=%d\00"
@.str.7 = [26 x i8] c":angle_elev_constant=%.2f\00"
@.str.8 = [11 x i8] c":Ntheta=%d\00"
@.str.9 = [14 x i8] c":bin_size=%dm\00"
@.str.10 = [18 x i8] c":d_theta=%.1lfdeg\00"
@.str.11 = [16 x i8] c":ele(1)=%.2fdeg\00"
@.str.12 = [17 x i8] c":ele(%d)=%.2fdeg\00"
@.str.13 = [30 x i8] c"\0A:elevation angle(1..Ntheta)=\00"
@.str.14 = [6 x i8] c"%.2f \00"
@.str.15 = [34 x i8] c"\0A:pulse repetion freq(1..Ntheta)=\00"
define i32 @f_JMA(i32 %0, i8** nocapture %1, float* nocapture readnone %2, i32 %3, i8* %4, i8** nocapture readnone %5) {
%7 = icmp slt i32 %0, 0
br i1 %7, label %240, label %8
8: ; preds = %6
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i64 5
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = getelementptr inbounds i8, i8* %10, i64 6
%16 = load i8, i8* %15
%17 = and i8 %16, -2
%18 = zext i8 %17 to i32
%19 = or i32 %14, %18
%20 = icmp eq i32 %19, 34
br i1 %20, label %21, label %240
21: ; preds = %8
%22 = getelementptr inbounds i8*, i8** %1, i64 4
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8, i8* %23, i64 7
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = shl nuw nsw i32 %26, 8
%28 = getelementptr inbounds i8, i8* %23, i64 8
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = or i32 %27, %30
%32 = icmp eq i32 %31, 51022
br i1 %32, label %33, label %240
33: ; preds = %21
%34 = getelementptr inbounds i8, i8* %23, i64 24
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = getelementptr inbounds i8, i8* %23, i64 25
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = getelementptr inbounds i8, i8* %23, i64 26
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = getelementptr inbounds i8, i8* %23, i64 27
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %36, i32 %39, i32 %42, i32 %45)
%47 = tail call i32 @strlen(i8* %4)
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8, i8* %4, i64 %48
%50 = icmp eq i32 %0, 0
br i1 %50, label %125, label %51
51: ; preds = %33
%52 = load i8*, i8** %22
%53 = getelementptr inbounds i8, i8* %52, i64 28
%54 = tail call i32 @uint2(i8* %53)
%55 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %49, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %54)
%56 = tail call i32 @strlen(i8* %49)
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8, i8* %49, i64 %57
%59 = load i8*, i8** %22
%60 = getelementptr inbounds i8, i8* %59, i64 18
%61 = tail call i32 @int4(i8* %60)
%62 = sitofp i32 %61 to double
%63 = fmul double %62, 0x3EB0C6F7A0B5ED8D
%64 = load i8*, i8** %22
%65 = getelementptr inbounds i8, i8* %64, i64 14
%66 = tail call i32 @int4(i8* %65)
%67 = sitofp i32 %66 to double
%68 = fmul double %67, 0x3EB0C6F7A0B5ED8D
%69 = load i8*, i8** %22
%70 = getelementptr inbounds i8, i8* %69, i64 22
%71 = tail call double @int2(i8* %70)
%72 = fmul double %71, 1.000000e-01
%73 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %58, i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double %63, double %68, double %72)
%74 = tail call i32 @strlen(i8* %58)
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %58, i64 %75
%77 = load i8*, i8** %22
%78 = getelementptr inbounds i8, i8* %77, i64 30
%79 = tail call double @int2(i8* %78)
%80 = fmul double %79, 1.000000e-03
%81 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %76, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %80)
%82 = tail call i32 @strlen(i8* %76)
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %76, i64 %83
%85 = load i8*, i8** %22
%86 = getelementptr inbounds i8, i8* %85, i64 32
%87 = tail call i32 @uint4(i8* %86)
%88 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %84, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %87)
%89 = tail call i32 @strlen(i8* %84)
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %84, i64 %90
%92 = load i8*, i8** %22
%93 = getelementptr inbounds i8, i8* %92, i64 36
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = getelementptr inbounds i8, i8* %92, i64 37
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = getelementptr inbounds i8, i8* %92, i64 38
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %91, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %95, i32 %98, i32 %101)
%103 = tail call i32 @strlen(i8* %91)
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8, i8* %91, i64 %104
%106 = load i8*, i8** %22
%107 = getelementptr inbounds i8, i8* %106, i64 39
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = getelementptr inbounds i8, i8* %106, i64 40
%111 = load i8, i8* %110
%112 = zext i8 %111 to i32
%113 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %105, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %109, i32 %112)
%114 = tail call i32 @strlen(i8* %105)
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %105, i64 %115
%117 = load i8*, i8** %22
%118 = getelementptr inbounds i8, i8* %117, i64 41
%119 = tail call double @int2(i8* %118)
%120 = fmul double %119, 1.000000e-02
%121 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %116, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), double %120)
%122 = tail call i32 @strlen(i8* %116)
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8, i8* %116, i64 %123
br label %125
125: ; preds = %51, %33
%126 = phi i8* [ %124, %51 ], [ %49, %33 ]
%127 = load i8*, i8** %22
%128 = icmp eq i8* %127, null
br i1 %128, label %133, label %129
129: ; preds = %125
%130 = tail call i32 @uint4(i8* %127)
%131 = and i32 %130, 3
%132 = icmp eq i32 %131, 0
br i1 %132, label %133, label %137
133: ; preds = %125, %129
%134 = phi i32 [ %130, %129 ], [ 0, %125 ]
%135 = add nsw i32 %134, -60
%136 = sdiv i32 %135, 4
br label %137
137: ; preds = %129, %133
%138 = phi i32 [ %136, %133 ], [ -1, %129 ]
br i1 %50, label %173, label %139
139: ; preds = %137
%140 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %126, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %138)
%141 = tail call i32 @strlen(i8* %126)
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i8, i8* %126, i64 %142
%144 = load i8*, i8** %22
%145 = getelementptr inbounds i8, i8* %144, i64 55
%146 = tail call i32 @uint_n(i8* %145, i32 3)
%147 = icmp eq i32 %146, 16777215
br i1 %147, label %153, label %148
148: ; preds = %139
%149 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %143, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %146)
%150 = tail call i32 @strlen(i8* %143)
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8, i8* %143, i64 %151
br label %153
153: ; preds = %148, %139
%154 = phi i8* [ %152, %148 ], [ %143, %139 ]
%155 = load i8*, i8** %22
%156 = getelementptr inbounds i8, i8* %155, i64 58
%157 = load i8, i8* %156
%158 = icmp eq i8 %157, -1
br i1 %158, label %159, label %163
159: ; preds = %153
%160 = getelementptr inbounds i8, i8* %155, i64 59
%161 = load i8, i8* %160
%162 = icmp eq i8 %161, -1
br i1 %162, label %170, label %163
163: ; preds = %159, %153
%164 = tail call double @int2(i8* %156)
%165 = fmul double %164, 1.000000e-01
%166 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %154, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), double %165)
%167 = tail call i32 @strlen(i8* %154)
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds i8, i8* %154, i64 %168
br label %170
170: ; preds = %159, %163
%171 = phi i8* [ %169, %163 ], [ %154, %159 ]
%172 = icmp ult i32 %0, 2
br i1 %172, label %173, label %195
173: ; preds = %137, %170
%174 = phi i8* [ %171, %170 ], [ %126, %137 ]
%175 = load i8*, i8** %22
%176 = getelementptr inbounds i8, i8* %175, i64 60
%177 = tail call double @int2(i8* %176)
%178 = fmul double %177, 1.000000e-02
%179 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %174, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), double %178)
%180 = tail call i32 @strlen(i8* %174)
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i8, i8* %174, i64 %181
%183 = sdiv i32 %138, 2
%184 = load i8*, i8** %22
%185 = getelementptr inbounds i8, i8* %184, i64 60
%186 = add nsw i32 %138, -1
%187 = sdiv i32 %186, 2
%188 = shl nsw i32 %187, 2
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i8, i8* %185, i64 %189
%191 = tail call double @int2(i8* %190)
%192 = fmul double %191, 1.000000e-02
%193 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %182, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %183, double %192)
%194 = tail call i32 @strlen(i8* %182)
br label %240
195: ; preds = %170
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(30) %171, i8* align 1 dereferenceable(30) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), i64 30, i1 false)
%196 = tail call i32 @strlen(i8* %171)
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds i8, i8* %171, i64 %197
%199 = icmp sgt i32 %138, 0
br i1 %199, label %202, label %200
200: ; preds = %195
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(34) %198, i8* align 1 dereferenceable(34) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), i64 34, i1 false)
%201 = tail call i32 @strlen(i8* %198)
br label %240
202: ; preds = %195
%203 = zext i32 %138 to i64
br label %204
204: ; preds = %202, %204
%205 = phi i64 [ 0, %202 ], [ %217, %204 ]
%206 = phi i8* [ %198, %202 ], [ %216, %204 ]
%207 = load i8*, i8** %22
%208 = getelementptr inbounds i8, i8* %207, i64 60
%209 = shl nsw i64 %205, 2
%210 = getelementptr inbounds i8, i8* %208, i64 %209
%211 = tail call double @int2(i8* %210)
%212 = fmul double %211, 1.000000e-02
%213 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %206, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), double %212)
%214 = tail call i32 @strlen(i8* %206)
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i8, i8* %206, i64 %215
%217 = add nuw nsw i64 %205, 1
%218 = icmp eq i64 %217, %203
br i1 %218, label %219, label %204
219: ; preds = %204
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(34) %216, i8* align 1 dereferenceable(34) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), i64 34, i1 false)
%220 = tail call i32 @strlen(i8* %216)
br i1 %199, label %221, label %240
221: ; preds = %219
%222 = sext i32 %220 to i64
%223 = getelementptr inbounds i8, i8* %216, i64 %222
%224 = zext i32 %138 to i64
br label %225
225: ; preds = %221, %225
%226 = phi i64 [ 0, %221 ], [ %238, %225 ]
%227 = phi i8* [ %223, %221 ], [ %237, %225 ]
%228 = load i8*, i8** %22
%229 = getelementptr inbounds i8, i8* %228, i64 62
%230 = shl nsw i64 %226, 2
%231 = getelementptr inbounds i8, i8* %229, i64 %230
%232 = tail call double @int2(i8* %231)
%233 = fmul double %232, 1.000000e-02
%234 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %227, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), double %233)
%235 = tail call i32 @strlen(i8* %227)
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds i8, i8* %227, i64 %236
%238 = add nuw nsw i64 %226, 1
%239 = icmp eq i64 %238, %224
br i1 %239, label %240, label %225
240: ; preds = %225, %200, %219, %173, %21, %8, %6
ret i32 0
}