#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*/ BTIC2D_TransDCT_Horiz(int *, int *);
int /*<<< orphan*/ BTIC2D_TransDCT_Vert(int *, int *);
void BTIC2D_TransDCT(int *iblk, int *oblk) {
  int s[64];
  int i, j;
  BTIC2D_TransDCT_Horiz(iblk + 0, s + 0);
  BTIC2D_TransDCT_Horiz(iblk + 8, s + 8);
  BTIC2D_TransDCT_Horiz(iblk + 16, s + 16);
  BTIC2D_TransDCT_Horiz(iblk + 24, s + 24);
  BTIC2D_TransDCT_Horiz(iblk + 32, s + 32);
  BTIC2D_TransDCT_Horiz(iblk + 40, s + 40);
  BTIC2D_TransDCT_Horiz(iblk + 48, s + 48);
  BTIC2D_TransDCT_Horiz(iblk + 56, s + 56);
  BTIC2D_TransDCT_Vert(s + 0, oblk + 0);
  BTIC2D_TransDCT_Vert(s + 1, oblk + 1);
  BTIC2D_TransDCT_Vert(s + 2, oblk + 2);
  BTIC2D_TransDCT_Vert(s + 3, oblk + 3);
  BTIC2D_TransDCT_Vert(s + 4, oblk + 4);
  BTIC2D_TransDCT_Vert(s + 5, oblk + 5);
  BTIC2D_TransDCT_Vert(s + 6, oblk + 6);
  BTIC2D_TransDCT_Vert(s + 7, oblk + 7);
}


