#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*/ idctcol(int *);
int /*<<< orphan*/ idctrow(int *);
void Fast_IDCT(int *block) {
  short i;
  for (i = 0; i < 8; i++)
    idctrow(block + 8 * i);
  for (i = 0; i < 8; i++)
    idctcol(block + i);
}


x86 assembly (clang, -O0):
<Fast_IDCT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cmp    $0x8,%eax
jge    1169 <Fast_IDCT+0x49>
mov    -0x8(%rbp),%rdi
movswl -0xa(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <idctrow@plt>
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    1132 <Fast_IDCT+0x12>
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cmp    $0x8,%eax
jge    11a3 <Fast_IDCT+0x83>
mov    -0x8(%rbp),%rdi
movswl -0xa(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <idctcol@plt>
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    116f <Fast_IDCT+0x4f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fast_IDCT>:
push   %rbx
mov    %rdi,%rbx
call   1030 <idctrow@plt>
lea    0x20(%rbx),%rdi
call   1030 <idctrow@plt>
lea    0x40(%rbx),%rdi
call   1030 <idctrow@plt>
lea    0x60(%rbx),%rdi
call   1030 <idctrow@plt>
lea    0x80(%rbx),%rdi
call   1030 <idctrow@plt>
lea    0xa0(%rbx),%rdi
call   1030 <idctrow@plt>
lea    0xc0(%rbx),%rdi
call   1030 <idctrow@plt>
lea    0xe0(%rbx),%rdi
call   1030 <idctrow@plt>
mov    %rbx,%rdi
call   1040 <idctcol@plt>
lea    0x4(%rbx),%rdi
call   1040 <idctcol@plt>
lea    0x8(%rbx),%rdi
call   1040 <idctcol@plt>
lea    0xc(%rbx),%rdi
call   1040 <idctcol@plt>
lea    0x10(%rbx),%rdi
call   1040 <idctcol@plt>
lea    0x14(%rbx),%rdi
call   1040 <idctcol@plt>
lea    0x18(%rbx),%rdi
call   1040 <idctcol@plt>
add    $0x1c,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <idctcol@plt>

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

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