xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ Pidentifier();
scalar_t__ Pname();
PnameRef() {
  int b = -1;
  ;
  b = Pidentifier() || Pname();
  return (b);
}


x86 assembly (clang, -O0):
<PnameRef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1040 <Pidentifier@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1159 <PnameRef+0x39>
mov    $0x0,%al
call   1030 <Pname@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PnameRef>:
push   %rax
xor    %eax,%eax
call   1040 <Pidentifier@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <PnameRef+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <Pname@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PnameRef() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i64 (...) @Pidentifier()
%3 = icmp ne i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call i64 (...) @Pname()
%6 = icmp ne i64 %5, 0
br label %7
7: ; preds = %4, %0
%8 = phi i1 [ true, %0 ], [ %6, %4 ]
%9 = zext i1 %8 to i32
store i32 %9, i32* %1
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @PnameRef() {
%1 = tail call i64 (...) @Pidentifier()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @Pname()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
int do_122() { return 122; }


x86 assembly (clang, -O0):
<do_122>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_122>:
mov    $0x7a,%eax
ret

LLVM IR (-O0):
define i32 @do_122() {
ret i32 122
}

LLVM IR (-O2):
define i32 @do_122() {
ret i32 122
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World!");
  printf("Hello World!");
  printf("Hello Mumma!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [13 x i8] c"Hello Mumma!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [13 x i8] c"Hello Mumma!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, int /*<<< orphan*/);
int /*<<< orphan*/ tag2str(int, int);
int is_ccn_tt(int tag, int num) { return strcmp("?", tag2str(tag, num)) != 0; }


x86 assembly (clang, -O0):
<is_ccn_tt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <tag2str@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ccn_tt>:
push   %rax
call   1040 <tag2str@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"?\00"
define i32 @is_ccn_tt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @tag2str(i32 %5, i32 %6)
%8 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [2 x i8] c"?\00"
define i32 @is_ccn_tt(i32 %0, i32 %1) {
%3 = tail call i32 @tag2str(i32 %0, i32 %1)
%4 = tail call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void SetRow_C() {}


x86 assembly (clang, -O0):
<SetRow_C>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetRow_C>:
ret

LLVM IR (-O0):
define void @SetRow_C() {
ret void
}

LLVM IR (-O2):
define void @SetRow_C() {
ret void
}
/* Variables and functions */
scalar_t__ intcmp(char *, char *);
int binary_eq(char *s1, char *s2) { return intcmp(s1, s2) == 0; }


x86 assembly (clang, -O0):
<binary_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <intcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_eq>:
push   %rax
call   1030 <intcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @binary_eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @intcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @binary_eq(i8* %0, i8* %1) {
%3 = tail call i64 @intcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ RS485_CTS_SaveConfig();
void RS485_CTS_Sleep(void) { RS485_CTS_SaveConfig(); }


x86 assembly (clang, -O0):
<RS485_CTS_Sleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <RS485_CTS_SaveConfig@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RS485_CTS_Sleep>:
xor    %eax,%eax
jmp    1030 <RS485_CTS_SaveConfig@plt>

LLVM IR (-O0):
define void @RS485_CTS_Sleep() {
%1 = call i32 (...) @RS485_CTS_SaveConfig()
ret void
}

LLVM IR (-O2):
define void @RS485_CTS_Sleep() {
%1 = tail call i32 (...) @RS485_CTS_SaveConfig()
ret void
}
/* Variables and functions */
scalar_t__ isalnum(char const);
int strxlen(const char *psz) {
  int len = 0;
  while (isalnum(*psz) || *psz == '_') {
    psz++;
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<strxlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    1151 <strxlen+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1161 <strxlen+0x51>
jmp    117b <strxlen+0x6b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <strxlen+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxlen>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
jmp    1124 <strxlen+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%r14,%rbx,1),%edi
call   1030 <isalnum@plt>
test   %rax,%rax
jne    1120 <strxlen+0x10>
cmpb   $0x5f,(%r14,%rbx,1)
je     1120 <strxlen+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @strxlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = call i64 @isalnum(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ true, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %21
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %14
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @strxlen(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = phi i32 [ 0, %1 ], [ %13, %11 ]
%5 = load i8, i8* %3
%6 = tail call i64 @isalnum(i8 signext %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 95
br i1 %10, label %11, label %14
11: ; preds = %2, %8
%12 = getelementptr inbounds i8, i8* %3, i64 1
%13 = add nuw nsw i32 %4, 1
br label %2
14: ; preds = %8
ret i32 %4
}
int PL_prep_for_tv_out(void) { return 0; }


x86 assembly (clang, -O0):
<PL_prep_for_tv_out>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PL_prep_for_tv_out>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @PL_prep_for_tv_out() {
ret i32 0
}

LLVM IR (-O2):
define i32 @PL_prep_for_tv_out() {
ret i32 0
}
long long test_00(long long a, long long b, long long c, int d) {
  if (d > 5)
    return a + b;
  else
    return a + c;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jle    112e <test_00+0x2e>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    113a <test_00+0x3a>
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
cmp    $0x6,%ecx
cmovl  %rdx,%rsi
lea    (%rsi,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @test_00(i64 %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, 5
br i1 %11, label %12, label %16
12: ; preds = %4
%13 = load i64, i64* %6
%14 = load i64, i64* %7
%15 = add nsw i64 %13, %14
store i64 %15, i64* %5
br label %20
16: ; preds = %4
%17 = load i64, i64* %6
%18 = load i64, i64* %8
%19 = add nsw i64 %17, %18
store i64 %19, i64* %5
br label %20
20: ; preds = %16, %12
%21 = load i64, i64* %5
ret i64 %21
}

LLVM IR (-O2):
define i64 @test_00(i64 %0, i64 %1, i64 %2, i32 %3) {
%5 = icmp sgt i32 %3, 5
%6 = select i1 %5, i64 %1, i64 %2
%7 = add nsw i64 %6, %0
ret i64 %7
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char *);
int _fetch_default_proxy_port(const char *scheme) {
  if (strcasecmp(scheme, "ftp") == 0)
    return (21);
  if (strcasecmp(scheme, "http") == 0)
    return (3128);
  return (0);
}


x86 assembly (clang, -O0):
<_fetch_default_proxy_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1142 <_fetch_default_proxy_port+0x32>
movl   $0x15,-0x4(%rbp)
jmp    116f <_fetch_default_proxy_port+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1168 <_fetch_default_proxy_port+0x58>
movl   $0xc38,-0x4(%rbp)
jmp    116f <_fetch_default_proxy_port+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fetch_default_proxy_port>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1143 <_fetch_default_proxy_port+0x33>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
mov    $0xc38,%eax
cmovne %ecx,%eax
pop    %rbx
ret
mov    $0x15,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ftp\00"
@.str.1 = [5 x i8] c"http\00"
define i32 @_fetch_default_proxy_port(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcasecmp(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 21, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strcasecmp(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 3128, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [4 x i8] c"ftp\00"
@.str.1 = [5 x i8] c"http\00"
define i32 @_fetch_default_proxy_port(i8* nocapture %0) {
%2 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 3128, i32 0
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 21, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void foo(unsigned int x) {
  if (x != -1U)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     112c <foo+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0xffffffff,%edi
jne    1116 <foo+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
void b_system(unsigned long function, void *var1, void *var2) {
  asm volatile("call *0x00100048" : : "c"(function), "a"(var1), "d"(var2));
}


x86 assembly (clang, -O0):
<b_system>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdx
call   *0x100048
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_system>:
mov    %rsi,%rax
mov    %rdi,%rcx
call   *0x100048
ret

LLVM IR (-O0):
define void @b_system(i64 %0, i8* %1, i8* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
define void @b_system(i64 %0, i8* %1, i8* %2) {
tail call void asm sideeffect "call *0x00100048", "{cx},{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i8* %1, i8* %2)
ret void
}
void wakeup_source_pm8xxx_cleanup(void) {}


x86 assembly (clang, -O0):
<wakeup_source_pm8xxx_cleanup>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wakeup_source_pm8xxx_cleanup>:
ret

LLVM IR (-O0):
define void @wakeup_source_pm8xxx_cleanup() {
ret void
}

LLVM IR (-O2):
define void @wakeup_source_pm8xxx_cleanup() {
ret void
}
void av_log2_16bit() {}


x86 assembly (clang, -O0):
<av_log2_16bit>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_log2_16bit>:
ret

LLVM IR (-O0):
define void @av_log2_16bit() {
ret void
}

LLVM IR (-O2):
define void @av_log2_16bit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(void) {
  foo(71);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x47,%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x47,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 71)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 71)
ret i32 0
}
void RTLogWriteCom(void) {}


x86 assembly (clang, -O0):
<RTLogWriteCom>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTLogWriteCom>:
ret

LLVM IR (-O0):
define void @RTLogWriteCom() {
ret void
}

LLVM IR (-O2):
define void @RTLogWriteCom() {
ret void
}
/* Variables and functions */
char toupper(char);
void str_upper(char *str) {
  while (*str) {
    *str = toupper(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<str_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <str_upper+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <str_upper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_upper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <str_upper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <str_upper+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @str_upper(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @toupper(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @str_upper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void border_nwse_double_diagonal_dirt(unsigned char *pic, unsigned char *mirr) {
  *pic = 0x14;
  *mirr = 0x02;
}


x86 assembly (clang, -O0):
<border_nwse_double_diagonal_dirt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x14,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_nwse_double_diagonal_dirt>:
movb   $0x14,(%rdi)
movb   $0x2,(%rsi)
ret

LLVM IR (-O0):
define void @border_nwse_double_diagonal_dirt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
store i8 20, i8* %5
%6 = load i8*, i8** %4
store i8 2, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_nwse_double_diagonal_dirt(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 20, i8* %0
store i8 2, i8* %1
ret void
}
/* Variables and functions */
char *strchr(char *, char);
scalar_t__ strncmp(char const *, char *, int);
const char *xenviron_match(char *entry, const char *name) {
  char *name_end = strchr(entry, '=');
  if (strncmp(name, entry, name_end - entry) == 0)
    return name_end + 1;
  return NULL;
}


x86 assembly (clang, -O0):
<xenviron_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1177 <xenviron_match+0x57>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    117f <xenviron_match+0x5f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xenviron_match>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,%rbx
mov    %ebx,%edx
sub    %r15d,%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strncmp@plt>
add    $0x1,%rbx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xenviron_match(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i8* @strchr(i8* %7, i8 signext 61)
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = load i8*, i8** %6
%12 = load i8*, i8** %4
%13 = ptrtoint i8* %11 to i64
%14 = ptrtoint i8* %12 to i64
%15 = sub i64 %13, %14
%16 = trunc i64 %15 to i32
%17 = call i64 @strncmp(i8* %9, i8* %10, i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load i8*, i8** %6
%21 = getelementptr inbounds i8, i8* %20, i64 1
store i8* %21, i8** %3
br label %23
22: ; preds = %2
store i8* null, i8** %3
br label %23
23: ; preds = %22, %19
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @xenviron_match(i8* %0, i8* %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 61)
%4 = ptrtoint i8* %3 to i64
%5 = ptrtoint i8* %0 to i64
%6 = sub i64 %4, %5
%7 = trunc i64 %6 to i32
%8 = tail call i64 @strncmp(i8* %1, i8* %0, i32 %7)
%9 = icmp eq i64 %8, 0
%10 = getelementptr inbounds i8, i8* %3, i64 1
%11 = select i1 %9, i8* %10, i8* null
ret i8* %11
}
unsigned long long unsignedLongLongTest(unsigned long long value) {
  return value;
}


x86 assembly (clang, -O0):
<unsignedLongLongTest>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedLongLongTest>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedLongLongTest(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret i64 %3
}

LLVM IR (-O2):
define i64 @unsignedLongLongTest(i64 returned %0) {
ret i64 %0
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint16_t m_max_uint16(uint16_t left, uint16_t right) {
  return (left > right) ? left : right;
}


x86 assembly (clang, -O0):
<m_max_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <m_max_uint16+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <m_max_uint16+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_max_uint16>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @m_max_uint16(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @m_max_uint16(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int S(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ w();
int U() {
  w();
  return S(0, 0);
}


x86 assembly (clang, -O0):
<U>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <w@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <S@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U>:
push   %rax
xor    %eax,%eax
call   1040 <w@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <S@plt>

LLVM IR (-O0):
define i32 @U() {
%1 = call i32 (...) @w()
%2 = call i32 @S(i32 0, i32 0)
ret i32 %2
}

LLVM IR (-O2):
define i32 @U() {
%1 = tail call i32 (...) @w()
%2 = tail call i32 @S(i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void oled_fini(int fd) { close(fd); }


x86 assembly (clang, -O0):
<oled_fini>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oled_fini>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @oled_fini(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
ret void
}

LLVM IR (-O2):
define void @oled_fini(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(int /*<<< orphan*/ *, char *);
void dummy_function2(void) { strcpy(NULL, "DIE"); }


x86 assembly (clang, -O0):
<dummy_function2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <strcpy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy_function2>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"DIE\00"
define void @dummy_function2() {
%1 = call i32 @strcpy(i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"DIE\00"
define void @dummy_function2() {
%1 = tail call i32 @strcpy(i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_37int16_reg(short val) {
  return ((val) & (0x37 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_37int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x37,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_37int16_reg>:
test   $0x37,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_37int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 55
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_37int16_reg(i16 signext %0) {
%2 = and i16 %0, 55
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ get_timers(double *);
void Cget_timers(double *timers) { get_timers(timers); }


x86 assembly (clang, -O0):
<Cget_timers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_timers@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cget_timers>:
jmp    1030 <get_timers@plt>

LLVM IR (-O0):
define void @Cget_timers(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @get_timers(double* %3)
ret void
}

LLVM IR (-O2):
define void @Cget_timers(double* %0) {
%2 = tail call i32 @get_timers(double* %0)
ret void
}
/* Variables and functions */
int W(int, int);
int /*<<< orphan*/ init();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  init();
  printf("%d\n", W(9, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x9,%edi
mov    $0x3,%esi
call   1050 <W@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init@plt>
mov    $0x9,%edi
mov    $0x3,%esi
call   1050 <W@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init()
%7 = call i32 @W(i32 9, i32 3)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 @W(i32 9, i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  while (1) {
    int *i = (int *)malloc(sizeof(int) * 100000);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x61a80,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x61a80,%edi
call   1030 <malloc@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call i64 @malloc(i32 400000)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i32 1
store i32* %7, i32** %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i64 @malloc(i32 400000)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
int read_byte(int);
scalar_t__ write_byte(int, int);
void send_command(int file, int command) {
  if (write_byte(file, command) < 0) {
    panic("write_byte failed.");
  }
  if (read_byte(file) != 0xfa) {
    panic("ack missing.");
  }
}


x86 assembly (clang, -O0):
<send_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <write_byte@plt>
cmp    $0x0,%rax
jge    115f <send_command+0x2f>
lea    0xea6(%rip),%rdi
call   1040 <panic@plt>
mov    -0x4(%rbp),%edi
call   1030 <read_byte@plt>
cmp    $0xfa,%eax
je     117e <send_command+0x4e>
lea    0xe9a(%rip),%rdi
call   1040 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_command>:
push   %rbx
mov    %edi,%ebx
call   1050 <write_byte@plt>
test   %rax,%rax
jns    1149 <send_command+0x19>
lea    0xebc(%rip),%rdi
call   1040 <panic@plt>
mov    %ebx,%edi
call   1030 <read_byte@plt>
cmp    $0xfa,%eax
jne    1159 <send_command+0x29>
pop    %rbx
ret
lea    0xeb3(%rip),%rdi
pop    %rbx
jmp    1040 <panic@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"write_byte failed.\00"
@.str.1 = [13 x i8] c"ack missing.\00"
define void @send_command(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i64 @write_byte(i32 %5, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @panic(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = load i32, i32* %3
%13 = call i32 @read_byte(i32 %12)
%14 = icmp ne i32 %13, 250
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @panic(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %11
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"write_byte failed.\00"
@.str.1 = [13 x i8] c"ack missing.\00"
define void @send_command(i32 %0, i32 %1) {
%3 = tail call i64 @write_byte(i32 %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @panic(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @read_byte(i32 %0)
%9 = icmp eq i32 %8, 250
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 @panic(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
ret void
}
float max(float num1, float num2) { return num1 > num2 ? num1 : num2; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <max+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <max+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @max(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISREG(int /*<<< orphan*/);
short stat(char *, struct stat *);
short UnixIsFolder(char *path) {
  struct stat filestat;
  short err;
  err = stat(path, &filestat);
  if (err == -1)
    return err;
  if (S_ISREG(filestat.st_mode) != 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<UnixIsFolder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    %ax,-0x1a(%rbp)
movswl -0x1a(%rbp),%eax
cmp    $0xffffffff,%eax
jne    1157 <UnixIsFolder+0x37>
mov    -0x1a(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1179 <UnixIsFolder+0x59>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x1,%eax
je     1173 <UnixIsFolder+0x53>
movw   $0x1,-0x2(%rbp)
jmp    1179 <UnixIsFolder+0x59>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnixIsFolder>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffff,%ax
je     1143 <UnixIsFolder+0x23>
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
setne  %al
pop    %rcx
ret
mov    $0xffff,%ax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define signext i16 @UnixIsFolder(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca i16
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call signext i16 @stat(i8* %6, %struct.stat* %4)
store i16 %7, i16* %5
%8 = load i16, i16* %5
%9 = sext i16 %8 to i32
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i16, i16* %5
store i16 %12, i16* %2
br label %20
13: ; preds = %1
%14 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%15 = load i32, i32* %14
%16 = call i32 @S_ISREG(i32 %15)
%17 = icmp ne i32 %16, 1
br i1 %17, label %18, label %19
18: ; preds = %13
store i16 1, i16* %2
br label %20
19: ; preds = %13
store i16 0, i16* %2
br label %20
20: ; preds = %19, %18, %11
%21 = load i16, i16* %2
ret i16 %21
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define signext i16 @UnixIsFolder(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call signext i16 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i16 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISREG(i32 %8)
%10 = icmp ne i32 %9, 1
%11 = zext i1 %10 to i16
br label %12
12: ; preds = %6, %1
%13 = phi i16 [ -1, %1 ], [ %11, %6 ]
ret i16 %13
}
struct block_list *BL_UCAST_(struct block_list *bl) {
  return bl;
}


x86 assembly (clang, -O0):
<BL_UCAST_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BL_UCAST_>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.block_list = type opaque
define %struct.block_list* @BL_UCAST_(%struct.block_list* %0) {
%2 = alloca %struct.block_list*
store %struct.block_list* %0, %struct.block_list** %2
%3 = load %struct.block_list*, %struct.block_list** %2
ret %struct.block_list* %3
}

LLVM IR (-O2):
%struct.block_list = type opaque
define %struct.block_list* @BL_UCAST_(%struct.block_list* readnone returned %0) {
ret %struct.block_list* %0
}
int __ltuchar(unsigned char a, unsigned char b) { return a < b; }


x86 assembly (clang, -O0):
<__ltuchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ltuchar>:
xor    %eax,%eax
cmp    %sil,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @__ltuchar(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp slt i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @__ltuchar(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp ult i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ pfdc4_save_chunk(int /*<<< orphan*/ *, int, int, unsigned char *);
int /*<<< orphan*/ psi_set_uint16_be(unsigned char *, int, int);
int pfdc4_save_header(FILE *fp) {
  unsigned char buf[4];
  psi_set_uint16_be(buf, 0, 4);
  psi_set_uint16_be(buf, 2, 0);
  if (pfdc4_save_chunk(fp, 0x50464443, 4, buf)) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<pfdc4_save_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <psi_set_uint16_be@plt>
lea    -0x14(%rbp),%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <psi_set_uint16_be@plt>
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rcx
mov    $0x50464443,%esi
mov    $0x4,%edx
call   1040 <pfdc4_save_chunk@plt>
cmp    $0x0,%rax
je     1179 <pfdc4_save_header+0x59>
movl   $0x1,-0x4(%rbp)
jmp    1180 <pfdc4_save_header+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pfdc4_save_header>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <psi_set_uint16_be@plt>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <psi_set_uint16_be@plt>
mov    %rbx,%rdi
mov    $0x50464443,%esi
mov    $0x4,%edx
mov    %r14,%rcx
call   1040 <pfdc4_save_chunk@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @pfdc4_save_header(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [4 x i8]
store i32* %0, i32** %3
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%6 = call i32 @psi_set_uint16_be(i8* %5, i32 0, i32 4)
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%8 = call i32 @psi_set_uint16_be(i8* %7, i32 2, i32 0)
%9 = load i32*, i32** %3
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%11 = call i64 @pfdc4_save_chunk(i32* %9, i32 1346782275, i32 4, i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 1, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @pfdc4_save_header(i32* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @psi_set_uint16_be(i8* %3, i32 0, i32 4)
%5 = call i32 @psi_set_uint16_be(i8* %3, i32 2, i32 0)
%6 = call i64 @pfdc4_save_chunk(i32* %0, i32 1346782275, i32 4, i8* %3)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
void HFillArc(int x0, int y0, int x1, int y1, int stAngle, int arcAngle) {}


x86 assembly (clang, -O0):
<HFillArc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HFillArc>:
ret

LLVM IR (-O0):
define void @HFillArc(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @HFillArc(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
/* Type definitions */
struct rbtree {
  int dummy;
};
struct htable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int read_records_from_file(char *, struct htable *, struct rbtree *);
int refresh_records(struct htable *ds, struct rbtree *rbt) {
  printf("read from records.z\n");
  return read_records_from_file("records.z", ds, rbt);
}


x86 assembly (clang, -O0):
<refresh_records>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rdi
call   1030 <read_records_from_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<refresh_records>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1040 <puts@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <read_records_from_file@plt>

LLVM IR (-O0):
%struct.htable = type { i32 }
%struct.rbtree = type { i32 }
@.str = [21 x i8] c"read from records.z\0A\00"
@.str.1 = [10 x i8] c"records.z\00"
define i32 @refresh_records(%struct.htable* %0, %struct.rbtree* %1) {
%3 = alloca %struct.htable*
%4 = alloca %struct.rbtree*
store %struct.htable* %0, %struct.htable** %3
store %struct.rbtree* %1, %struct.rbtree** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = load %struct.htable*, %struct.htable** %3
%7 = load %struct.rbtree*, %struct.rbtree** %4
%8 = call i32 @read_records_from_file(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %struct.htable* %6, %struct.rbtree* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.htable = type { i32 }
%struct.rbtree = type { i32 }
@.str.1 = [10 x i8] c"records.z\00"
@str = [20 x i8] c"read from records.z\00"
define i32 @refresh_records(%struct.htable* %0, %struct.rbtree* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @read_records_from_file(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %struct.htable* %0, %struct.rbtree* %1)
ret i32 %4
}
int max_sum_for_submatrix(unsigned int size, int **matrix) {
  int ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<max_sum_for_submatrix>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_sum_for_submatrix>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @max_sum_for_submatrix(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32
store i32 %0, i32* %3
store i32** %1, i32*** %4
store i32 0, i32* %5
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @max_sum_for_submatrix(i32 %0, i32** nocapture readnone %1) {
ret i32 0
}
void test_vm_gc() {}


x86 assembly (clang, -O0):
<test_vm_gc>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vm_gc>:
ret

LLVM IR (-O0):
define void @test_vm_gc() {
ret void
}

LLVM IR (-O2):
define void @test_vm_gc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
closeServer(int sock) { close(sock); }


x86 assembly (clang, -O0):
<closeServer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeServer>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @closeServer(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @close(i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @closeServer(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 undef
}
/* Variables and functions */
bool prime(int num) {
  int i;
  for (i = 2; i * i < (num + 1); i++) {
    if (num % i == 0)
      return false;
    else
      continue;
  }
  return true;
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1152 <prime+0x52>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113f <prime+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1159 <prime+0x59>
jmp    1144 <prime+0x44>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <prime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime>:
mov    $0x1,%ecx
cmp    $0x4,%edi
jl     1125 <prime+0x25>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1128 <prime+0x28>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1110 <prime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %22
12: ; preds = %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = srem i32 %13, %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12
store i32 0, i32* %2
br label %23
18: ; preds = %12
br label %19
19: ; preds = %18
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %5
22: ; preds = %5
store i32 1, i32* %2
br label %23
23: ; preds = %22, %17
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @prime(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %11, label %6
3: ; preds = %6
%4 = mul nsw i32 %10, %10
%5 = icmp sgt i32 %4, %0
br i1 %5, label %11, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %10, %3 ], [ 2, %1 ]
%8 = srem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw nsw i32 %7, 1
br i1 %9, label %11, label %3
11: ; preds = %6, %3, %1
%12 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %12
}