#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*/ print_field(int);
int /*<<< orphan*/ printf(char *);
void print_window(int *window) {
  print_field(window[0]);
  print_field(window[1]);
  print_field(window[2]);
  printf("\n");
  print_field(window[3]);
  print_field(window[4]);
  print_field(window[5]);
  printf("\n");
  print_field(window[6]);
  print_field(window[7]);
  print_field(window[8]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_window>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edi
call   1040 <print_field@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edi
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%edi
call   1040 <print_field@plt>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%edi
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%edi
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%edi
call   1040 <print_field@plt>
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_window>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <print_field@plt>
mov    0x4(%rbx),%edi
call   1040 <print_field@plt>
mov    0x8(%rbx),%edi
call   1040 <print_field@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rbx),%edi
call   1040 <print_field@plt>
mov    0x10(%rbx),%edi
call   1040 <print_field@plt>
mov    0x14(%rbx),%edi
call   1040 <print_field@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rbx),%edi
call   1040 <print_field@plt>
mov    0x1c(%rbx),%edi
call   1040 <print_field@plt>
mov    0x20(%rbx),%edi
call   1040 <print_field@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @print_window(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = call i32 @print_field(i32 %5)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = call i32 @print_field(i32 %9)
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 2
%13 = load i32, i32* %12
%14 = call i32 @print_field(i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 3
%18 = load i32, i32* %17
%19 = call i32 @print_field(i32 %18)
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 4
%22 = load i32, i32* %21
%23 = call i32 @print_field(i32 %22)
%24 = load i32*, i32** %2
%25 = getelementptr inbounds i32, i32* %24, i64 5
%26 = load i32, i32* %25
%27 = call i32 @print_field(i32 %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = load i32*, i32** %2
%30 = getelementptr inbounds i32, i32* %29, i64 6
%31 = load i32, i32* %30
%32 = call i32 @print_field(i32 %31)
%33 = load i32*, i32** %2
%34 = getelementptr inbounds i32, i32* %33, i64 7
%35 = load i32, i32* %34
%36 = call i32 @print_field(i32 %35)
%37 = load i32*, i32** %2
%38 = getelementptr inbounds i32, i32* %37, i64 8
%39 = load i32, i32* %38
%40 = call i32 @print_field(i32 %39)
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

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