xunge/DecIR huggingface dataset:
f(char *b) { return "y" > b; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
cmp    -0x8(%rbp),%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0xef9(%rip),%rcx
xor    %eax,%eax
cmp    %rcx,%rdi
setb   %al
ret

LLVM IR (-O0):
@.str = [2 x i8] c"y\00"
define i32 @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ugt i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@.str = [2 x i8] c"y\00"
define i32 @f(i8* readnone %0) {
%2 = icmp ult i8* %0, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void pari(int num) {
  if (num % 2)
    printf("%s\n", "dispari");
  else
    printf("%s\n", "pari");
}


x86 assembly (clang, -O0):
<pari>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1147 <pari+0x37>
lea    0xeca(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1030 <printf@plt>
jmp    115a <pari+0x4a>
lea    0xeb2(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pari>:
test   $0x1,%dil
lea    0xeec(%rip),%rax
lea    0xee2(%rip),%rsi
cmove  %rax,%rsi
lea    0xed3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [8 x i8] c"dispari\00"
@.str.2 = [5 x i8] c"pari\00"
define void @pari(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [8 x i8] c"dispari\00"
@.str.2 = [5 x i8] c"pari\00"
define void @pari(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int efi_rtc_close(struct inode *inode, struct file *file) {
  { return (0); }
}


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

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.file = type opaque
define i32 @efi_rtc_close(%struct.inode* %0, %struct.file* %1) {
%3 = alloca %struct.inode*
%4 = alloca %struct.file*
store %struct.inode* %0, %struct.inode** %3
store %struct.file* %1, %struct.file** %4
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.file = type opaque
define i32 @efi_rtc_close(%struct.inode* nocapture readnone %0, %struct.file* nocapture readnone %1) {
ret i32 0
}
int NJ_is_alpha(char c) {
  if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<NJ_is_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1124 <NJ_is_alpha+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    113e <NJ_is_alpha+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     114a <NJ_is_alpha+0x4a>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     114a <NJ_is_alpha+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <NJ_is_alpha+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NJ_is_alpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @NJ_is_alpha(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %19, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %19, label %20
19: ; preds = %15, %7
store i32 1, i32* %2
br label %21
20: ; preds = %15, %11
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @NJ_is_alpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void swap(int a[], int first, int second) {
  int temp = a[first];
  a[first] = a[second];
  a[second] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
int do_927() { return 927; }


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

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

LLVM IR (-O0):
define i32 @do_927() {
ret i32 927
}

LLVM IR (-O2):
define i32 @do_927() {
ret i32 927
}
/* Variables and functions */
float asinf(float);
float _asin(float n) { return asinf(n); }


x86 assembly (clang, -O0):
<_asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asinf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_asin>:
jmp    1030 <asinf@plt>

LLVM IR (-O0):
define float @_asin(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @asinf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @_asin(float %0) {
%2 = tail call float @asinf(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void stdio_skip(void *user, int n) { fseek((FILE *)user, n, SEEK_CUR); }


x86 assembly (clang, -O0):
<stdio_skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdio_skip>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define void @stdio_skip(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_CUR
%9 = call i32 @fseek(i32* %6, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define void @stdio_skip(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i32 @fseek(i32* %3, i32 %1, i32 %4)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ lfs_aligndown(scalar_t__, scalar_t__);
uint32_t lfs_alignup(uint32_t a, uint32_t alignment) {
  return lfs_aligndown(a + alignment - 1, alignment);
}


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

x86 assembly (clang, -O2):
<lfs_alignup>:
add    %rsi,%rdi
add    $0xffffffffffffffff,%rdi
jmp    1030 <lfs_aligndown@plt>

LLVM IR (-O0):
define i64 @lfs_alignup(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = sub nsw i64 %7, 1
%9 = load i64, i64* %4
%10 = call i64 @lfs_aligndown(i64 %8, i64 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @lfs_alignup(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = tail call i64 @lfs_aligndown(i64 %4, i64 %1)
ret i64 %5
}
/* Type definitions */
typedef scalar_t__ off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ exit(int);
scalar_t__ lseek(int, scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void doseek(int fd, unsigned long long pos) {
  if (lseek(fd, (off_t)pos, SEEK_SET) == (off_t)-1) {
    perror("lseek");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<doseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
cmp    $0xffffffffffffffff,%rax
jne    1174 <doseek+0x44>
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doseek>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
cmp    $0xffffffffffffffff,%rax
je     1147 <doseek+0x17>
pop    %rax
ret
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
@.str = [6 x i8] c"lseek\00"
define void @doseek(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = load i32, i32* @SEEK_SET
%8 = call i64 @lseek(i32 %5, i64 %6, i32 %7)
%9 = icmp eq i64 %8, -1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
@.str = [6 x i8] c"lseek\00"
define void @doseek(i32 %0, i64 %1) {
%3 = load i32, i32* @SEEK_SET
%4 = tail call i64 @lseek(i32 %0, i64 %1, i32 %3)
%5 = icmp eq i64 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
void printColor(char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @printColor(i8* nocapture %0, ...) {
ret void
}
void ignore(void) {}


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

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

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

LLVM IR (-O2):
define void @ignore() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x22() {
  Assert_real((isxdigit(34) == 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_isxdigit.c",
              175, ("isxdigit should be 0 for 0x22"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x22>:
push   %rax
mov    $0x22,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xaf,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x22\00"
define void @t_isxdigit_0x22() {
%1 = call i64 @isxdigit(i32 34)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 175, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x22\00"
define void @t_isxdigit_0x22() {
%1 = tail call i64 @isxdigit(i32 34)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 175, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
g(volatile short *p) { *p; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ax
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @g(i16* %0) {
%2 = load volatile i16, i16* %0
ret i32 undef
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0) {
    x = x + y;
    y = (-2) * y - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1158 <main+0x48>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0xfffffffe,-0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %9, %0
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = mul nsw i32 -2, %13
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %6
16: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
char *helloSubFunc();
char *helloFunc() { return helloSubFunc(); }


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

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

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

LLVM IR (-O2):
define i8* @helloFunc() {
%1 = tail call i8* (...) @helloSubFunc()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ lucas_numbers(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ twin_primes(int);
int main() {
  printf("Lucas numbers:\n");
  lucas_numbers(100);
  printf("\nTwin primes:\n");
  twin_primes(10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <printf@plt>
mov    $0x64,%edi
call   1040 <lucas_numbers@plt>
lea    0xeb4(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <twin_primes@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x64,%edi
call   1050 <lucas_numbers@plt>
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <twin_primes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Lucas numbers:\0A\00"
@.str.1 = [15 x i8] c"\0ATwin primes:\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @lucas_numbers(i32 100)
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @twin_primes(i32 10)
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Lucas numbers:\00"
@str.2 = [14 x i8] c"\0ATwin primes:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @lucas_numbers(i32 100)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @twin_primes(i32 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, size_t, char *, int /*<<< orphan*/);
void gmt_time_string(char *buf, size_t buf_len, time_t *t) {
  strftime(buf, buf_len, "%a, %d %b %Y %H:%M:%S GMT", gmtime(t));
}


x86 assembly (clang, -O0):
<gmt_time_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <gmtime@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%ecx
lea    0xea2(%rip),%rdx
call   1030 <strftime@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmt_time_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1040 <gmtime@plt>
lea    0xec7(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strftime@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"%a, %d %b %Y %H:%M:%S GMT\00"
define void @gmt_time_string(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32*, i32** %6
%10 = call i32 @gmtime(i32* %9)
%11 = call i32 @strftime(i8* %7, i64 %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%a, %d %b %Y %H:%M:%S GMT\00"
define void @gmt_time_string(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @gmtime(i32* %2)
%5 = tail call i32 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
int xmlUCSIsCatZl(int code) { return ((code == 0x2028)); }


x86 assembly (clang, -O0):
<xmlUCSIsCatZl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2028,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCatZl>:
xor    %eax,%eax
cmp    $0x2028,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCatZl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 8232
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @xmlUCSIsCatZl(i32 %0) {
%2 = icmp eq i32 %0, 8232
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ test_sat_parser_should_fail(char *);
int test18(void) {
  return test_sat_parser_should_fail("(a") ||
         test_sat_parser_should_fail("(-a  ");
}


x86 assembly (clang, -O0):
<test18>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    114c <test18+0x3c>
lea    0xec6(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test18>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112c <test18+0x1c>
pop    %rcx
ret
lea    0xed0(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"(a\00"
@.str.1 = [6 x i8] c"(-a \00"
define i32 @test18() {
%1 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"(a\00"
@.str.1 = [6 x i8] c"(-a \00"
define i32 @test18() {
%1 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
XUninstallColormap() {}


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

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

LLVM IR (-O0):
define i32 @XUninstallColormap() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XUninstallColormap() {
ret i32 undef
}
__attribute__((no, noclone)) unsigned __int128 t175_3sub(signed __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((signed __int128)(-5), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t175_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rsi
mov    %rsi,%rax
sar    $0x3f,%rax
mov    $0xfffffffffffffffb,%rdx
sub    %rcx,%rdx
mov    $0xffffffffffffffff,%r9
mov    %r9,%rcx
sbb    %rsi,%rcx
mov    %r9,%r8
sbb    %rax,%r8
sbb    %rax,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1194 <t175_3sub+0x84>
jmp    119b <t175_3sub+0x8b>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t175_3sub>:
push   %r14
push   %rbx
push   %rax
mov    $0xfffffffffffffffb,%r14
sub    %rdi,%r14
mov    $0xffffffffffffffff,%rbx
sbb    %rsi,%rbx
cmp    $0xfffffffffffffffc,%rdi
sbb    $0xffffffffffffffff,%rsi
jl     1139 <t175_3sub+0x29>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t175_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 -5, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t175_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sub nuw i129 -5, %7
%9 = icmp sgt i128 %6, -5
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int foo(int *p, int b) {
  int *q;
  int i = 1;
  if (b)
    q = &i;
  else
    q = (void *)0;
  *q = 2;
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1129 <foo+0x29>
lea    -0x1c(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1131 <foo+0x31>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture readnone %0, i32 %1) {
%3 = icmp ne i32 %1, 0
tail call void @llvm.assume(i1 %3)
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ pthread_exit(void *);
void *start_routine(void *arg) {
  free(arg);
  void *valuePtr = malloc(20);
  pthread_exit(valuePtr);
}


x86 assembly (clang, -O0):
<start_routine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_routine>:
push   %rax
call   1030 <free@plt>
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @start_routine(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @free(i8* %5)
%7 = call i8* @malloc(i32 20)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @pthread_exit(i8* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @start_routine(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
%3 = tail call dereferenceable_or_null(20) i8* @malloc(i32 20)
%4 = tail call i32 @pthread_exit(i8* %3)
ret i8* undef
}
ShowDepth(ch) char ch;
{}


x86 assembly (clang, -O0):
<ShowDepth>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ShowDepth(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @ShowDepth(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ LCD_CLR_RESET();
int /*<<< orphan*/ LCD_SET_CLK();
int /*<<< orphan*/ LCD_SET_DDR();
int /*<<< orphan*/ LCD_SET_RESET();
int /*<<< orphan*/ LCD_SET_SDI();
void LCD_X_Init(void) {
  LCD_CLR_RESET();
  LCD_SET_DDR();
  ;
  LCD_SET_CLK();
  LCD_SET_SDI();
  LCD_SET_RESET();
}


x86 assembly (clang, -O0):
<LCD_X_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <LCD_CLR_RESET@plt>
mov    $0x0,%al
call   1040 <LCD_SET_DDR@plt>
mov    $0x0,%al
call   1070 <LCD_SET_CLK@plt>
mov    $0x0,%al
call   1050 <LCD_SET_SDI@plt>
mov    $0x0,%al
call   1030 <LCD_SET_RESET@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_X_Init>:
push   %rax
xor    %eax,%eax
call   1060 <LCD_CLR_RESET@plt>
xor    %eax,%eax
call   1040 <LCD_SET_DDR@plt>
xor    %eax,%eax
call   1070 <LCD_SET_CLK@plt>
xor    %eax,%eax
call   1050 <LCD_SET_SDI@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <LCD_SET_RESET@plt>

LLVM IR (-O0):
define void @LCD_X_Init() {
%1 = call i32 (...) @LCD_CLR_RESET()
%2 = call i32 (...) @LCD_SET_DDR()
%3 = call i32 (...) @LCD_SET_CLK()
%4 = call i32 (...) @LCD_SET_SDI()
%5 = call i32 (...) @LCD_SET_RESET()
ret void
}

LLVM IR (-O2):
define void @LCD_X_Init() {
%1 = tail call i32 (...) @LCD_CLR_RESET()
%2 = tail call i32 (...) @LCD_SET_DDR()
%3 = tail call i32 (...) @LCD_SET_CLK()
%4 = tail call i32 (...) @LCD_SET_SDI()
%5 = tail call i32 (...) @LCD_SET_RESET()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fileexist(char *fname) {
  FILE *fp;
  fp = fopen(fname, "r");
  if (fp == NULL)
    return 0;
  fclose(fp);
  return 1;
}


x86 assembly (clang, -O0):
<fileexist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <fileexist+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <fileexist+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileexist>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <fileexist+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @fileexist(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ vranlc_(int *, double *, int *, double *);
void vranlc(int n, double *x, int a, double *y) { vranlc_(&n, x, &a, y); }


x86 assembly (clang, -O0):
<vranlc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
call   1030 <vranlc_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vranlc>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %edx,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rdx
call   1030 <vranlc_@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @vranlc(i32 %0, double* %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
store i32 %0, i32* %5
store double* %1, double** %6
store i32 %2, i32* %7
store double* %3, double** %8
%9 = load double*, double** %6
%10 = load double*, double** %8
%11 = call i32 @vranlc_(i32* %5, double* %9, i32* %7, double* %10)
ret void
}

LLVM IR (-O2):
define void @vranlc(i32 %0, double* %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %5
store i32 %2, i32* %6
%7 = call i32 @vranlc_(i32* %5, double* %1, i32* %6, double* %3)
ret void
}
unsigned int PHashKey_isEqual_(void *key1, void *key2) { return key1 == key2; }


x86 assembly (clang, -O0):
<PHashKey_isEqual_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PHashKey_isEqual_>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @PHashKey_isEqual_(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 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @PHashKey_isEqual_(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ my_log(char *);
int /*<<< orphan*/ quit();
void sig_int(int dummy) {
  my_log("POLYGLOT *** SIGINT Received ***\n");
  quit();
}


x86 assembly (clang, -O0):
<sig_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <my_log@plt>
mov    $0x0,%al
call   1030 <quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_int>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <my_log@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <quit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"POLYGLOT *** SIGINT Received ***\0A\00"
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @my_log(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @quit()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"POLYGLOT *** SIGINT Received ***\0A\00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @my_log(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @quit()
ret void
}
int compare(const void *a, const void *b) {
  if (*(double *)a == *(double *)b)
    return 0;
  else if (*(double *)a > *(double *)b)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1134 <compare+0x34>
jp     1134 <compare+0x34>
movl   $0x0,-0x4(%rbp)
jmp    115d <compare+0x5d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1156 <compare+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <compare+0x5d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
xor    %ecx,%ecx
ucomisd (%rsi),%xmm0
seta   %cl
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to double*
%8 = load double, double* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to double*
%11 = load double, double* %10
%12 = fcmp oeq double %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %24
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to double*
%17 = load double, double* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to double*
%20 = load double, double* %19
%21 = fcmp ogt double %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %24
23: ; preds = %14
store i32 -1, i32* %3
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp oeq double %4, %6
%8 = fcmp ogt double %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
int double_loop(void) {
  int i, j, p = 0;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 10; j++) {
      p++;
    }
    p -= 10;
  }
  return p;
}


x86 assembly (clang, -O0):
<double_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    115b <double_loop+0x5b>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1144 <double_loop+0x44>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1123 <double_loop+0x23>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <double_loop+0x12>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @double_loop() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %3
store i32 0, i32* %1
br label %4
4: ; preds = %20, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %23
7: ; preds = %4
store i32 0, i32* %2
br label %8
8: ; preds = %14, %7
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %8
17: ; preds = %8
%18 = load i32, i32* %3
%19 = sub nsw i32 %18, 10
store i32 %19, i32* %3
br label %20
20: ; preds = %17
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %4
23: ; preds = %4
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @double_loop() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ c_nnpntendd();
void nnpntendd_() { c_nnpntendd(); }


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

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

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

LLVM IR (-O2):
define void @nnpntendd_() {
%1 = tail call i32 (...) @c_nnpntendd()
ret void
}
int fun403() { return 403; }


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

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

LLVM IR (-O0):
define i32 @fun403() {
ret i32 403
}

LLVM IR (-O2):
define i32 @fun403() {
ret i32 403
}
const char *lsm_name(void) { return "none"; }


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

x86 assembly (clang, -O2):
<lsm_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"none\00"
define i8* @lsm_name() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define i8* @lsm_name() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ dl_get_sym(char *);
int stub1();
int dl_map() { return (*(int (*)())dl_get_sym("dl_map"))(); }


x86 assembly (clang, -O0):
<dl_map>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <dl_get_sym@plt>
mov    %rax,%rcx
mov    $0x0,%al
call   *%rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_map>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <dl_get_sym@plt>
mov    %rax,%rcx
xor    %eax,%eax
pop    %rdx
jmp    *%rcx

LLVM IR (-O0):
@.str = [7 x i8] c"dl_map\00"
define i32 @dl_map() {
%1 = call i64 @dl_get_sym(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = inttoptr i64 %1 to i32 (...)*
%3 = call i32 (...) %2()
ret i32 %3
}

LLVM IR (-O2):
@.str = [7 x i8] c"dl_map\00"
define i32 @dl_map() {
%1 = tail call i64 @dl_get_sym(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = inttoptr i64 %1 to i32 (...)*
%3 = tail call i32 (...) %2()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ stb_nptr_didfree(void *, int);
void stb_nptr_free(void *address_being_freed, int len) {
  free(address_being_freed);
  stb_nptr_didfree(address_being_freed, len);
}


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

x86 assembly (clang, -O2):
<stb_nptr_free>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <stb_nptr_didfree@plt>

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

LLVM IR (-O2):
define void @stb_nptr_free(i8* %0, i32 %1) {
%3 = tail call i32 @free(i8* %0)
%4 = tail call i32 @stb_nptr_didfree(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_sec;
  int tm_min;
  int tm_hour;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int daytime(time_t *time) {
  struct tm *ptm = localtime(time);
  int retval = ptm->tm_sec * 60 + ptm->tm_min * 60 + ptm->tm_hour;
  return retval;
}


x86 assembly (clang, -O0):
<daytime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x3c,(%rax),%eax
mov    -0x10(%rbp),%rcx
imul   $0x3c,0x4(%rcx),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
add    0x8(%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daytime>:
push   %rax
call   1030 <localtime@plt>
mov    0x4(%rax),%ecx
add    (%rax),%ecx
imul   $0x3c,%ecx,%ecx
add    0x8(%rax),%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define i32 @daytime(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.tm*
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %6, %struct.tm** %3
%7 = load %struct.tm*, %struct.tm** %3
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 60
%11 = load %struct.tm*, %struct.tm** %3
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 1
%13 = load i32, i32* %12
%14 = mul nsw i32 %13, 60
%15 = add nsw i32 %10, %14
%16 = load %struct.tm*, %struct.tm** %3
%17 = getelementptr inbounds %struct.tm, %struct.tm* %16, i32 0, i32 2
%18 = load i32, i32* %17
%19 = add nsw i32 %15, %18
store i32 %19, i32* %4
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
define i32 @daytime(i32* %0) {
%2 = tail call %struct.tm* @localtime(i32* %0)
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
%6 = load i32, i32* %5
%7 = add i32 %6, %4
%8 = mul i32 %7, 60
%9 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ SYS_ioprio_set;
int syscall(int /*<<< orphan*/, int, int, int);
int ioprio_set(int which, int who, int ioprio) {
  return syscall(SYS_ioprio_set, which, who, ioprio);
}


x86 assembly (clang, -O0):
<ioprio_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioprio_set>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_ioprio_set = global i32 0
define i32 @ioprio_set(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* @SYS_ioprio_set
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @syscall(i32 %7, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@SYS_ioprio_set = global i32 0
define i32 @ioprio_set(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @SYS_ioprio_set
%5 = tail call i32 @syscall(i32 %4, i32 %0, i32 %1, i32 %2)
ret i32 %5
}