void idct_enc(block) short *block;
{
  int i;
  for (i = 0; i < 8; i++)
    idctrow_enc(block + 8 * i);
  for (i = 0; i < 8; i++)
    idctcol_enc(block + i);
}


x86 assembly (clang, -O0):
<idct_enc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1165 <idct_enc+0x45>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x1,%rax
add    %rax,%rdi
mov    $0x0,%al
call   1030 <idctrow_enc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <idct_enc+0x13>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    119a <idct_enc+0x7a>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rdi
mov    $0x0,%al
call   1040 <idctcol_enc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <idct_enc+0x4c>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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