#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*/ free(int *);
double log(double);
int /*<<< orphan*/ sc_parse_parameters(char const *, char, char, float *,
                                       float *);
int /*<<< orphan*/ sscanf(char const *, char *, float *);
int *vrna_alloc(int);
int vrna_sc_SHAPE_to_pr(const char *shape_conversion, double *values,
                        int length, double default_value) {
  int *indices;
  int i, j;
  int index;
  int ret = 1;
  if (!shape_conversion || !(*shape_conversion) || length <= 0)
    return 0;
  if (*shape_conversion == 'S')
    return 1;
  indices = vrna_alloc(sizeof(int) * (length + 1));
  for (i = 1, j = 0; i <= length; ++i) {
    if (values[i] < 0)
      values[i] = default_value;
    else
      indices[j++] = i;
  }
  if (*shape_conversion == 'M') {
    double max;
    double map_info[4][2] = {{0.25, 0.35}, {0.30, 0.55}, {0.70, 0.85}, {0, 1}};
    max = values[1];
    for (i = 2; i <= length; ++i)
      max = ((max) > (values[i]) ? (max) : (values[i]));
    map_info[3][0] = max;
    for (i = 0; indices[i]; ++i) {
      double lower_source = 0;
      double lower_target = 0;
      index = indices[i];
      if (values[index] == 0)
        continue;
      for (j = 0; j < 4; ++j) {
        if (values[index] > lower_source && values[index] <= map_info[j][0]) {
          double diff_source = map_info[j][0] - lower_source;
          double diff_target = map_info[j][1] - lower_target;
          values[index] =
              (values[index] - lower_source) / diff_source * diff_target +
              lower_target;
          break;
        }
        lower_source = map_info[j][0];
        lower_target = map_info[j][1];
      }
    }
  } else if (*shape_conversion == 'C') {
    float cutoff = 0.25;
    int i;
    sscanf(shape_conversion + 1, "%f", &cutoff);
    for (i = 0; indices[i]; ++i) {
      index = indices[i];
      values[index] = values[index] < cutoff ? 0 : 1;
    }
  } else if (*shape_conversion == 'L' || *shape_conversion == 'O') {
    int i;
    float slope = (*shape_conversion == 'L') ? 0.68 : 1.6;
    float intercept = (*shape_conversion == 'L') ? 0.2 : -2.29;
    sc_parse_parameters(shape_conversion + 1, 's', 'i', &slope, &intercept);
    for (i = 0; indices[i]; ++i) {
      double v;
      index = indices[i];
      v = (*shape_conversion == 'L') ? values[index] : log(values[index]);
      values[index] =
          (((((v - intercept) / slope) < (1) ? ((v - intercept) / slope)
                                             : (1))) > (0)
               ? ((((v - intercept) / slope) < (1) ? ((v - intercept) / slope)
                                                   : (1)))
               : (0));
    }
  } else
    ret = 0;
  free(indices);
  return ret;
}


