xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x2e() {
  Assert_real((iscntrl(46) == 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_iscntrl.c",
              235, ("iscntrl should be 0 for ."));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x2e>:
push   %rax
mov    $0x2e,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xeb,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for .\00"
define void @t_iscntrl_0x2e() {
%1 = call i64 @iscntrl(i32 46)
%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 235, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for .\00"
define void @t_iscntrl_0x2e() {
%1 = tail call i64 @iscntrl(i32 46)
%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 235, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void mdp4_dtv_wait4vsync(int cndx) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_dtv_wait4vsync(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("usage: dslm [-w <time>] <disk>");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"usage: dslm [-w <time>] <disk>\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"usage: dslm [-w <time>] <disk>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ strcmp(char *, char *);
void strcmp_greater() {
  Assert_real((strcmp("equal", "EQUAL") > 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/string/strcmp.c",
              22, ("Should be > 0"));
}


x86 assembly (clang, -O0):
<strcmp_greater>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec2(%rip),%rsi
mov    $0x16,%edx
lea    0xf59(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_greater>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
lea    0xec8(%rip),%rsi
lea    0xf64(%rip),%rcx
mov    $0x16,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"equal\00"
@.str.1 = [6 x i8] c"EQUAL\00"
@.str.2 = [163 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/string/strcmp.c\00"
@.str.3 = [14 x i8] c"Should be > 0\00"
define void @strcmp_greater() {
%1 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str.2, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"equal\00"
@.str.1 = [6 x i8] c"EQUAL\00"
@.str.2 = [163 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/string/strcmp.c\00"
@.str.3 = [14 x i8] c"Should be > 0\00"
define void @strcmp_greater() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str.2, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *alloc2();
void *alloc1(void) { return alloc2(); }


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

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

LLVM IR (-O0):
define i8* @alloc1() {
%1 = call i8* (...) @alloc2()
ret i8* %1
}

LLVM IR (-O2):
define i8* @alloc1() {
%1 = tail call i8* (...) @alloc2()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ unlink(char *);
void close_delete_file_(char *fname, int *fd) {
  close(*fd);
  unlink(fname);
}


x86 assembly (clang, -O0):
<close_delete_file_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_delete_file_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%edi
call   1040 <close@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define void @close_delete_file_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = call i32 @close(i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @unlink(i8* %8)
ret void
}

LLVM IR (-O2):
define void @close_delete_file_(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @close(i32 %3)
%5 = tail call i32 @unlink(i8* %0)
ret void
}
void rop3_230_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T & S;
  stk3 = ~stk3;
  stk2 = *D & stk3;
  stk1 = S ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_230_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_230_0_0>:
and    %esi,%edx
not    %dl
and    (%rdi),%dl
xor    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_230_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %9
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = load i8*, i8** %4
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @rop3_230_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = and i8 %6, %5
%8 = xor i8 %7, %1
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addHist(char *);
int /*<<< orphan*/ cpuSetPC(int);
int /*<<< orphan*/ cpuSetPSW(int);
int /*<<< orphan*/ execCommand(char *);
char *getLine(char *);
int /*<<< orphan*/ initInstrTable();
int /*<<< orphan*/ printf(char *);
int main(void) {
  char *line;
  printf("\n\nECO32 Machine Monitor 1.3\n\n");
  initInstrTable();
  cpuSetPC(0xC0010000);
  cpuSetPSW(0x08000000);
  while (1) {
    line = getLine("ECO32 > ");
    addHist(line);
    execCommand(line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <initInstrTable@plt>
mov    $0xc0010000,%edi
call   1050 <cpuSetPC@plt>
mov    $0x8000000,%edi
call   1090 <cpuSetPSW@plt>
lea    0xe71(%rip),%rdi
call   1080 <getLine@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <addHist@plt>
mov    -0x10(%rbp),%rdi
call   1060 <execCommand@plt>
jmp    11a6 <main+0x36>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <initInstrTable@plt>
mov    $0xc0010000,%edi
call   1050 <cpuSetPC@plt>
mov    $0x8000000,%edi
call   1090 <cpuSetPSW@plt>
lea    0xe5e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1080 <getLine@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <addHist@plt>
mov    %rbx,%rdi
call   1060 <execCommand@plt>
jmp    11b0 <main+0x40>

LLVM IR (-O0):
@.str = [30 x i8] c"\0A\0AECO32 Machine Monitor 1.3\0A\0A\00"
@.str.1 = [9 x i8] c"ECO32 > \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @initInstrTable()
%5 = call i32 @cpuSetPC(i32 -1073676288)
%6 = call i32 @cpuSetPSW(i32 134217728)
br label %7
7: ; preds = %0, %7
%8 = call i8* @getLine(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @addHist(i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 @execCommand(i8* %11)
br label %7
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"ECO32 > \00"
@str = [29 x i8] c"\0A\0AECO32 Machine Monitor 1.3\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @initInstrTable()
%3 = tail call i32 @cpuSetPC(i32 -1073676288)
%4 = tail call i32 @cpuSetPSW(i32 134217728)
br label %5
5: ; preds = %5, %0
%6 = tail call i8* @getLine(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @addHist(i8* %6)
%8 = tail call i32 @execCommand(i8* %6)
br label %5
}
int SER_GetChar(void) { return (-1); }


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

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

LLVM IR (-O0):
define i32 @SER_GetChar() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @SER_GetChar() {
ret i32 -1
}
OP(ed, ee) { illegal_2(); }


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 <illegal_2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
xor    %eax,%eax
jmp    1030 <illegal_2@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 (...) @illegal_2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
void tegra114_emc_timing_invalidate(void) { return; }


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

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

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

LLVM IR (-O2):
define void @tegra114_emc_timing_invalidate() {
ret void
}
void asm_error(const struct parser_param *param, const char *s) {}


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

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

LLVM IR (-O0):
%struct.parser_param = type opaque
define void @asm_error(%struct.parser_param* %0, i8* %1) {
%3 = alloca %struct.parser_param*
%4 = alloca i8*
store %struct.parser_param* %0, %struct.parser_param** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.parser_param = type opaque
define void @asm_error(%struct.parser_param* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void version(void) {
  printf("kore %d.%d.%d-%s ", 1, 2, 4, "develop");
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
lea    0xed1(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xed3(%rip),%r8
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"kore %d.%d.%d-%s \00"
@.str.1 = [8 x i8] c"develop\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"kore %d.%d.%d-%s \00"
@.str.1 = [8 x i8] c"develop\00"
define void @version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @exit(i32 0)
unreachable
}
float pay(int rate, int hours) {
  if (hours < 41) {
    return rate * hours * 1.0;
  } else if ((hours > 40) && (hours < 61)) {
    return rate * hours * 1.5;
  } else {
    return rate * hours * 2.0;
  }
}


x86 assembly (clang, -O0):
<pay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x29,-0xc(%rbp)
jge    1139 <pay+0x39>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xee9(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1192 <pay+0x92>
cmpl   $0x28,-0xc(%rbp)
jle    1172 <pay+0x72>
cmpl   $0x3d,-0xc(%rbp)
jge    1172 <pay+0x72>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xea8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1192 <pay+0x92>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe7b(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pay>:
cmp    $0x28,%esi
jg     1111 <pay+0x11>
imul   %edi,%esi
cvtsi2sd %esi,%xmm0
cvtsd2ss %xmm0,%xmm0
ret
imul   %esi,%edi
cvtsi2sd %edi,%xmm0
cmp    $0x3c,%esi
ja     112a <pay+0x2a>
mulsd  0xedb(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret
addsd  %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @pay(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp slt i32 %6, 41
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = mul nsw i32 %9, %10
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 1.000000e+00
%14 = fptrunc double %13 to float
store float %14, float* %3
br label %35
15: ; preds = %2
%16 = load i32, i32* %5
%17 = icmp sgt i32 %16, 40
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 61
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = mul nsw i32 %22, %23
%25 = sitofp i32 %24 to double
%26 = fmul double %25, 1.500000e+00
%27 = fptrunc double %26 to float
store float %27, float* %3
br label %35
28: ; preds = %18, %15
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = mul nsw i32 %29, %30
%32 = sitofp i32 %31 to double
%33 = fmul double %32, 2.000000e+00
%34 = fptrunc double %33 to float
store float %34, float* %3
br label %35
35: ; preds = %28, %21, %8
%36 = load float, float* %3
ret float %36
}

LLVM IR (-O2):
define float @pay(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 41
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = mul nsw i32 %1, %0
%6 = sitofp i32 %5 to double
br label %15
7: ; preds = %2
%8 = icmp ult i32 %1, 61
%9 = mul nsw i32 %1, %0
%10 = sitofp i32 %9 to double
br i1 %8, label %11, label %13
11: ; preds = %7
%12 = fmul double %10, 1.500000e+00
br label %15
13: ; preds = %7
%14 = fmul double %10, 2.000000e+00
br label %15
15: ; preds = %13, %11, %4
%16 = phi double [ %6, %4 ], [ %12, %11 ], [ %14, %13 ]
%17 = fptrunc double %16 to float
ret float %17
}
const char *_Locale_messages_default(char *__DUMMY_PAR) { return 0; }


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

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

LLVM IR (-O0):
define i8* @_Locale_messages_default(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @_Locale_messages_default(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ die();
int /*<<< orphan*/ perror(char *);
void fail(char *s) {
  perror(s);
  die();
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x0,%al
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fail>:
push   %rax
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <die@plt>

LLVM IR (-O0):
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 (...) @die()
ret void
}

LLVM IR (-O2):
define void @fail(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 (...) @die()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ AUTH;

/* Variables and functions */
void authnone_verf(AUTH *client) {}


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

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

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

LLVM IR (-O2):
define void @authnone_verf(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int runBadCode() {
  int *ptr = NULL;
  int a = 10;
  int b = 11;
  int c = 12;
  printf("Executing bad code.\n");
  return (*ptr) + 1;
}


x86 assembly (clang, -O0):
<runBadCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0xb,-0x10(%rbp)
movl   $0xc,-0x14(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"Executing bad code.\0A\00"
define i32 @runBadCode() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32* null, i32** %1
store i32 10, i32* %2
store i32 11, i32* %3
store i32 12, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = load i32*, i32** %1
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
@str = [20 x i8] c"Executing bad code.\00"
define i32 @runBadCode() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int);
int /*<<< orphan*/ stderr;
void _test_start(const char *func, const char *file, int lineno) {
  fprintf(stderr, "Running '%s' (%s:%d)\n", func, file, lineno);
}


x86 assembly (clang, -O0):
<_test_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_start>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Running '%s' (%s:%d)\0A\00"
define void @_test_start(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 i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Running '%s' (%s:%d)\0A\00"
define void @_test_start(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void getFileName(char *target) {
  printf("Please enter the file name: (example: source_file.txt)\n");
  scanf(" %s", target);
}


x86 assembly (clang, -O0):
<getFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef5(%rip),%rdi
call   1040 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileName>:
push   %rbx
mov    %rdi,%rbx
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Please enter the file name: (example: source_file.txt)\0A\00"
@.str.1 = [4 x i8] c" %s\00"
define void @getFileName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %s\00"
@str = [55 x i8] c"Please enter the file name: (example: source_file.txt)\00"
define void @getFileName(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int do_831() { return 831; }


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

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

LLVM IR (-O0):
define i32 @do_831() {
ret i32 831
}

LLVM IR (-O2):
define i32 @do_831() {
ret i32 831
}
int snoopy_datasource_noop(char *const result, char const *const arg) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @snoopy_datasource_noop(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @snoopy_datasource_noop(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getline(char **, size_t *, int /*<<< orphan*/ *);
int main(void) {
  char *line = 0;
  size_t len = 0;
  FILE *fp = 0;
  getline(&line, &len, fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <getline@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <getline@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i8*
%2 = alloca i64
%3 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = call i32 @getline(i8** %1, i64* %2, i32* null)
ret i32 0
}
/* Type definitions */
struct json {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ json_delete(int /*<<< orphan*/);
int /*<<< orphan*/ json_detach_item_from_array(struct json *, int);
void json_delete_item_from_array(struct json *array, int which) {
  json_delete(json_detach_item_from_array(array, which));
}


x86 assembly (clang, -O0):
<json_delete_item_from_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <json_detach_item_from_array@plt>
mov    %eax,%edi
call   1040 <json_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_delete_item_from_array>:
push   %rax
call   1030 <json_detach_item_from_array@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <json_delete@plt>

LLVM IR (-O0):
%struct.json = type { i32 }
define void @json_delete_item_from_array(%struct.json* %0, i32 %1) {
%3 = alloca %struct.json*
%4 = alloca i32
store %struct.json* %0, %struct.json** %3
store i32 %1, i32* %4
%5 = load %struct.json*, %struct.json** %3
%6 = load i32, i32* %4
%7 = call i32 @json_detach_item_from_array(%struct.json* %5, i32 %6)
%8 = call i32 @json_delete(i32 %7)
ret void
}

LLVM IR (-O2):
%struct.json = type { i32 }
define void @json_delete_item_from_array(%struct.json* %0, i32 %1) {
%3 = tail call i32 @json_detach_item_from_array(%struct.json* %0, i32 %1)
%4 = tail call i32 @json_delete(i32 %3)
ret void
}
int dummy(int param1, int param2) {
  if (1) {
  }
}


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

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

LLVM IR (-O0):
define i32 @dummy(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @dummy(i32 %0, i32 %1) {
ret i32 undef
}
void async_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @async_exit() {
ret void
}
void usename(char **name) { **name = 'a'; }


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

x86 assembly (clang, -O2):
<usename>:
mov    (%rdi),%rax
movb   $0x61,(%rax)
ret

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

LLVM IR (-O2):
define void @usename(i8** nocapture %0) {
%2 = load i8*, i8** %0
store i8 97, i8* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gfx_fill_arc(int, int, int, int, int /*<<< orphan*/, int);
void gfx_fill_circle(int xCtr, int yCtr, int r) {
  gfx_fill_arc(xCtr - r, yCtr - r, 2 * r, 2 * r, 0, 360);
}


x86 assembly (clang, -O0):
<gfx_fill_circle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
shl    $0x1,%edx
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
xor    %r8d,%r8d
mov    $0x168,%r9d
call   1030 <gfx_fill_arc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_fill_circle>:
sub    %edx,%edi
sub    %edx,%esi
lea    (%rdx,%rdx,1),%ecx
mov    %ecx,%edx
xor    %r8d,%r8d
mov    $0x168,%r9d
jmp    1030 <gfx_fill_arc@plt>

LLVM IR (-O0):
define void @gfx_fill_circle(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = sub nsw i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = sub nsw i32 %10, %11
%13 = load i32, i32* %6
%14 = mul nsw i32 2, %13
%15 = load i32, i32* %6
%16 = mul nsw i32 2, %15
%17 = call i32 @gfx_fill_arc(i32 %9, i32 %12, i32 %14, i32 %16, i32 0, i32 360)
ret void
}

LLVM IR (-O2):
define void @gfx_fill_circle(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %2
%5 = sub nsw i32 %1, %2
%6 = shl nsw i32 %2, 1
%7 = tail call i32 @gfx_fill_arc(i32 %4, i32 %5, i32 %6, i32 %6, i32 0, i32 360)
ret void
}
void RTLockValidatorRecExclRecursion(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecExclRecursion() {
ret void
}
/* Variables and functions */
double const log(int /*<<< orphan*/);
int /*<<< orphan*/ randomDouble();
double randomExpDouble(const double p) { return (-p * log(randomDouble())); }


x86 assembly (clang, -O0):
<randomExpDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <randomDouble@plt>
mov    %eax,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomExpDouble>:
sub    $0x18,%rsp
xorpd  0xed4(%rip),%xmm0
movapd %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <randomDouble@plt>
mov    %eax,%edi
call   1040 <log@plt>
mulsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @randomExpDouble(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call i32 (...) @randomDouble()
%6 = call double @log(i32 %5)
%7 = fmul double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @randomExpDouble(double %0) {
%2 = fneg double %0
%3 = tail call i32 (...) @randomDouble()
%4 = tail call double @log(i32 %3)
%5 = fmul double %4, %2
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t, int);
int /*<<< orphan*/ stderr;
void exit_input_error(size_t lineno, int line_num) {
  fprintf(stderr, "Wrong input format at line %lu : %d\n", lineno, line_num);
  exit(1);
}


x86 assembly (clang, -O0):
<exit_input_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_input_error>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Wrong input format at line %lu : %d\0A\00"
define void @exit_input_error(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i64, i64* %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 %6, i32 %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Wrong input format at line %lu : %d\0A\00"
define void @exit_input_error(i64 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 %0, i32 %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
void mspack_destroy_kwaj_decompressor(struct mskwaj_decompressor *this) {}


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

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

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

LLVM IR (-O2):
%struct.mskwaj_decompressor = type opaque
define void @mspack_destroy_kwaj_decompressor(%struct.mskwaj_decompressor* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MPI_Pcontrol(int, char *, void *);
int main(int argc, char *argv[]) {
  char region_name[4096];
  MPI_Pcontrol(1, "get_region();", (void *)region_name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1010(%rbp),%rdx
mov    $0x1,%edi
lea    0xec4(%rip),%rsi
call   1030 <MPI_Pcontrol@plt>
xor    %eax,%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1008,%rsp
lea    0xee2(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1030 <MPI_Pcontrol@plt>
xor    %eax,%eax
add    $0x1008,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"get_region();\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4096 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%8 = call i32 @MPI_Pcontrol(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"get_region();\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = call i32 @MPI_Pcontrol(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
unsigned char scanchar(void) { return 'a'; }


x86 assembly (clang, -O0):
<scanchar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanchar>:
mov    $0x61,%al
ret

LLVM IR (-O0):
define zeroext i8 @scanchar() {
ret i8 97
}

LLVM IR (-O2):
define zeroext i8 @scanchar() {
ret i8 97
}
unsigned esp(void) {
  int a;
  return &a;
}


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

x86 assembly (clang, -O2):
<esp>:
lea    -0x4(%rsp),%rax
ret

LLVM IR (-O0):
define i32 @esp() {
%1 = alloca i32
%2 = ptrtoint i32* %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @esp() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = ptrtoint i32* %1 to i64
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct uthread_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
struct uthread_t *uthread_running();
int uthread_status(struct uthread_t *);
void *hello_world(void *arg) {
  struct uthread_t *running = uthread_running();
  printf("uthread %p status %d\n", running, uthread_status(running));
  printf("hello world\n");
  return NULL;
}


x86 assembly (clang, -O0):
<hello_world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <uthread_running@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <uthread_status@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello_world>:
push   %rbx
xor    %eax,%eax
call   1040 <uthread_running@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <uthread_status@plt>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.uthread_t = type { i32 }
@.str = [22 x i8] c"uthread %p status %d\0A\00"
@.str.1 = [13 x i8] c"hello world\0A\00"
define i8* @hello_world(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.uthread_t*
store i8* %0, i8** %2
%4 = call %struct.uthread_t* (...) @uthread_running()
store %struct.uthread_t* %4, %struct.uthread_t** %3
%5 = load %struct.uthread_t*, %struct.uthread_t** %3
%6 = load %struct.uthread_t*, %struct.uthread_t** %3
%7 = call i32 @uthread_status(%struct.uthread_t* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %struct.uthread_t* %5, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
%struct.uthread_t = type { i32 }
@.str = [22 x i8] c"uthread %p status %d\0A\00"
@str = [12 x i8] c"hello world\00"
define noalias i8* @hello_world(i8* nocapture readnone %0) {
%2 = tail call %struct.uthread_t* (...) @uthread_running()
%3 = tail call i32 @uthread_status(%struct.uthread_t* %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %struct.uthread_t* %2, i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i8* null
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long root;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmotion_root(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xmotion.root = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xmotion_root>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xmotion_root(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xmotion_root(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
void sigchld_handler(int sig) {
  pid_t pid;
  int status;
  pid = waitpid(-1, &status, WNOHANG);
  printf("remove child pid: %ld\n", pid);
}


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigchld_handler>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [23 x i8] c"remove child pid: %ld\0A\00"
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* @WNOHANG
%6 = call i32 @waitpid(i32 -1, i32* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [23 x i8] c"remove child pid: %ld\0A\00"
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 -1, i32* %2, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int write(int, char const *, int);
int serial_write(int fd, const char *buf, int size) {
  int ret = 0;
  ret = write(fd, buf, size);
  if (ret != size)
    fprintf(stderr, "Error sending data");
  return ret;
}


x86 assembly (clang, -O0):
<serial_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     116c <serial_write+0x4c>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
call   1030 <write@plt>
mov    %eax,%ebx
cmp    %ebp,%eax
je     1145 <serial_write+0x25>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Error sending data\00"
define i32 @serial_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @write(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp ne i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %15, %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Error sending data\00"
define i32 @serial_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ japi_setflowlayout(int, int);
void j_setflowlayout(int arg0, int arg1) { japi_setflowlayout(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setflowlayout>:
jmp    1030 <japi_setflowlayout@plt>

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

LLVM IR (-O2):
define void @j_setflowlayout(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setflowlayout(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
char Expander_Read_Byte(char, int);
char Expander_Read_Port(char ModuleAddress) {
  return Expander_Read_Byte(ModuleAddress, 0x00);
}


x86 assembly (clang, -O0):
<Expander_Read_Port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %esi,%esi
movsbl -0x1(%rbp),%edi
call   1030 <Expander_Read_Byte@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Expander_Read_Port>:
xor    %esi,%esi
jmp    1030 <Expander_Read_Byte@plt>

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

LLVM IR (-O2):
define signext i8 @Expander_Read_Port(i8 signext %0) {
%2 = tail call signext i8 @Expander_Read_Byte(i8 signext %0, i32 0)
ret i8 %2
}