#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 cos(float);
float pow(float, float);
float glottal_area(char model, char mode, float Ap, short *t0) {
  float oqF, cqF;
  float wp, oqM, cqM;
  static short n;
  static float amp;
  static short t1, t2, t3;
  static float a, b, A, A0;
  float t;
  if (mode == 'o') {
    if (*t0 > 0) {
      A = (float)0.5 * Ap;
      if (model == 'F') {
        oqF = 0.36f;
        cqF = 0.26f;
        t1 = (short)(oqF * (*t0));
        t2 = (short)(cqF * (*t0));
        t3 = t1 + t2;
        a = 3.141593f / t1;
        b = (float)(1. / (1. - cos(a * t2)));
      }
      if (model == 'M') {
        wp = 2.f;
        oqM = 0.5f;
        cqM = 0.2f;
        t1 = (short)(oqM * (*t0));
        t2 = (short)(cqM * (*t0));
        t3 = t1 + t2;
        a = (float)(3.141593f / t1);
        b = (float)((t1 - t2) / pow(t2, wp));
      }
      *t0 = 0;
      n = 0;
    }
    if (n < t1)
      amp = (float)(A * (1.0 - cos(a * n)));
    if (n >= t1 && n < t3) {
      t = (float)(n - t1);
      if (model == 'F')
        amp = (float)(Ap * (1. - b + b * cos(a * t)));
      if (model == 'M')
        amp = (float)(A * (1. + cos(a * (t + pow(t, wp)))));
    }
    if (n >= t3)
      amp = 0.0;
    n++;
    return (amp);
  }
  if (mode == 't') {
    if (*t0 > 0) {
      t1 = *t0;
      A0 = amp;
      A = (float)(0.5 * (Ap - A0));
      a = (float)(3.141593 / t1);
      n = 0;
      *t0 = 0;
    }
    if (n < t1)
      amp = (float)(A0 + A * (1. - cos(a * n)));
    else
      amp = Ap;
    n++;
    return (amp);
  }
  return 0;
}