x86 assembly (clang, -O0):
<vrna_sc_SHAPE_to_pr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
movl   $0x1,-0x40(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11a4 <vrna_sc_SHAPE_to_pr+0x44>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     11a4 <vrna_sc_SHAPE_to_pr+0x44>
cmpl   $0x0,-0x1c(%rbp)
jg     11b0 <vrna_sc_SHAPE_to_pr+0x50>
movl   $0x0,-0x4(%rbp)
jmp    1871 <vrna_sc_SHAPE_to_pr+0x711>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
jne    11cc <vrna_sc_SHAPE_to_pr+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    1871 <vrna_sc_SHAPE_to_pr+0x711>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <vrna_alloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1255 <vrna_sc_SHAPE_to_pr+0xf5>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    122a <vrna_sc_SHAPE_to_pr+0xca>
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1242 <vrna_sc_SHAPE_to_pr+0xe2>
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1247 <vrna_sc_SHAPE_to_pr+0xe7>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11f1 <vrna_sc_SHAPE_to_pr+0x91>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4d,%eax
jne    14b4 <vrna_sc_SHAPE_to_pr+0x354>
lea    -0x90(%rbp),%rdi
lea    0xdbd(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x2,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     12f8 <vrna_sc_SHAPE_to_pr+0x198>
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    12c8 <vrna_sc_SHAPE_to_pr+0x168>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    12dd <vrna_sc_SHAPE_to_pr+0x17d>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1292 <vrna_sc_SHAPE_to_pr+0x132>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     14af <vrna_sc_SHAPE_to_pr+0x34f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1364 <vrna_sc_SHAPE_to_pr+0x204>
jp     1364 <vrna_sc_SHAPE_to_pr+0x204>
jmp    14a1 <vrna_sc_SHAPE_to_pr+0x341>
movl   $0x0,-0x38(%rbp)
cmpl   $0x4,-0x38(%rbp)
jge    149c <vrna_sc_SHAPE_to_pr+0x33c>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1451 <vrna_sc_SHAPE_to_pr+0x2f1>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movslq -0x38(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1451 <vrna_sc_SHAPE_to_pr+0x2f1>
movslq -0x38(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
subsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movslq -0x38(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
subsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x98(%rbp),%xmm0
ff
divsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    149c <vrna_sc_SHAPE_to_pr+0x33c>
movslq -0x38(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movslq -0x38(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    136b <vrna_sc_SHAPE_to_pr+0x20b>
jmp    14a1 <vrna_sc_SHAPE_to_pr+0x341>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1309 <vrna_sc_SHAPE_to_pr+0x1a9>
jmp    1862 <vrna_sc_SHAPE_to_pr+0x702>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x43,%eax
jne    1570 <vrna_sc_SHAPE_to_pr+0x410>
movss  0xb5c(%rip),%xmm0
movss  %xmm0,-0xb4(%rbp)
ff
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xb8d(%rip),%rsi
lea    -0xb4(%rbp),%rdx
call   1060 <sscanf@plt>
movl   $0x0,-0xb8(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xb8(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     156b <vrna_sc_SHAPE_to_pr+0x40b>
mov    -0x30(%rbp),%rax
movslq -0xb8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movss  -0xb4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    14f9 <vrna_sc_SHAPE_to_pr+0x399>
jmp    185d <vrna_sc_SHAPE_to_pr+0x6fd>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
je     1590 <vrna_sc_SHAPE_to_pr+0x430>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4f,%eax
jne    1851 <vrna_sc_SHAPE_to_pr+0x6f1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsd  0xa71(%rip),%xmm0
movsd  0xa71(%rip),%xmm1
movsd  %xmm1,-0xe8(%rbp)
ff
cmp    $0x4c,%eax
movsd  %xmm0,-0xe0(%rbp)
ff
je     15d0 <vrna_sc_SHAPE_to_pr+0x470>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsd  0xa0d(%rip),%xmm0
movsd  0xa0d(%rip),%xmm1
movsd  %xmm1,-0xf8(%rbp)
ff
cmp    $0x4c,%eax
movsd  %xmm0,-0xf0(%rbp)
ff
je     1624 <vrna_sc_SHAPE_to_pr+0x4c4>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc4(%rbp)
ff
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x73,%esi
mov    $0x69,%edx
lea    -0xc0(%rbp),%rcx
lea    -0xc4(%rbp),%r8
call   1040 <sc_parse_parameters@plt>
movl   $0x0,-0xbc(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xbc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     184c <vrna_sc_SHAPE_to_pr+0x6ec>
mov    -0x30(%rbp),%rax
movslq -0xbc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
jne    16b7 <vrna_sc_SHAPE_to_pr+0x557>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    16d1 <vrna_sc_SHAPE_to_pr+0x571>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1080 <log@plt>
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm1
ff
movss  -0xc4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
subsd  %xmm0,%xmm1
movss  -0xc0(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  0x90f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1750 <vrna_sc_SHAPE_to_pr+0x5f0>
movsd  -0xd0(%rbp),%xmm0
ff
movss  -0xc4(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movss  -0xc0(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
jmp    1765 <vrna_sc_SHAPE_to_pr+0x605>
movsd  0x8c8(%rip),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
jmp    1765 <vrna_sc_SHAPE_to_pr+0x605>
movsd  -0x108(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1813 <vrna_sc_SHAPE_to_pr+0x6b3>
movsd  -0xd0(%rbp),%xmm1
ff
movss  -0xc4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
subsd  %xmm0,%xmm1
movss  -0xc0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  0x876(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    17e9 <vrna_sc_SHAPE_to_pr+0x689>
movsd  -0xd0(%rbp),%xmm0
ff
movss  -0xc4(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movss  -0xc0(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
jmp    17fe <vrna_sc_SHAPE_to_pr+0x69e>
movsd  0x82f(%rip),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
jmp    17fe <vrna_sc_SHAPE_to_pr+0x69e>
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
jmp    1823 <vrna_sc_SHAPE_to_pr+0x6c3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
jmp    1823 <vrna_sc_SHAPE_to_pr+0x6c3>
movsd  -0x118(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    1667 <vrna_sc_SHAPE_to_pr+0x507>
jmp    1858 <vrna_sc_SHAPE_to_pr+0x6f8>
movl   $0x0,-0x40(%rbp)
jmp    185d <vrna_sc_SHAPE_to_pr+0x6fd>
jmp    1862 <vrna_sc_SHAPE_to_pr+0x702>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrna_sc_SHAPE_to_pr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %ebp,%ebp
test   %rdi,%rdi
je     13f1 <vrna_sc_SHAPE_to_pr+0x2a1>
mov    %edx,%r12d
test   %edx,%edx
jle    13f1 <vrna_sc_SHAPE_to_pr+0x2a1>
mov    %rdi,%r15
mov    (%rdi),%al
test   %al,%al
je     13f1 <vrna_sc_SHAPE_to_pr+0x2a1>
mov    $0x1,%ebp
cmp    $0x53,%al
je     13f1 <vrna_sc_SHAPE_to_pr+0x2a1>
mov    %rsi,%r13
movsd  %xmm0,0x10(%rsp)
lea    0x4(,%r12,4),%edi
call   1060 <vrna_alloc@plt>
mov    %rax,%r14
mov    %r12d,%ecx
mov    %rcx,%rax
add    $0xffffffffffffffff,%rax
je     1232 <vrna_sc_SHAPE_to_pr+0xe2>
mov    %ecx,%edi
and    $0xfffffffe,%edi
neg    %rdi
xor    %esi,%esi
mov    $0x1,%edx
xorpd  %xmm0,%xmm0
movsd  0x10(%rsp),%xmm1
jmp    11e9 <vrna_sc_SHAPE_to_pr+0x99>
xchg   %ax,%ax
movsd  %xmm1,0x8(%r13,%rdx,8)
lea    (%rdi,%rdx,1),%rbp
add    $0x2,%rbp
add    $0x2,%rdx
cmp    $0x1,%rbp
je     123f <vrna_sc_SHAPE_to_pr+0xef>
ucomisd 0x0(%r13,%rdx,8),%xmm0
jbe    1210 <vrna_sc_SHAPE_to_pr+0xc0>
movsd  %xmm1,0x0(%r13,%rdx,8)
ucomisd 0x8(%r13,%rdx,8),%xmm0
ja     11d0 <vrna_sc_SHAPE_to_pr+0x80>
jmp    1223 <vrna_sc_SHAPE_to_pr+0xd3>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %esi,%rbp
add    $0x1,%esi
mov    %edx,(%r14,%rbp,4)
ucomisd 0x8(%r13,%rdx,8),%xmm0
ja     11d0 <vrna_sc_SHAPE_to_pr+0x80>
movslq %esi,%rbp
add    $0x1,%esi
lea    0x1(%rdx),%ebx
mov    %ebx,(%r14,%rbp,4)
jmp    11d7 <vrna_sc_SHAPE_to_pr+0x87>
xor    %esi,%esi
mov    $0x1,%edx
movsd  0x10(%rsp),%xmm1
test   $0x1,%cl
je     1261 <vrna_sc_SHAPE_to_pr+0x111>
xorpd  %xmm0,%xmm0
ucomisd 0x0(%r13,%rdx,8),%xmm0
jbe    125a <vrna_sc_SHAPE_to_pr+0x10a>
movsd  %xmm1,0x0(%r13,%rdx,8)
jmp    1261 <vrna_sc_SHAPE_to_pr+0x111>
movslq %esi,%rsi
mov    %edx,(%r14,%rsi,4)
mov    (%r15),%dl
xor    %ebp,%ebp
lea    -0x43(%rdx),%esi
cmp    $0xc,%sil
ja     13e9 <vrna_sc_SHAPE_to_pr+0x299>
movzbl %sil,%esi
lea    0xdd2(%rip),%rdi
movslq (%rdi,%rsi,4),%rsi
add    %rdi,%rsi
jmp    *%rsi
xor    %eax,%eax
cmp    $0x4c,%dl
sete   %al
lea    0xd6a(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0xd60(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
movss  %xmm0,0x4(%rsp)
lea    0x1(%r15),%rdi
lea    0x8(%rsp),%rcx
lea    0x4(%rsp),%r8
mov    $0x73,%esi
mov    $0x69,%edx
call   1040 <sc_parse_parameters@plt>
mov    (%r14),%eax
test   %eax,%eax
je     13e4 <vrna_sc_SHAPE_to_pr+0x294>
mov    %r14,%rbp
add    $0x4,%rbp
movsd  0xd26(%rip),%xmm3
xorpd  %xmm4,%xmm4
jmp    1306 <vrna_sc_SHAPE_to_pr+0x1b6>
movsd  %xmm1,0x0(%r13,%rbx,8)
mov    0x0(%rbp),%eax
add    $0x4,%rbp
test   %eax,%eax
je     13e4 <vrna_sc_SHAPE_to_pr+0x294>
cmpb   $0x4c,(%r15)
movslq %eax,%rbx
movsd  0x0(%r13,%rbx,8),%xmm0
je     1327 <vrna_sc_SHAPE_to_pr+0x1d7>
call   1070 <log@plt>
xorpd  %xmm4,%xmm4
movsd  0xce9(%rip),%xmm3
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
minsd  %xmm3,%xmm2
ucomisd %xmm4,%xmm2
xorpd  %xmm1,%xmm1
cmpnltsd %xmm2,%xmm1
andnpd %xmm3,%xmm1
jbe    12f0 <vrna_sc_SHAPE_to_pr+0x1a0>
movapd %xmm0,%xmm2
cmpltsd %xmm3,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
movapd %xmm2,%xmm1
jmp    12f0 <vrna_sc_SHAPE_to_pr+0x1a0>
movl   $0x3e800000,0xc(%rsp)
3e
add    $0x1,%r15
lea    0xd41(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %r15,%rdi
call   1050 <sscanf@plt>
mov    (%r14),%ecx
test   %ecx,%ecx
je     13e4 <vrna_sc_SHAPE_to_pr+0x294>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rax
add    $0x4,%rax
movsd  0xc54(%rip),%xmm1
nopl   0x0(%rax)
movslq %ecx,%rcx
movsd  0x0(%r13,%rcx,8),%xmm2
cmpnltsd %xmm0,%xmm2
andpd  %xmm1,%xmm2
movlpd %xmm2,0x0(%r13,%rcx,8)
mov    (%rax),%ecx
add    $0x4,%rax
test   %ecx,%ecx
jne    13c0 <vrna_sc_SHAPE_to_pr+0x270>
mov    $0x1,%ebp
mov    %r14,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x8(%r13),%xmm0
cmp    $0x2,%r12d
jl     148e <vrna_sc_SHAPE_to_pr+0x33e>
add    $0x1,%rcx
add    $0xfffffffffffffffd,%rcx
mov    %eax,%edx
and    $0x3,%edx
cmp    $0x3,%rcx
jae    142c <vrna_sc_SHAPE_to_pr+0x2dc>
mov    $0x2,%ecx
jmp    146e <vrna_sc_SHAPE_to_pr+0x31e>
and    $0xfffffffffffffffc,%rax
neg    %rax
mov    $0x2,%ecx
nopl   0x0(%rax,%rax,1)
maxsd  0x0(%r13,%rcx,8),%xmm0
maxsd  0x8(%r13,%rcx,8),%xmm0
maxsd  0x10(%r13,%rcx,8),%xmm0
maxsd  0x18(%r13,%rcx,8),%xmm0
lea    (%rax,%rcx,1),%rsi
add    $0x4,%rsi
add    $0x4,%rcx
cmp    $0x2,%rsi
jne    1440 <vrna_sc_SHAPE_to_pr+0x2f0>
test   %rdx,%rdx
je     148e <vrna_sc_SHAPE_to_pr+0x33e>
lea    0x0(,%rcx,8),%rax
add    %r13,%rax
xor    %ecx,%ecx
maxsd  (%rax,%rcx,8),%xmm0
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1480 <vrna_sc_SHAPE_to_pr+0x330>
mov    (%r14),%edx
mov    $0x1,%ebp
test   %edx,%edx
je     13e9 <vrna_sc_SHAPE_to_pr+0x299>
mov    %r14,%rax
add    $0x4,%rax
xorpd  %xmm1,%xmm1
movsd  0xb67(%rip),%xmm5
movsd  0xb66(%rip),%xmm12
movsd  0xb65(%rip),%xmm10
movsd  0xb64(%rip),%xmm11
movsd  0xb63(%rip),%xmm9
movsd  0xb62(%rip),%xmm8
lea    0xbab(%rip),%rcx
jmp    1528 <vrna_sc_SHAPE_to_pr+0x3d8>
xor    %esi,%esi
xorpd  %xmm2,%xmm2
movapd %xmm5,%xmm6
subsd  %xmm2,%xmm6
shl    $0x4,%rsi
movsd  0x8(%rsi,%rcx,1),%xmm3
subsd  %xmm4,%xmm3
subsd  %xmm2,%xmm7
divsd  %xmm6,%xmm7
mulsd  %xmm3,%xmm7
addsd  %xmm4,%xmm7
movsd  %xmm7,0x0(%r13,%rdx,8)
mov    (%rax),%edx
add    $0x4,%rax
test   %edx,%edx
je     13e9 <vrna_sc_SHAPE_to_pr+0x299>
movslq %edx,%rdx
movsd  0x0(%r13,%rdx,8),%xmm7
ucomisd %xmm1,%xmm7
jne    153a <vrna_sc_SHAPE_to_pr+0x3ea>
jnp    151a <vrna_sc_SHAPE_to_pr+0x3ca>
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm7
jbe    154a <vrna_sc_SHAPE_to_pr+0x3fa>
ucomisd %xmm7,%xmm5
jae    14e7 <vrna_sc_SHAPE_to_pr+0x397>
ucomisd %xmm5,%xmm7
jbe    156a <vrna_sc_SHAPE_to_pr+0x41a>
mov    $0x1,%esi
ucomisd %xmm7,%xmm12
movapd %xmm10,%xmm4
movapd %xmm5,%xmm2
movapd %xmm12,%xmm6
jae    14f1 <vrna_sc_SHAPE_to_pr+0x3a1>
ucomisd %xmm12,%xmm7
jbe    1590 <vrna_sc_SHAPE_to_pr+0x440>
mov    $0x2,%esi
ucomisd %xmm7,%xmm11
movapd %xmm9,%xmm4
movapd %xmm12,%xmm2
movapd %xmm11,%xmm6
jae    14f1 <vrna_sc_SHAPE_to_pr+0x3a1>
ucomisd %xmm11,%xmm7
jbe    151a <vrna_sc_SHAPE_to_pr+0x3ca>
mov    $0x3,%esi
ucomisd %xmm7,%xmm0
movapd %xmm8,%xmm4
movapd %xmm11,%xmm2
movapd %xmm0,%xmm6
jae    14f1 <vrna_sc_SHAPE_to_pr+0x3a1>
jmp    151a <vrna_sc_SHAPE_to_pr+0x3ca>

LLVM IR (-O0):
@__const.vrna_sc_SHAPE_to_pr.map_info = [4 x [2 x double]] [[2 x double] [double 2.500000e-01, double 3.500000e-01], [2 x double] [double 3.000000e-01, double 5.500000e-01], [2 x double] [double 0x3FE6666666666666, double 8.500000e-01], [2 x double] [double 0.000000e+00, double 1.000000e+00]]
@.str = [3 x i8] c"%f\00"
define i32 @vrna_sc_SHAPE_to_pr(i8* %0, double* %1, i32 %2, double %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double*
%8 = alloca i32
%9 = alloca double
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca [4 x [2 x double]]
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca float
%22 = alloca i32
%23 = alloca i32
%24 = alloca float
%25 = alloca float
%26 = alloca double
store i8* %0, i8** %6
store double* %1, double** %7
store i32 %2, i32* %8
store double %3, double* %9
store i32 1, i32* %14
%27 = load i8*, i8** %6
%28 = icmp ne i8* %27, null
br i1 %28, label %29, label %36
29: ; preds = %4
%30 = load i8*, i8** %6
%31 = load i8, i8* %30
%32 = icmp ne i8 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = load i32, i32* %8
%35 = icmp sle i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %33, %29, %4
store i32 0, i32* %5
br label %370
37: ; preds = %33
%38 = load i8*, i8** %6
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 83
br i1 %41, label %42, label %43
42: ; preds = %37
store i32 1, i32* %5
br label %370
43: ; preds = %37
%44 = load i32, i32* %8
%45 = add nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = mul i64 4, %46
%48 = trunc i64 %47 to i32
%49 = call i32* @vrna_alloc(i32 %48)
store i32* %49, i32** %10
store i32 1, i32* %11
store i32 0, i32* %12
br label %50
50: ; preds = %75, %43
%51 = load i32, i32* %11
%52 = load i32, i32* %8
%53 = icmp sle i32 %51, %52
br i1 %53, label %54, label %78
54: ; preds = %50
%55 = load double*, double** %7
%56 = load i32, i32* %11
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = fcmp olt double %59, 0.000000e+00
br i1 %60, label %61, label %67
61: ; preds = %54
%62 = load double, double* %9
%63 = load double*, double** %7
%64 = load i32, i32* %11
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
store double %62, double* %66
br label %74
67: ; preds = %54
%68 = load i32, i32* %11
%69 = load i32*, i32** %10
%70 = load i32, i32* %12
%71 = add nsw i32 %70, 1
store i32 %71, i32* %12
%72 = sext i32 %70 to i64
%73 = getelementptr inbounds i32, i32* %69, i64 %72
store i32 %68, i32* %73
br label %74
74: ; preds = %67, %61
br label %75
75: ; preds = %74
%76 = load i32, i32* %11
%77 = add nsw i32 %76, 1
store i32 %77, i32* %11
br label %50
78: ; preds = %50
%79 = load i8*, i8** %6
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 77
br i1 %82, label %83, label %211
83: ; preds = %78
%84 = bitcast [4 x [2 x double]]* %16 to i8*
%85 = load double*, double** %7
%86 = getelementptr inbounds double, double* %85, i64 1
%87 = load double, double* %86
store double %87, double* %15
store i32 2, i32* %11
br label %88
88: ; preds = %110, %83
%89 = load i32, i32* %11
%90 = load i32, i32* %8
%91 = icmp sle i32 %89, %90
br i1 %91, label %92, label %113
92: ; preds = %88
%93 = load double, double* %15
%94 = load double*, double** %7
%95 = load i32, i32* %11
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = fcmp ogt double %93, %98
br i1 %99, label %100, label %102
100: ; preds = %92
%101 = load double, double* %15
br label %108
102: ; preds = %92
%103 = load double*, double** %7
%104 = load i32, i32* %11
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
%107 = load double, double* %106
br label %108
108: ; preds = %102, %100
%109 = phi double [ %101, %100 ], [ %107, %102 ]
store double %109, double* %15
br label %110
110: ; preds = %108
%111 = load i32, i32* %11
%112 = add nsw i32 %111, 1
store i32 %112, i32* %11
br label %88
113: ; preds = %88
%114 = load double, double* %15
%115 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %16, i64 0, i64 3
%116 = getelementptr inbounds [2 x double], [2 x double]* %115, i64 0, i64 0
store double %114, double* %116
store i32 0, i32* %11
br label %117
117: ; preds = %207, %113
%118 = load i32*, i32** %10
%119 = load i32, i32* %11
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %118, i64 %120
%122 = load i32, i32* %121
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %210
124: ; preds = %117
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
%125 = load i32*, i32** %10
%126 = load i32, i32* %11
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i32, i32* %125, i64 %127
%129 = load i32, i32* %128
store i32 %129, i32* %13
%130 = load double*, double** %7
%131 = load i32, i32* %13
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %130, i64 %132
%134 = load double, double* %133
%135 = fcmp oeq double %134, 0.000000e+00
br i1 %135, label %136, label %137
136: ; preds = %124
br label %207
137: ; preds = %124
store i32 0, i32* %12
br label %138
138: ; preds = %203, %137
%139 = load i32, i32* %12
%140 = icmp slt i32 %139, 4
br i1 %140, label %141, label %206
141: ; preds = %138
%142 = load double*, double** %7
%143 = load i32, i32* %13
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
%146 = load double, double* %145
%147 = load double, double* %17
%148 = fcmp ogt double %146, %147
br i1 %148, label %149, label %192
149: ; preds = %141
%150 = load double*, double** %7
%151 = load i32, i32* %13
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %150, i64 %152
%154 = load double, double* %153
%155 = load i32, i32* %12
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %16, i64 0, i64 %156
%158 = getelementptr inbounds [2 x double], [2 x double]* %157, i64 0, i64 0
%159 = load double, double* %158
%160 = fcmp ole double %154, %159
br i1 %160, label %161, label %192
161: ; preds = %149
%162 = load i32, i32* %12
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %16, i64 0, i64 %163
%165 = getelementptr inbounds [2 x double], [2 x double]* %164, i64 0, i64 0
%166 = load double, double* %165
%167 = load double, double* %17
%168 = fsub double %166, %167
store double %168, double* %19
%169 = load i32, i32* %12
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %16, i64 0, i64 %170
%172 = getelementptr inbounds [2 x double], [2 x double]* %171, i64 0, i64 1
%173 = load double, double* %172
%174 = load double, double* %18
%175 = fsub double %173, %174
store double %175, double* %20
%176 = load double*, double** %7
%177 = load i32, i32* %13
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %176, i64 %178
%180 = load double, double* %179
%181 = load double, double* %17
%182 = fsub double %180, %181
%183 = load double, double* %19
%184 = fdiv double %182, %183
%185 = load double, double* %20
%186 = load double, double* %18
%187 = call double @llvm.fmuladd.f64(double %184, double %185, double %186)
%188 = load double*, double** %7
%189 = load i32, i32* %13
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds double, double* %188, i64 %190
store double %187, double* %191
br label %206
192: ; preds = %149, %141
%193 = load i32, i32* %12
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %16, i64 0, i64 %194
%196 = getelementptr inbounds [2 x double], [2 x double]* %195, i64 0, i64 0
%197 = load double, double* %196
store double %197, double* %17
%198 = load i32, i32* %12
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %16, i64 0, i64 %199
%201 = getelementptr inbounds [2 x double], [2 x double]* %200, i64 0, i64 1
%202 = load double, double* %201
store double %202, double* %18
br label %203
203: ; preds = %192
%204 = load i32, i32* %12
%205 = add nsw i32 %204, 1
store i32 %205, i32* %12
br label %138
206: ; preds = %161, %138
br label %207
207: ; preds = %206, %136
%208 = load i32, i32* %11
%209 = add nsw i32 %208, 1
store i32 %209, i32* %11
br label %117
210: ; preds = %117
br label %366
211: ; preds = %78
%212 = load i8*, i8** %6
%213 = load i8, i8* %212
%214 = sext i8 %213 to i32
%215 = icmp eq i32 %214, 67
br i1 %215, label %216, label %252
216: ; preds = %211
store float 2.500000e-01, float* %21
%217 = load i8*, i8** %6
%218 = getelementptr inbounds i8, i8* %217, i64 1
%219 = call i32 @sscanf(i8* %218, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %21)
store i32 0, i32* %22
br label %220
220: ; preds = %248, %216
%221 = load i32*, i32** %10
%222 = load i32, i32* %22
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds i32, i32* %221, i64 %223
%225 = load i32, i32* %224
%226 = icmp ne i32 %225, 0
br i1 %226, label %227, label %251
227: ; preds = %220
%228 = load i32*, i32** %10
%229 = load i32, i32* %22
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds i32, i32* %228, i64 %230
%232 = load i32, i32* %231
store i32 %232, i32* %13
%233 = load double*, double** %7
%234 = load i32, i32* %13
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = load float, float* %21
%239 = fpext float %238 to double
%240 = fcmp olt double %237, %239
%241 = zext i1 %240 to i64
%242 = select i1 %240, i32 0, i32 1
%243 = sitofp i32 %242 to double
%244 = load double*, double** %7
%245 = load i32, i32* %13
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %244, i64 %246
store double %243, double* %247
br label %248
248: ; preds = %227
%249 = load i32, i32* %22
%250 = add nsw i32 %249, 1
store i32 %250, i32* %22
br label %220
251: ; preds = %220
br label %365
252: ; preds = %211
%253 = load i8*, i8** %6
%254 = load i8, i8* %253
%255 = sext i8 %254 to i32
%256 = icmp eq i32 %255, 76
br i1 %256, label %262, label %257
257: ; preds = %252
%258 = load i8*, i8** %6
%259 = load i8, i8* %258
%260 = sext i8 %259 to i32
%261 = icmp eq i32 %260, 79
br i1 %261, label %262, label %363
262: ; preds = %257, %252
%263 = load i8*, i8** %6
%264 = load i8, i8* %263
%265 = sext i8 %264 to i32
%266 = icmp eq i32 %265, 76
%267 = zext i1 %266 to i64
%268 = select i1 %266, double 6.800000e-01, double 1.600000e+00
%269 = fptrunc double %268 to float
store float %269, float* %24
%270 = load i8*, i8** %6
%271 = load i8, i8* %270
%272 = sext i8 %271 to i32
%273 = icmp eq i32 %272, 76
%274 = zext i1 %273 to i64
%275 = select i1 %273, double 2.000000e-01, double -2.290000e+00
%276 = fptrunc double %275 to float
store float %276, float* %25
%277 = load i8*, i8** %6
%278 = getelementptr inbounds i8, i8* %277, i64 1
%279 = call i32 @sc_parse_parameters(i8* %278, i8 signext 115, i8 signext 105, float* %24, float* %25)
store i32 0, i32* %23
br label %280
280: ; preds = %359, %262
%281 = load i32*, i32** %10
%282 = load i32, i32* %23
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds i32, i32* %281, i64 %283
%285 = load i32, i32* %284
%286 = icmp ne i32 %285, 0
br i1 %286, label %287, label %362
287: ; preds = %280
%288 = load i32*, i32** %10
%289 = load i32, i32* %23
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds i32, i32* %288, i64 %290
%292 = load i32, i32* %291
store i32 %292, i32* %13
%293 = load i8*, i8** %6
%294 = load i8, i8* %293
%295 = sext i8 %294 to i32
%296 = icmp eq i32 %295, 76
br i1 %296, label %297, label %303
297: ; preds = %287
%298 = load double*, double** %7
%299 = load i32, i32* %13
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double, double* %298, i64 %300
%302 = load double, double* %301
br label %310
303: ; preds = %287
%304 = load double*, double** %7
%305 = load i32, i32* %13
%306 = sext i32 %305 to i64
%307 = getelementptr inbounds double, double* %304, i64 %306
%308 = load double, double* %307
%309 = call double @log(double %308)
br label %310
310: ; preds = %303, %297
%311 = phi double [ %302, %297 ], [ %309, %303 ]
store double %311, double* %26
%312 = load double, double* %26
%313 = load float, float* %25
%314 = fpext float %313 to double
%315 = fsub double %312, %314
%316 = load float, float* %24
%317 = fpext float %316 to double
%318 = fdiv double %315, %317
%319 = fcmp olt double %318, 1.000000e+00
br i1 %319, label %320, label %328
320: ; preds = %310
%321 = load double, double* %26
%322 = load float, float* %25
%323 = fpext float %322 to double
%324 = fsub double %321, %323
%325 = load float, float* %24
%326 = fpext float %325 to double
%327 = fdiv double %324, %326
br label %329
328: ; preds = %310
br label %329
329: ; preds = %328, %320
%330 = phi double [ %327, %320 ], [ 1.000000e+00, %328 ]
%331 = fcmp ogt double %330, 0.000000e+00
br i1 %331, label %332, label %352
332: ; preds = %329
%333 = load double, double* %26
%334 = load float, float* %25
%335 = fpext float %334 to double
%336 = fsub double %333, %335
%337 = load float, float* %24
%338 = fpext float %337 to double
%339 = fdiv double %336, %338
%340 = fcmp olt double %339, 1.000000e+00
br i1 %340, label %341, label %349
341: ; preds = %332
%342 = load double, double* %26
%343 = load float, float* %25
%344 = fpext float %343 to double
%345 = fsub double %342, %344
%346 = load float, float* %24
%347 = fpext float %346 to double
%348 = fdiv double %345, %347
br label %350
349: ; preds = %332
br label %350
350: ; preds = %349, %341
%351 = phi double [ %348, %341 ], [ 1.000000e+00, %349 ]
br label %353
352: ; preds = %329
br label %353
353: ; preds = %352, %350
%354 = phi double [ %351, %350 ], [ 0.000000e+00, %352 ]
%355 = load double*, double** %7
%356 = load i32, i32* %13
%357 = sext i32 %356 to i64
%358 = getelementptr inbounds double, double* %355, i64 %357
store double %354, double* %358
br label %359
359: ; preds = %353
%360 = load i32, i32* %23
%361 = add nsw i32 %360, 1
store i32 %361, i32* %23
br label %280
362: ; preds = %280
br label %364
363: ; preds = %257
store i32 0, i32* %14
br label %364
364: ; preds = %363, %362
br label %365
365: ; preds = %364, %251
br label %366
366: ; preds = %365, %210
%367 = load i32*, i32** %10
%368 = call i32 @free(i32* %367)
%369 = load i32, i32* %14
store i32 %369, i32* %5
br label %370
370: ; preds = %366, %42, %36
%371 = load i32, i32* %5
ret i32 %371
}

LLVM IR (-O2):
@__const.vrna_sc_SHAPE_to_pr.map_info = [4 x [2 x double]] [[2 x double] [double 2.500000e-01, double 3.500000e-01], [2 x double] [double 3.000000e-01, double 5.500000e-01], [2 x double] [double 0x3FE6666666666666, double 8.500000e-01], [2 x double] [double 0.000000e+00, double 1.000000e+00]]
@.str = [3 x i8] c"%f\00"
define i32 @vrna_sc_SHAPE_to_pr(i8* %0, double* nocapture %1, i32 %2, double %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = icmp eq i8* %0, null
br i1 %8, label %235, label %9
9: ; preds = %4
%10 = load i8, i8* %0
%11 = icmp eq i8 %10, 0
%12 = icmp slt i32 %2, 1
%13 = or i1 %12, %11
br i1 %13, label %235, label %14
14: ; preds = %9
%15 = icmp eq i8 %10, 83
br i1 %15, label %235, label %16
16: ; preds = %14
%17 = shl i32 %2, 2
%18 = add i32 %17, 4
%19 = tail call i32* @vrna_alloc(i32 %18)
%20 = add nuw i32 %2, 1
%21 = zext i32 %20 to i64
%22 = add nsw i64 %21, -1
%23 = add nsw i64 %21, -2
%24 = and i64 %22, 1
%25 = icmp eq i64 %23, 0
br i1 %25, label %58, label %26
26: ; preds = %16
%27 = and i64 %22, -2
br label %28
28: ; preds = %53, %26
%29 = phi i64 [ 1, %26 ], [ %55, %53 ]
%30 = phi i32 [ 0, %26 ], [ %54, %53 ]
%31 = phi i64 [ 0, %26 ], [ %56, %53 ]
%32 = getelementptr inbounds double, double* %1, i64 %29
%33 = load double, double* %32
%34 = fcmp olt double %33, 0.000000e+00
br i1 %34, label %35, label %36
35: ; preds = %28
store double %3, double* %32
br label %41
36: ; preds = %28
%37 = add nsw i32 %30, 1
%38 = sext i32 %30 to i64
%39 = getelementptr inbounds i32, i32* %19, i64 %38
%40 = trunc i64 %29 to i32
store i32 %40, i32* %39
br label %41
41: ; preds = %35, %36
%42 = phi i32 [ %30, %35 ], [ %37, %36 ]
%43 = add nuw nsw i64 %29, 1
%44 = getelementptr inbounds double, double* %1, i64 %43
%45 = load double, double* %44
%46 = fcmp olt double %45, 0.000000e+00
br i1 %46, label %52, label %47
47: ; preds = %41
%48 = add nsw i32 %42, 1
%49 = sext i32 %42 to i64
%50 = getelementptr inbounds i32, i32* %19, i64 %49
%51 = trunc i64 %43 to i32
store i32 %51, i32* %50
br label %53
52: ; preds = %41
store double %3, double* %44
br label %53
53: ; preds = %52, %47
%54 = phi i32 [ %42, %52 ], [ %48, %47 ]
%55 = add nuw nsw i64 %29, 2
%56 = add i64 %31, 2
%57 = icmp eq i64 %56, %27
br i1 %57, label %58, label %28
58: ; preds = %53, %16
%59 = phi i64 [ 1, %16 ], [ %55, %53 ]
%60 = phi i32 [ 0, %16 ], [ %54, %53 ]
%61 = icmp eq i64 %24, 0
br i1 %61, label %71, label %62
62: ; preds = %58
%63 = getelementptr inbounds double, double* %1, i64 %59
%64 = load double, double* %63
%65 = fcmp olt double %64, 0.000000e+00
br i1 %65, label %70, label %66
66: ; preds = %62
%67 = sext i32 %60 to i64
%68 = getelementptr inbounds i32, i32* %19, i64 %67
%69 = trunc i64 %59 to i32
store i32 %69, i32* %68
br label %71
70: ; preds = %62
store double %3, double* %63
br label %71
71: ; preds = %66, %70, %58
%72 = load i8, i8* %0
switch i8 %72, label %232 [
i8 77, label %73
i8 67, label %169
i8 76, label %191
i8 79, label %191
]
73: ; preds = %71
%74 = getelementptr inbounds double, double* %1, i64 1
%75 = load double, double* %74
%76 = icmp slt i32 %2, 2
br i1 %76, label %125, label %77
77: ; preds = %73
%78 = add nsw i64 %21, -3
%79 = and i64 %23, 3
%80 = icmp ult i64 %78, 3
br i1 %80, label %109, label %81
81: ; preds = %77
%82 = and i64 %23, -4
br label %83
83: ; preds = %83, %81
%84 = phi i64 [ 2, %81 ], [ %106, %83 ]
%85 = phi double [ %75, %81 ], [ %105, %83 ]
%86 = phi i64 [ 0, %81 ], [ %107, %83 ]
%87 = getelementptr inbounds double, double* %1, i64 %84
%88 = load double, double* %87
%89 = fcmp ogt double %85, %88
%90 = select i1 %89, double %85, double %88
%91 = or i64 %84, 1
%92 = getelementptr inbounds double, double* %1, i64 %91
%93 = load double, double* %92
%94 = fcmp ogt double %90, %93
%95 = select i1 %94, double %90, double %93
%96 = add nuw nsw i64 %84, 2
%97 = getelementptr inbounds double, double* %1, i64 %96
%98 = load double, double* %97
%99 = fcmp ogt double %95, %98
%100 = select i1 %99, double %95, double %98
%101 = add nuw nsw i64 %84, 3
%102 = getelementptr inbounds double, double* %1, i64 %101
%103 = load double, double* %102
%104 = fcmp ogt double %100, %103
%105 = select i1 %104, double %100, double %103
%106 = add nuw nsw i64 %84, 4
%107 = add i64 %86, 4
%108 = icmp eq i64 %107, %82
br i1 %108, label %109, label %83
109: ; preds = %83, %77
%110 = phi double [ undef, %77 ], [ %105, %83 ]
%111 = phi i64 [ 2, %77 ], [ %106, %83 ]
%112 = phi double [ %75, %77 ], [ %105, %83 ]
%113 = icmp eq i64 %79, 0
br i1 %113, label %125, label %114
114: ; preds = %109, %114
%115 = phi i64 [ %122, %114 ], [ %111, %109 ]
%116 = phi double [ %121, %114 ], [ %112, %109 ]
%117 = phi i64 [ %123, %114 ], [ 0, %109 ]
%118 = getelementptr inbounds double, double* %1, i64 %115
%119 = load double, double* %118
%120 = fcmp ogt double %116, %119
%121 = select i1 %120, double %116, double %119
%122 = add nuw nsw i64 %115, 1
%123 = add i64 %117, 1
%124 = icmp eq i64 %123, %79
br i1 %124, label %125, label %114
125: ; preds = %109, %114, %73
%126 = phi double [ %75, %73 ], [ %110, %109 ], [ %121, %114 ]
%127 = load i32, i32* %19
%128 = icmp eq i32 %127, 0
br i1 %128, label %232, label %129
129: ; preds = %125, %164
%130 = phi i64 [ %165, %164 ], [ 0, %125 ]
%131 = phi i32 [ %167, %164 ], [ %127, %125 ]
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %1, i64 %132
%134 = load double, double* %133
%135 = fcmp oeq double %134, 0.000000e+00
br i1 %135, label %164, label %136
136: ; preds = %129
%137 = fcmp ule double %134, 0.000000e+00
%138 = fcmp ugt double %134, 2.500000e-01
%139 = or i1 %137, %138
br i1 %139, label %152, label %140
140: ; preds = %160, %156, %152, %136
%141 = phi i64 [ 0, %136 ], [ 1, %152 ], [ 2, %156 ], [ 3, %160 ]
%142 = phi double [ 0.000000e+00, %136 ], [ 3.500000e-01, %152 ], [ 5.500000e-01, %156 ], [ 8.500000e-01, %160 ]
%143 = phi double [ 0.000000e+00, %136 ], [ 2.500000e-01, %152 ], [ 3.000000e-01, %156 ], [ 0x3FE6666666666666, %160 ]
%144 = phi double [ 2.500000e-01, %136 ], [ 3.000000e-01, %152 ], [ 0x3FE6666666666666, %156 ], [ %126, %160 ]
%145 = fsub double %144, %143
%146 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* @__const.vrna_sc_SHAPE_to_pr.map_info, i64 0, i64 %141, i64 1
%147 = load double, double* %146
%148 = fsub double %147, %142
%149 = fsub double %134, %143
%150 = fdiv double %149, %145
%151 = tail call double @llvm.fmuladd.f64(double %150, double %148, double %142)
store double %151, double* %133
br label %164
152: ; preds = %136
%153 = fcmp ule double %134, 2.500000e-01
%154 = fcmp ugt double %134, 3.000000e-01
%155 = or i1 %153, %154
br i1 %155, label %156, label %140
156: ; preds = %152
%157 = fcmp ule double %134, 3.000000e-01
%158 = fcmp ugt double %134, 0x3FE6666666666666
%159 = or i1 %157, %158
br i1 %159, label %160, label %140
160: ; preds = %156
%161 = fcmp ule double %134, 0x3FE6666666666666
%162 = fcmp ugt double %134, %126
%163 = select i1 %161, i1 true, i1 %162
br i1 %163, label %164, label %140
164: ; preds = %160, %140, %129
%165 = add nuw i64 %130, 1
%166 = getelementptr inbounds i32, i32* %19, i64 %165
%167 = load i32, i32* %166
%168 = icmp eq i32 %167, 0
br i1 %168, label %232, label %129
169: ; preds = %71
%170 = bitcast float* %5 to i8*
store float 2.500000e-01, float* %5
%171 = getelementptr inbounds i8, i8* %0, i64 1
%172 = call i32 @sscanf(i8* %171, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %5)
%173 = load i32, i32* %19
%174 = icmp eq i32 %173, 0
br i1 %174, label %190, label %175
175: ; preds = %169
%176 = load float, float* %5
%177 = fpext float %176 to double
br label %178
178: ; preds = %175, %178
%179 = phi i64 [ 0, %175 ], [ %186, %178 ]
%180 = phi i32 [ %173, %175 ], [ %188, %178 ]
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %1, i64 %181
%183 = load double, double* %182
%184 = fcmp uge double %183, %177
%185 = uitofp i1 %184 to double
store double %185, double* %182
%186 = add nuw nsw i64 %179, 1
%187 = getelementptr inbounds i32, i32* %19, i64 %186
%188 = load i32, i32* %187
%189 = icmp eq i32 %188, 0
br i1 %189, label %190, label %178
190: ; preds = %178, %169
br label %232
191: ; preds = %71, %71
%192 = bitcast float* %6 to i8*
%193 = icmp eq i8 %72, 76
%194 = select i1 %193, float 0x3FE5C28F60000000, float 0x3FF99999A0000000
store float %194, float* %6
%195 = bitcast float* %7 to i8*
%196 = select i1 %193, float 0x3FC99999A0000000, float 0xC00251EB80000000
store float %196, float* %7
%197 = getelementptr inbounds i8, i8* %0, i64 1
%198 = call i32 @sc_parse_parameters(i8* %197, i8 signext 115, i8 signext 105, float* %6, float* %7)
%199 = load i32, i32* %19
%200 = icmp eq i32 %199, 0
br i1 %200, label %231, label %201
201: ; preds = %191, %211
%202 = phi i64 [ %227, %211 ], [ 0, %191 ]
%203 = phi i32 [ %229, %211 ], [ %199, %191 ]
%204 = load i8, i8* %0
%205 = icmp eq i8 %204, 76
%206 = sext i32 %203 to i64
%207 = getelementptr inbounds double, double* %1, i64 %206
%208 = load double, double* %207
br i1 %205, label %211, label %209
209: ; preds = %201
%210 = call double @log(double %208)
br label %211
211: ; preds = %201, %209
%212 = phi double [ %210, %209 ], [ %208, %201 ]
%213 = load float, float* %7
%214 = fpext float %213 to double
%215 = fsub double %212, %214
%216 = load float, float* %6
%217 = fpext float %216 to double
%218 = fdiv double %215, %217
%219 = fcmp olt double %218, 1.000000e+00
%220 = select i1 %219, double %218, double 1.000000e+00
%221 = fcmp ule double %220, 0.000000e+00
%222 = xor i1 %219, true
%223 = or i1 %221, %222
%224 = select i1 %221, double 0.000000e+00, double 1.000000e+00
%225 = select i1 %223, double %224, double %218
%226 = getelementptr inbounds double, double* %1, i64 %206
store double %225, double* %226
%227 = add nuw i64 %202, 1
%228 = getelementptr inbounds i32, i32* %19, i64 %227
%229 = load i32, i32* %228
%230 = icmp eq i32 %229, 0
br i1 %230, label %231, label %201
231: ; preds = %211, %191
br label %232
232: ; preds = %164, %125, %71, %190, %231
%233 = phi i32 [ 1, %190 ], [ 1, %231 ], [ 0, %71 ], [ 1, %125 ], [ 1, %164 ]
%234 = call i32 @free(i32* %19)
br label %235
235: ; preds = %14, %4, %9, %232
%236 = phi i32 [ %233, %232 ], [ 0, %9 ], [ 0, %4 ], [ 1, %14 ]
ret i32 %236
}