#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 SKP_INVERSE32_varQ(int, int);
int SKP_Silk_CLZ32(int);
int LPC_inverse_pred_gain_QA(int *invGain_Q30, int A_QA[2][16],
                             const int order) {
  int k, n, headrm;
  int rc_Q31, rc_mult1_Q30, rc_mult2_Q16, tmp_QA;
  int *Aold_QA, *Anew_QA;
  Anew_QA = A_QA[order & 1];
  *invGain_Q30 = (1 << 30);
  for (k = order - 1; k > 0; k--) {
    if ((Anew_QA[k] > ((int)((0.99975) * ((long long)1 << (16)) + 0.5))) ||
        (Anew_QA[k] < -((int)((0.99975) * ((long long)1 << (16)) + 0.5)))) {
      return 1;
    }
    rc_Q31 = -((Anew_QA[k]) << (31 - 16));
    rc_mult1_Q30 = (0x7FFFFFFF >> 1) -
                   (int)((((long long)((rc_Q31)) * ((rc_Q31)))) >> (32));
    ;
    ;
    rc_mult2_Q16 = SKP_INVERSE32_varQ(rc_mult1_Q30, 46);
    *invGain_Q30 =
        (((int)((((long long)((*invGain_Q30)) * ((rc_mult1_Q30)))) >> (32)))
         << (2));
    ;
    ;
    Aold_QA = Anew_QA;
    Anew_QA = A_QA[k & 1];
    headrm = SKP_Silk_CLZ32(rc_mult2_Q16) - 1;
    rc_mult2_Q16 = ((rc_mult2_Q16) << (headrm));
    for (n = 0; n < k; n++) {
      tmp_QA =
          Aold_QA[n] -
          (((int)((((long long)((Aold_QA[k - n - 1])) * ((rc_Q31)))) >> (32)))
           << (1));
      Anew_QA[n] =
          (((int)((((long long)((tmp_QA)) * ((rc_mult2_Q16)))) >> (32)))
           << (16 - headrm));
    }
  }
  if ((Anew_QA[0] > ((int)((0.99975) * ((long long)1 << (16)) + 0.5))) ||
      (Anew_QA[0] < -((int)((0.99975) * ((long long)1 << (16)) + 0.5)))) {
    return 1;
  }
  rc_Q31 = -((Anew_QA[0]) << (31 - 16));
  rc_mult1_Q30 =
      (0x7FFFFFFF >> 1) - (int)((((long long)((rc_Q31)) * ((rc_Q31)))) >> (32));
  *invGain_Q30 =
      (((int)((((long long)((*invGain_Q30)) * ((rc_mult1_Q30)))) >> (32)))
       << (2));
  ;
  ;
  return 0;
}


