#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void output_write(int quant_coefficient_matrix[8][8], FILE *output_fileHandle) {
  int i, j;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      fprintf(output_fileHandle, "%5d", quant_coefficient_matrix[i][j]);
    }
    fprintf(output_fileHandle, "\n");
  }
}


x86 assembly (clang, -O0):
<output_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1198 <output_write+0x88>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1178 <output_write+0x68>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe9d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1138 <output_write+0x28>
mov    -0x10(%rbp),%rdi
lea    0xe81(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <output_write+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_write>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %rdi,%r14
lea    0xecb(%rip),%r15
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x4(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x8(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0xc(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x10(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x14(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x18(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x1c(%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1030 <fputc@plt>
add    $0x20,%rbx
cmp    $0x100,%rbx
jne    1140 <output_write+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%5d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @output_write([8 x i32]* %0, i32* %1) {
%3 = alloca [8 x i32]*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store [8 x i32]* %0, [8 x i32]** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %7
7: ; preds = %31, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 8
br i1 %9, label %10, label %34
10: ; preds = %7
store i32 0, i32* %6
br label %11
11: ; preds = %25, %10
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %28
14: ; preds = %11
%15 = load i32*, i32** %4
%16 = load [8 x i32]*, [8 x i32]** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [8 x i32], [8 x i32]* %16, i64 %18
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [8 x i32], [8 x i32]* %19, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
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** %4
%30 = call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %28
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %7
34: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%5d\00"
define void @output_write([8 x i32]* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %30, %3 ]
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 0
%6 = load i32, i32* %5
%7 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 1
%9 = load i32, i32* %8
%10 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 2
%12 = load i32, i32* %11
%13 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 3
%15 = load i32, i32* %14
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 4
%18 = load i32, i32* %17
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 5
%21 = load i32, i32* %20
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 6
%24 = load i32, i32* %23
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %4, i64 7
%27 = load i32, i32* %26
%28 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = tail call i32 @fputc(i32 10, i32* %1)
%30 = add nuw nsw i64 %4, 1
%31 = icmp eq i64 %30, 8
br i1 %31, label %32, label %3
32: ; preds = %3
ret void
}