xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Hello world.\n");
  printf("This is my %d programm.\n", 1);
  printf("In %c programming language.\n", 'C');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x43,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x43,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world.\0A\00"
@.str.1 = [25 x i8] c"This is my %d programm.\0A\00"
@.str.2 = [29 x i8] c"In %c programming language.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8 signext 67)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello world.\0A\00"
@.str.1 = [25 x i8] c"This is my %d programm.\0A\00"
@.str.2 = [29 x i8] c"In %c programming language.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8 signext 67)
ret i32 0
}
void stack_trim(void) {}


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

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

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

LLVM IR (-O2):
define void @stack_trim() {
ret void
}
/* Variables and functions */
scalar_t__ EINVAL;
scalar_t__ strtol(char *, char **, int);
int isNumeric(char *s) {
  char *p;
  if (strtol(s, &p, 10) == EINVAL)
    return 0;
  if (p == s)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isNumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
jne    114a <isNumeric+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    116b <isNumeric+0x5b>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1164 <isNumeric+0x54>
movl   $0x0,-0x4(%rbp)
jmp    116b <isNumeric+0x5b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumeric>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
cmp    %rbx,0x8(%rsp)
setne  %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@EINVAL = global i64 0
define i32 @isNumeric(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strtol(i8* %5, i8** %4, i32 10)
%7 = load i64, i64* @EINVAL
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %16
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = icmp eq i8* %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %2
br label %16
15: ; preds = %10
store i32 1, i32* %2
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@EINVAL = global i64 0
define i32 @isNumeric(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i64, i64* @EINVAL
%6 = icmp ne i64 %4, %5
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, %0
%9 = select i1 %6, i1 %8, i1 false
%10 = zext i1 %9 to i32
ret i32 %10
}
char *strend(cp)
register char *cp;
{
  while (*cp)
    cp++;
  return (cp);
}


x86 assembly (clang, -O0):
<strend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1126 <strend+0x26>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <strend+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strend>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rax)
lea    0x1(%rax),%rax
jne    1110 <strend+0x10>
ret

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

LLVM IR (-O2):
define i8* @strend(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %3
}
int test_imm_2Buint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x2B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Buint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x2b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Buint64_lowword_mem>:
testb  $0x2b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Buint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 43
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gtk_text_iter_set_visible_line_offset() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_set_visible_line_offset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_ptTimer(int /*<<< orphan*/, void *);
void stop_pTimer() { set_ptTimer(0, ((void *)0)); }


x86 assembly (clang, -O0):
<stop_pTimer>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <set_ptTimer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_pTimer>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <set_ptTimer@plt>

LLVM IR (-O0):
define void @stop_pTimer() {
%1 = call i32 @set_ptTimer(i32 0, i8* null)
ret void
}

LLVM IR (-O2):
define void @stop_pTimer() {
%1 = tail call i32 @set_ptTimer(i32 0, i8* null)
ret void
}
/* Variables and functions */
int rand();
int throw(void) {
  int die1, die2, total;
  die1 = rand() % 6 + 1;
  die2 = rand() % 6 + 1;
  total = die1 + die2;
  return (total);
}


x86 assembly (clang, -O0):
<throw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<throw>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rbx
imul   $0x2aaaaaab,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    %ebx,%eax
add    $0x2,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @throw() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 6
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 6
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @throw() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %2, 2
%6 = add nsw i32 %5, %4
ret i32 %6
}
unsigned long pcm_prng(unsigned long state) {
  return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL;
}


x86 assembly (clang, -O0):
<pcm_prng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0x19660d,-0x8(%rbp),%rax
add    $0x3c6ef35f,%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcm_prng>:
imul   $0x19660d,%edi,%eax
add    $0x3c6ef35f,%eax
ret

LLVM IR (-O0):
define i64 @pcm_prng(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 1664525
%5 = add i64 %4, 1013904223
%6 = and i64 %5, 4294967295
ret i64 %6
}

