#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void displayWorld(int world[5][5]) {
  int x, y;
  for (y = 5 - 1; y >= 0; y--) {
    for (x = 0; x < 5; x++) {
      printf("%d", world[x][y]);
      printf("\t");
    }
    printf("\n");
  }
  fflush(stdout);
}


x86 assembly (clang, -O0):
<displayWorld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x4,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     11aa <displayWorld+0x8a>
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    118e <displayWorld+0x6e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <displayWorld+0x24>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <displayWorld+0x13>
mov    0x2e2f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayWorld>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x10(%rdi),%esi
lea    0xebf(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x24(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x38(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x4c(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x60(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x20(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x34(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x48(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x5c(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x1c(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x30(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x44(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x58(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x18(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x2c(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x40(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x54(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x14(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x28(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x3c(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    0x50(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fflush@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@stdout = global i32 0
define void @displayWorld([5 x i32]* nocapture %0) {
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 0, i64 4
%3 = load i32, i32* %2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @putchar(i32 9)
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 1, i64 4
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @putchar(i32 9)
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 2, i64 4
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 @putchar(i32 9)
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 3, i64 4
%15 = load i32, i32* %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = tail call i32 @putchar(i32 9)
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 4, i64 4
%19 = load i32, i32* %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = tail call i32 @putchar(i32 9)
%22 = tail call i32 @putchar(i32 10)
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 0, i64 3
%24 = load i32, i32* %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = tail call i32 @putchar(i32 9)
%27 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 1, i64 3
%28 = load i32, i32* %27
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = tail call i32 @putchar(i32 9)
%31 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 2, i64 3
%32 = load i32, i32* %31
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = tail call i32 @putchar(i32 9)
%35 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 3, i64 3
%36 = load i32, i32* %35
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = tail call i32 @putchar(i32 9)
%39 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 4, i64 3
%40 = load i32, i32* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = tail call i32 @putchar(i32 9)
%43 = tail call i32 @putchar(i32 10)
%44 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 0, i64 2
%45 = load i32, i32* %44
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = tail call i32 @putchar(i32 9)
%48 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 1, i64 2
%49 = load i32, i32* %48
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = tail call i32 @putchar(i32 9)
%52 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 2, i64 2
%53 = load i32, i32* %52
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %53)
%55 = tail call i32 @putchar(i32 9)
%56 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 3, i64 2
%57 = load i32, i32* %56
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %57)
%59 = tail call i32 @putchar(i32 9)
%60 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 4, i64 2
%61 = load i32, i32* %60
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = tail call i32 @putchar(i32 9)
%64 = tail call i32 @putchar(i32 10)
%65 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 0, i64 1
%66 = load i32, i32* %65
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %66)
%68 = tail call i32 @putchar(i32 9)
%69 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 1, i64 1
%70 = load i32, i32* %69
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = tail call i32 @putchar(i32 9)
%73 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 2, i64 1
%74 = load i32, i32* %73
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %74)
%76 = tail call i32 @putchar(i32 9)
%77 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 3, i64 1
%78 = load i32, i32* %77
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %78)
%80 = tail call i32 @putchar(i32 9)
%81 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 4, i64 1
%82 = load i32, i32* %81
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %82)
%84 = tail call i32 @putchar(i32 9)
%85 = tail call i32 @putchar(i32 10)
%86 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 0, i64 0
%87 = load i32, i32* %86
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %87)
%89 = tail call i32 @putchar(i32 9)
%90 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 1, i64 0
%91 = load i32, i32* %90
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %91)
%93 = tail call i32 @putchar(i32 9)
%94 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 2, i64 0
%95 = load i32, i32* %94
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %95)
%97 = tail call i32 @putchar(i32 9)
%98 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 3, i64 0
%99 = load i32, i32* %98
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %99)
%101 = tail call i32 @putchar(i32 9)
%102 = getelementptr inbounds [5 x i32], [5 x i32]* %0, i64 4, i64 0
%103 = load i32, i32* %102
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %103)
%105 = tail call i32 @putchar(i32 9)
%106 = tail call i32 @putchar(i32 10)
%107 = load i32, i32* @stdout
%108 = tail call i32 @fflush(i32 %107)
ret void
}