#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 */
scalar_t__ abs(int);
int clip23(int);
int /*<<< orphan*/ clp_v(int *, int);
int /*<<< orphan*/ dct_a(int *, int *);
int /*<<< orphan*/ dct_b(int *, int *);
int /*<<< orphan*/ mod_a(int *, int *);
int /*<<< orphan*/ mod_b(int *, int *);
int /*<<< orphan*/ mod_c(int *, int *);
int /*<<< orphan*/ sum_a(int *, int *, int);
int /*<<< orphan*/ sum_b(int *, int *, int);
int /*<<< orphan*/ sum_c(int *, int *, int);
int /*<<< orphan*/ sum_d(int *, int *, int);
void idct_perform32_fixed(int *restrict input, int *restrict output) {
  int mag = 0;
  for (int i = 0; i < 32; i++)
    mag += abs(input[i]);
  int shift = mag > 0x400000 ? 2 : 0;
  int round = shift > 0 ? 1 << (shift - 1) : 0;
  for (int i = 0; i < 32; i++)
    input[i] = (input[i] + round) >> shift;
  sum_a(input, output + 0, 16);
  sum_b(input, output + 16, 16);
  clp_v(output, 32);
  sum_a(output + 0, input + 0, 8);
  sum_b(output + 0, input + 8, 8);
  sum_c(output + 16, input + 16, 8);
  sum_d(output + 16, input + 24, 8);
  clp_v(input, 32);
  dct_a(input + 0, output + 0);
  dct_b(input + 8, output + 8);
  dct_b(input + 16, output + 16);
  dct_b(input + 24, output + 24);
  clp_v(output, 32);
  mod_a(output + 0, input + 0);
  mod_b(output + 16, input + 16);
  clp_v(input, 32);
  mod_c(input, output);
  for (int i = 0; i < 32; i++)
    output[i] = clip23(output[i] * (1 << shift));
}


