xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
void test13_head() {
  do {
    printf("test13");
    puts("");
  } while (0);
}


x86 assembly (clang, -O0):
<test13_head>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test13_head+0x9>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test13_head>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"test13\00"
@.str.1 = [1 x i8] zeroinitializer
define void @test13_head() {
br label %1
1: ; preds = %0
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"test13\00"
define void @test13_head() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int atoi(char const *);
char *getenv(char *);
int get_env_error_rate() {
  const char *error_rate = getenv("ERROR_RATE");
  int rate = 10;
  if (error_rate != NULL) {
    rate = atoi(error_rate);
  }
  if (rate > 100) {
    rate = 100;
  }
  if (rate < 0) {
    rate = 0;
  }
  return rate;
}


x86 assembly (clang, -O0):
<get_env_error_rate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1156 <get_env_error_rate+0x36>
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jle    1167 <get_env_error_rate+0x47>
movl   $0x64,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1178 <get_env_error_rate+0x58>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_env_error_rate>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     114e <get_env_error_rate+0x2e>
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    $0x64,%eax
cmp    $0x63,%ecx
jg     114c <get_env_error_rate+0x2c>
mov    %ecx,%eax
test   %ecx,%ecx
jle    1155 <get_env_error_rate+0x35>
pop    %rcx
ret
mov    $0xa,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR_RATE\00"
define i32 @get_env_error_rate() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %1
store i32 10, i32* %2
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8*, i8** %1
%8 = call i32 @atoi(i8* %7)
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %0
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 100
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 100, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %2
br label %17
17: ; preds = %16, %13
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR_RATE\00"
define i32 @get_env_error_rate() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @atoi(i8* %1)
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = icmp sgt i32 %4, 0
br i1 %7, label %8, label %10
8: ; preds = %3, %0, %6
%9 = phi i32 [ %4, %6 ], [ 10, %0 ], [ 100, %3 ]
br label %10
10: ; preds = %6, %8
%11 = phi i32 [ %9, %8 ], [ 0, %6 ]
ret i32 %11
}
/* Variables and functions */
int Serve1();
int Serve2(int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *);
void test() {
  assert(1 == Serve1());
  assert(10 == Serve2(10));
  printf("TEST UTILITY SUCCESS!\n");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <Serve1@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0xa,%edi
call   1040 <Serve2@plt>
mov    %eax,%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1060 <Serve1@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0xa,%edi
call   1040 <Serve2@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xe8b(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"TEST UTILITY SUCCESS!\0A\00"
define void @test() {
%1 = call i32 (...) @Serve1()
%2 = icmp eq i32 1, %1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @Serve2(i32 10)
%6 = icmp eq i32 10, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"TEST UTILITY SUCCESS!\00"
define void @test() {
%1 = tail call i32 (...) @Serve1()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @Serve2(i32 10)
%6 = icmp eq i32 %5, 10
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printhelp() {
  char *help =
      "This is a text adventure.\nCommands:\n\ntalk - Talk to someone\nlook - "
      "Look at someone/something\n\nThat's it as this is only a demo.";
  printf("%s", help);
}


x86 assembly (clang, -O0):
<printhelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xf52(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printhelp>:
lea    0xf69(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [128 x i8] c"This is a text adventure.\0ACommands:\0A\0Atalk - Talk to someone\0Alook - Look at someone/something\0A\0AThat's it as this is only a demo.\00"
@.str.1 = [3 x i8] c"%s\00"
define void @printhelp() {
%1 = alloca i8*
store i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [128 x i8] c"This is a text adventure.\0ACommands:\0A\0Atalk - Talk to someone\0Alook - Look at someone/something\0A\0AThat's it as this is only a demo.\00"
@.str.1 = [3 x i8] c"%s\00"
define void @printhelp() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xec() {
  Assert_real((isascii(236) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              1185, ("isascii should be 0 for 0xec"));
}


x86 assembly (clang, -O0):
<t_isascii_0xec>:
push   %rbp
mov    %rsp,%rbp
mov    $0xec,%edi
call   1030 <isascii@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4a1,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0xec>:
push   %rax
mov    $0xec,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4a1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xec\00"
define void @t_isascii_0xec() {
%1 = call i64 @isascii(i32 236)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xec\00"
define void @t_isascii_0xec() {
%1 = tail call i64 @isascii(i32 236)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ebpt_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebpt_node *__ebpt_lookup(struct eb_root *, void *);
struct ebpt_node *ebpt_lookup(struct eb_root *root, void *x) {
  return __ebpt_lookup(root, x);
}


x86 assembly (clang, -O0):
<ebpt_lookup>:
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 <__ebpt_lookup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebpt_lookup>:
jmp    1030 <__ebpt_lookup@plt>

LLVM IR (-O0):
%struct.ebpt_node = type { i32 }
%struct.eb_root = type { i32 }
define %struct.ebpt_node* @ebpt_lookup(%struct.eb_root* %0, i8* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca i8*
store %struct.eb_root* %0, %struct.eb_root** %3
store i8* %1, i8** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load i8*, i8** %4
%7 = call %struct.ebpt_node* @__ebpt_lookup(%struct.eb_root* %5, i8* %6)
ret %struct.ebpt_node* %7
}

LLVM IR (-O2):
%struct.ebpt_node = type { i32 }
%struct.eb_root = type { i32 }
define %struct.ebpt_node* @ebpt_lookup(%struct.eb_root* %0, i8* %1) {
%3 = tail call %struct.ebpt_node* @__ebpt_lookup(%struct.eb_root* %0, i8* %1)
ret %struct.ebpt_node* %3
}
void printEpaTable(const struct epaTable *table) { (void)table; }


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

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

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

LLVM IR (-O2):
%struct.epaTable = type opaque
define void @printEpaTable(%struct.epaTable* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t not_xlow_0(uint64_t u) { return ~((u + 1) | u); }


x86 assembly (clang, -O0):
<not_xlow_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
or     -0x4(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_xlow_0>:
lea    0x1(%rdi),%eax
or     %edi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @not_xlow_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %4, %5
%7 = xor i32 %6, -1
ret i32 %7
}

LLVM IR (-O2):
define i32 @not_xlow_0(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = or i32 %2, %0
%4 = xor i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x29() {
  Assert_real((isalpha(41) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              210, ("isalpha should be 0 for )"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x29>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xd2,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x29>:
push   %rax
mov    $0x29,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xd2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for )\00"
define void @t_isalpha_0x29() {
%1 = call i64 @isalpha(i32 41)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 210, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for )\00"
define void @t_isalpha_0x29() {
%1 = tail call i64 @isalpha(i32 41)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 210, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_tx(char *);
void print_str(char *str) { serial_tx(str); }


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

x86 assembly (clang, -O2):
<print_str>:
jmp    1030 <serial_tx@plt>

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

LLVM IR (-O2):
define void @print_str(i8* %0) {
%2 = tail call i32 @serial_tx(i8* %0)
ret void
}
/* Variables and functions */
char *doubleToString(scalar_t__);
scalar_t__ parseNum(char *, int);
char *wum_add(char *a, char *b) {
  return doubleToString((parseNum(a, 10) + parseNum(b, 10)));
}


x86 assembly (clang, -O0):
<wum_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <doubleToString@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wum_add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0xa,%esi
call   1030 <parseNum@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <doubleToString@plt>

LLVM IR (-O0):
define i8* @wum_add(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 = call i64 @parseNum(i8* %5, i32 10)
%7 = load i8*, i8** %4
%8 = call i64 @parseNum(i8* %7, i32 10)
%9 = add nsw i64 %6, %8
%10 = call i8* @doubleToString(i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @wum_add(i8* %0, i8* %1) {
%3 = tail call i64 @parseNum(i8* %0, i32 10)
%4 = tail call i64 @parseNum(i8* %1, i32 10)
%5 = add nsw i64 %4, %3
%6 = tail call i8* @doubleToString(i64 %5)
ret i8* %6
}
void __attribute__((optimize("Os"))) foo() {}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int NSIG;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ __sigaddset(int /*<<< orphan*/ *, int);
int sigaddset(sigset_t *set, int signo) {
  if (set == NULL || signo <= 0 || signo >= NSIG) {
    __set_errno(EINVAL);
    return -1;
  }
  __sigaddset(set, signo);
  return 0;
}


x86 assembly (clang, -O0):
<sigaddset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1156 <sigaddset+0x36>
cmpl   $0x0,-0x14(%rbp)
jle    1156 <sigaddset+0x36>
mov    -0x14(%rbp),%eax
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%eax
jl     1170 <sigaddset+0x50>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1183 <sigaddset+0x63>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <__sigaddset@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigaddset>:
push   %rax
test   %rdi,%rdi
je     113e <sigaddset+0x1e>
test   %esi,%esi
jle    113e <sigaddset+0x1e>
mov    0x2ea7(%rip),%rax
cmp    %esi,(%rax)
jle    113e <sigaddset+0x1e>
call   1040 <__sigaddset@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@NSIG = global i32 0
@EINVAL = global i32 0
define i32 @sigaddset(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32*, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %15, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sle i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i32, i32* %5
%13 = load i32, i32* @NSIG
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %11, %8, %2
%16 = load i32, i32* @EINVAL
%17 = call i32 @__set_errno(i32 %16)
store i32 -1, i32* %3
br label %22
18: ; preds = %11
%19 = load i32*, i32** %4
%20 = load i32, i32* %5
%21 = call i32 @__sigaddset(i32* %19, i32 %20)
store i32 0, i32* %3
br label %22
22: ; preds = %18, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@NSIG = global i32 0
@EINVAL = global i32 0
define i32 @sigaddset(i32* %0, i32 %1) {
%3 = icmp ne i32* %0, null
%4 = icmp sgt i32 %1, 0
%5 = and i1 %3, %4
%6 = load i32, i32* @NSIG
%7 = icmp sgt i32 %6, %1
%8 = select i1 %5, i1 %7, i1 false
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* @EINVAL
%11 = tail call i32 @__set_errno(i32 %10)
br label %14
12: ; preds = %2
%13 = tail call i32 @__sigaddset(i32* %0, i32 %1)
br label %14
14: ; preds = %12, %9
%15 = phi i32 [ -1, %9 ], [ 0, %12 ]
ret i32 %15
}
void nop_log(void *data, int priority, const char *file, int line,
             const char *string) {
  return;
}


x86 assembly (clang, -O0):
<nop_log>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @nop_log(i8* nocapture %0, i32 %1, i8* nocapture %2, i32 %3, i8* nocapture %4) {
ret void
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
int sdo_is_size_indicated(const struct can_frame *frame) {
  return frame->data[0] & 1;
}


x86 assembly (clang, -O0):
<sdo_is_size_indicated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdo_is_size_indicated>:
mov    (%rdi),%rax
mov    (%rax),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define i32 @sdo_is_size_indicated(%struct.can_frame* %0) {
%2 = alloca %struct.can_frame*
store %struct.can_frame* %0, %struct.can_frame** %2
%3 = load %struct.can_frame*, %struct.can_frame** %2
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %3, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define i32 @sdo_is_size_indicated(%struct.can_frame* nocapture %0) {
%2 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ CE_High();
int /*<<< orphan*/ CE_Low();
int /*<<< orphan*/ Send_Byte(unsigned long);
void Sector_Erase(unsigned long Dst) {
  CE_Low();
  Send_Byte(0x20);
  Send_Byte(((Dst & 0xFFFFFF) >> 16));
  Send_Byte(((Dst & 0xFFFF) >> 8));
  Send_Byte(Dst & 0xFF);
  CE_High();
}


x86 assembly (clang, -O0):
<Sector_Erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <CE_Low@plt>
mov    $0x20,%edi
call   1030 <Send_Byte@plt>
mov    -0x8(%rbp),%rdi
and    $0xffffff,%rdi
shr    $0x10,%rdi
call   1030 <Send_Byte@plt>
mov    -0x8(%rbp),%rdi
and    $0xffff,%rdi
shr    $0x8,%rdi
call   1030 <Send_Byte@plt>
mov    -0x8(%rbp),%rdi
and    $0xff,%rdi
call   1030 <Send_Byte@plt>
mov    $0x0,%al
call   1040 <CE_High@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sector_Erase>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <CE_Low@plt>
mov    $0x20,%edi
call   1030 <Send_Byte@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <Send_Byte@plt>
movzbl %bh,%edi
call   1030 <Send_Byte@plt>
movzbl %bl,%edi
call   1030 <Send_Byte@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <CE_High@plt>

LLVM IR (-O0):
define void @Sector_Erase(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @CE_Low()
%4 = call i32 @Send_Byte(i64 32)
%5 = load i64, i64* %2
%6 = and i64 %5, 16777215
%7 = lshr i64 %6, 16
%8 = call i32 @Send_Byte(i64 %7)
%9 = load i64, i64* %2
%10 = and i64 %9, 65535
%11 = lshr i64 %10, 8
%12 = call i32 @Send_Byte(i64 %11)
%13 = load i64, i64* %2
%14 = and i64 %13, 255
%15 = call i32 @Send_Byte(i64 %14)
%16 = call i32 (...) @CE_High()
ret void
}

LLVM IR (-O2):
define void @Sector_Erase(i64 %0) {
%2 = tail call i32 (...) @CE_Low()
%3 = tail call i32 @Send_Byte(i64 32)
%4 = lshr i64 %0, 16
%5 = and i64 %4, 255
%6 = tail call i32 @Send_Byte(i64 %5)
%7 = lshr i64 %0, 8
%8 = and i64 %7, 255
%9 = tail call i32 @Send_Byte(i64 %8)
%10 = and i64 %0, 255
%11 = tail call i32 @Send_Byte(i64 %10)
%12 = tail call i32 (...) @CE_High()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XStandardColormap;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XStandardColormap(void *_p) {
  if (_p == NULL)
    abort();
  free((XStandardColormap *)_p);
}


x86 assembly (clang, -O0):
<free_XStandardColormap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XStandardColormap+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XStandardColormap>:
test   %rdi,%rdi
je     112a <free_XStandardColormap+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XStandardColormap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XStandardColormap(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
void gdk_event_get_graphics_expose() {}


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

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

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

LLVM IR (-O2):
define void @gdk_event_get_graphics_expose() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("asian father is sad this printf statement is still here.\n");
  return EXIT_SUCCESS;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [58 x i8] c"asian father is sad this printf statement is still here.\0A\00"
@EXIT_SUCCESS = global i32 0
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 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [57 x i8] c"asian father is sad this printf statement is still here.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quat_null(float *);
__attribute__((always_)) struct quat *psquat_null(struct quat *result) {
  quat_null((float *)result);
  return result;
}


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

x86 assembly (clang, -O2):
<psquat_null>:
push   %rbx
mov    %rdi,%rbx
call   1030 <quat_null@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.quat = type { i32 }
define %struct.quat* @psquat_null(%struct.quat* %0) {
%2 = alloca %struct.quat*
store %struct.quat* %0, %struct.quat** %2
%3 = load %struct.quat*, %struct.quat** %2
%4 = bitcast %struct.quat* %3 to float*
%5 = call i32 @quat_null(float* %4)
%6 = load %struct.quat*, %struct.quat** %2
ret %struct.quat* %6
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define %struct.quat* @psquat_null(%struct.quat* returned %0) {
%2 = bitcast %struct.quat* %0 to float*
%3 = tail call i32 @quat_null(float* %2)
ret %struct.quat* %0
}
/* Variables and functions */
int /*<<< orphan*/ FileOperations();
int /*<<< orphan*/ FindKeywordCounts(char *);
int /*<<< orphan*/ TempFile();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  FileOperations();
  FindKeywordCounts("2D-Allocator.c");
  TempFile();
  printf("Press any key to exit...");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <FileOperations@plt>
lea    0xe93(%rip),%rdi
call   1060 <FindKeywordCounts@plt>
mov    $0x0,%al
call   1070 <TempFile@plt>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <FileOperations@plt>
lea    0xea1(%rip),%rdi
call   1060 <FindKeywordCounts@plt>
xor    %eax,%eax
call   1070 <TempFile@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"2D-Allocator.c\00"
@.str.1 = [25 x i8] c"Press any key to exit...\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @FileOperations()
%3 = call i32 @FindKeywordCounts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @TempFile()
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"2D-Allocator.c\00"
@.str.1 = [25 x i8] c"Press any key to exit...\00"
define i32 @main() {
%1 = tail call i32 (...) @FileOperations()
%2 = tail call i32 @FindKeywordCounts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @TempFile()
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int EXIT_FAILURE;
int screen_init(void) { return EXIT_FAILURE; }


x86 assembly (clang, -O0):
<screen_init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_init>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @screen_init() {
%1 = load i32, i32* @EXIT_FAILURE
ret i32 %1
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @screen_init() {
%1 = load i32, i32* @EXIT_FAILURE
ret i32 %1
}
/* Variables and functions */
scalar_t__ COND_CS();
int /*<<< orphan*/ EA_A7_PI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scs_8_pi7(void) {
  m68ki_write_8(EA_A7_PI_8(), COND_CS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_scs_8_pi7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_A7_PI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_CS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_scs_8_pi7>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_A7_PI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_CS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_scs_8_pi7() {
%1 = call i32 (...) @EA_A7_PI_8()
%2 = call i64 (...) @COND_CS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_scs_8_pi7() {
%1 = tail call i32 (...) @EA_A7_PI_8()
%2 = tail call i64 (...) @COND_CS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
unsigned int mydiv(unsigned int a, unsigned int b) { return a / b; }


x86 assembly (clang, -O0):
<mydiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mydiv>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i32 @mydiv(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 = udiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @mydiv(i32 %0, i32 %1) {
%3 = udiv i32 %0, %1
ret i32 %3
}
void USB_OTG_BSP_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @USB_OTG_BSP_Init() {
ret void
}
void ptrace_sandbox_permit_readlink(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_readlink(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_get_prop_int_range() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_get_prop_int_range"
         "\n");
}


x86 assembly (clang, -O0):
<pa_format_info_get_prop_int_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa_format_info_get_prop_int_range>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"NOT IMPLEMENTED:pa_format_info_get_prop_int_range\0A\00"
define i32 @pa_format_info_get_prop_int_range() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [50 x i8] c"NOT IMPLEMENTED:pa_format_info_get_prop_int_range\00"
define i32 @pa_format_info_get_prop_int_range() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int Cyc_Parse_is_typeparam(void *tm) {
  void *_T0;
  int *_T1;
  int _T2;
  _T0 = tm;
  _T1 = (int *)_T0;
  _T2 = *_T1;
  if (_T2 != 4)
    goto _TL70;
  return 1;
_TL70:
  return 0;
  ;
}


x86 assembly (clang, -O0):
<Cyc_Parse_is_typeparam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
je     1130 <Cyc_Parse_is_typeparam+0x30>
jmp    113c <Cyc_Parse_is_typeparam+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <Cyc_Parse_is_typeparam+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Parse_is_typeparam>:
xor    %eax,%eax
cmpl   $0x4,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @Cyc_Parse_is_typeparam(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %3
%7 = load i8*, i8** %3
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp ne i32 %12, 4
br i1 %13, label %14, label %15
14: ; preds = %1
br label %16
15: ; preds = %1
store i32 1, i32* %2
br label %17
16: ; preds = %14
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @Cyc_Parse_is_typeparam(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 4
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_system_status(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int open_record() {
  char command[256];
  int result;
  sprintf(command, "%s",
          "/usr/local/alsa/bin/amixer -c 0 sset \'Analog Right Sub Mic\' cap");
  printf("open_record %s\r\n", command);
  print_system_status(system(command));
  return result;
}


x86 assembly (clang, -O0):
<open_record>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
lea    0xea7(%rip),%rsi
lea    0xea3(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x100(%rbp),%rsi
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
mov    %eax,%edi
call   1060 <print_system_status@plt>
mov    -0x104(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_record>:
push   %rbx
sub    $0x100,%rsp
movups 0xef1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0xed5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xeb9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xe9d(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed2(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %eax,%edi
call   1050 <print_system_status@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [64 x i8] c"/usr/local/alsa/bin/amixer -c 0 sset 'Analog Right Sub Mic' cap\00"
@.str.2 = [17 x i8] c"open_record %s\0D\0A\00"
define i32 @open_record() {
%1 = alloca [256 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%8 = call i32 @system(i8* %7)
%9 = call i32 @print_system_status(i32 %8)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str.1 = [64 x i8] c"/usr/local/alsa/bin/amixer -c 0 sset 'Analog Right Sub Mic' cap\00"
@.str.2 = [17 x i8] c"open_record %s\0D\0A\00"
define i32 @open_record() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%4 = call i32 @system(i8* %2)
%5 = call i32 @print_system_status(i32 %4)
ret i32 undef
}
unsigned int unused_integer_underflow_Good_FP() {
  unsigned int n = 0;
  if (n-- == 0) {
    return 0;
  } else {
    return n;
  }
}


x86 assembly (clang, -O0):
<unused_integer_underflow_Good_FP>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jne    112b <unused_integer_underflow_Good_FP+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1131 <unused_integer_underflow_Good_FP+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @unused_integer_underflow_Good_FP() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1
store i32 %4, i32* %2
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %1
br label %9
7: ; preds = %0
%8 = load i32, i32* %2
store i32 %8, i32* %1
br label %9
9: ; preds = %7, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @unused_integer_underflow_Good_FP() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello World\n");
  printf("C Programming\n");
  printf("Welcome\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [15 x i8] c"C Programming\0A\00"
@.str.2 = [9 x i8] c"Welcome\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 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
@str.3 = [14 x i8] c"C Programming\00"
@str.4 = [8 x i8] c"Welcome\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct cli_def {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cli_print(struct cli_def *, char *, char const *);
int hook_history(struct cli_def *cli, const char *command, char *argv[],
                 int argc) {
  cli_print(cli, "Hook (history): %s", command);
  return 0;
}


x86 assembly (clang, -O0):
<hook_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rsi
call   1030 <cli_print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hook_history>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
call   1030 <cli_print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.cli_def = type { i32 }
@.str = [19 x i8] c"Hook (history): %s\00"
define i32 @hook_history(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3) {
%5 = alloca %struct.cli_def*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i32
store %struct.cli_def* %0, %struct.cli_def** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%9 = load %struct.cli_def*, %struct.cli_def** %5
%10 = load i8*, i8** %6
%11 = call i32 @cli_print(%struct.cli_def* %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.cli_def = type { i32 }
@.str = [19 x i8] c"Hook (history): %s\00"
define i32 @hook_history(%struct.cli_def* %0, i8* %1, i8** nocapture readnone %2, i32 %3) {
%5 = tail call i32 @cli_print(%struct.cli_def* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(
      stderr,
      "infoImg [kernel_1 addr] [kernel_1 mtd num] [sysimg_1 mtd num] [kernel_2 "
      "addr] [kernel_2 mtd num] [sysimg_2 mtd num] [fw file path]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [132 x i8] c"infoImg [kernel_1 addr] [kernel_1 mtd num] [sysimg_1 mtd num] [kernel_2 addr] [kernel_2 mtd num] [sysimg_2 mtd num] [fw file path]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [132 x i8] c"infoImg [kernel_1 addr] [kernel_1 mtd num] [sysimg_1 mtd num] [kernel_2 addr] [kernel_2 mtd num] [sysimg_2 mtd num] [fw file path]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EvbUart1WriteStr(char const *);
void EvbTraceEntry(const char *str) { EvbUart1WriteStr(str); }


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

x86 assembly (clang, -O2):
<EvbTraceEntry>:
jmp    1030 <EvbUart1WriteStr@plt>

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

LLVM IR (-O2):
define void @EvbTraceEntry(i8* %0) {
%2 = tail call i32 @EvbUart1WriteStr(i8* %0)
ret void
}
int sumByValue(int a, int b) {
  int aux = a;
  a = b;
  b = aux;
  return (a + b);
}


x86 assembly (clang, -O0):
<sumByValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumByValue>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @sumByValue(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %5
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sumByValue(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mvaddstr(short, short, char *);
int strlen(char *);
void center(short row, char *buf) {
  short margin;
  margin = ((80 - strlen(buf)) / 2);
  mvaddstr(row, margin, buf);
}


x86 assembly (clang, -O0):
<center>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x50,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %ax,-0x12(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x12(%rbp),%ax
mov    -0x10(%rbp),%rdx
movswl %cx,%edi
movswl %ax,%esi
call   1040 <mvaddstr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<center>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    $0x50,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
shr    %eax
movswl %ax,%esi
mov    %ebp,%edi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mvaddstr@plt>

LLVM IR (-O0):
define void @center(i16 signext %0, i8* %1) {
%3 = alloca i16
%4 = alloca i8*
%5 = alloca i16
store i16 %0, i16* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 80, %7
%9 = sdiv i32 %8, 2
%10 = trunc i32 %9 to i16
store i16 %10, i16* %5
%11 = load i16, i16* %3
%12 = load i16, i16* %5
%13 = load i8*, i8** %4
%14 = call i32 @mvaddstr(i16 signext %11, i16 signext %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @center(i16 signext %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = sub nsw i32 80, %3
%5 = sdiv i32 %4, 2
%6 = trunc i32 %5 to i16
%7 = tail call i32 @mvaddstr(i16 signext %0, i16 signext %6, i8* %1)
ret void
}