LLVM IR (-O2):
define i64 @pcm_prng(i64 %0) {
%2 = mul i64 %0, 1664525
%3 = add i64 %2, 1013904223
%4 = and i64 %3, 4294967295
ret i64 %4
}
void fmt_set_format() {}


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

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

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

LLVM IR (-O2):
define void @fmt_set_format() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Quit(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void CA_CannotOpen(char *string) {
  char str[30];
  strcpy(str, "Can't open ");
  strcat(str, string);
  strcat(str, "!\n");
  Quit(str);
}


x86 assembly (clang, -O0):
<CA_CannotOpen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcat@plt>
lea    -0x30(%rbp),%rdi
lea    0xea8(%rip),%rsi
call   1040 <strcat@plt>
lea    -0x30(%rbp),%rdi
call   1050 <Quit@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CA_CannotOpen>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
call   1050 <Quit@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Can't open \00"
@.str.1 = [3 x i8] c"!\0A\00"
define void @CA_CannotOpen(i8* %0) {
%2 = alloca i8*
%3 = alloca [30 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcat(i8* %6, i8* %7)
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%12 = call i32 @Quit(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Can't open \00"
@.str.1 = [3 x i8] c"!\0A\00"
define void @CA_CannotOpen(i8* %0) {
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strcat(i8* %3, i8* %0)
%6 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @Quit(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_proc_c_v1() {
  printf("Hello from \"test_proc_c_v1(C)\", "
         "invoked from \"demo_fort_v1(Fort)\"!\n");
}


x86 assembly (clang, -O0):
<test_proc_c_v1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [68 x i8] c"Hello from \22test_proc_c_v1(C)\22, invoked from \22demo_fort_v1(Fort)\22!\0A\00"
define void @test_proc_c_v1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [67 x i8] c"Hello from \22test_proc_c_v1(C)\22, invoked from \22demo_fort_v1(Fort)\22!\00"
define void @test_proc_c_v1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
ret void
}
int waitForInput(int fd1, int fd2) {
  int ret = 0;
  ret = (1 | 2);
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @waitForInput(i32 %0, i32 %1) {
ret i32 3
}
int _JsString_Init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_JsString_Init() {
ret i32 0
}
/* Variables and functions */
int nepim_str_split(char, char *, int, char **);
int nepim_str_split_comma(char *buf, int buf_size, char **next) {
  return nepim_str_split(',', buf, buf_size, next);
}


x86 assembly (clang, -O0):
<nepim_str_split_comma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x2c,%edi
call   1030 <nepim_str_split@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nepim_str_split_comma>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x2c,%edi
jmp    1030 <nepim_str_split@plt>

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

LLVM IR (-O2):
define i32 @nepim_str_split_comma(i8* %0, i32 %1, i8** %2) {
%4 = tail call i32 @nepim_str_split(i8 signext 44, i8* %0, i32 %1, i8** %2)
ret i32 %4
}
/* Variables and functions */
int O_CREAT;
int /*<<< orphan*/ __fortify_fail(char *);
int __open64(char const *, int);
int __open64_2(const char *file, int oflag) {
  if (oflag & O_CREAT)
    __fortify_fail("invalid open64 call: O_CREAT without mode");
  return __open64(file, oflag);
}


x86 assembly (clang, -O0):
<__open64_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ebf(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1150 <__open64_2+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <__fortify_fail@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <__open64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__open64_2>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2ec8(%rip),%rax
test   %esi,(%rax)
je     1140 <__open64_2+0x20>
lea    0xec5(%rip),%rdi
call   1040 <__fortify_fail@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__open64@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@.str = [42 x i8] c"invalid open64 call: O_CREAT without mode\00"
define i32 @__open64_2(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* @O_CREAT
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @__fortify_fail(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @__open64(i8* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@.str = [42 x i8] c"invalid open64 call: O_CREAT without mode\00"
define i32 @__open64_2(i8* %0, i32 %1) {
%3 = load i32, i32* @O_CREAT
%4 = and i32 %3, %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @__fortify_fail(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
%9 = tail call i32 @__open64(i8* %0, i32 %1)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ MSG_NOSIGNAL;
int send(int, char *, int, int /*<<< orphan*/);
int comms_send(int socketfd, char *data, int data_len) {
  return send(socketfd, data, data_len, MSG_NOSIGNAL);
}


x86 assembly (clang, -O0):
<comms_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2ead(%rip),%rax
mov    (%rax),%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comms_send>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
@MSG_NOSIGNAL = global i32 0
define i32 @comms_send(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @MSG_NOSIGNAL
%5 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int net_read_bytes(int);
int /*<<< orphan*/ net_skip_bytes(int);
void exec_sound(void) {
  int channel = net_read_bytes(2);
  if (channel & (1 << 15))
    net_skip_bytes(1);
  if (channel & (1 << 14))
    net_skip_bytes(1);
  net_skip_bytes(7);
}


x86 assembly (clang, -O0):
<exec_sound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1040 <net_read_bytes@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     1150 <exec_sound+0x30>
mov    $0x1,%edi
call   1030 <net_skip_bytes@plt>
mov    -0x4(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     116b <exec_sound+0x4b>
mov    $0x1,%edi
call   1030 <net_skip_bytes@plt>
mov    $0x7,%edi
call   1030 <net_skip_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_sound>:
push   %rbx
mov    $0x2,%edi
call   1040 <net_read_bytes@plt>
mov    %eax,%ebx
test   $0x8000,%eax
je     113e <exec_sound+0x1e>
mov    $0x1,%edi
call   1030 <net_skip_bytes@plt>
test   $0x4000,%ebx
je     1150 <exec_sound+0x30>
mov    $0x1,%edi
call   1030 <net_skip_bytes@plt>
mov    $0x7,%edi
pop    %rbx
jmp    1030 <net_skip_bytes@plt>

LLVM IR (-O0):
define void @exec_sound() {
%1 = alloca i32
%2 = call i32 @net_read_bytes(i32 2)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, 32768
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @net_skip_bytes(i32 1)
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
%10 = and i32 %9, 16384
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @net_skip_bytes(i32 1)
br label %14
14: ; preds = %12, %8
%15 = call i32 @net_skip_bytes(i32 7)
ret void
}

LLVM IR (-O2):
define void @exec_sound() {
%1 = tail call i32 @net_read_bytes(i32 2)
%2 = and i32 %1, 32768
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @net_skip_bytes(i32 1)
br label %6
6: ; preds = %4, %0
%7 = and i32 %1, 16384
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @net_skip_bytes(i32 1)
br label %11
11: ; preds = %9, %6
%12 = tail call i32 @net_skip_bytes(i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UNUSED(void *);
int /*<<< orphan*/ free(void *);
void qc_segment_free(void *instance, void *env) {
  UNUSED(env);
  free(instance);
}


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

x86 assembly (clang, -O2):
<qc_segment_free>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <UNUSED@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @qc_segment_free(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @UNUSED(i8* %1)
%4 = tail call i32 @free(i8* %0)
ret void
}
int ntoi(int addr) { return (addr); }


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

x86 assembly (clang, -O2):
<ntoi>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ntoi(i32 returned %0) {
ret i32 %0
}
int i64c(int i) {
  i &= 0x3f;
  if (i == 0)
    return '.';
  if (i == 1)
    return '/';
  if (i < 12)
    return ('0' - 2 + i);
  if (i < 38)
    return ('A' - 12 + i);
  return ('a' - 38 + i);
}


x86 assembly (clang, -O0):
<i64c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1126 <i64c+0x26>
movl   $0x2e,-0x4(%rbp)
jmp    1175 <i64c+0x75>
cmpl   $0x1,-0x8(%rbp)
jne    113c <i64c+0x3c>
movl   $0x2f,-0x4(%rbp)
jmp    1175 <i64c+0x75>
cmpl   $0xc,-0x8(%rbp)
jge    1154 <i64c+0x54>
mov    -0x8(%rbp),%eax
add    $0x2e,%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <i64c+0x75>
cmpl   $0x26,-0x8(%rbp)
jge    116c <i64c+0x6c>
mov    -0x8(%rbp),%eax
add    $0x35,%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <i64c+0x75>
mov    -0x8(%rbp),%eax
add    $0x3b,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i64c>:
mov    %edi,%eax
and    $0x3f,%eax
je     1112 <i64c+0x12>
cmp    $0x1,%eax
jne    1118 <i64c+0x18>
mov    $0x2f,%eax
ret
mov    $0x2e,%eax
ret
cmp    $0xb,%eax
ja     1121 <i64c+0x21>
add    $0x2e,%eax
ret
cmp    $0x25,%eax
ja     112a <i64c+0x2a>
add    $0x35,%eax
ret
add    $0x3b,%eax
ret

LLVM IR (-O0):
define i32 @i64c(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 63
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 46, i32* %2
br label %28
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 47, i32* %2
br label %28
13: ; preds = %9
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 12
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 46, %17
store i32 %18, i32* %2
br label %28
19: ; preds = %13
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 38
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %3
%24 = add nsw i32 53, %23
store i32 %24, i32* %2
br label %28
25: ; preds = %19
%26 = load i32, i32* %3
%27 = add nsw i32 59, %26
store i32 %27, i32* %2
br label %28
28: ; preds = %25, %22, %16, %12, %8
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @i64c(i32 %0) {
%2 = and i32 %0, 63
switch i32 %2, label %4 [
i32 0, label %14
i32 1, label %3
]
3: ; preds = %1
br label %14
4: ; preds = %1
%5 = icmp ult i32 %2, 12
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = add nuw nsw i32 %2, 46
br label %14
8: ; preds = %4
%9 = icmp ult i32 %2, 38
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = add nuw nsw i32 %2, 53
br label %14
12: ; preds = %8
%13 = add nuw nsw i32 %2, 59
br label %14
14: ; preds = %1, %12, %10, %6, %3
%15 = phi i32 [ 47, %3 ], [ %7, %6 ], [ %11, %10 ], [ %13, %12 ], [ 46, %1 ]
ret i32 %15
}
/* Variables and functions */
char *abspath(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ normpath(char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
char *strdup(char *);
void test(char *s) {
  char *abs_s = abspath(s);
  char *norm_s = strdup(s);
  normpath(norm_s);
  printf("%-25s -> '%s'  '%s'\n", s, abs_s, norm_s);
  free(abs_s);
  free(norm_s);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <abspath@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <normpath@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xe6e(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1070 <abspath@plt>
mov    %rax,%r14
mov    %r15,%rdi
call   1060 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <normpath@plt>
lea    0xe86(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%-25s -> '%s' '%s'\0A\00"
define void @test(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @abspath(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %2
%8 = call i8* @strdup(i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @normpath(i8* %9)
%11 = load i8*, i8** %2
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
%17 = load i8*, i8** %4
%18 = call i32 @free(i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%-25s -> '%s' '%s'\0A\00"
define void @test(i8* %0) {
%2 = tail call i8* @abspath(i8* %0)
%3 = tail call i8* @strdup(i8* %0)
%4 = tail call i32 @normpath(i8* %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2, i8* %3)
%6 = tail call i32 @free(i8* %2)
%7 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sigsetmask(int /*<<< orphan*/);
main() { sigsetmask(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <sigsetmask@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @sigsetmask(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sigsetmask(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_assert_fail_add_test();
void test_assert_fail_add_test_constructor(void) {
  test_assert_fail_add_test();
}


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

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

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

LLVM IR (-O2):
define void @test_assert_fail_add_test_constructor() {
%1 = tail call i32 (...) @test_assert_fail_add_test()
ret void
}
/* Variables and functions */
char *ed_typestring(int /*<<< orphan*/);
int /*<<< orphan*/ usb_pipetype(int);
char *pipestring(int pipe) { return ed_typestring(usb_pipetype(pipe)); }


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

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

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

LLVM IR (-O2):
define i8* @pipestring(i32 %0) {
%2 = tail call i32 @usb_pipetype(i32 %0)
%3 = tail call i8* @ed_typestring(i32 %2)
ret i8* %3
}
int max(int num1, int num2) { return (num1 > num2) ? num1 : num2; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }


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

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

LLVM IR (-O0):
define i32 @Ch(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* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = xor i32 %9, %10
%12 = and i32 %8, %11
%13 = xor i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @Ch(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %2, %1
%5 = and i32 %4, %0
%6 = xor i32 %5, %2
ret i32 %6
}
void carp_instr_NOP(__attribute__((unused)) struct carp_machine_state *m) {}


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

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

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

LLVM IR (-O2):
%struct.carp_machine_state = type opaque
define void @carp_instr_NOP(%struct.carp_machine_state* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x2c() {
  Assert_real((islower(44) == 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_islower.c",
              225, ("islower should be 0 for ,"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x2c>:
push   %rax
mov    $0x2c,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xe1,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ,\00"
define void @t_islower_0x2c() {
%1 = call i64 @islower(i32 44)
%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 225, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ,\00"
define void @t_islower_0x2c() {
%1 = tail call i64 @islower(i32 44)
%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 225, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_89uint32_mem(unsigned int *val) {
  return ((*val) & (0x89 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_89uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x89,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_89uint32_mem>:
testb  $0x89,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_89uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 137
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int stat(char *, struct stat *);
int lrng_present(void) {
  struct stat buf;
  int ret = stat("/proc/sys/kernel/random/lrng_type", &buf);
  if (ret == -1 && errno == ENOENT)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<lrng_present>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    115b <lrng_present+0x4b>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
jne    115b <lrng_present+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1162 <lrng_present+0x52>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrng_present>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    113d <lrng_present+0x2d>
mov    0x2eb4(%rip),%rax
mov    (%rax),%rcx
mov    0x2e9a(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
je     1142 <lrng_present+0x32>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [34 x i8] c"/proc/sys/kernel/random/lrng_type\00"
@errno = global i64 0
@ENOENT = global i64 0
define i32 @lrng_present() {
%1 = alloca i32
%2 = alloca %struct.stat
%3 = alloca i32
%4 = call i32 @stat(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), %struct.stat* %2)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i64, i64* @errno
%9 = load i64, i64* @ENOENT
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 0, i32* %1
br label %13
12: ; preds = %7, %0
store i32 1, i32* %1
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [34 x i8] c"/proc/sys/kernel/random/lrng_type\00"
@errno = global i64 0
@ENOENT = global i64 0
define i32 @lrng_present() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i32 @stat(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i64, i64* @errno
%7 = load i64, i64* @ENOENT
%8 = icmp eq i64 %6, %7
br i1 %8, label %10, label %9
9: ; preds = %5, %0
br label %10
10: ; preds = %5, %9
%11 = phi i32 [ 1, %9 ], [ 0, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "uname", message); }


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

x86 assembly (clang, -O2):
<g_error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [6 x i8] c"uname\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __p3dfft_MOD_p3dfft_ftran_r2c(float *, float *);
void p3dfft_ftran_r2c(float *A, float *B) {
  __p3dfft_MOD_p3dfft_ftran_r2c(A, B);
}


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

x86 assembly (clang, -O2):
<p3dfft_ftran_r2c>:
jmp    1030 <__p3dfft_MOD_p3dfft_ftran_r2c@plt>

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

LLVM IR (-O2):
define void @p3dfft_ftran_r2c(float* %0, float* %1) {
%3 = tail call i32 @__p3dfft_MOD_p3dfft_ftran_r2c(float* %0, float* %1)
ret void
}
/* Type definitions */
struct nl_msg {
  int dummy;
};

/* Variables and functions */
struct nl_msg *nlmsg_alloc();
int /*<<< orphan*/ panic(char *);
struct nl_msg *nl80211_nlmsg_xalloc(void) {
  struct nl_msg *ret = nlmsg_alloc();
  if (!ret)
    panic("Cannot allocate nlmsg memory!\n");
  return ret;
}


x86 assembly (clang, -O0):
<nl80211_nlmsg_xalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <nlmsg_alloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114a <nl80211_nlmsg_xalloc+0x2a>
lea    0xebb(%rip),%rdi
call   1030 <panic@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nl80211_nlmsg_xalloc>:
push   %rbx
xor    %eax,%eax
call   1040 <nlmsg_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <nl80211_nlmsg_xalloc+0x1c>
lea    0xec9(%rip),%rdi
call   1030 <panic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.nl_msg = type { i32 }
@.str = [31 x i8] c"Cannot allocate nlmsg memory!\0A\00"
define %struct.nl_msg* @nl80211_nlmsg_xalloc() {
%1 = alloca %struct.nl_msg*
%2 = call %struct.nl_msg* (...) @nlmsg_alloc()
store %struct.nl_msg* %2, %struct.nl_msg** %1
%3 = load %struct.nl_msg*, %struct.nl_msg** %1
%4 = icmp ne %struct.nl_msg* %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load %struct.nl_msg*, %struct.nl_msg** %1
ret %struct.nl_msg* %8
}

LLVM IR (-O2):
%struct.nl_msg = type { i32 }
@.str = [31 x i8] c"Cannot allocate nlmsg memory!\0A\00"
define %struct.nl_msg* @nl80211_nlmsg_xalloc() {
%1 = tail call %struct.nl_msg* (...) @nlmsg_alloc()
%2 = icmp eq %struct.nl_msg* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret %struct.nl_msg* %1
}
int module_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @module_init() {
ret i32 0
}
/* Variables and functions */
bool nrf53_errata_65(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_65() {
ret i32 0
}
void free_output_search(char **files_found, int files_found_count) {
  int i;
  for (i = 0; i < files_found_count; i++) {
    free(files_found[i]);
  }
  free(files_found);
}


x86 assembly (clang, -O0):
<free_output_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_output_search+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_output_search+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_output_search>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_output_search+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_output_search+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

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


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

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

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

LLVM IR (-O2):
define i32 @sched_yield() {
ret i32 -1
}
int main(int argc, char **argv) {
  float x = argc;
  return (int)(x + 42.);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed3(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cvtsi2ss %edi,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xef0(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
store float %8, float* %6
%9 = load float, float* %6
%10 = fpext float %9 to double
%11 = fadd double %10, 4.200000e+01
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = sitofp i32 %0 to float
%4 = fpext float %3 to double
%5 = fadd double %4, 4.200000e+01
%6 = fptosi double %5 to i32
ret i32 %6
}
/* Variables and functions */
int chdir(char const *);
int iposix_chdir(const char *path) { return chdir(path); }


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

x86 assembly (clang, -O2):
<iposix_chdir>:
jmp    1030 <chdir@plt>

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

LLVM IR (-O2):
define i32 @iposix_chdir(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ BUG();
int freeze_processes(void) {
  BUG();
  return 0;
}


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

x86 assembly (clang, -O2):
<freeze_processes>:
push   %rax
xor    %eax,%eax
call   1030 <BUG@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @freeze_processes() {
%1 = call i32 (...) @BUG()
ret i32 0
}

LLVM IR (-O2):
define i32 @freeze_processes() {
%1 = tail call i32 (...) @BUG()
ret i32 0
}