#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*/ fast_idct_8(short *, int);
j_rev_dct(short *data) {
  int i, j, k, id;
  for (i = 0; i < 8; i++)
    fast_idct_8(data + i * 8, 1);
  for (i = 0; i < 8; i++)
    fast_idct_8(data + i, 8);
}


x86 assembly (clang, -O0):
<j_rev_dct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1158 <j_rev_dct+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x1,%rax
add    %rax,%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <j_rev_dct+0x13>
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1190 <j_rev_dct+0x80>
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115f <j_rev_dct+0x4f>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_rev_dct>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x10(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x20(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x30(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x40(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x50(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x60(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
lea    0x70(%rbx),%rdi
mov    $0x1,%esi
call   1030 <fast_idct_8@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
lea    0x2(%rbx),%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
lea    0x4(%rbx),%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
lea    0x6(%rbx),%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
lea    0x8(%rbx),%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
lea    0xa(%rbx),%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
lea    0xc(%rbx),%rdi
mov    $0x8,%esi
call   1030 <fast_idct_8@plt>
add    $0xe,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
pop    %rbx
jmp    1030 <fast_idct_8@plt>

LLVM IR (-O0):
define i32 @j_rev_dct(i16* %0) {
%2 = alloca i32
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i16* %0, i16** %3
store i32 0, i32* %4
br label %8
8: ; preds = %18, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 8
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i16*, i16** %3
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 8
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i16, i16* %12, i64 %15
%17 = call i32 @fast_idct_8(i16* %16, i32 1)
br label %18
18: ; preds = %11
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %8
21: ; preds = %8
store i32 0, i32* %4
br label %22
22: ; preds = %31, %21
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 8
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i16*, i16** %3
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i16, i16* %26, i64 %28
%30 = call i32 @fast_idct_8(i16* %29, i32 8)
br label %31
31: ; preds = %25
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
br label %22
34: ; preds = %22
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @j_rev_dct(i16* %0) {
%2 = tail call i32 @fast_idct_8(i16* %0, i32 1)
%3 = getelementptr inbounds i16, i16* %0, i64 8
%4 = tail call i32 @fast_idct_8(i16* %3, i32 1)
%5 = getelementptr inbounds i16, i16* %0, i64 16
%6 = tail call i32 @fast_idct_8(i16* %5, i32 1)
%7 = getelementptr inbounds i16, i16* %0, i64 24
%8 = tail call i32 @fast_idct_8(i16* %7, i32 1)
%9 = getelementptr inbounds i16, i16* %0, i64 32
%10 = tail call i32 @fast_idct_8(i16* %9, i32 1)
%11 = getelementptr inbounds i16, i16* %0, i64 40
%12 = tail call i32 @fast_idct_8(i16* %11, i32 1)
%13 = getelementptr inbounds i16, i16* %0, i64 48
%14 = tail call i32 @fast_idct_8(i16* %13, i32 1)
%15 = getelementptr inbounds i16, i16* %0, i64 56
%16 = tail call i32 @fast_idct_8(i16* %15, i32 1)
%17 = tail call i32 @fast_idct_8(i16* %0, i32 8)
%18 = getelementptr inbounds i16, i16* %0, i64 1
%19 = tail call i32 @fast_idct_8(i16* %18, i32 8)
%20 = getelementptr inbounds i16, i16* %0, i64 2
%21 = tail call i32 @fast_idct_8(i16* %20, i32 8)
%22 = getelementptr inbounds i16, i16* %0, i64 3
%23 = tail call i32 @fast_idct_8(i16* %22, i32 8)
%24 = getelementptr inbounds i16, i16* %0, i64 4
%25 = tail call i32 @fast_idct_8(i16* %24, i32 8)
%26 = getelementptr inbounds i16, i16* %0, i64 5
%27 = tail call i32 @fast_idct_8(i16* %26, i32 8)
%28 = getelementptr inbounds i16, i16* %0, i64 6
%29 = tail call i32 @fast_idct_8(i16* %28, i32 8)
%30 = getelementptr inbounds i16, i16* %0, i64 7
%31 = tail call i32 @fast_idct_8(i16* %30, i32 8)
ret i32 undef
}