x86 assembly (clang, -O0):
<glottal_area>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movsbl -0x6(%rbp),%eax
cmp    $0x6f,%eax
jne    1528 <glottal_area+0x408>
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cmp    $0x0,%eax
jle    1328 <glottal_area+0x208>
movss  0xeb3(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,0x2eda(%rip)
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jne    1245 <glottal_area+0x125>
movl   $0x3eb851ec,-0x1c(%rbp)
movl   $0x3e851eb8,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %ax,0x2e90(%rip)
movss  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %ax,0x2e73(%rip)
movswl 0x2e6a(%rip),%eax
movswl 0x2e65(%rip),%ecx
add    %ecx,%eax
mov    %ax,0x2e5e(%rip)
movswl 0x2e53(%rip),%eax
cvtsi2ss %eax,%xmm1
movss  0xe27(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x2e43(%rip)
movss  0x2e3b(%rip),%xmm0
movswl 0x2e2e(%rip),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
call   1030 <cos@plt>
cvtsi2sd %eax,%xmm0
movsd  0xde7(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xddb(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2e03(%rip)
movsbl -0x5(%rbp),%eax
cmp    $0x4d,%eax
jne    1316 <glottal_area+0x1f6>
movl   $0x40000000,-0x24(%rbp)
movl   $0x3f000000,-0x28(%rbp)
movl   $0x3e4ccccd,-0x2c(%rbp)
movss  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %ax,0x2db6(%rip)
movss  -0x2c(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %ax,0x2d99(%rip)
movzwl 0x2d90(%rip),%eax
movzwl 0x2d8b(%rip),%ecx
add    %ecx,%eax
mov    %ax,0x2d84(%rip)
movswl 0x2d79(%rip),%eax
cvtsi2ss %eax,%xmm1
movss  0xd4d(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x2d69(%rip)
movswl 0x2d5a(%rip),%ecx
movswl 0x2d55(%rip),%eax
sub    %eax,%ecx
cvtsi2ss %ecx,%xmm0
movss  %xmm0,-0x34(%rbp)
cvtsi2ss %eax,%xmm0
movss  -0x24(%rbp),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x34(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x2d32(%rip)
mov    -0x18(%rbp),%rax
movw   $0x0,(%rax)
movw   $0x0,0x2d0c(%rip)
movswl 0x2d05(%rip),%eax
movswl 0x2d06(%rip),%ecx
cmp    %ecx,%eax
jge    1390 <glottal_area+0x270>
movss  0x2d06(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  0x2ced(%rip),%xmm0
movswl 0x2cd6(%rip),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  -0x40(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0xc94(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2ca8(%rip)
movswl 0x2c9d(%rip),%eax
movswl 0x2c9e(%rip),%ecx
cmp    %ecx,%eax
jl     14e3 <glottal_area+0x3c3>
movswl 0x2c87(%rip),%eax
movswl 0x2c8c(%rip),%ecx
cmp    %ecx,%eax
jge    14e3 <glottal_area+0x3c3>
movswl 0x2c71(%rip),%eax
movswl 0x2c72(%rip),%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x30(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jne    145b <glottal_area+0x33b>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movss  0x2c50(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc0c(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  0x2c33(%rip),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  0x2c22(%rip),%xmm0
mulss  -0x30(%rbp),%xmm0
call   1030 <cos@plt>
movss  -0x54(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
cvtsi2ss %eax,%xmm3
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2bdd(%rip)
movsbl -0x5(%rbp),%eax
cmp    $0x4d,%eax
jne    14de <glottal_area+0x3be>
movss  0x2bdc(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movss  0x2bc3(%rip),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x30(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
call   1040 <pow@plt>
movss  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x64(%rbp),%xmm0
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  -0x60(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0xb46(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2b5a(%rip)
jmp    14e3 <glottal_area+0x3c3>
movswl 0x2b4a(%rip),%eax
movswl 0x2b4f(%rip),%ecx
cmp    %ecx,%eax
jl     1504 <glottal_area+0x3e4>
xorps  %xmm0,%xmm0
movss  %xmm0,0x2b34(%rip)
mov    0x2b29(%rip),%ax
add    $0x1,%ax
mov    %ax,0x2b1e(%rip)
movss  0x2b1a(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1681 <glottal_area+0x561>
movsbl -0x6(%rbp),%eax
cmp    $0x74,%eax
jne    1679 <glottal_area+0x559>
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cmp    $0x0,%eax
jle    15c1 <glottal_area+0x4a1>
mov    -0x18(%rbp),%rax
mov    (%rax),%ax
mov    %ax,0x2ae9(%rip)
movss  0x2add(%rip),%xmm0
movss  %xmm0,0x2aed(%rip)
movss  -0xc(%rbp),%xmm0
subss  0x2ae0(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa8c(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2ac0(%rip)
movswl 0x2aa9(%rip),%eax
cvtsi2sd %eax,%xmm1
movsd  0xa61(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2a95(%rip)
movw   $0x0,0x2a7c(%rip)
mov    -0x18(%rbp),%rax
movw   $0x0,(%rax)
movswl 0x2a6c(%rip),%eax
movswl 0x2a6d(%rip),%ecx
cmp    %ecx,%eax
jge    1648 <glottal_area+0x528>
movss  0x2a71(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movss  0x2a5c(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movss  0x2a43(%rip),%xmm0
movswl 0x2a2c(%rip),%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  -0x78(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
cvtsi2sd %eax,%xmm3
movsd  0x9e5(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x29f5(%rip)
jmp    1655 <glottal_area+0x535>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,0x29e3(%rip)
mov    0x29d8(%rip),%ax
add    $0x1,%ax
mov    %ax,0x29cd(%rip)
movss  0x29c9(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1681 <glottal_area+0x561>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glottal_area>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
movaps %xmm0,%xmm2
cmp    $0x74,%sil
je     11ff <glottal_area+0xef>
xorps  %xmm0,%xmm0
cmp    $0x6f,%sil
jne    150a <glottal_area+0x3fa>
mov    %edi,%ebp
movzwl (%rbx),%eax
test   %ax,%ax
jle    12e7 <glottal_area+0x1d7>
movss  0xeb7(%rip),%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,0x2eeb(%rip)
cmp    $0x4d,%bpl
je     130c <glottal_area+0x1fc>
cmp    $0x46,%bpl
jne    1381 <glottal_area+0x271>
cwtl
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0xe93(%rip),%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
mov    %ax,0x2eac(%rip)
mulss  0xe80(%rip),%xmm0
cvttss2si %xmm0,%ecx
movswl %ax,%edx
add    %ecx,%eax
mov    %ax,0x2e96(%rip)
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
movss  0xe59(%rip),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x2e7d(%rip)
movswl %cx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
movss  %xmm2,(%rsp)
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe3e(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movss  (%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
jmp    1379 <glottal_area+0x269>
movzwl (%rbx),%ecx
test   %cx,%cx
jle    12f3 <glottal_area+0x1e3>
mov    %cx,0x2e22(%rip)
movss  0x2e16(%rip),%xmm0
movss  %xmm0,0x2e22(%rip)
movaps %xmm2,%xmm1
subss  %xmm0,%xmm1
mulss  0xdcf(%rip),%xmm1
movss  %xmm1,0x2e07(%rip)
movswl %cx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xdcd(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x2dda(%rip)
movw   $0x0,0x2dc5(%rip)
movw   $0x0,(%rbx)
xor    %eax,%eax
cmp    %cx,%ax
jge    12d7 <glottal_area+0x1c7>
movss  0x2dc9(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
cwtl
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x2dac(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
mulss  0x2d92(%rip),%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xd66(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  (%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtsd2ss %xmm1,%xmm2
movzwl 0x2d55(%rip),%eax
movss  %xmm2,0x2d51(%rip)
movaps %xmm2,%xmm0
jmp    1500 <glottal_area+0x3f0>
movzwl 0x2d3e(%rip),%eax
jmp    1391 <glottal_area+0x281>
movzwl 0x2d32(%rip),%eax
movzwl 0x2d33(%rip),%ecx
cmp    %cx,%ax
jl     1273 <glottal_area+0x163>
jmp    12d7 <glottal_area+0x1c7>
cwtl
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0xce4(%rip),%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
mulss  0xcd8(%rip),%xmm0
cvttss2si %xmm0,%ecx
movswl %ax,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
movss  0xcc6(%rip),%xmm1
divss  %xmm0,%xmm1
movswl %cx,%esi
sub    %esi,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
mov    %ax,0x2cdb(%rip)
movss  %xmm1,0x2cd7(%rip)
xorps  %xmm1,%xmm1
cvtsi2ss %esi,%xmm1
add    %ecx,%eax
mov    %ax,0x2cc5(%rip)
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,0x2cbb(%rip)
movw   $0x0,(%rbx)
movw   $0x0,0x2c9d(%rip)
xor    %eax,%eax
movzwl 0x2c9c(%rip),%ecx
cmp    %cx,%ax
jge    1404 <glottal_area+0x2f4>
cwtl
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x2c93(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
mulss  0x2c79(%rip),%xmm0
movss  %xmm2,(%rsp)
call   1030 <cos@plt>
movss  (%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xc43(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x2c3a(%rip)
movzwl 0x2c2f(%rip),%eax
movzwl 0x2c30(%rip),%ecx
cmp    %cx,%ax
jl     14d9 <glottal_area+0x3c9>
cmp    0x2c22(%rip),%ax
jge    14d9 <glottal_area+0x3c9>
movswl %cx,%ecx
cwtl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
cmp    $0x4d,%bpl
je     148d <glottal_area+0x37d>
cmp    $0x46,%bpl
jne    14d9 <glottal_area+0x3c9>
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
movsd  %xmm1,(%rsp)
movss  0x2bf1(%rip),%xmm1
movss  %xmm1,0x14(%rsp)
cvtss2sd %xmm1,%xmm1
movsd  0xbc3(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
mulss  0x2bc9(%rip),%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x8(%rsp),%xmm0
jmp    14c8 <glottal_area+0x3b8>
movss  0x2bab(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,(%rsp)
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
addss  %xmm0,%xmm1
mulss  0x2b87(%rip),%xmm1
movaps %xmm1,%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xb58(%rip),%xmm0
mulsd  (%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2b57(%rip)
movzwl 0x2b4c(%rip),%eax
cmp    0x2b4f(%rip),%ax
jge    14f3 <glottal_area+0x3e3>
movss  0x2b3f(%rip),%xmm0
jmp    1500 <glottal_area+0x3f0>
movl   $0x0,0x2b33(%rip)
xorps  %xmm0,%xmm0
add    $0x1,%eax
mov    %ax,0x2b22(%rip)
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@glottal_area.n = internal global i16 0
@glottal_area.amp = internal global float 0.000000e+00
@glottal_area.t1 = internal global i16 0
@glottal_area.t2 = internal global i16 0
@glottal_area.t3 = internal global i16 0
@glottal_area.a = internal global float 0.000000e+00
@glottal_area.b = internal global float 0.000000e+00
@glottal_area.A = internal global float 0.000000e+00
@glottal_area.A0 = internal global float 0.000000e+00
define float @glottal_area(i8 signext %0, i8 signext %1, float %2, i16* %3) {
%5 = alloca float
%6 = alloca i8
%7 = alloca i8
%8 = alloca float
%9 = alloca i16*
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
store i8 %0, i8* %6
store i8 %1, i8* %7
store float %2, float* %8
store i16* %3, i16** %9
%16 = load i8, i8* %7
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 111
br i1 %18, label %19, label %196
19: ; preds = %4
%20 = load i16*, i16** %9
%21 = load i16, i16* %20
%22 = sext i16 %21 to i32
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %107
24: ; preds = %19
%25 = load float, float* %8
%26 = fmul float 5.000000e-01, %25
store float %26, float* @glottal_area.A
%27 = load i8, i8* %6
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 70
br i1 %29, label %30, label %65
30: ; preds = %24
store float 0x3FD70A3D80000000, float* %10
store float 0x3FD0A3D700000000, float* %11
%31 = load float, float* %10
%32 = load i16*, i16** %9
%33 = load i16, i16* %32
%34 = sext i16 %33 to i32
%35 = sitofp i32 %34 to float
%36 = fmul float %31, %35
%37 = fptosi float %36 to i16
store i16 %37, i16* @glottal_area.t1
%38 = load float, float* %11
%39 = load i16*, i16** %9
%40 = load i16, i16* %39
%41 = sext i16 %40 to i32
%42 = sitofp i32 %41 to float
%43 = fmul float %38, %42
%44 = fptosi float %43 to i16
store i16 %44, i16* @glottal_area.t2
%45 = load i16, i16* @glottal_area.t1
%46 = sext i16 %45 to i32
%47 = load i16, i16* @glottal_area.t2
%48 = sext i16 %47 to i32
%49 = add nsw i32 %46, %48
%50 = trunc i32 %49 to i16
store i16 %50, i16* @glottal_area.t3
%51 = load i16, i16* @glottal_area.t1
%52 = sext i16 %51 to i32
%53 = sitofp i32 %52 to float
%54 = fdiv float 0x400921FB80000000, %53
store float %54, float* @glottal_area.a
%55 = load float, float* @glottal_area.a
%56 = load i16, i16* @glottal_area.t2
%57 = sext i16 %56 to i32
%58 = sitofp i32 %57 to float
%59 = fmul float %55, %58
%60 = call i32 @cos(float %59)
%61 = sitofp i32 %60 to double
%62 = fsub double 1.000000e+00, %61
%63 = fdiv double 1.000000e+00, %62
%64 = fptrunc double %63 to float
store float %64, float* @glottal_area.b
br label %65
65: ; preds = %30, %24
%66 = load i8, i8* %6
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 77
br i1 %68, label %69, label %105
69: ; preds = %65
store float 2.000000e+00, float* %12
store float 5.000000e-01, float* %13
store float 0x3FC99999A0000000, float* %14
%70 = load float, float* %13
%71 = load i16*, i16** %9
%72 = load i16, i16* %71
%73 = sext i16 %72 to i32
%74 = sitofp i32 %73 to float
%75 = fmul float %70, %74
%76 = fptosi float %75 to i16
store i16 %76, i16* @glottal_area.t1
%77 = load float, float* %14
%78 = load i16*, i16** %9
%79 = load i16, i16* %78
%80 = sext i16 %79 to i32
%81 = sitofp i32 %80 to float
%82 = fmul float %77, %81
%83 = fptosi float %82 to i16
store i16 %83, i16* @glottal_area.t2
%84 = load i16, i16* @glottal_area.t1
%85 = sext i16 %84 to i32
%86 = load i16, i16* @glottal_area.t2
%87 = sext i16 %86 to i32
%88 = add nsw i32 %85, %87
%89 = trunc i32 %88 to i16
store i16 %89, i16* @glottal_area.t3
%90 = load i16, i16* @glottal_area.t1
%91 = sext i16 %90 to i32
%92 = sitofp i32 %91 to float
%93 = fdiv float 0x400921FB80000000, %92
store float %93, float* @glottal_area.a
%94 = load i16, i16* @glottal_area.t1
%95 = sext i16 %94 to i32
%96 = load i16, i16* @glottal_area.t2
%97 = sext i16 %96 to i32
%98 = sub nsw i32 %95, %97
%99 = sitofp i32 %98 to float
%100 = load i16, i16* @glottal_area.t2
%101 = sitofp i16 %100 to float
%102 = load float, float* %12
%103 = call float @pow(float %101, float %102)
%104 = fdiv float %99, %103
store float %104, float* @glottal_area.b
br label %105
105: ; preds = %69, %65
%106 = load i16*, i16** %9
store i16 0, i16* %106
store i16 0, i16* @glottal_area.n
br label %107
107: ; preds = %105, %19
%108 = load i16, i16* @glottal_area.n
%109 = sext i16 %108 to i32
%110 = load i16, i16* @glottal_area.t1
%111 = sext i16 %110 to i32
%112 = icmp slt i32 %109, %111
br i1 %112, label %113, label %126
113: ; preds = %107
%114 = load float, float* @glottal_area.A
%115 = fpext float %114 to double
%116 = load float, float* @glottal_area.a
%117 = load i16, i16* @glottal_area.n
%118 = sext i16 %117 to i32
%119 = sitofp i32 %118 to float
%120 = fmul float %116, %119
%121 = call i32 @cos(float %120)
%122 = sitofp i32 %121 to double
%123 = fsub double 1.000000e+00, %122
%124 = fmul double %115, %123
%125 = fptrunc double %124 to float
store float %125, float* @glottal_area.amp
br label %126
126: ; preds = %113, %107
%127 = load i16, i16* @glottal_area.n
%128 = sext i16 %127 to i32
%129 = load i16, i16* @glottal_area.t1
%130 = sext i16 %129 to i32
%131 = icmp sge i32 %128, %130
br i1 %131, label %132, label %185
132: ; preds = %126
%133 = load i16, i16* @glottal_area.n
%134 = sext i16 %133 to i32
%135 = load i16, i16* @glottal_area.t3
%136 = sext i16 %135 to i32
%137 = icmp slt i32 %134, %136
br i1 %137, label %138, label %185
138: ; preds = %132
%139 = load i16, i16* @glottal_area.n
%140 = sext i16 %139 to i32
%141 = load i16, i16* @glottal_area.t1
%142 = sext i16 %141 to i32
%143 = sub nsw i32 %140, %142
%144 = sitofp i32 %143 to float
store float %144, float* %15
%145 = load i8, i8* %6
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 70
br i1 %147, label %148, label %165
148: ; preds = %138
%149 = load float, float* %8
%150 = fpext float %149 to double
%151 = load float, float* @glottal_area.b
%152 = fpext float %151 to double
%153 = fsub double 1.000000e+00, %152
%154 = load float, float* @glottal_area.b
%155 = load float, float* @glottal_area.a
%156 = load float, float* %15
%157 = fmul float %155, %156
%158 = call i32 @cos(float %157)
%159 = sitofp i32 %158 to float
%160 = fmul float %154, %159
%161 = fpext float %160 to double
%162 = fadd double %153, %161
%163 = fmul double %150, %162
%164 = fptrunc double %163 to float
store float %164, float* @glottal_area.amp
br label %165
165: ; preds = %148, %138
%166 = load i8, i8* %6
%167 = sext i8 %166 to i32
%168 = icmp eq i32 %167, 77
br i1 %168, label %169, label %184
169: ; preds = %165
%170 = load float, float* @glottal_area.A
%171 = fpext float %170 to double
%172 = load float, float* @glottal_area.a
%173 = load float, float* %15
%174 = load float, float* %15
%175 = load float, float* %12
%176 = call float @pow(float %174, float %175)
%177 = fadd float %173, %176
%178 = fmul float %172, %177
%179 = call i32 @cos(float %178)
%180 = sitofp i32 %179 to double
%181 = fadd double 1.000000e+00, %180
%182 = fmul double %171, %181
%183 = fptrunc double %182 to float
store float %183, float* @glottal_area.amp
br label %184
184: ; preds = %169, %165
br label %185
185: ; preds = %184, %132, %126
%186 = load i16, i16* @glottal_area.n
%187 = sext i16 %186 to i32
%188 = load i16, i16* @glottal_area.t3
%189 = sext i16 %188 to i32
%190 = icmp sge i32 %187, %189
br i1 %190, label %191, label %192
191: ; preds = %185
store float 0.000000e+00, float* @glottal_area.amp
br label %192
192: ; preds = %191, %185
%193 = load i16, i16* @glottal_area.n
%194 = add i16 %193, 1
store i16 %194, i16* @glottal_area.n
%195 = load float, float* @glottal_area.amp
store float %195, float* %5
br label %249
196: ; preds = %4
%197 = load i8, i8* %7
%198 = sext i8 %197 to i32
%199 = icmp eq i32 %198, 116
br i1 %199, label %200, label %248
200: ; preds = %196
%201 = load i16*, i16** %9
%202 = load i16, i16* %201
%203 = sext i16 %202 to i32
%204 = icmp sgt i32 %203, 0
br i1 %204, label %205, label %221
205: ; preds = %200
%206 = load i16*, i16** %9
%207 = load i16, i16* %206
store i16 %207, i16* @glottal_area.t1
%208 = load float, float* @glottal_area.amp
store float %208, float* @glottal_area.A0
%209 = load float, float* %8
%210 = load float, float* @glottal_area.A0
%211 = fsub float %209, %210
%212 = fpext float %211 to double
%213 = fmul double 5.000000e-01, %212
%214 = fptrunc double %213 to float
store float %214, float* @glottal_area.A
%215 = load i16, i16* @glottal_area.t1
%216 = sext i16 %215 to i32
%217 = sitofp i32 %216 to double
%218 = fdiv double 0x400921FB82C2BD7F, %217
%219 = fptrunc double %218 to float
store float %219, float* @glottal_area.a
store i16 0, i16* @glottal_area.n
%220 = load i16*, i16** %9
store i16 0, i16* %220
br label %221
221: ; preds = %205, %200
%222 = load i16, i16* @glottal_area.n
%223 = sext i16 %222 to i32
%224 = load i16, i16* @glottal_area.t1
%225 = sext i16 %224 to i32
%226 = icmp slt i32 %223, %225
br i1 %226, label %227, label %242
227: ; preds = %221
%228 = load float, float* @glottal_area.A0
%229 = fpext float %228 to double
%230 = load float, float* @glottal_area.A
%231 = fpext float %230 to double
%232 = load float, float* @glottal_area.a
%233 = load i16, i16* @glottal_area.n
%234 = sext i16 %233 to i32
%235 = sitofp i32 %234 to float
%236 = fmul float %232, %235
%237 = call i32 @cos(float %236)
%238 = sitofp i32 %237 to double
%239 = fsub double 1.000000e+00, %238
%240 = call double @llvm.fmuladd.f64(double %231, double %239, double %229)
%241 = fptrunc double %240 to float
store float %241, float* @glottal_area.amp
br label %244
242: ; preds = %221
%243 = load float, float* %8
store float %243, float* @glottal_area.amp
br label %244
244: ; preds = %242, %227
%245 = load i16, i16* @glottal_area.n
%246 = add i16 %245, 1
store i16 %246, i16* @glottal_area.n
%247 = load float, float* @glottal_area.amp
store float %247, float* %5
br label %249
248: ; preds = %196
store float 0.000000e+00, float* %5
br label %249
249: ; preds = %248, %244, %192
%250 = load float, float* %5
ret float %250
}

LLVM IR (-O2):
@glottal_area.n = internal unnamed_addr global i16 0
@glottal_area.amp = internal unnamed_addr global float 0.000000e+00
@glottal_area.t1 = internal unnamed_addr global i16 0
@glottal_area.t3 = internal unnamed_addr global i16 0
@glottal_area.a = internal unnamed_addr global float 0.000000e+00
@glottal_area.b = internal unnamed_addr global float 0.000000e+00
@glottal_area.A = internal unnamed_addr global float 0.000000e+00
@glottal_area.A0 = internal unnamed_addr global float 0.000000e+00
define float @glottal_area(i8 signext %0, i8 signext %1, float %2, i16* nocapture %3) {
switch i8 %1, label %148 [
i8 111, label %5
i8 116, label %110
]
5: ; preds = %4
%6 = load i16, i16* %3
%7 = icmp sgt i16 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = load i16, i16* @glottal_area.n
br label %47
10: ; preds = %5
%11 = fmul float %2, 5.000000e-01
store float %11, float* @glottal_area.A
switch i8 %0, label %46 [
i8 70, label %12
i8 77, label %28
]
12: ; preds = %10
%13 = sitofp i16 %6 to float
%14 = fmul float %13, 0x3FD70A3D80000000
%15 = fptosi float %14 to i16
store i16 %15, i16* @glottal_area.t1
%16 = fmul float %13, 0x3FD0A3D700000000
%17 = fptosi float %16 to i16
%18 = add i16 %15, %17
store i16 %18, i16* @glottal_area.t3
%19 = sitofp i16 %15 to float
%20 = fdiv float 0x400921FB80000000, %19
store float %20, float* @glottal_area.a
%21 = sitofp i16 %17 to float
%22 = fmul float %20, %21
%23 = tail call i32 @cos(float %22)
%24 = sitofp i32 %23 to double
%25 = fsub double 1.000000e+00, %24
%26 = fdiv double 1.000000e+00, %25
%27 = fptrunc double %26 to float
br label %44
28: ; preds = %10
%29 = sitofp i16 %6 to float
%30 = fmul float %29, 5.000000e-01
%31 = fptosi float %30 to i16
store i16 %31, i16* @glottal_area.t1
%32 = fmul float %29, 0x3FC99999A0000000
%33 = fptosi float %32 to i16
%34 = add i16 %31, %33
store i16 %34, i16* @glottal_area.t3
%35 = sitofp i16 %31 to float
%36 = fdiv float 0x400921FB80000000, %35
store float %36, float* @glottal_area.a
%37 = sext i16 %31 to i32
%38 = sext i16 %33 to i32
%39 = sub nsw i32 %37, %38
%40 = sitofp i32 %39 to float
%41 = sitofp i16 %33 to float
%42 = fmul float %41, %41
%43 = fdiv float %40, %42
br label %44
44: ; preds = %28, %12
%45 = phi float [ %27, %12 ], [ %43, %28 ]
store float %45, float* @glottal_area.b
br label %46
46: ; preds = %44, %10
store i16 0, i16* %3
store i16 0, i16* @glottal_area.n
br label %47
47: ; preds = %8, %46
%48 = phi i16 [ %9, %8 ], [ 0, %46 ]
%49 = load i16, i16* @glottal_area.t1
%50 = icmp slt i16 %48, %49
br i1 %50, label %51, label %64
51: ; preds = %47
%52 = load float, float* @glottal_area.A
%53 = fpext float %52 to double
%54 = load float, float* @glottal_area.a
%55 = sitofp i16 %48 to float
%56 = fmul float %54, %55
%57 = tail call i32 @cos(float %56)
%58 = sitofp i32 %57 to double
%59 = fsub double 1.000000e+00, %58
%60 = fmul double %59, %53
%61 = fptrunc double %60 to float
store float %61, float* @glottal_area.amp
%62 = load i16, i16* @glottal_area.n
%63 = load i16, i16* @glottal_area.t1
br label %64
64: ; preds = %51, %47
%65 = phi i16 [ %63, %51 ], [ %49, %47 ]
%66 = phi i16 [ %62, %51 ], [ %48, %47 ]
%67 = icmp sge i16 %66, %65
%68 = load i16, i16* @glottal_area.t3
%69 = icmp slt i16 %66, %68
%70 = select i1 %67, i1 %69, i1 false
br i1 %70, label %71, label %103
71: ; preds = %64
%72 = sext i16 %65 to i32
%73 = sext i16 %66 to i32
%74 = sub nsw i32 %73, %72
%75 = sitofp i32 %74 to float
switch i8 %0, label %103 [
i8 70, label %76
i8 77, label %89
]
76: ; preds = %71
%77 = fpext float %2 to double
%78 = load float, float* @glottal_area.b
%79 = fpext float %78 to double
%80 = fsub double 1.000000e+00, %79
%81 = load float, float* @glottal_area.a
%82 = fmul float %81, %75
%83 = tail call i32 @cos(float %82)
%84 = sitofp i32 %83 to float
%85 = fmul float %78, %84
%86 = fpext float %85 to double
%87 = fadd double %80, %86
%88 = fmul double %87, %77
br label %100
89: ; preds = %71
%90 = load float, float* @glottal_area.A
%91 = fpext float %90 to double
%92 = load float, float* @glottal_area.a
%93 = fmul float %75, %75
%94 = fadd float %93, %75
%95 = fmul float %94, %92
%96 = tail call i32 @cos(float %95)
%97 = sitofp i32 %96 to double
%98 = fadd double %97, 1.000000e+00
%99 = fmul double %98, %91
br label %100
100: ; preds = %89, %76
%101 = phi double [ %88, %76 ], [ %99, %89 ]
%102 = fptrunc double %101 to float
store float %102, float* @glottal_area.amp
br label %103
103: ; preds = %100, %71, %64
%104 = load i16, i16* @glottal_area.n
%105 = load i16, i16* @glottal_area.t3
%106 = icmp slt i16 %104, %105
br i1 %106, label %107, label %109
107: ; preds = %103
%108 = load float, float* @glottal_area.amp
br label %144
109: ; preds = %103
store float 0.000000e+00, float* @glottal_area.amp
br label %144
110: ; preds = %4
%111 = load i16, i16* %3
%112 = icmp sgt i16 %111, 0
br i1 %112, label %116, label %113
113: ; preds = %110
%114 = load i16, i16* @glottal_area.n
%115 = load i16, i16* @glottal_area.t1
br label %123
116: ; preds = %110
store i16 %111, i16* @glottal_area.t1
%117 = load float, float* @glottal_area.amp
store float %117, float* @glottal_area.A0
%118 = fsub float %2, %117
%119 = fmul float %118, 5.000000e-01
store float %119, float* @glottal_area.A
%120 = sitofp i16 %111 to double
%121 = fdiv double 0x400921FB82C2BD7F, %120
%122 = fptrunc double %121 to float
store float %122, float* @glottal_area.a
store i16 0, i16* @glottal_area.n
store i16 0, i16* %3
br label %123
123: ; preds = %113, %116
%124 = phi i16 [ %115, %113 ], [ %111, %116 ]
%125 = phi i16 [ %114, %113 ], [ 0, %116 ]
%126 = icmp slt i16 %125, %124
br i1 %126, label %127, label %141
127: ; preds = %123
%128 = load float, float* @glottal_area.A0
%129 = fpext float %128 to double
%130 = load float, float* @glottal_area.A
%131 = fpext float %130 to double
%132 = load float, float* @glottal_area.a
%133 = sitofp i16 %125 to float
%134 = fmul float %132, %133
%135 = tail call i32 @cos(float %134)
%136 = sitofp i32 %135 to double
%137 = fsub double 1.000000e+00, %136
%138 = tail call double @llvm.fmuladd.f64(double %131, double %137, double %129)
%139 = fptrunc double %138 to float
%140 = load i16, i16* @glottal_area.n
br label %141
141: ; preds = %123, %127
%142 = phi i16 [ %140, %127 ], [ %125, %123 ]
%143 = phi float [ %139, %127 ], [ %2, %123 ]
store float %143, float* @glottal_area.amp
br label %144
144: ; preds = %109, %107, %141
%145 = phi i16 [ %142, %141 ], [ %104, %107 ], [ %104, %109 ]
%146 = phi float [ %143, %141 ], [ %108, %107 ], [ 0.000000e+00, %109 ]
%147 = add i16 %145, 1
store i16 %147, i16* @glottal_area.n
br label %148
148: ; preds = %144, %4
%149 = phi float [ 0.000000e+00, %4 ], [ %146, %144 ]
ret float %149
}