x86 assembly (clang, -O0):
<BTIC2D_TransDCT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
lea    -0x110(%rbp),%rsi
add    $0x20,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
lea    -0x110(%rbp),%rsi
add    $0x40,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x60,%rdi
lea    -0x110(%rbp),%rsi
add    $0x60,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x80,%rdi
lea    -0x110(%rbp),%rsi
add    $0x80,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0xa0,%rdi
lea    -0x110(%rbp),%rsi
add    $0xa0,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0xc0,%rdi
lea    -0x110(%rbp),%rsi
add    $0xc0,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0xe0,%rdi
lea    -0x110(%rbp),%rsi
add    $0xe0,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0x4,%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0x8,%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0xc,%rdi
mov    -0x10(%rbp),%rsi
add    $0xc,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0x10,%rdi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0x14,%rdi
mov    -0x10(%rbp),%rsi
add    $0x14,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0x18,%rdi
mov    -0x10(%rbp),%rsi
add    $0x18,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    -0x110(%rbp),%rdi
add    $0x1c,%rdi
mov    -0x10(%rbp),%rsi
add    $0x1c,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTIC2D_TransDCT>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    0x20(%rbx),%rdi
lea    0x20(%rsp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    0x40(%rbx),%rdi
lea    0x40(%rsp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    0x60(%rbx),%rdi
lea    0x60(%rsp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    0x80(%rbx),%rdi
lea    0x80(%rsp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    0xa0(%rbx),%rdi
lea    0xa0(%rsp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
lea    0xc0(%rbx),%rdi
lea    0xc0(%rsp),%rsi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
add    $0xe0,%rbx
lea    0xe0(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <BTIC2D_TransDCT_Horiz@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0x4(%rsp),%rdi
lea    0x4(%r15),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0x8(%rsp),%rdi
lea    0x8(%r15),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0xc(%rsp),%rdi
lea    0xc(%r15),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0x10(%rsp),%rdi
lea    0x10(%r15),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0x14(%rsp),%rdi
lea    0x14(%r15),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0x18(%rsp),%rdi
lea    0x18(%r15),%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
lea    0x1c(%rsp),%rdi
add    $0x1c,%r15
mov    %r15,%rsi
call   1030 <BTIC2D_TransDCT_Vert@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @BTIC2D_TransDCT(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [64 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = call i32 @BTIC2D_TransDCT_Horiz(i32* %9, i32* %11)
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 8
%15 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%16 = getelementptr inbounds i32, i32* %15, i64 8
%17 = call i32 @BTIC2D_TransDCT_Horiz(i32* %14, i32* %16)
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 16
%20 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%21 = getelementptr inbounds i32, i32* %20, i64 16
%22 = call i32 @BTIC2D_TransDCT_Horiz(i32* %19, i32* %21)
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 24
%25 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%26 = getelementptr inbounds i32, i32* %25, i64 24
%27 = call i32 @BTIC2D_TransDCT_Horiz(i32* %24, i32* %26)
%28 = load i32*, i32** %3
%29 = getelementptr inbounds i32, i32* %28, i64 32
%30 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%31 = getelementptr inbounds i32, i32* %30, i64 32
%32 = call i32 @BTIC2D_TransDCT_Horiz(i32* %29, i32* %31)
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i64 40
%35 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%36 = getelementptr inbounds i32, i32* %35, i64 40
%37 = call i32 @BTIC2D_TransDCT_Horiz(i32* %34, i32* %36)
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 48
%40 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%41 = getelementptr inbounds i32, i32* %40, i64 48
%42 = call i32 @BTIC2D_TransDCT_Horiz(i32* %39, i32* %41)
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 56
%45 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%46 = getelementptr inbounds i32, i32* %45, i64 56
%47 = call i32 @BTIC2D_TransDCT_Horiz(i32* %44, i32* %46)
%48 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%49 = getelementptr inbounds i32, i32* %48, i64 0
%50 = load i32*, i32** %4
%51 = getelementptr inbounds i32, i32* %50, i64 0
%52 = call i32 @BTIC2D_TransDCT_Vert(i32* %49, i32* %51)
%53 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%54 = getelementptr inbounds i32, i32* %53, i64 1
%55 = load i32*, i32** %4
%56 = getelementptr inbounds i32, i32* %55, i64 1
%57 = call i32 @BTIC2D_TransDCT_Vert(i32* %54, i32* %56)
%58 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%59 = getelementptr inbounds i32, i32* %58, i64 2
%60 = load i32*, i32** %4
%61 = getelementptr inbounds i32, i32* %60, i64 2
%62 = call i32 @BTIC2D_TransDCT_Vert(i32* %59, i32* %61)
%63 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%64 = getelementptr inbounds i32, i32* %63, i64 3
%65 = load i32*, i32** %4
%66 = getelementptr inbounds i32, i32* %65, i64 3
%67 = call i32 @BTIC2D_TransDCT_Vert(i32* %64, i32* %66)
%68 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%69 = getelementptr inbounds i32, i32* %68, i64 4
%70 = load i32*, i32** %4
%71 = getelementptr inbounds i32, i32* %70, i64 4
%72 = call i32 @BTIC2D_TransDCT_Vert(i32* %69, i32* %71)
%73 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%74 = getelementptr inbounds i32, i32* %73, i64 5
%75 = load i32*, i32** %4
%76 = getelementptr inbounds i32, i32* %75, i64 5
%77 = call i32 @BTIC2D_TransDCT_Vert(i32* %74, i32* %76)
%78 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%79 = getelementptr inbounds i32, i32* %78, i64 6
%80 = load i32*, i32** %4
%81 = getelementptr inbounds i32, i32* %80, i64 6
%82 = call i32 @BTIC2D_TransDCT_Vert(i32* %79, i32* %81)
%83 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%84 = getelementptr inbounds i32, i32* %83, i64 7
%85 = load i32*, i32** %4
%86 = getelementptr inbounds i32, i32* %85, i64 7
%87 = call i32 @BTIC2D_TransDCT_Vert(i32* %84, i32* %86)
ret void
}

LLVM IR (-O2):
define void @BTIC2D_TransDCT(i32* %0, i32* %1) {
%3 = alloca [64 x i32]
%4 = bitcast [64 x i32]* %3 to i8*
%5 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 0
%6 = call i32 @BTIC2D_TransDCT_Horiz(i32* %0, i32* %5)
%7 = getelementptr inbounds i32, i32* %0, i64 8
%8 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 8
%9 = call i32 @BTIC2D_TransDCT_Horiz(i32* %7, i32* %8)
%10 = getelementptr inbounds i32, i32* %0, i64 16
%11 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 16
%12 = call i32 @BTIC2D_TransDCT_Horiz(i32* %10, i32* %11)
%13 = getelementptr inbounds i32, i32* %0, i64 24
%14 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 24
%15 = call i32 @BTIC2D_TransDCT_Horiz(i32* %13, i32* %14)
%16 = getelementptr inbounds i32, i32* %0, i64 32
%17 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 32
%18 = call i32 @BTIC2D_TransDCT_Horiz(i32* %16, i32* %17)
%19 = getelementptr inbounds i32, i32* %0, i64 40
%20 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 40
%21 = call i32 @BTIC2D_TransDCT_Horiz(i32* %19, i32* %20)
%22 = getelementptr inbounds i32, i32* %0, i64 48
%23 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 48
%24 = call i32 @BTIC2D_TransDCT_Horiz(i32* %22, i32* %23)
%25 = getelementptr inbounds i32, i32* %0, i64 56
%26 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 56
%27 = call i32 @BTIC2D_TransDCT_Horiz(i32* %25, i32* %26)
%28 = call i32 @BTIC2D_TransDCT_Vert(i32* %5, i32* %1)
%29 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 1
%30 = getelementptr inbounds i32, i32* %1, i64 1
%31 = call i32 @BTIC2D_TransDCT_Vert(i32* %29, i32* %30)
%32 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 2
%33 = getelementptr inbounds i32, i32* %1, i64 2
%34 = call i32 @BTIC2D_TransDCT_Vert(i32* %32, i32* %33)
%35 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 3
%36 = getelementptr inbounds i32, i32* %1, i64 3
%37 = call i32 @BTIC2D_TransDCT_Vert(i32* %35, i32* %36)
%38 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 4
%39 = getelementptr inbounds i32, i32* %1, i64 4
%40 = call i32 @BTIC2D_TransDCT_Vert(i32* %38, i32* %39)
%41 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 5
%42 = getelementptr inbounds i32, i32* %1, i64 5
%43 = call i32 @BTIC2D_TransDCT_Vert(i32* %41, i32* %42)
%44 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 6
%45 = getelementptr inbounds i32, i32* %1, i64 6
%46 = call i32 @BTIC2D_TransDCT_Vert(i32* %44, i32* %45)
%47 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 7
%48 = getelementptr inbounds i32, i32* %1, i64 7
%49 = call i32 @BTIC2D_TransDCT_Vert(i32* %47, i32* %48)
ret void
}