#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*/ arry;

/* Variables and functions */
int findodd(int *, size_t);
int /*<<< orphan*/ output(int *, size_t);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int ret = 0;
  int arry[] = {3, 2, 3, 5, 1, 3, 1, 2, 5};
  size_t len = sizeof(arry) / sizeof(arry[0]);
  output(arry, len);
  ret = findodd(arry, len);
  printf("result: %d\n", ret);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe98(%rip),%rsi
mov    $0x24,%edx
call   1060 <memcpy@plt>
movq   $0x9,-0x48(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1030 <output@plt>
lea    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1050 <findodd@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xee5(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeae(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    $0x9,%esi
mov    %rbx,%rdi
call   1030 <output@plt>
mov    $0x9,%esi
mov    %rbx,%rdi
call   1050 <findodd@plt>
mov    %eax,%ebx
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.arry = [9 x i32] [i32 3, i32 2, i32 3, i32 5, i32 1, i32 3, i32 1, i32 2, i32 5]
@.str = [12 x i8] c"result: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i32]
%4 = bitcast [9 x i32]* %3 to i8*
%5 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
%6 = call i32 @output(i32* %5, i64 9)
%7 = call i32 @findodd(i32* %5, i64 9)
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 %7
}