#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 */
unsigned int FtoC(unsigned int);
int maxarray(int *, int const);
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  unsigned int fair = 300;
  unsigned int cel = FtoC(fair);
  printf("%d F == %d C\n", fair, cel);
  int const size = 5;
  int arr[] = {1, 55, 340, 22, -6};
  int max = maxarray(arr, size);
  printf("max of array: %d\n", max);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x12c,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <FtoC@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x5,-0xc(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeaf(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1050 <maxarray@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    $0x12c,%edi
call   1030 <FtoC@plt>
lea    0xebb(%rip),%rdi
mov    $0x12c,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xed7(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1050 <maxarray@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%d F == %d C\0A\00"
@__const.main.arr = [5 x i32] [i32 1, i32 55, i32 340, i32 22, i32 -6]
@.str.1 = [18 x i8] c"max of array: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [5 x i32]
%5 = alloca i32
store i32 300, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @FtoC(i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
store i32 5, i32* %3
%11 = bitcast [5 x i32]* %4 to i8*
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%13 = call i32 @maxarray(i32* %12, i32 5)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d F == %d C\0A\00"
@__const.main.arr = [5 x i32] [i32 1, i32 55, i32 340, i32 22, i32 -6]
@.str.1 = [18 x i8] c"max of array: %d\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = tail call i32 @FtoC(i32 300)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 300, i32 %2)
%4 = bitcast [5 x i32]* %1 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = call i32 @maxarray(i32* %5, i32 5)
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}