x86 assembly (clang, -O0):
<idct_perform32_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x20,-0x18(%rbp)
jge    1213 <idct_perform32_fixed+0x53>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <abs@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11de <idct_perform32_fixed+0x1e>
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    $0x2,%ecx
cmp    $0x400000,%edx
cmovg  %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1248 <idct_perform32_fixed+0x88>
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x2c(%rbp)
jmp    1252 <idct_perform32_fixed+0x92>
xor    %eax,%eax
mov    %eax,-0x2c(%rbp)
jmp    1252 <idct_perform32_fixed+0x92>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    1295 <idct_perform32_fixed+0xd5>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
sar    %cl,%edx
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    125f <idct_perform32_fixed+0x9f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   10b0 <sum_a@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x40,%rsi
mov    $0x10,%edx
call   1040 <sum_b@plt>
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   10b0 <sum_a@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x20,%rsi
mov    $0x8,%edx
call   1040 <sum_b@plt>
mov    -0x10(%rbp),%rdi
add    $0x40,%rdi
mov    -0x8(%rbp),%rsi
add    $0x40,%rsi
mov    $0x8,%edx
call   10a0 <sum_c@plt>
mov    -0x10(%rbp),%rdi
add    $0x40,%rdi
mov    -0x8(%rbp),%rsi
add    $0x60,%rsi
mov    $0x8,%edx
call   1060 <sum_d@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10c0 <dct_a@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
mov    -0x10(%rbp),%rsi
add    $0x20,%rsi
call   1070 <dct_b@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
mov    -0x10(%rbp),%rsi
add    $0x40,%rsi
call   1070 <dct_b@plt>
mov    -0x8(%rbp),%rdi
add    $0x60,%rdi
mov    -0x10(%rbp),%rsi
add    $0x60,%rsi
call   1070 <dct_b@plt>
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   10d0 <mod_a@plt>
mov    -0x10(%rbp),%rdi
add    $0x40,%rdi
mov    -0x8(%rbp),%rsi
add    $0x40,%rsi
call   1080 <mod_b@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10e0 <mod_c@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x20,-0x28(%rbp)
jge    1415 <idct_perform32_fixed+0x255>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
imul   %eax,%edi
call   1090 <clip23@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13d3 <idct_perform32_fixed+0x213>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idct_perform32_fixed>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r15
mov    %rdi,%r14
mov    (%rdi),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
mov    0x4(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x8(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0xc(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x10(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x14(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x18(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x1c(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x20(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x24(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x28(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x2c(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x30(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x34(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x38(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x3c(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x40(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x44(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x48(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x4c(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x50(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x54(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x58(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x5c(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x60(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x64(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x68(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x6c(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x70(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x74(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x78(%r14),%edi
call   1030 <abs@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x7c(%r14),%edi
call   1030 <abs@plt>
add    %ebx,%eax
xor    %ebx,%ebx
cmp    $0x400001,%eax
setge  %bl
add    %ebx,%ebx
lea    -0x1(%rbx),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    %r12d,%r12d
cmp    $0x400001,%eax
cmovl  %r12d,%edx
lea    0x20(%r14),%rbp
mov    %rbp,0x8(%rsp)
lea    0x40(%r14),%rax
mov    %rax,0x10(%rsp)
movd   %edx,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqu (%r14),%xmm2
movdqu 0x10(%r14),%xmm3
movdqu 0x20(%r14),%xmm4
movdqu 0x30(%r14),%xmm5
paddd  %xmm0,%xmm2
movd   %ebx,%xmm1
psrad  %xmm1,%xmm2
movdqu %xmm2,(%r14)
paddd  %xmm0,%xmm3
psrad  %xmm1,%xmm3
movdqu %xmm3,0x10(%r14)
paddd  %xmm0,%xmm4
psrad  %xmm1,%xmm4
movdqu %xmm4,0x20(%r14)
paddd  %xmm0,%xmm5
psrad  %xmm1,%xmm5
movdqu %xmm5,0x30(%r14)
movdqu 0x40(%r14),%xmm2
paddd  %xmm0,%xmm2
psrad  %xmm1,%xmm2
movdqu %xmm2,0x40(%r14)
movdqu 0x50(%r14),%xmm2
paddd  %xmm0,%xmm2
psrad  %xmm1,%xmm2
lea    0x60(%r14),%rax
mov    %rax,(%rsp)
movdqu %xmm2,0x50(%r14)
movdqu 0x60(%r14),%xmm2
paddd  %xmm0,%xmm2
psrad  %xmm1,%xmm2
movdqu %xmm2,0x60(%r14)
movdqu 0x70(%r14),%xmm2
paddd  %xmm0,%xmm2
psrad  %xmm1,%xmm2
movdqu %xmm2,0x70(%r14)
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x10,%edx
call   10b0 <sum_a@plt>
lea    0x40(%r15),%r13
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x10,%edx
call   1040 <sum_b@plt>
mov    %r15,%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   10b0 <sum_a@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
call   1040 <sum_b@plt>
mov    %r13,%rdi
mov    0x10(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x8,%edx
call   10a0 <sum_c@plt>
mov    %r13,%rdi
mov    (%rsp),%rsi
mov    $0x8,%edx
call   1060 <sum_d@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dct_a@plt>
lea    0x20(%r15),%rsi
mov    0x8(%rsp),%rdi
call   1070 <dct_b@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1070 <dct_b@plt>
lea    0x60(%r15),%rsi
mov    (%rsp),%rdi
call   1070 <dct_b@plt>
mov    %r15,%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10d0 <mod_a@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1080 <mod_b@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1050 <clp_v@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10e0 <mod_c@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15,%r12,4),%edi
mov    %ebx,%ecx
shl    %cl,%edi
call   1090 <clip23@plt>
mov    %eax,(%r15,%r12,4)
add    $0x1,%r12
cmp    $0x20,%r12
jne    1570 <idct_perform32_fixed+0x3b0>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @idct_perform32_fixed(i32* noalias %0, i32* noalias %1) {
%3 = load i32, i32* %0
%4 = tail call i64 @abs(i32 %3)
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i64 @abs(i32 %7)
%9 = trunc i64 %8 to i32
%10 = add i32 %5, %9
%11 = getelementptr inbounds i32, i32* %0, i64 2
%12 = load i32, i32* %11
%13 = tail call i64 @abs(i32 %12)
%14 = trunc i64 %13 to i32
%15 = add i32 %10, %14
%16 = getelementptr inbounds i32, i32* %0, i64 3
%17 = load i32, i32* %16
%18 = tail call i64 @abs(i32 %17)
%19 = trunc i64 %18 to i32
%20 = add i32 %15, %19
%21 = getelementptr inbounds i32, i32* %0, i64 4
%22 = load i32, i32* %21
%23 = tail call i64 @abs(i32 %22)
%24 = trunc i64 %23 to i32
%25 = add i32 %20, %24
%26 = getelementptr inbounds i32, i32* %0, i64 5
%27 = load i32, i32* %26
%28 = tail call i64 @abs(i32 %27)
%29 = trunc i64 %28 to i32
%30 = add i32 %25, %29
%31 = getelementptr inbounds i32, i32* %0, i64 6
%32 = load i32, i32* %31
%33 = tail call i64 @abs(i32 %32)
%34 = trunc i64 %33 to i32
%35 = add i32 %30, %34
%36 = getelementptr inbounds i32, i32* %0, i64 7
%37 = load i32, i32* %36
%38 = tail call i64 @abs(i32 %37)
%39 = trunc i64 %38 to i32
%40 = add i32 %35, %39
%41 = getelementptr inbounds i32, i32* %0, i64 8
%42 = load i32, i32* %41
%43 = tail call i64 @abs(i32 %42)
%44 = trunc i64 %43 to i32
%45 = add i32 %40, %44
%46 = getelementptr inbounds i32, i32* %0, i64 9
%47 = load i32, i32* %46
%48 = tail call i64 @abs(i32 %47)
%49 = trunc i64 %48 to i32
%50 = add i32 %45, %49
%51 = getelementptr inbounds i32, i32* %0, i64 10
%52 = load i32, i32* %51
%53 = tail call i64 @abs(i32 %52)
%54 = trunc i64 %53 to i32
%55 = add i32 %50, %54
%56 = getelementptr inbounds i32, i32* %0, i64 11
%57 = load i32, i32* %56
%58 = tail call i64 @abs(i32 %57)
%59 = trunc i64 %58 to i32
%60 = add i32 %55, %59
%61 = getelementptr inbounds i32, i32* %0, i64 12
%62 = load i32, i32* %61
%63 = tail call i64 @abs(i32 %62)
%64 = trunc i64 %63 to i32
%65 = add i32 %60, %64
%66 = getelementptr inbounds i32, i32* %0, i64 13
%67 = load i32, i32* %66
%68 = tail call i64 @abs(i32 %67)
%69 = trunc i64 %68 to i32
%70 = add i32 %65, %69
%71 = getelementptr inbounds i32, i32* %0, i64 14
%72 = load i32, i32* %71
%73 = tail call i64 @abs(i32 %72)
%74 = trunc i64 %73 to i32
%75 = add i32 %70, %74
%76 = getelementptr inbounds i32, i32* %0, i64 15
%77 = load i32, i32* %76
%78 = tail call i64 @abs(i32 %77)
%79 = trunc i64 %78 to i32
%80 = add i32 %75, %79
%81 = getelementptr inbounds i32, i32* %0, i64 16
%82 = load i32, i32* %81
%83 = tail call i64 @abs(i32 %82)
%84 = trunc i64 %83 to i32
%85 = add i32 %80, %84
%86 = getelementptr inbounds i32, i32* %0, i64 17
%87 = load i32, i32* %86
%88 = tail call i64 @abs(i32 %87)
%89 = trunc i64 %88 to i32
%90 = add i32 %85, %89
%91 = getelementptr inbounds i32, i32* %0, i64 18
%92 = load i32, i32* %91
%93 = tail call i64 @abs(i32 %92)
%94 = trunc i64 %93 to i32
%95 = add i32 %90, %94
%96 = getelementptr inbounds i32, i32* %0, i64 19
%97 = load i32, i32* %96
%98 = tail call i64 @abs(i32 %97)
%99 = trunc i64 %98 to i32
%100 = add i32 %95, %99
%101 = getelementptr inbounds i32, i32* %0, i64 20
%102 = load i32, i32* %101
%103 = tail call i64 @abs(i32 %102)
%104 = trunc i64 %103 to i32
%105 = add i32 %100, %104
%106 = getelementptr inbounds i32, i32* %0, i64 21
%107 = load i32, i32* %106
%108 = tail call i64 @abs(i32 %107)
%109 = trunc i64 %108 to i32
%110 = add i32 %105, %109
%111 = getelementptr inbounds i32, i32* %0, i64 22
%112 = load i32, i32* %111
%113 = tail call i64 @abs(i32 %112)
%114 = trunc i64 %113 to i32
%115 = add i32 %110, %114
%116 = getelementptr inbounds i32, i32* %0, i64 23
%117 = load i32, i32* %116
%118 = tail call i64 @abs(i32 %117)
%119 = trunc i64 %118 to i32
%120 = add i32 %115, %119
%121 = getelementptr inbounds i32, i32* %0, i64 24
%122 = load i32, i32* %121
%123 = tail call i64 @abs(i32 %122)
%124 = trunc i64 %123 to i32
%125 = add i32 %120, %124
%126 = getelementptr inbounds i32, i32* %0, i64 25
%127 = load i32, i32* %126
%128 = tail call i64 @abs(i32 %127)
%129 = trunc i64 %128 to i32
%130 = add i32 %125, %129
%131 = getelementptr inbounds i32, i32* %0, i64 26
%132 = load i32, i32* %131
%133 = tail call i64 @abs(i32 %132)
%134 = trunc i64 %133 to i32
%135 = add i32 %130, %134
%136 = getelementptr inbounds i32, i32* %0, i64 27
%137 = load i32, i32* %136
%138 = tail call i64 @abs(i32 %137)
%139 = trunc i64 %138 to i32
%140 = add i32 %135, %139
%141 = getelementptr inbounds i32, i32* %0, i64 28
%142 = load i32, i32* %141
%143 = tail call i64 @abs(i32 %142)
%144 = trunc i64 %143 to i32
%145 = add i32 %140, %144
%146 = getelementptr inbounds i32, i32* %0, i64 29
%147 = load i32, i32* %146
%148 = tail call i64 @abs(i32 %147)
%149 = trunc i64 %148 to i32
%150 = add i32 %145, %149
%151 = getelementptr inbounds i32, i32* %0, i64 30
%152 = load i32, i32* %151
%153 = tail call i64 @abs(i32 %152)
%154 = trunc i64 %153 to i32
%155 = add i32 %150, %154
%156 = getelementptr inbounds i32, i32* %0, i64 31
%157 = load i32, i32* %156
%158 = tail call i64 @abs(i32 %157)
%159 = trunc i64 %158 to i32
%160 = add i32 %155, %159
%161 = icmp sgt i32 %160, 4194304
%162 = select i1 %161, i32 2, i32 0
%163 = add nsw i32 %162, -1
%164 = shl nuw nsw i32 1, %163
%165 = select i1 %161, i32 %164, i32 0
%166 = insertelement <4 x i32> poison, i32 %165, i64 0
%167 = shufflevector <4 x i32> %166, <4 x i32> poison, <4 x i32> zeroinitializer
%168 = insertelement <4 x i32> poison, i32 %162, i64 0
%169 = shufflevector <4 x i32> %168, <4 x i32> poison, <4 x i32> zeroinitializer
%170 = bitcast i32* %0 to <4 x i32>*
%171 = load <4 x i32>, <4 x i32>* %170
%172 = add nsw <4 x i32> %171, %167
%173 = ashr <4 x i32> %172, %169
%174 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %173, <4 x i32>* %174
%175 = getelementptr inbounds i32, i32* %0, i64 4
%176 = bitcast i32* %175 to <4 x i32>*
%177 = load <4 x i32>, <4 x i32>* %176
%178 = add nsw <4 x i32> %177, %167
%179 = ashr <4 x i32> %178, %169
%180 = bitcast i32* %175 to <4 x i32>*
store <4 x i32> %179, <4 x i32>* %180
%181 = getelementptr inbounds i32, i32* %0, i64 8
%182 = bitcast i32* %181 to <4 x i32>*
%183 = load <4 x i32>, <4 x i32>* %182
%184 = add nsw <4 x i32> %183, %167
%185 = ashr <4 x i32> %184, %169
%186 = bitcast i32* %181 to <4 x i32>*
store <4 x i32> %185, <4 x i32>* %186
%187 = getelementptr inbounds i32, i32* %0, i64 12
%188 = bitcast i32* %187 to <4 x i32>*
%189 = load <4 x i32>, <4 x i32>* %188
%190 = add nsw <4 x i32> %189, %167
%191 = ashr <4 x i32> %190, %169
%192 = bitcast i32* %187 to <4 x i32>*
store <4 x i32> %191, <4 x i32>* %192
%193 = getelementptr inbounds i32, i32* %0, i64 16
%194 = bitcast i32* %193 to <4 x i32>*
%195 = load <4 x i32>, <4 x i32>* %194
%196 = add nsw <4 x i32> %195, %167
%197 = ashr <4 x i32> %196, %169
%198 = bitcast i32* %193 to <4 x i32>*
store <4 x i32> %197, <4 x i32>* %198
%199 = getelementptr inbounds i32, i32* %0, i64 20
%200 = bitcast i32* %199 to <4 x i32>*
%201 = load <4 x i32>, <4 x i32>* %200
%202 = add nsw <4 x i32> %201, %167
%203 = ashr <4 x i32> %202, %169
%204 = bitcast i32* %199 to <4 x i32>*
store <4 x i32> %203, <4 x i32>* %204
%205 = getelementptr inbounds i32, i32* %0, i64 24
%206 = bitcast i32* %205 to <4 x i32>*
%207 = load <4 x i32>, <4 x i32>* %206
%208 = add nsw <4 x i32> %207, %167
%209 = ashr <4 x i32> %208, %169
%210 = bitcast i32* %205 to <4 x i32>*
store <4 x i32> %209, <4 x i32>* %210
%211 = getelementptr inbounds i32, i32* %0, i64 28
%212 = bitcast i32* %211 to <4 x i32>*
%213 = load <4 x i32>, <4 x i32>* %212
%214 = add nsw <4 x i32> %213, %167
%215 = ashr <4 x i32> %214, %169
%216 = bitcast i32* %211 to <4 x i32>*
store <4 x i32> %215, <4 x i32>* %216
%217 = tail call i32 @sum_a(i32* %0, i32* %1, i32 16)
%218 = getelementptr inbounds i32, i32* %1, i64 16
%219 = tail call i32 @sum_b(i32* %0, i32* %218, i32 16)
%220 = tail call i32 @clp_v(i32* %1, i32 32)
%221 = tail call i32 @sum_a(i32* %1, i32* %0, i32 8)
%222 = tail call i32 @sum_b(i32* %1, i32* %41, i32 8)
%223 = tail call i32 @sum_c(i32* %218, i32* %81, i32 8)
%224 = tail call i32 @sum_d(i32* %218, i32* %121, i32 8)
%225 = tail call i32 @clp_v(i32* %0, i32 32)
%226 = tail call i32 @dct_a(i32* %0, i32* %1)
%227 = getelementptr inbounds i32, i32* %1, i64 8
%228 = tail call i32 @dct_b(i32* %41, i32* %227)
%229 = tail call i32 @dct_b(i32* %81, i32* %218)
%230 = getelementptr inbounds i32, i32* %1, i64 24
%231 = tail call i32 @dct_b(i32* %121, i32* %230)
%232 = tail call i32 @clp_v(i32* %1, i32 32)
%233 = tail call i32 @mod_a(i32* %1, i32* %0)
%234 = tail call i32 @mod_b(i32* %218, i32* %81)
%235 = tail call i32 @clp_v(i32* %0, i32 32)
%236 = tail call i32 @mod_c(i32* %0, i32* %1)
br label %238
237: ; preds = %238
ret void
238: ; preds = %2, %238
%239 = phi i64 [ 0, %2 ], [ %244, %238 ]
%240 = getelementptr inbounds i32, i32* %1, i64 %239
%241 = load i32, i32* %240
%242 = shl i32 %241, %162
%243 = tail call i32 @clip23(i32 %242)
store i32 %243, i32* %240
%244 = add nuw nsw i64 %239, 1
%245 = icmp eq i64 %244, 32
br i1 %245, label %237, label %238
}