xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x57() {
  Assert_real((isspace(87) == 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_isspace.c",
              440, ("isspace should be 0 for W"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x57>:
push   %rax
mov    $0x57,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1b8,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for W\00"
define void @t_isspace_0x57() {
%1 = call i64 @isspace(i32 87)
%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 440, 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for W\00"
define void @t_isspace_0x57() {
%1 = tail call i64 @isspace(i32 87)
%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 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ ends_with(char const *, char *);
int is_playlist(const char *file) {
  return (ends_with(file, ".m3u") || ends_with(file, ".pls"));
}


x86 assembly (clang, -O0):
<is_playlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1158 <is_playlist+0x48>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <ends_with@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_playlist>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <is_playlist+0x1f>
pop    %rbx
ret
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ends_with@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c".m3u\00"
@.str.1 = [5 x i8] c".pls\00"
define i32 @is_playlist(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @ends_with(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @ends_with(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [5 x i8] c".m3u\00"
@.str.1 = [5 x i8] c".pls\00"
define i32 @is_playlist(i8* %0) {
%2 = tail call i64 @ends_with(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ends_with(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x3d() {
  Assert_real((isprint(61)),
              "/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_isprint.c",
              310, ("isprint should be 1 for ="));
}


x86 assembly (clang, -O0):
<t_isprint_0x3d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x136,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x3d>:
push   %rax
mov    $0x3d,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x136,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for =\00"
define void @t_isprint_0x3d() {
%1 = call i32 @isprint(i32 61)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 310, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for =\00"
define void @t_isprint_0x3d() {
%1 = tail call i32 @isprint(i32 61)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 310, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hfree(void *ptr) {
  if (ptr)
    free(ptr);
}


x86 assembly (clang, -O0):
<hfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <hfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hfree>:
test   %rdi,%rdi
je     111a <hfree+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @hfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
int __attribute__((__unused__)) init_char_p(char buf[]) {
  buf[0] = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<init_char_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_char_p>:
movb   $0x0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @init_char_p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @init_char_p(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret i32 0
}
OP(fd, aa) { op_aa(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_aa@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_aa()
ret i32 undef
}
int power_supply_create_attrs(struct power_supply *psy) { return 0; }


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

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

LLVM IR (-O0):
%struct.power_supply = type opaque
define i32 @power_supply_create_attrs(%struct.power_supply* %0) {
%2 = alloca %struct.power_supply*
store %struct.power_supply* %0, %struct.power_supply** %2
ret i32 0
}

LLVM IR (-O2):
%struct.power_supply = type opaque
define i32 @power_supply_create_attrs(%struct.power_supply* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ file_getlocalpackagepath(char *, int, char const *);
unsigned int file_remove(char *);
unsigned int file_removepackage(const char *name) {
  char remotedatapath[128];
  file_getlocalpackagepath(remotedatapath, 128, name);
  return file_remove(remotedatapath);
}


x86 assembly (clang, -O0):
<file_removepackage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x80,%esi
call   1040 <file_getlocalpackagepath@plt>
lea    -0x90(%rbp),%rdi
call   1030 <file_remove@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_removepackage>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <file_getlocalpackagepath@plt>
mov    %rbx,%rdi
call   1030 <file_remove@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @file_removepackage(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @file_getlocalpackagepath(i8* %4, i32 128, i8* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call i32 @file_remove(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @file_removepackage(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @file_getlocalpackagepath(i8* %3, i32 128, i8* %0)
%5 = call i32 @file_remove(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ err(char *, unsigned long);
void *realloc(void *, size_t);
void *mem_realloc(void *mem, size_t size) {
  void *new_mem = realloc(mem, size);
  if (!new_mem)
    err("cannot reallocate %lu bytes\n", (unsigned long)(size & ~0ul));
  return new_mem;
}


x86 assembly (clang, -O0):
<mem_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1160 <mem_realloc+0x40>
mov    -0x10(%rbp),%rsi
and    $0xffffffffffffffff,%rsi
lea    0xea5(%rip),%rdi
call   1030 <err@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <mem_realloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"cannot reallocate %lu bytes\0A\00"
define i8* @mem_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = and i64 %12, -1
%14 = call i32 @err(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@.str = [29 x i8] c"cannot reallocate %lu bytes\0A\00"
define noalias i8* @mem_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void classInitroomy_t(int samplingFreq) {}


x86 assembly (clang, -O0):
<classInitroomy_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @classInitroomy_t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @classInitroomy_t(i32 %0) {
ret void
}
int disk_read(void *ctx, unsigned sec, unsigned numsec, char *buf) {
  return -1;
}


x86 assembly (clang, -O0):
<disk_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @disk_read(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @disk_read(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
ret i32 -1
}
int foo(volatile int a, long b) { return a + b; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltq
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %rsi,%rax
mov    %edi,-0x4(%rsp)
add    -0x4(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store volatile i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load volatile i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i64, i64* %4
%8 = add nsw i64 %6, %7
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i64 %1) {
%3 = alloca i32
store volatile i32 %0, i32* %3
%4 = load volatile i32, i32* %3
%5 = trunc i64 %1 to i32
%6 = add i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *hoedown_calloc(size_t nmemb, size_t size) {
  void *ret = calloc(nmemb, size);
  if (!ret) {
    fprintf(stderr, "Allocation failed.\n");
    abort();
  }
  return ret;
}


x86 assembly (clang, -O0):
<hoedown_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1178 <hoedown_calloc+0x48>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hoedown_calloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     113d <hoedown_calloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Allocation failed.\0A\00"
define i8* @hoedown_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Allocation failed.\0A\00"
define noalias i8* @hoedown_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int main(int argc, char *argv[]) {
  char b[10];
  (void)sprintf(b, "%s", argv[1]);
  (void)printf("%s\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x1a(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x8(%rsi),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i8* @strcpy(i8* %4, i8* dereferenceable(1) %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
void null_input_poll(void *data) { (void)data; }


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

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

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

LLVM IR (-O2):
define void @null_input_poll(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2cStart();
int /*<<< orphan*/ i2cStop();
int /*<<< orphan*/ i2cWrite(unsigned char);
void send_screen_data(unsigned char data) {
  i2cStart();
  i2cWrite(0x7C);
  i2cWrite(data);
  i2cStop();
}


x86 assembly (clang, -O0):
<send_screen_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <i2cStart@plt>
mov    $0x7c,%edi
call   1040 <i2cWrite@plt>
movzbl -0x1(%rbp),%edi
call   1040 <i2cWrite@plt>
mov    $0x0,%al
call   1030 <i2cStop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_screen_data>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <i2cStart@plt>
mov    $0x7c,%edi
call   1040 <i2cWrite@plt>
mov    %ebx,%edi
call   1040 <i2cWrite@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <i2cStop@plt>

LLVM IR (-O0):
define void @send_screen_data(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @i2cStart()
%4 = call i32 @i2cWrite(i8 zeroext 124)
%5 = load i8, i8* %2
%6 = call i32 @i2cWrite(i8 zeroext %5)
%7 = call i32 (...) @i2cStop()
ret void
}

LLVM IR (-O2):
define void @send_screen_data(i8 zeroext %0) {
%2 = tail call i32 (...) @i2cStart()
%3 = tail call i32 @i2cWrite(i8 zeroext 124)
%4 = tail call i32 @i2cWrite(i8 zeroext %0)
%5 = tail call i32 (...) @i2cStop()
ret void
}
/* Variables and functions */
long rint(double);
long lrint(double x) { return rint(x); }


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

x86 assembly (clang, -O2):
<lrint>:
jmp    1030 <rint@plt>

LLVM IR (-O0):
define i64 @lrint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @rint(double %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = tail call i64 @rint(double %0)
ret i64 %2
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn92() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn92");
  return result;
}


x86 assembly (clang, -O0):
<fn92>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn92>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn92\00"
define i8* @fn92() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn92\00"
define i8* @fn92() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
char **stb_tokens_raw(char *, char *, int *, int, int, int /*<<< orphan*/,
                      int /*<<< orphan*/);
char **stb_tokens_stripwhite(char *src, char *delimit, int *count) {
  return stb_tokens_raw(src, delimit, count, 1, 1, 0, 0);
}


x86 assembly (clang, -O0):
<stb_tokens_stripwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%r8d
xor    %r9d,%r9d
mov    %r8d,%ecx
movl   $0x0,(%rsp)
call   1030 <stb_tokens_raw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_tokens_stripwhite>:
push   %rax
movl   $0x0,(%rsp)
mov    $0x1,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <stb_tokens_raw@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8** @stb_tokens_stripwhite(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32*, i32** %6
%10 = call i8** @stb_tokens_raw(i8* %7, i8* %8, i32* %9, i32 1, i32 1, i32 0, i32 0)
ret i8** %10
}

LLVM IR (-O2):
define i8** @stb_tokens_stripwhite(i8* %0, i8* %1, i32* %2) {
%4 = tail call i8** @stb_tokens_raw(i8* %0, i8* %1, i32* %2, i32 1, i32 1, i32 0, i32 0)
ret i8** %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t getDatacenterId(int datacenter_id) {
  return (uint64_t)datacenter_id % (2 ^ 5);
}


x86 assembly (clang, -O0):
<getDatacenterId>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDatacenterId>:
movslq %edi,%rcx
imul   $0xffffffff92492493,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x2,%eax
add    %edx,%eax
lea    0x0(,%rax,8),%edx
sub    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getDatacenterId(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 7
ret i32 %4
}

LLVM IR (-O2):
define i32 @getDatacenterId(i32 %0) {
%2 = srem i32 %0, 7
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t bitcount(uint32_t num) {
  uint32_t c;
  for (c = 0; num; ++c)
    num >>= 1;
  return c;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <bitcount+0x2f>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bitcount+0x10>
ret

LLVM IR (-O0):
define i32 @bitcount(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = ashr i32 %8, 1
store i32 %9, i32* %2
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ rdfpcr();
unsigned long swcr_update_status(unsigned long, int /*<<< orphan*/);
unsigned long osf_getsysinfo(unsigned long flags) {
  unsigned long w;
  w = swcr_update_status(flags, rdfpcr());
  return w;
}


x86 assembly (clang, -O0):
<osf_getsysinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rdfpcr@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <swcr_update_status@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osf_getsysinfo>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rdfpcr@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <swcr_update_status@plt>

LLVM IR (-O0):
define i64 @osf_getsysinfo(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 (...) @rdfpcr()
%6 = call i64 @swcr_update_status(i64 %4, i32 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
ret i64 %7
}

LLVM IR (-O2):
define i64 @osf_getsysinfo(i64 %0) {
%2 = tail call i32 (...) @rdfpcr()
%3 = tail call i64 @swcr_update_status(i64 %0, i32 %2)
ret i64 %3
}
double newPositionScalar(double s, double u, double a, double t) {
  return (s + (u * t)) + ((a * (t * t)) / 2.0);
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<newPositionScalar>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeb6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<newPositionScalar>:
mulsd  %xmm3,%xmm1
addsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xee8(%rip),%xmm3
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @newPositionScalar(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %8
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double %9)
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %8
%16 = fmul double %14, %15
%17 = fmul double %13, %16
%18 = fdiv double %17, 2.000000e+00
%19 = fadd double %12, %18
ret double %19
}

LLVM IR (-O2):
define double @newPositionScalar(double %0, double %1, double %2, double %3) {
%5 = tail call double @llvm.fmuladd.f64(double %1, double %3, double %0)
%6 = fmul double %3, %3
%7 = fmul double %6, %2
%8 = fmul double %7, 5.000000e-01
%9 = fadd double %5, %8
ret double %9
}
/* Variables and functions */
char *hstrerror(int);
int /*<<< orphan*/ printf(char *, char const *, char *);
int _hstrerror(char const *message, int value) {
  printf("%s: %s\n", message, hstrerror(value));
  return 0;
}


x86 assembly (clang, -O0):
<_hstrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <hstrerror@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hstrerror>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <hstrerror@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
define i32 @_hstrerror(i8* %0, i32 %1) {
%3 = tail call i8* @hstrerror(i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret i32 0
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char *argv[]) {
  int c;
  int enable = 1;
  while ((c = getchar()) != EOF) {
    putchar(c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%eax
je     1163 <main+0x43>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %7
br label %8
8: ; preds = %12, %2
%9 = call i32 (...) @getchar()
store i32 %9, i32* %6
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %6
%14 = call i32 @putchar(i32 %13)
br label %8
15: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int restore_quaddobl_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(668, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<restore_quaddobl_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x29c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_quaddobl_solutions>:
mov    $0x29c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @restore_quaddobl_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 668, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @restore_quaddobl_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 668, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ translate_joyname(int *, char **, int);
int getJoySymbolFromJoyName(char *name) {
  int joysymbol;
  translate_joyname(&joysymbol, &name, 1);
  return joysymbol;
}


x86 assembly (clang, -O0):
<getJoySymbolFromJoyName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1030 <translate_joyname@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getJoySymbolFromJoyName>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x1,%edx
call   1030 <translate_joyname@plt>
mov    0xc(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @getJoySymbolFromJoyName(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @translate_joyname(i32* %3, i8** %2, i32 1)
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @getJoySymbolFromJoyName(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @translate_joyname(i32* %3, i8** %2, i32 1)
%6 = load i32, i32* %3
ret i32 %6
}
/* Variables and functions */
int ENOSYS;
int hisi_irqaffinity_register(unsigned int irq, int cpu) { return -ENOSYS; }


x86 assembly (clang, -O0):
<hisi_irqaffinity_register>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ed5(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hisi_irqaffinity_register>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @hisi_irqaffinity_register(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
void pm_gpio_dbg_showall(unsigned int level) {}


x86 assembly (clang, -O0):
<pm_gpio_dbg_showall>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pm_gpio_dbg_showall(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @pm_gpio_dbg_showall(i32 %0) {
ret void
}
void yolo_begin(void) {}


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

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

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

LLVM IR (-O2):
define void @yolo_begin() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void help(void) {
  fprintf(stderr, "Usage:\n"
                  "\thexpand -t type -s signature -l length -m message\n"
                  "\thexpand --test\n\n"
                  "Options:\n"
                  "\t-t --type\tthe hash algorithm for expansion (md5, sha1, "
                  "sha256, or sha512\n"
                  "\t-s --sig\tthe result of the original hash function\n"
                  "\t-l --length\tthe length of the original message\n"
                  "\t-m --message\tthe message to be appended\n"
                  "\t--test\t\truns a set of test cases\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [333 x i8] c"Usage:\0A\09hexpand -t type -s signature -l length -m message\0A\09hexpand --test\0A\0AOptions:\0A\09-t --type\09the hash algorithm for expansion (md5, sha1, sha256, or sha512\0A\09-s --sig\09the result of the original hash function\0A\09-l --length\09the length of the original message\0A\09-m --message\09the message to be appended\0A\09--test\09\09runs a set of test cases\0A\00"
@EXIT_FAILURE = global i32 0
define void @help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([333 x i8], [333 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [333 x i8] c"Usage:\0A\09hexpand -t type -s signature -l length -m message\0A\09hexpand --test\0A\0AOptions:\0A\09-t --type\09the hash algorithm for expansion (md5, sha1, sha256, or sha512\0A\09-s --sig\09the result of the original hash function\0A\09-l --length\09the length of the original message\0A\09-m --message\09the message to be appended\0A\09--test\09\09runs a set of test cases\0A\00"
@EXIT_FAILURE = global i32 0
define void @help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([333 x i8], [333 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void genbne_idle() {}


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

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

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

LLVM IR (-O2):
define void @genbne_idle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void stop_udp_server(int sockfd) { close(sockfd); }


x86 assembly (clang, -O0):
<stop_udp_server>:
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):
<stop_udp_server>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @stop_udp_server(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 @stop_udp_server(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
double trunc(double);
double fpart(double arg) { return arg - trunc(arg); }


x86 assembly (clang, -O0):
<fpart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <trunc@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpart>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <trunc@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fpart(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.trunc.f64(double %4)
%6 = fsub double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @fpart(double %0) {
%2 = tail call double @llvm.trunc.f64(double %0)
%3 = fsub double %0, %2
ret double %3
}
display_set(set) struct word_list *set;
{
  cleanup_set(set);
  display_word_list(set);
}


x86 assembly (clang, -O0):
<display_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <cleanup_set@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <display_word_list@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_set>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <cleanup_set@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <display_word_list@plt>

LLVM IR (-O0):
%struct.word_list = type opaque
define i32 @display_set(%struct.word_list* %0) {
%2 = alloca i32
%3 = alloca %struct.word_list*
store %struct.word_list* %0, %struct.word_list** %3
%4 = load %struct.word_list*, %struct.word_list** %3
%5 = call i32 (%struct.word_list*, ...) bitcast (i32 (...)* @cleanup_set to i32 (%struct.word_list*, ...)*)(%struct.word_list* %4)
%6 = load %struct.word_list*, %struct.word_list** %3
%7 = call i32 (%struct.word_list*, ...) bitcast (i32 (...)* @display_word_list to i32 (%struct.word_list*, ...)*)(%struct.word_list* %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
%struct.word_list = type opaque
define i32 @display_set(%struct.word_list* %0) {
%2 = tail call i32 (%struct.word_list*, ...) bitcast (i32 (...)* @cleanup_set to i32 (%struct.word_list*, ...)*)(%struct.word_list* %0)
%3 = tail call i32 (%struct.word_list*, ...) bitcast (i32 (...)* @display_word_list to i32 (%struct.word_list*, ...)*)(%struct.word_list* %0)
ret i32 undef
}
void uncap_init(struct consumer_workspace *ws) {}


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

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

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

LLVM IR (-O2):
%struct.consumer_workspace = type opaque
define void @uncap_init(%struct.consumer_workspace* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ YM2612_write(int, int);
void YM2612_enableDAC() {
  YM2612_write(0, 0x2B);
  YM2612_write(1, 0x80);
}


x86 assembly (clang, -O0):
<YM2612_enableDAC>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x2b,%esi
call   1030 <YM2612_write@plt>
mov    $0x1,%edi
mov    $0x80,%esi
call   1030 <YM2612_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<YM2612_enableDAC>:
push   %rax
xor    %edi,%edi
mov    $0x2b,%esi
call   1030 <YM2612_write@plt>
mov    $0x1,%edi
mov    $0x80,%esi
pop    %rax
jmp    1030 <YM2612_write@plt>

LLVM IR (-O0):
define void @YM2612_enableDAC() {
%1 = call i32 @YM2612_write(i32 0, i32 43)
%2 = call i32 @YM2612_write(i32 1, i32 128)
ret void
}

LLVM IR (-O2):
define void @YM2612_enableDAC() {
%1 = tail call i32 @YM2612_write(i32 0, i32 43)
%2 = tail call i32 @YM2612_write(i32 1, i32 128)
ret void
}
long Long_copy(long *x) { return *x; }


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

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

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

LLVM IR (-O2):
define i64 @Long_copy(i64* nocapture %0) {
%2 = load i64, i64* %0
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int tolower(int);
int tolower_l(int c, locale_t locale) {
  return tolower(c);
  (void)locale;
}


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

x86 assembly (clang, -O2):
<tolower_l>:
jmp    1030 <tolower@plt>

LLVM IR (-O0):
define i32 @tolower_l(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 = call i32 @tolower(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @tolower_l(i32 %0, i32 %1) {
%3 = tail call i32 @tolower(i32 %0)
ret i32 %3
}