x86 assembly (clang, -O0):
<LPC_inverse_pred_gain_QA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
and    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x40000000,(%rax)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    12c4 <LPC_inverse_pred_gain_QA+0x1a4>
mov    -0x48(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0xfff0,(%rax,%rcx,4)
jg     1192 <LPC_inverse_pred_gain_QA+0x72>
mov    -0x48(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0xffff0010,(%rax,%rcx,4)
jge    119e <LPC_inverse_pred_gain_QA+0x7e>
movl   $0x1,-0x4(%rbp)
jmp    1341 <LPC_inverse_pred_gain_QA+0x221>
mov    -0x48(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
shl    $0xf,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   %rcx,%rax
sar    $0x20,%rax
mov    %eax,%ecx
mov    $0x3fffffff,%eax
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    $0x2e,%esi
call   1040 <SKP_INVERSE32_varQ@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
movslq -0x30(%rbp),%rcx
imul   %rcx,%rax
sar    $0x20,%rax
mov    %eax,%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
and    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x34(%rbp),%edi
call   1030 <SKP_Silk_CLZ32@plt>
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x28(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12b1 <LPC_inverse_pred_gain_QA+0x191>
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x40(%rbp),%rcx
mov    -0x20(%rbp),%edx
sub    -0x24(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movslq (%rcx,%rdx,4),%rcx
movslq -0x2c(%rbp),%rdx
imul   %rdx,%rcx
sar    $0x20,%rcx
shl    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x38(%rbp)
movslq -0x38(%rbp),%rax
movslq -0x34(%rbp),%rcx
imul   %rcx,%rax
sar    $0x20,%rax
mov    %eax,%edx
mov    $0x10,%ecx
sub    -0x28(%rbp),%ecx
shl    %cl,%edx
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    123d <LPC_inverse_pred_gain_QA+0x11d>
jmp    12b6 <LPC_inverse_pred_gain_QA+0x196>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    115e <LPC_inverse_pred_gain_QA+0x3e>
mov    -0x48(%rbp),%rax
cmpl   $0xfff0,(%rax)
jg     12e4 <LPC_inverse_pred_gain_QA+0x1c4>
mov    -0x48(%rbp),%rax
cmpl   $0xffff0010,(%rax)
jge    12f0 <LPC_inverse_pred_gain_QA+0x1d0>
movl   $0x1,-0x4(%rbp)
jmp    1341 <LPC_inverse_pred_gain_QA+0x221>
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
shl    $0xf,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   %rcx,%rax
sar    $0x20,%rax
mov    %eax,%ecx
mov    $0x3fffffff,%eax
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
movslq -0x30(%rbp),%rcx
imul   %rcx,%rax
sar    $0x20,%rax
mov    %eax,%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPC_inverse_pred_gain_QA>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,0x18(%rsp)
mov    %edx,%r13d
and    $0x1,%r13d
mov    %rdi,0x38(%rsp)
movl   $0x40000000,(%rdi)
cmp    $0x2,%edx
jl     15b2 <LPC_inverse_pred_gain_QA+0x492>
mov    %edx,%edi
lea    -0x1(%rdx),%ebp
lea    -0x2(%rdx),%eax
mov    %eax,0x30(%rsp)
mov    %edx,%eax
not    %eax
mov    %eax,0x2c(%rsp)
mov    0x18(%rsp),%rax
add    $0x4,%rax
mov    %rax,0x48(%rsp)
mov    %rdi,%rax
shl    $0x20,%rax
movabs $0xfffffffe00000000,%rsi
ff ff ff
add    %rax,%rsi
xor    %ecx,%ecx
mov    %ebp,0x34(%rsp)
mov    %ebp,%r15d
mov    %rdx,0x58(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%r14
shl    $0x6,%r14
add    0x18(%rsp),%r14
lea    -0x1(%rdi),%rbx
mov    %ebx,%eax
movslq (%r14,%rax,4),%rbp
lea    -0xfff1(%rbp),%eax
cmp    $0xfffe001f,%eax
jb     1617 <LPC_inverse_pred_gain_QA+0x4f7>
mov    %rdi,0x70(%rsp)
mov    %rsi,(%rsp)
mov    %r15d,%r12d
and    $0x1,%r12d
shl    $0x6,%r12
mov    0x18(%rsp),%rax
add    %rax,%r12
mov    %r13,0x60(%rsp)
and    $0x1,%r13d
shl    $0x6,%r13
add    %rax,%r13
mov    %r15d,%r15d
mov    %r15,0x10(%rsp)
mov    %ecx,%r15d
not    %r15d
add    %edx,%r15d
shl    $0xf,%rbp
neg    %rbp
mov    %rbp,0x8(%rsp)
mov    %rbp,%rax
imul   %rbp,%rax
shr    $0x20,%rax
mov    $0x3fffffff,%ebp
sub    %eax,%ebp
mov    %ebp,%edi
mov    $0x2e,%esi
mov    %rcx,0x20(%rsp)
mov    %rbx,0x40(%rsp)
call   1040 <SKP_INVERSE32_varQ@plt>
mov    %eax,%ebx
mov    0x38(%rsp),%rdx
movslq (%rdx),%rax
movslq %ebp,%rcx
imul   %rax,%rcx
shr    $0x1e,%rcx
and    $0xfffffffc,%ecx
mov    %ecx,(%rdx)
mov    0x40(%rsp),%rax
and    $0x1,%eax
mov    %rax,0x68(%rsp)
mov    %ebx,%edi
call   1030 <SKP_Silk_CLZ32@plt>
lea    -0x1(%rax),%ecx
shl    %cl,%ebx
movslq %ebx,%r11
mov    $0x11,%ecx
sub    %eax,%ecx
cmp    $0x4,%r15d
jae    1320 <LPC_inverse_pred_gain_QA+0x200>
xor    %eax,%eax
movabs $0xffffffff00000000,%r10
ff ff ff
mov    (%rsp),%rsi
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%rdx
mov    %rax,%rdi
shl    $0x20,%rdi
mov    %rsi,%rbx
sub    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
movslq 0x0(%r13,%rax,4),%rdi
mov    %rbx,%rbp
sar    $0x1e,%rbp
movslq 0x0(%rbp,%r14,1),%rbp
imul   %rdx,%rbp
shr    $0x1f,%rbp
movslq %ebp,%rbp
and    $0xfffffffffffffffe,%rbp
sub    %rbp,%rdi
imul   %r11,%rdi
shr    $0x20,%rdi
shl    %cl,%edi
mov    %edi,(%r12,%rax,4)
add    $0x1,%rax
add    %r10,%rbx
cmp    %rax,%r15
jne    12b0 <LPC_inverse_pred_gain_QA+0x190>
mov    0x20(%rsp),%rcx
add    $0x1,%ecx
add    %r10,%rsi
add    $0xffffffff,%r15d
mov    0x68(%rsp),%rax
mov    %rax,%r13
cmpq   $0x3,0x70(%rsp)
mov    0x40(%rsp),%rdi
mov    0x58(%rsp),%rdx
jge    11a0 <LPC_inverse_pred_gain_QA+0x80>
jmp    15b5 <LPC_inverse_pred_gain_QA+0x495>
nop
mov    0x34(%rsp),%eax
mov    %eax,%r9d
mov    0x20(%rsp),%rax
sub    %eax,%r9d
mov    0x30(%rsp),%ebp
sub    %eax,%ebp
lea    -0x1(%r9),%r10
mov    %ebp,%esi
sub    %r10d,%esi
mov    %r10,%rax
mov    $0x4,%edx
mul    %rdx
seto   %r8b
cmp    %ebp,%esi
movaps 0xca9(%rip),%xmm10
jg     127f <LPC_inverse_pred_gain_QA+0x15f>
shr    $0x20,%r10
jne    127f <LPC_inverse_pred_gain_QA+0x15f>
mov    %r15,0x50(%rsp)
movslq %ebp,%rbx
lea    (%r14,%rbx,4),%rbp
mov    %rbp,%rsi
sub    %rax,%rsi
cmp    %rbp,%rsi
movabs $0xffffffff00000000,%r10
ff ff ff
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%rdx
ja     15a7 <LPC_inverse_pred_gain_QA+0x487>
mov    $0x0,%eax
test   %r8b,%r8b
mov    (%rsp),%rsi
jne    1299 <LPC_inverse_pred_gain_QA+0x179>
mov    0x2c(%rsp),%eax
sub    0x20(%rsp),%eax
and    $0x1,%eax
shl    $0x6,%rax
add    0x18(%rsp),%rax
lea    (%rax,%r9,4),%rsi
lea    (%r14,%r9,4),%rdi
mov    0x60(%rsp),%r8
shl    $0x4,%r8
add    %rbx,%r8
mov    0x48(%rsp),%rbp
lea    0x0(,%r8,4),%rbx
add    %rbp,%rbx
sub    %r9,%r8
lea    0x0(%rbp,%r8,4),%rbp
cmp    %rdi,%rax
setb   %r8b
cmp    %rsi,%r14
setb   %r9b
cmp    %rbx,%rax
setb   %bl
cmp    %rsi,%rbp
setb   %dil
test   %r9b,%r8b
jne    15a7 <LPC_inverse_pred_gain_QA+0x487>
mov    $0x0,%eax
and    %dil,%bl
mov    (%rsp),%rsi
jne    1299 <LPC_inverse_pred_gain_QA+0x179>
mov    %rdx,%rdi
mov    %r15d,%edx
and    $0xfffffffc,%edx
mov    0x50(%rsp),%r15
mov    %r15d,%eax
and    $0xfffffffc,%eax
movq   %rdi,%xmm0
pshufd $0x44,%xmm0,%xmm9
movq   %r11,%xmm1
pshufd $0x44,%xmm1,%xmm1
movd   %ecx,%xmm8
mov    %rsi,%rbx
xor    %ebp,%ebp
movabs $0xfffffffc00000000,%r8
ff ff ff
nopl   0x0(%rax,%rax,1)
movdqu 0x0(%r13,%rbp,4),%xmm3
mov    %rbx,%rdi
sar    $0x1e,%rdi
movdqu -0xc(%rdi,%r14,1),%xmm4
pshufd $0x1b,%xmm4,%xmm5
pshufd $0x11,%xmm4,%xmm4
pxor   %xmm6,%xmm6
pcmpgtd %xmm4,%xmm6
punpckldq %xmm6,%xmm4
pxor   %xmm7,%xmm7
pcmpgtd %xmm5,%xmm7
punpckldq %xmm7,%xmm5
movdqa %xmm9,%xmm0
pmuludq %xmm5,%xmm0
movdqa %xmm9,%xmm2
psrlq  $0x20,%xmm2
pmuludq %xmm2,%xmm5
pshufd $0xd4,%xmm7,%xmm7
pmuludq %xmm9,%xmm7
paddq  %xmm5,%xmm7
psllq  $0x20,%xmm7
paddq  %xmm0,%xmm7
movdqa %xmm9,%xmm0
pmuludq %xmm4,%xmm0
pmuludq %xmm4,%xmm2
pshufd $0xd4,%xmm6,%xmm4
pmuludq %xmm9,%xmm4
paddq  %xmm2,%xmm4
psllq  $0x20,%xmm4
paddq  %xmm0,%xmm4
psrlq  $0x1f,%xmm4
psrlq  $0x1f,%xmm7
shufps $0x88,%xmm4,%xmm7
andps  %xmm10,%xmm7
psubd  %xmm7,%xmm3
pshufd $0xee,%xmm3,%xmm0
pxor   %xmm2,%xmm2
pcmpgtd %xmm0,%xmm2
punpckldq %xmm2,%xmm0
pxor   %xmm4,%xmm4
pcmpgtd %xmm3,%xmm4
punpckldq %xmm4,%xmm3
movdqa %xmm1,%xmm5
pmuludq %xmm3,%xmm5
movdqa %xmm1,%xmm6
psrlq  $0x20,%xmm6
pmuludq %xmm6,%xmm3
pshufd $0xd4,%xmm4,%xmm4
pmuludq %xmm1,%xmm4
paddq  %xmm3,%xmm4
psllq  $0x20,%xmm4
paddq  %xmm5,%xmm4
movdqa %xmm1,%xmm3
pmuludq %xmm0,%xmm3
pmuludq %xmm0,%xmm6
pshufd $0xd4,%xmm2,%xmm0
pmuludq %xmm1,%xmm0
paddq  %xmm6,%xmm0
psllq  $0x20,%xmm0
paddq  %xmm3,%xmm0
shufps $0xdd,%xmm0,%xmm4
xorps  %xmm0,%xmm0
movss  %xmm8,%xmm0
pslld  %xmm0,%xmm4
movdqu %xmm4,(%r12,%rbp,4)
add    $0x4,%rbp
add    %r8,%rbx
cmp    %rbp,%rdx
jne    1460 <LPC_inverse_pred_gain_QA+0x340>
cmp    %r15,%rax
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%rdx
jne    1299 <LPC_inverse_pred_gain_QA+0x179>
jmp    12ed <LPC_inverse_pred_gain_QA+0x1cd>
xor    %eax,%eax
mov    (%rsp),%rsi
jmp    1299 <LPC_inverse_pred_gain_QA+0x179>
mov    %r13,%rax
shl    $0x6,%rax
mov    0x18(%rsp),%rcx
movslq (%rcx,%rax,1),%rcx
lea    -0xfff1(%rcx),%edx
mov    $0x1,%eax
cmp    $0xfffe001f,%edx
jb     161c <LPC_inverse_pred_gain_QA+0x4fc>
shl    $0xf,%rcx
neg    %rcx
imul   %rcx,%rcx
movabs $0x7fffffff00000000,%rax
ff ff 7f
and    %rcx,%rax
mov    0x38(%rsp),%rsi
movslq (%rsi),%rcx
movabs $0x3fffffff00000000,%rdx
ff ff 3f
sub    %rax,%rdx
sar    $0x20,%rdx
imul   %rcx,%rdx
shr    $0x1e,%rdx
and    $0xfffffffc,%edx
mov    %edx,(%rsi)
xor    %eax,%eax
jmp    161c <LPC_inverse_pred_gain_QA+0x4fc>
mov    $0x1,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @LPC_inverse_pred_gain_QA(i32* %0, [16 x i32]* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca [16 x i32]*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32*
store i32* %0, i32** %5
store [16 x i32]* %1, [16 x i32]** %6
store i32 %2, i32* %7
%17 = load [16 x i32]*, [16 x i32]** %6
%18 = load i32, i32* %7
%19 = and i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %17, i64 %20
%22 = getelementptr inbounds [16 x i32], [16 x i32]* %21, i64 0, i64 0
store i32* %22, i32** %16
%23 = load i32*, i32** %5
store i32 1073741824, i32* %23
%24 = load i32, i32* %7
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %8
br label %26
26: ; preds = %129, %3
%27 = load i32, i32* %8
%28 = icmp sgt i32 %27, 0
br i1 %28, label %29, label %132
29: ; preds = %26
%30 = load i32*, i32** %16
%31 = load i32, i32* %8
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
%34 = load i32, i32* %33
%35 = icmp sgt i32 %34, 65520
br i1 %35, label %43, label %36
36: ; preds = %29
%37 = load i32*, i32** %16
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
%41 = load i32, i32* %40
%42 = icmp slt i32 %41, -65520
br i1 %42, label %43, label %44
43: ; preds = %36, %29
store i32 1, i32* %4
br label %167
44: ; preds = %36
%45 = load i32*, i32** %16
%46 = load i32, i32* %8
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %45, i64 %47
%49 = load i32, i32* %48
%50 = shl i32 %49, 15
%51 = sub nsw i32 0, %50
store i32 %51, i32* %11
%52 = load i32, i32* %11
%53 = sext i32 %52 to i64
%54 = load i32, i32* %11
%55 = sext i32 %54 to i64
%56 = mul nsw i64 %53, %55
%57 = ashr i64 %56, 32
%58 = trunc i64 %57 to i32
%59 = sub nsw i32 1073741823, %58
store i32 %59, i32* %12
%60 = load i32, i32* %12
%61 = call i32 @SKP_INVERSE32_varQ(i32 %60, i32 46)
store i32 %61, i32* %13
%62 = load i32*, i32** %5
%63 = load i32, i32* %62
%64 = sext i32 %63 to i64
%65 = load i32, i32* %12
%66 = sext i32 %65 to i64
%67 = mul nsw i64 %64, %66
%68 = ashr i64 %67, 32
%69 = trunc i64 %68 to i32
%70 = shl i32 %69, 2
%71 = load i32*, i32** %5
store i32 %70, i32* %71
%72 = load i32*, i32** %16
store i32* %72, i32** %15
%73 = load [16 x i32]*, [16 x i32]** %6
%74 = load i32, i32* %8
%75 = and i32 %74, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [16 x i32], [16 x i32]* %73, i64 %76
%78 = getelementptr inbounds [16 x i32], [16 x i32]* %77, i64 0, i64 0
store i32* %78, i32** %16
%79 = load i32, i32* %13
%80 = call i32 @SKP_Silk_CLZ32(i32 %79)
%81 = sub nsw i32 %80, 1
store i32 %81, i32* %10
%82 = load i32, i32* %13
%83 = load i32, i32* %10
%84 = shl i32 %82, %83
store i32 %84, i32* %13
store i32 0, i32* %9
br label %85
85: ; preds = %125, %44
%86 = load i32, i32* %9
%87 = load i32, i32* %8
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %128
89: ; preds = %85
%90 = load i32*, i32** %15
%91 = load i32, i32* %9
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i32, i32* %90, i64 %92
%94 = load i32, i32* %93
%95 = load i32*, i32** %15
%96 = load i32, i32* %8
%97 = load i32, i32* %9
%98 = sub nsw i32 %96, %97
%99 = sub nsw i32 %98, 1
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %95, i64 %100
%102 = load i32, i32* %101
%103 = sext i32 %102 to i64
%104 = load i32, i32* %11
%105 = sext i32 %104 to i64
%106 = mul nsw i64 %103, %105
%107 = ashr i64 %106, 32
%108 = trunc i64 %107 to i32
%109 = shl i32 %108, 1
%110 = sub nsw i32 %94, %109
store i32 %110, i32* %14
%111 = load i32, i32* %14
%112 = sext i32 %111 to i64
%113 = load i32, i32* %13
%114 = sext i32 %113 to i64
%115 = mul nsw i64 %112, %114
%116 = ashr i64 %115, 32
%117 = trunc i64 %116 to i32
%118 = load i32, i32* %10
%119 = sub nsw i32 16, %118
%120 = shl i32 %117, %119
%121 = load i32*, i32** %16
%122 = load i32, i32* %9
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %121, i64 %123
store i32 %120, i32* %124
br label %125
125: ; preds = %89
%126 = load i32, i32* %9
%127 = add nsw i32 %126, 1
store i32 %127, i32* %9
br label %85
128: ; preds = %85
br label %129
129: ; preds = %128
%130 = load i32, i32* %8
%131 = add nsw i32 %130, -1
store i32 %131, i32* %8
br label %26
132: ; preds = %26
%133 = load i32*, i32** %16
%134 = getelementptr inbounds i32, i32* %133, i64 0
%135 = load i32, i32* %134
%136 = icmp sgt i32 %135, 65520
br i1 %136, label %142, label %137
137: ; preds = %132
%138 = load i32*, i32** %16
%139 = getelementptr inbounds i32, i32* %138, i64 0
%140 = load i32, i32* %139
%141 = icmp slt i32 %140, -65520
br i1 %141, label %142, label %143
142: ; preds = %137, %132
store i32 1, i32* %4
br label %167
143: ; preds = %137
%144 = load i32*, i32** %16
%145 = getelementptr inbounds i32, i32* %144, i64 0
%146 = load i32, i32* %145
%147 = shl i32 %146, 15
%148 = sub nsw i32 0, %147
store i32 %148, i32* %11
%149 = load i32, i32* %11
%150 = sext i32 %149 to i64
%151 = load i32, i32* %11
%152 = sext i32 %151 to i64
%153 = mul nsw i64 %150, %152
%154 = ashr i64 %153, 32
%155 = trunc i64 %154 to i32
%156 = sub nsw i32 1073741823, %155
store i32 %156, i32* %12
%157 = load i32*, i32** %5
%158 = load i32, i32* %157
%159 = sext i32 %158 to i64
%160 = load i32, i32* %12
%161 = sext i32 %160 to i64
%162 = mul nsw i64 %159, %161
%163 = ashr i64 %162, 32
%164 = trunc i64 %163 to i32
%165 = shl i32 %164, 2
%166 = load i32*, i32** %5
store i32 %165, i32* %166
store i32 0, i32* %4
br label %167
167: ; preds = %143, %142, %43
%168 = load i32, i32* %4
ret i32 %168
}

LLVM IR (-O2):
define i32 @LPC_inverse_pred_gain_QA(i32* nocapture %0, [16 x i32]* nocapture %1, i32 %2) {
%4 = and i32 %2, 1
%5 = zext i32 %4 to i64
store i32 1073741824, i32* %0
%6 = icmp sgt i32 %2, 1
br i1 %6, label %7, label %165
7: ; preds = %3
%8 = zext i32 %2 to i64
%9 = add i32 %2, -1
%10 = add i32 %2, -2
%11 = xor i32 %2, -1
%12 = getelementptr [16 x i32], [16 x i32]* %1, i64 0, i64 1
%13 = getelementptr [16 x i32], [16 x i32]* %1, i64 0, i64 1
br label %17
14: ; preds = %141, %137
%15 = icmp sgt i64 %19, 2
%16 = add i32 %18, 1
br i1 %15, label %17, label %165
17: ; preds = %7, %14
%18 = phi i32 [ 0, %7 ], [ %16, %14 ]
%19 = phi i64 [ %8, %7 ], [ %49, %14 ]
%20 = phi i32 [ %2, %7 ], [ %48, %14 ]
%21 = phi i64 [ %5, %7 ], [ %70, %14 ]
%22 = xor i32 %18, -1
%23 = add i32 %22, %2
%24 = zext i32 %23 to i64
%25 = sub i32 %11, %18
%26 = and i32 %25, 1
%27 = zext i32 %26 to i64
%28 = getelementptr [16 x i32], [16 x i32]* %1, i64 %27, i64 0
%29 = sub i32 %9, %18
%30 = zext i32 %29 to i64
%31 = getelementptr [16 x i32], [16 x i32]* %1, i64 %27, i64 %30
%32 = getelementptr [16 x i32], [16 x i32]* %1, i64 %21, i64 0
%33 = getelementptr [16 x i32], [16 x i32]* %1, i64 %21, i64 %30
%34 = shl nuw nsw i64 %21, 4
%35 = sub i32 %10, %18
%36 = sext i32 %35 to i64
%37 = add nsw i64 %34, %36
%38 = sub nsw i64 %37, %30
%39 = getelementptr i32, i32* %12, i64 %38
%40 = getelementptr i32, i32* %13, i64 %37
%41 = sub i32 %9, %18
%42 = zext i32 %41 to i64
%43 = add nsw i64 %42, -1
%44 = sub i32 %10, %18
%45 = sext i32 %44 to i64
%46 = getelementptr [16 x i32], [16 x i32]* %1, i64 %21, i64 %45
%47 = bitcast i32* %46 to i8*
%48 = add i32 %20, -1
%49 = add nsw i64 %19, -1
%50 = and i64 %49, 4294967295
%51 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %21, i64 %50
%52 = load i32, i32* %51
%53 = add i32 %52, -65521
%54 = icmp ult i32 %53, -131041
br i1 %54, label %184, label %55
55: ; preds = %17
%56 = mul nsw i32 %52, -32768
%57 = sext i32 %56 to i64
%58 = mul nsw i64 %57, %57
%59 = lshr i64 %58, 32
%60 = trunc i64 %59 to i32
%61 = sub nsw i32 1073741823, %60
%62 = tail call i32 @SKP_INVERSE32_varQ(i32 %61, i32 46)
%63 = load i32, i32* %0
%64 = sext i32 %63 to i64
%65 = sext i32 %61 to i64
%66 = mul nsw i64 %64, %65
%67 = lshr i64 %66, 30
%68 = trunc i64 %67 to i32
%69 = and i32 %68, -4
store i32 %69, i32* %0
%70 = and i64 %49, 1
%71 = tail call i32 @SKP_Silk_CLZ32(i32 %62)
%72 = add nsw i32 %71, -1
%73 = shl i32 %62, %72
%74 = sext i32 %73 to i64
%75 = sub i32 17, %71
%76 = zext i32 %48 to i64
%77 = icmp ult i32 %23, 4
br i1 %77, label %139, label %78
78: ; preds = %55
%79 = trunc i64 %43 to i32
%80 = sub i32 %44, %79
%81 = icmp sgt i32 %80, %44
%82 = icmp ugt i64 %43, 4294967295
%83 = or i1 %81, %82
%84 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %43, i64 4)
%85 = extractvalue { i64, i1 } %84, 0
%86 = extractvalue { i64, i1 } %84, 1
%87 = sub i64 0, %85
%88 = getelementptr i8, i8* %47, i64 %87
%89 = icmp ugt i8* %88, %47
%90 = or i1 %89, %86
%91 = or i1 %83, %90
br i1 %91, label %139, label %92
92: ; preds = %78
%93 = icmp ult i32* %28, %33
%94 = icmp ult i32* %32, %31
%95 = and i1 %93, %94
%96 = icmp ult i32* %28, %40
%97 = icmp ult i32* %39, %31
%98 = and i1 %96, %97
%99 = or i1 %95, %98
br i1 %99, label %139, label %100
100: ; preds = %92
%101 = and i64 %24, 4294967292
%102 = insertelement <4 x i64> poison, i64 %57, i64 0
%103 = shufflevector <4 x i64> %102, <4 x i64> poison, <4 x i32> zeroinitializer
%104 = insertelement <4 x i64> poison, i64 %74, i64 0
%105 = shufflevector <4 x i64> %104, <4 x i64> poison, <4 x i32> zeroinitializer
%106 = insertelement <4 x i32> poison, i32 %75, i64 0
%107 = shufflevector <4 x i32> %106, <4 x i32> poison, <4 x i32> zeroinitializer
br label %108
108: ; preds = %108, %100
%109 = phi i64 [ 0, %100 ], [ %135, %108 ]
%110 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %21, i64 %109
%111 = bitcast i32* %110 to <4 x i32>*
%112 = load <4 x i32>, <4 x i32>* %111
%113 = xor i64 %109, -1
%114 = add i64 %49, %113
%115 = shl i64 %114, 32
%116 = ashr exact i64 %115, 32
%117 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %21, i64 %116
%118 = getelementptr inbounds i32, i32* %117, i64 -3
%119 = bitcast i32* %118 to <4 x i32>*
%120 = load <4 x i32>, <4 x i32>* %119
%121 = shufflevector <4 x i32> %120, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%122 = sext <4 x i32> %121 to <4 x i64>
%123 = mul nsw <4 x i64> %103, %122
%124 = lshr <4 x i64> %123, <i64 31, i64 31, i64 31, i64 31>
%125 = trunc <4 x i64> %124 to <4 x i32>
%126 = and <4 x i32> %125, <i32 -2, i32 -2, i32 -2, i32 -2>
%127 = sub nsw <4 x i32> %112, %126
%128 = sext <4 x i32> %127 to <4 x i64>
%129 = mul nsw <4 x i64> %105, %128
%130 = lshr <4 x i64> %129, <i64 32, i64 32, i64 32, i64 32>
%131 = trunc <4 x i64> %130 to <4 x i32>
%132 = shl <4 x i32> %131, %107
%133 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %70, i64 %109
%134 = bitcast i32* %133 to <4 x i32>*
store <4 x i32> %132, <4 x i32>* %134
%135 = add nuw i64 %109, 4
%136 = icmp eq i64 %135, %101
br i1 %136, label %137, label %108
137: ; preds = %108
%138 = icmp eq i64 %101, %24
br i1 %138, label %14, label %139
139: ; preds = %92, %78, %55, %137
%140 = phi i64 [ 0, %92 ], [ 0, %78 ], [ 0, %55 ], [ %101, %137 ]
br label %141
141: ; preds = %139, %141
%142 = phi i64 [ %163, %141 ], [ %140, %139 ]
%143 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %21, i64 %142
%144 = load i32, i32* %143
%145 = xor i64 %142, -1
%146 = add i64 %49, %145
%147 = shl i64 %146, 32
%148 = ashr exact i64 %147, 32
%149 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %21, i64 %148
%150 = load i32, i32* %149
%151 = sext i32 %150 to i64
%152 = mul nsw i64 %151, %57
%153 = lshr i64 %152, 31
%154 = trunc i64 %153 to i32
%155 = and i32 %154, -2
%156 = sub nsw i32 %144, %155
%157 = sext i32 %156 to i64
%158 = mul nsw i64 %157, %74
%159 = lshr i64 %158, 32
%160 = trunc i64 %159 to i32
%161 = shl i32 %160, %75
%162 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %70, i64 %142
store i32 %161, i32* %162
%163 = add nuw nsw i64 %142, 1
%164 = icmp eq i64 %163, %76
br i1 %164, label %14, label %141
165: ; preds = %14, %3
%166 = phi i64 [ %5, %3 ], [ %70, %14 ]
%167 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 %166, i64 0
%168 = load i32, i32* %167
%169 = add i32 %168, -65521
%170 = icmp ult i32 %169, -131041
br i1 %170, label %184, label %171
171: ; preds = %165
%172 = mul nsw i32 %168, -32768
%173 = sext i32 %172 to i64
%174 = mul nsw i64 %173, %173
%175 = and i64 %174, 9223372032559808512
%176 = load i32, i32* %0
%177 = sext i32 %176 to i64
%178 = sub nsw i64 4611686014132420608, %175
%179 = ashr exact i64 %178, 32
%180 = mul nsw i64 %179, %177
%181 = lshr i64 %180, 30
%182 = trunc i64 %181 to i32
%183 = and i32 %182, -4
store i32 %183, i32* %0
br label %184
184: ; preds = %17, %165, %171
%185 = phi i32 [ 0, %171 ], [ 1, %165 ], [ 1, %17 ]
ret i32 %185
}