#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 find(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int arr[5][5] = {{4, 5, 6, 7, 8},
                   {4, 6, 7, 8, 9},
                   {4, 5, 7, 8, 9},
                   {4, 5, 6, 8, 9},
                   {4, 5, 6, 7, 9}};
  int m = 99999;
  m = find(arr[0], 5);
  printf("sup: missing = %d\n", m);
  m = find(arr[1], 5);
  printf("sup: missing = %d\n", m);
  m = find(arr[2], 5);
  printf("sup: missing = %d\n", m);
  m = find(arr[3], 5);
  printf("sup: missing = %d\n", m);
  m = find(arr[4], 5);
  printf("sup: missing = %d\n", m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
movl   $0x1869f,-0x74(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x5,%esi
call   1050 <find@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
add    $0x14,%rdi
mov    $0x5,%esi
call   1050 <find@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
add    $0x28,%rdi
mov    $0x5,%esi
call   1050 <find@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
add    $0x3c,%rdi
mov    $0x5,%esi
call   1050 <find@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
add    $0x50,%rdi
mov    $0x5,%esi
call   1050 <find@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    0xf33(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xf18(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xefc(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8c(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x50(%rsp),%r14
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <find@plt>
lea    0xed3(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0x14(%rsp),%rdi
mov    $0x5,%esi
call   1040 <find@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0x28(%rsp),%rdi
mov    $0x5,%esi
call   1040 <find@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0x3c(%rsp),%rdi
mov    $0x5,%esi
call   1040 <find@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
call   1040 <find@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.arr = [5 x [5 x i32]] [[5 x i32] [i32 4, i32 5, i32 6, i32 7, i32 8], [5 x i32] [i32 4, i32 6, i32 7, i32 8, i32 9], [5 x i32] [i32 4, i32 5, i32 7, i32 8, i32 9], [5 x i32] [i32 4, i32 5, i32 6, i32 8, i32 9], [5 x i32] [i32 4, i32 5, i32 6, i32 7, i32 9]]
@.str = [19 x i8] c"sup: missing = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [5 x i32]]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x [5 x i32]]* %2 to i8*
store i32 99999, i32* %3
%5 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%7 = call i32 @find(i32* %6, i32 5)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 1
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %10, i64 0, i64 0
%12 = call i32 @find(i32* %11, i32 5)
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 2
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %15, i64 0, i64 0
%17 = call i32 @find(i32* %16, i32 5)
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 3
%21 = getelementptr inbounds [5 x i32], [5 x i32]* %20, i64 0, i64 0
%22 = call i32 @find(i32* %21, i32 5)
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 4
%26 = getelementptr inbounds [5 x i32], [5 x i32]* %25, i64 0, i64 0
%27 = call i32 @find(i32* %26, i32 5)
store i32 %27, i32* %3
%28 = load i32, i32* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %28)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [5 x [5 x i32]] [[5 x i32] [i32 4, i32 5, i32 6, i32 7, i32 8], [5 x i32] [i32 4, i32 6, i32 7, i32 8, i32 9], [5 x i32] [i32 4, i32 5, i32 7, i32 8, i32 9], [5 x i32] [i32 4, i32 5, i32 6, i32 8, i32 9], [5 x i32] [i32 4, i32 5, i32 6, i32 7, i32 9]]
@.str = [19 x i8] c"sup: missing = %d\0A\00"
define i32 @main() {
%1 = alloca [5 x [5 x i32]]
%2 = bitcast [5 x [5 x i32]]* %1 to i8*
%3 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0, i64 0
%4 = call i32 @find(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 1, i64 0
%7 = call i32 @find(i32* %6, i32 5)
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 2, i64 0
%10 = call i32 @find(i32* %9, i32 5)
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 3, i64 0
%13 = call i32 @find(i32* %12, i32 5)
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 4, i64 0
%16 = call i32 @find(i32* %15, i32 5)
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}