xunge/DecIR huggingface dataset:
/* Variables and functions */
int BIO_dgram_non_fatal_error(int);
int errno;
int BIO_dgram_should_retry(int i) {
  int err;
  if ((i == 0) || (i == -1)) {
    err = errno;
    return (BIO_dgram_non_fatal_error(err));
  }
  return (0);
}


x86 assembly (clang, -O0):
<BIO_dgram_should_retry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <BIO_dgram_should_retry+0x1f>
cmpl   $0xffffffff,-0x8(%rbp)
jne    114b <BIO_dgram_should_retry+0x3b>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <BIO_dgram_non_fatal_error@plt>
mov    %eax,-0x4(%rbp)
jmp    1152 <BIO_dgram_should_retry+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_dgram_should_retry>:
add    $0x1,%edi
cmp    $0x1,%edi
ja     1126 <BIO_dgram_should_retry+0x16>
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <BIO_dgram_non_fatal_error@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @BIO_dgram_should_retry(i32 %0) {
%2 = add i32 %0, 1
%3 = icmp ult i32 %2, 2
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @BIO_dgram_non_fatal_error(i32 %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xda() {
  Assert_real((isupper(218) == 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_isupper.c",
              1095, ("isupper should be 0 for 0xda"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xda>:
push   %rax
mov    $0xda,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x447,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xda\00"
define void @t_isupper_0xda() {
%1 = call i64 @isupper(i32 218)
%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 1095, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xda\00"
define void @t_isupper_0xda() {
%1 = tail call i64 @isupper(i32 218)
%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 1095, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int roxml_is_separator(char sep) {
  int i = 0;
  char separators[32] = "\r\t\n ";
  while (separators[i] != 0)
    if (sep == separators[i++])
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<roxml_is_separator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0xee8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xee2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xedf(%rip),%rax
mov    %rax,-0x18(%rbp)
movslq -0xc(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     117f <roxml_is_separator+0x7f>
movsbl -0x5(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl -0x30(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    117a <roxml_is_separator+0x7a>
movl   $0x1,-0x4(%rbp)
jmp    1186 <roxml_is_separator+0x86>
jmp    113d <roxml_is_separator+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roxml_is_separator>:
cmp    $0x20,%dil
ja     1120 <roxml_is_separator+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    1120 <roxml_is_separator+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.roxml_is_separator.separators = [32 x i8] c"\0D\09\0A \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @roxml_is_separator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca [32 x i8]
store i8 %0, i8* %3
store i32 0, i32* %4
%6 = bitcast [32 x i8]* %5 to i8*
br label %7
7: ; preds = %25, %1
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %26
14: ; preds = %7
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %16, %22
br i1 %23, label %24, label %25
24: ; preds = %14
store i32 1, i32* %2
br label %27
25: ; preds = %14
br label %7
26: ; preds = %7
store i32 0, i32* %2
br label %27
27: ; preds = %26, %24
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @roxml_is_separator(i8 signext %0) {
switch i8 %0, label %2 [
i8 13, label %3
i8 9, label %3
i8 10, label %3
i8 32, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage(void) {
  fprintf(stderr, "Usage: 'tsmodder input.ts [b:buffer_size] +0 pat.ts +pid "
                  "pmt.ts +pid nit.ts  ... '\n");
  fprintf(stderr, "'+pid file.ts' change the packets with 'pid' with the "
                  "packets from the file.ts\n");
  fprintf(stderr, "'b:buffer_size' set size of the internal buffer to many "
                  "packets as buffer_size\n");
}


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

x86 assembly (clang, -O2):
<Usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf25(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf67(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [84 x i8] c"Usage: 'tsmodder input.ts [b:buffer_size] +0 pat.ts +pid pmt.ts +pid nit.ts ... '\0A\00"
@.str.1 = [80 x i8] c"'+pid file.ts' change the packets with 'pid' with the packets from the file.ts\0A\00"
@.str.2 = [80 x i8] c"'b:buffer_size' set size of the internal buffer to many packets as buffer_size\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [84 x i8] c"Usage: 'tsmodder input.ts [b:buffer_size] +0 pat.ts +pid pmt.ts +pid nit.ts ... '\0A\00"
@.str.1 = [80 x i8] c"'+pid file.ts' change the packets with 'pid' with the packets from the file.ts\0A\00"
@.str.2 = [80 x i8] c"'b:buffer_size' set size of the internal buffer to many packets as buffer_size\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char u_char;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void mark_packet(u_char *buf, int bufsiz) {
  if (bufsiz > 13) {
    buf[13] = 'Z';
  } else {
    fprintf(stderr, "Can't mark packet; too small :/");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<mark_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jle    1146 <mark_packet+0x26>
mov    -0x8(%rbp),%rax
movb   $0x5a,0xd(%rax)
jmp    1165 <mark_packet+0x45>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_packet>:
push   %rax
cmp    $0xe,%esi
jl     112c <mark_packet+0xc>
movb   $0x5a,0xd(%rdi)
pop    %rax
ret
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Can't mark packet; too small :/\00"
define void @mark_packet(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 = icmp sgt i32 %5, 13
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 13
store i8 90, i8* %9
br label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %7
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Can't mark packet; too small :/\00"
define void @mark_packet(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 13
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 13
store i8 90, i8* %5
ret void
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
}
int gt(int a, int b) { return a > b ? a : b; }


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

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

LLVM IR (-O0):
define i32 @gt(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 @gt(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("ybfasm (experimental)\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"ybfasm (experimental)\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [22 x i8] c"ybfasm (experimental)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tcc_free(int *);
void tok_str_free(int *str) { tcc_free(str); }


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

x86 assembly (clang, -O2):
<tok_str_free>:
jmp    1030 <tcc_free@plt>

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

LLVM IR (-O2):
define void @tok_str_free(i32* %0) {
%2 = tail call i32 @tcc_free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ readPWM(int);
void PWM_ISR_5() { readPWM(5); }


x86 assembly (clang, -O0):
<PWM_ISR_5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <readPWM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWM_ISR_5>:
mov    $0x5,%edi
jmp    1030 <readPWM@plt>

LLVM IR (-O0):
define void @PWM_ISR_5() {
%1 = call i32 @readPWM(i32 5)
ret void
}

LLVM IR (-O2):
define void @PWM_ISR_5() {
%1 = tail call i32 @readPWM(i32 5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int pthread_mutex_lock(int /*<<< orphan*/ *);
char *strerror(int);
int main() {
  pthread_t mutex;
  pthread_mutex_init(&mutex, NULL);
  int ret = pthread_mutex_lock(&mutex);
  printf("errno: %s\n", strerror(ret));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <pthread_mutex_init@plt>
lea    -0x4(%rbp),%rdi
call   1060 <pthread_mutex_lock@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <strerror@plt>
mov    %rax,%rsi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <pthread_mutex_init@plt>
mov    %rbx,%rdi
call   1060 <pthread_mutex_lock@plt>
mov    %eax,%edi
call   1040 <strerror@plt>
lea    0xe96(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"errno: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @pthread_mutex_init(i32* %1, i32* null)
%4 = call i32 @pthread_mutex_lock(i32* %1)
%5 = call i8* @strerror(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
int install_running_p(struct install_options *param) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.install_options = type opaque
define i32 @install_running_p(%struct.install_options* nocapture readnone %0) {
ret i32 0
}
double linearphi1(double lp) { return lp; }


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

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

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

LLVM IR (-O2):
define double @linearphi1(double returned %0) {
ret double %0
}
/* Type definitions */
struct htrace_span {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ htrace_span_free(struct htrace_span *);
void span_table_free_entry(void *tracer, void *key, void *val) {
  struct htrace_span *span = val;
  htrace_span_free(span);
}


x86 assembly (clang, -O0):
<span_table_free_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <htrace_span_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<span_table_free_entry>:
mov    %rdx,%rdi
jmp    1030 <htrace_span_free@plt>

LLVM IR (-O0):
%struct.htrace_span = type { i32 }
define void @span_table_free_entry(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.htrace_span*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to %struct.htrace_span*
store %struct.htrace_span* %9, %struct.htrace_span** %7
%10 = load %struct.htrace_span*, %struct.htrace_span** %7
%11 = call i32 @htrace_span_free(%struct.htrace_span* %10)
ret void
}

LLVM IR (-O2):
%struct.htrace_span = type { i32 }
define void @span_table_free_entry(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.htrace_span*
%5 = tail call i32 @htrace_span_free(%struct.htrace_span* %4)
ret void
}
long __syscall2(long n, long a1, long a2) {
  unsigned long __ret;
  __asm__ __volatile__("xchg %%ebx,%%edx ; "
                       "call *%%gs:16"
                       " ; xchg %%ebx,%%edx"
                       : "=a"(__ret)
                       : "a"(n), "d"(a1), "c"(a2)
                       : "memory");
  return __ret;
}


x86 assembly (clang, -O0):
<__syscall2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xchg   %edx,%ebx
call   *%gs:0x10
xchg   %edx,%ebx
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__syscall2>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rax
xchg   %edx,%ebx
call   *%gs:0x10
xchg   %edx,%ebx
ret

LLVM IR (-O0):
define i64 @__syscall2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i64 asm sideeffect "xchg %ebx,%edx ; call *%gs:16 ; xchg %ebx,%edx", "={ax},{ax},{dx},{cx},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %8, i64 %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
ret i64 %12
}

LLVM IR (-O2):
define i64 @__syscall2(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 asm sideeffect "xchg %ebx,%edx ; call *%gs:16 ; xchg %ebx,%edx", "={ax},{ax},{dx},{cx},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2)
ret i64 %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
scalar_t__ nrf_802154_rssi_sample_temp_corr_value_get();
uint8_t nrf_802154_rssi_cca_ed_threshold_corrected_get(uint8_t cca_ed) {
  return cca_ed - nrf_802154_rssi_sample_temp_corr_value_get();
}


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

x86 assembly (clang, -O2):
<nrf_802154_rssi_cca_ed_threshold_corrected_get>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <nrf_802154_rssi_sample_temp_corr_value_get@plt>
sub    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @nrf_802154_rssi_cca_ed_threshold_corrected_get(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 (...) @nrf_802154_rssi_sample_temp_corr_value_get()
%5 = sub nsw i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @nrf_802154_rssi_cca_ed_threshold_corrected_get(i64 %0) {
%2 = tail call i64 (...) @nrf_802154_rssi_sample_temp_corr_value_get()
%3 = sub nsw i64 %0, %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void showBadNumeralStringMessage(char *value) {
  fprintf(stderr, "in the string '%s'.\n", value);
}


x86 assembly (clang, -O0):
<showBadNumeralStringMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showBadNumeralStringMessage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"in the string '%s'.\0A\00"
define void @showBadNumeralStringMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"in the string '%s'.\0A\00"
define void @showBadNumeralStringMessage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tty_put_ui32(long long);
int /*<<< orphan*/ tty_putchar(char);
void tty_put_i64(long long v) {
  if (v < 0) {
    tty_putchar('-');
    v = -v;
  }
  tty_put_ui32(v);
}


x86 assembly (clang, -O0):
<tty_put_i64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    114b <tty_put_i64+0x2b>
mov    $0x2d,%edi
call   1030 <tty_putchar@plt>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <tty_put_ui32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_put_i64>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jns    1136 <tty_put_i64+0x16>
mov    $0x2d,%edi
call   1030 <tty_putchar@plt>
neg    %rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <tty_put_ui32@plt>

LLVM IR (-O0):
define void @tty_put_i64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @tty_putchar(i8 signext 45)
%7 = load i64, i64* %2
%8 = sub nsw i64 0, %7
store i64 %8, i64* %2
br label %9
9: ; preds = %5, %1
%10 = load i64, i64* %2
%11 = call i32 @tty_put_ui32(i64 %10)
ret void
}

LLVM IR (-O2):
define void @tty_put_i64(i64 %0) {
%2 = icmp slt i64 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @tty_putchar(i8 signext 45)
%5 = sub nsw i64 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i64 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @tty_put_ui32(i64 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *, int /*<<< orphan*/);
int /*<<< orphan*/ getProgramName();
void usage() { error("Usage: %s run1 run2 [qrels]\n", getProgramName()); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getProgramName@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
xor    %eax,%eax
call   1030 <getProgramName@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Usage: %s run1 run2 [qrels]\0A\00"
define void @usage() {
%1 = call i32 (...) @getProgramName()
%2 = call i32 @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Usage: %s run1 run2 [qrels]\0A\00"
define void @usage() {
%1 = tail call i32 (...) @getProgramName()
%2 = tail call i32 @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int remove(const char *pathname) {
  fprintf(stderr, "\nAccess to dangerous function %s() denied.\n", "remove");
  assert(0);
  ;
}


x86 assembly (clang, -O0):
<remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
lea    0xee9(%rip),%rdx
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xef4(%rip),%rdx
call   1040 <fprintf@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"\0AAccess to dangerous function %s() denied.\0A\00"
@.str.1 = [7 x i8] c"remove\00"
define i32 @remove(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @assert(i32 0)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"\0AAccess to dangerous function %s() denied.\0A\00"
@.str.1 = [7 x i8] c"remove\00"
define i32 @remove(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @assert(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ata_get_string(unsigned char const *, int, int, char *);
void ata_get_ata_identify_fw_rev(const unsigned char *buf, char *out) {
  ata_get_string(buf, 23, 26, out);
}


x86 assembly (clang, -O0):
<ata_get_ata_identify_fw_rev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x17,%esi
mov    $0x1a,%edx
call   1030 <ata_get_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_get_ata_identify_fw_rev>:
mov    %rsi,%rcx
mov    $0x17,%esi
mov    $0x1a,%edx
jmp    1030 <ata_get_string@plt>

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

LLVM IR (-O2):
define void @ata_get_ata_identify_fw_rev(i8* %0, i8* %1) {
%3 = tail call i32 @ata_get_string(i8* %0, i32 23, i32 26, i8* %1)
ret void
}
void replicationSetupSlaveForFullResync(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               111, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<replicationSetupSlaveForFullResync>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x6f,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<replicationSetupSlaveForFullResync>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x6f,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.replicationSetupSlaveForFullResync = [35 x i8] c"replicationSetupSlaveForFullResync\00"
define void @replicationSetupSlaveForFullResync() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 111, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.replicationSetupSlaveForFullResync, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.replicationSetupSlaveForFullResync = [35 x i8] c"replicationSetupSlaveForFullResync\00"
define void @replicationSetupSlaveForFullResync() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 111, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.replicationSetupSlaveForFullResync, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Cyc_CfFlowInfo_FlowEnv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
Cyc_CfFlowInfo_i_typ_to_absrval(struct Cyc_CfFlowInfo_FlowEnv *, int, int,
                                void *, void *);
void *Cyc_CfFlowInfo_typ_to_absrval(struct Cyc_CfFlowInfo_FlowEnv *fenv,
                                    void *t, int no_init_bits_only,
                                    void *leafval) {
  return ({
    Cyc_CfFlowInfo_i_typ_to_absrval(fenv, 1, no_init_bits_only, t, leafval);
  });
}


x86 assembly (clang, -O0):
<Cyc_CfFlowInfo_typ_to_absrval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x1,%esi
call   1030 <Cyc_CfFlowInfo_i_typ_to_absrval@plt>
mov    %eax,-0x24(%rbp)
movslq -0x24(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_CfFlowInfo_typ_to_absrval>:
push   %rax
mov    %rcx,%r8
mov    %rsi,%rcx
mov    $0x1,%esi
call   1030 <Cyc_CfFlowInfo_i_typ_to_absrval@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_CfFlowInfo_FlowEnv = type { i32 }
define i8* @Cyc_CfFlowInfo_typ_to_absrval(%struct.Cyc_CfFlowInfo_FlowEnv* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca %struct.Cyc_CfFlowInfo_FlowEnv*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store %struct.Cyc_CfFlowInfo_FlowEnv* %0, %struct.Cyc_CfFlowInfo_FlowEnv** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = load %struct.Cyc_CfFlowInfo_FlowEnv*, %struct.Cyc_CfFlowInfo_FlowEnv** %5
%11 = load i32, i32* %7
%12 = load i8*, i8** %6
%13 = load i8*, i8** %8
%14 = call i32 @Cyc_CfFlowInfo_i_typ_to_absrval(%struct.Cyc_CfFlowInfo_FlowEnv* %10, i32 1, i32 %11, i8* %12, i8* %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i8*
ret i8* %17
}

LLVM IR (-O2):
%struct.Cyc_CfFlowInfo_FlowEnv = type { i32 }
define i8* @Cyc_CfFlowInfo_typ_to_absrval(%struct.Cyc_CfFlowInfo_FlowEnv* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @Cyc_CfFlowInfo_i_typ_to_absrval(%struct.Cyc_CfFlowInfo_FlowEnv* %0, i32 1, i32 %2, i8* %1, i8* %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Type definitions */
struct aiocb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int aio_return(struct aiocb *);
int /*<<< orphan*/ perror(char *);
int ps_test_aio_return(struct aiocb *aiocbp) {
  int rv;
  if ((rv = aio_return(aiocbp)) == -1) {
    perror("aio_return failed");
    abort();
  }
  return rv;
}


x86 assembly (clang, -O0):
<ps_test_aio_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <aio_return@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    1164 <ps_test_aio_return+0x34>
lea    0xea8(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps_test_aio_return>:
push   %rax
call   1040 <aio_return@plt>
cmp    $0xffffffff,%eax
je     113d <ps_test_aio_return+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.aiocb = type { i32 }
@.str = [18 x i8] c"aio_return failed\00"
define i32 @ps_test_aio_return(%struct.aiocb* %0) {
%2 = alloca %struct.aiocb*
%3 = alloca i32
store %struct.aiocb* %0, %struct.aiocb** %2
%4 = load %struct.aiocb*, %struct.aiocb** %2
%5 = call i32 @aio_return(%struct.aiocb* %4)
store i32 %5, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.aiocb = type { i32 }
@.str = [18 x i8] c"aio_return failed\00"
define i32 @ps_test_aio_return(%struct.aiocb* %0) {
%2 = tail call i32 @aio_return(%struct.aiocb* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t sclass_is_simple_goal(uint16_t sclassid) {
  if (sclassid >= 10) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<sclass_is_simple_goal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jl     111d <sclass_is_simple_goal+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1124 <sclass_is_simple_goal+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sclass_is_simple_goal>:
xor    %eax,%eax
cmp    $0xa,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @sclass_is_simple_goal(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double normalizedRand() {
  double p = (double)rand();
  double q = ((double)RAND_MAX) + 1.0;
  return p / q;
}


x86 assembly (clang, -O0):
<normalizedRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    0x2eb8(%rip),%rax
cvtsi2sdq (%rax),%xmm0
movsd  0xec3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalizedRand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
addsd  0xecf(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @normalizedRand() {
%1 = alloca double
%2 = alloca double
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to double
store double %4, double* %1
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
%7 = fadd double %6, 1.000000e+00
store double %7, double* %2
%8 = load double, double* %1
%9 = load double, double* %2
%10 = fdiv double %8, %9
ret double %10
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @normalizedRand() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fadd double %4, 1.000000e+00
%6 = fdiv double %2, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ read_temp(float *, char *);
int /*<<< orphan*/ stdout;
void print_text(char *fileName) {
  float temp;
  if (!read_temp(&temp, fileName)) {
    printf("Temp.: %.1f C\n", temp);
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<print_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
call   1050 <read_temp@plt>
cmp    $0x0,%eax
jne    1171 <print_text+0x41>
movss  -0xc(%rbp),%xmm0
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_text>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
call   1050 <read_temp@plt>
test   %eax,%eax
je     1144 <print_text+0x14>
pop    %rax
ret
movss  0x4(%rsp),%xmm0
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Temp.: %.1f C\0A\00"
@stdout = global i32 0
define void @print_text(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @read_temp(float* %3, i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load float, float* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
br label %12
12: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Temp.: %.1f C\0A\00"
@stdout = global i32 0
define void @print_text(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @read_temp(float* %2, i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
br label %11
11: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHelp() {
  printf("golcli 1.0. Conway's Game of Life with ncurses interface.\n\n");
  printf("Usage: golcli [OPTIONS]\n\n");
  printf("Options:\n    -h   Help\n    -x   Width\n    -y   Height\n    -d   "
         "Delay between frames (ms, default: 50)\n    -cf  Foreground char\n   "
         " -cb  Background char\n    -m   Map file\n    -mcb Background char "
         "in map file (default: ' ')\n");
}


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

x86 assembly (clang, -O2):
<printHelp>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"golcli 1.0. Conway's Game of Life with ncurses interface.\0A\0A\00"
@.str.1 = [26 x i8] c"Usage: golcli [OPTIONS]\0A\0A\00"
@.str.2 = [223 x i8] c"Options:\0A -h Help\0A -x Width\0A -y Height\0A -d Delay between frames (ms, default: 50)\0A -cf Foreground char\0A -cb Background char\0A -m Map file\0A -mcb Background char in map file (default: ' ')\0A\00"
define void @printHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([223 x i8], [223 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [59 x i8] c"golcli 1.0. Conway's Game of Life with ncurses interface.\0A\00"
@str.3 = [25 x i8] c"Usage: golcli [OPTIONS]\0A\00"
@str.4 = [222 x i8] c"Options:\0A -h Help\0A -x Width\0A -y Height\0A -d Delay between frames (ms, default: 50)\0A -cf Foreground char\0A -cb Background char\0A -m Map file\0A -mcb Background char in map file (default: ' ')\00"
define void @printHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([222 x i8], [222 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zfree(unsigned char *);
void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata) { zfree(bitmap); }


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

x86 assembly (clang, -O2):
<stbtt_FreeBitmap>:
jmp    1030 <zfree@plt>

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

LLVM IR (-O2):
define void @stbtt_FreeBitmap(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @zfree(i8* %0)
ret void
}
/* Variables and functions */
int mkstemps(char *, int);
void resourceLeak_mkstemps(char *template, int suffixlen) {
  int fp = mkstemps(template, suffixlen);
}


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

x86 assembly (clang, -O2):
<resourceLeak_mkstemps>:
jmp    1030 <mkstemps@plt>

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

LLVM IR (-O2):
define void @resourceLeak_mkstemps(i8* %0, i32 %1) {
%3 = tail call i32 @mkstemps(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *realloc(void *, size_t);
void *erealloc(void *ptr, size_t size) {
  void *ret;
  if (NULL == (ret = realloc(ptr, size)))
    die("out of memory");
  return ret;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    115b <erealloc+0x3b>
lea    0xeaa(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <erealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
int main(void) {
  int truth_value, value1 = 42, value2 = 89;
  truth_value = 42 < 89;
  truth_value = 42 <= 89;
  truth_value = 42 > 89;
  truth_value = 42 >= 89;
  truth_value = 42 == 89;
  truth_value = 42 != 89;
  truth_value = value1 < value2;
  truth_value = value1 <= value2;
  truth_value = value1 > value2;
  truth_value = value1 >= value2;
  truth_value = value1 == value2;
  truth_value = value1 != value2;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0xc(%rbp)
movl   $0x59,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %3
store i32 89, i32* %4
store i32 1, i32* %2
store i32 1, i32* %2
store i32 0, i32* %2
store i32 0, i32* %2
store i32 0, i32* %2
store i32 1, i32* %2
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
store i32 %8, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
%12 = zext i1 %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
%16 = zext i1 %15 to i32
store i32 %16, i32* %2
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp sge i32 %17, %18
%20 = zext i1 %19 to i32
store i32 %20, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = icmp eq i32 %21, %22
%24 = zext i1 %23 to i32
store i32 %24, i32* %2
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = icmp ne i32 %25, %26
%28 = zext i1 %27 to i32
store i32 %28, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}