xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ UINT64_C(int);
scalar_t__ rgph_t1ha64s_mux(int /*<<< orphan*/, int /*<<< orphan*/);
void rgph_t1ha64s_fmix3(uint64_t k, uint64_t h[]) {
  h[0] += rgph_t1ha64s_mux(k, UINT64_C(0xbd9cacc22c6e9571));
}


x86 assembly (clang, -O0):
<rgph_t1ha64s_fmix3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x2c6e9571,%edi
call   1030 <UINT64_C@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <rgph_t1ha64s_mux@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_t1ha64s_fmix3>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x2c6e9571,%edi
call   1030 <UINT64_C@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <rgph_t1ha64s_mux@plt>
add    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @rgph_t1ha64s_fmix3(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = call i32 @UINT64_C(i32 745444721)
%7 = call i64 @rgph_t1ha64s_mux(i32 %5, i32 %6)
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = add nsw i64 %11, %7
%13 = trunc i64 %12 to i32
store i32 %13, i32* %9
ret void
}

LLVM IR (-O2):
define void @rgph_t1ha64s_fmix3(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @UINT64_C(i32 745444721)
%4 = tail call i64 @rgph_t1ha64s_mux(i32 %0, i32 %3)
%5 = load i32, i32* %1
%6 = trunc i64 %4 to i32
%7 = add i32 %5, %6
store i32 %7, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ba();
int /*<<< orphan*/ compword(char *);
int /*<<< orphan*/ ithen();
int /*<<< orphan*/ swap();
void ielse() {
  compword("bra");
  ba();
  swap();
  ithen();
}


x86 assembly (clang, -O0):
<ielse>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <compword@plt>
mov    $0x0,%al
call   1040 <ba@plt>
mov    $0x0,%al
call   1060 <swap@plt>
mov    $0x0,%al
call   1050 <ithen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ielse>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <compword@plt>
xor    %eax,%eax
call   1040 <ba@plt>
xor    %eax,%eax
call   1060 <swap@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <ithen@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"bra\00"
define void @ielse() {
%1 = call i32 @compword(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @ba()
%3 = call i32 (...) @swap()
%4 = call i32 (...) @ithen()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"bra\00"
define void @ielse() {
%1 = tail call i32 @compword(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @ba()
%3 = tail call i32 (...) @swap()
%4 = tail call i32 (...) @ithen()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_enterexit_func(char *, char *, char const *);
void log_enter_ocall(const char *func) {
  log_enterexit_func("enter", "ocall", func);
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"enter\00"
@.str.1 = [6 x i8] c"ocall\00"
define void @log_enter_ocall(i8* %0) {
%2 = tail call i32 @log_enterexit_func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
void fn0C1E() { return; }


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

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

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

LLVM IR (-O2):
define void @fn0C1E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void run_test(char *name, int (*test)(char *), char *input_data_path) {
  printf("############## %s ##############\n", name);
  test(input_data_path);
  printf("############## End of test %s ##############\n", name);
}


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

x86 assembly (clang, -O2):
<run_test>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r15,%rdi
call   *%r14
lea    0xee8(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [34 x i8] c"############## %s ##############\0A\00"
@.str.1 = [46 x i8] c"############## End of test %s ##############\0A\00"
define void @run_test(i8* %0, i32 (i8*)* nocapture %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 %1(i8* %2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *basename_c(const char *path) {
  const char *t = strrchr(path, '/');
  return (t == 0 ? path : ++t);
}


x86 assembly (clang, -O0):
<basename_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <basename_c+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <basename_c+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename_c>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @basename_c(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %2
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %8
%14 = phi i8* [ %9, %8 ], [ %12, %10 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @basename_c(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EMACTimestampTargetIntEnable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000700))) |= 0x00000010;
}


x86 assembly (clang, -O0):
<EMACTimestampTargetIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x700,%eax
cltq
mov    (%rax),%ecx
or     $0x10,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampTargetIntEnable>:
movslq %edi,%rax
orl    $0x10,0x700(%rax)
ret

LLVM IR (-O0):
define void @EMACTimestampTargetIntEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1792
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 16
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @EMACTimestampTargetIntEnable(i32 %0) {
%2 = add nsw i32 %0, 1792
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 16
store volatile i32 %6, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OutOfMemory();
char *strdup(char const *);
char *vlmcsd_strdup(const char *src) {
  char *dst = strdup(src);
  if (!dst)
    OutOfMemory();
  return dst;
}


x86 assembly (clang, -O0):
<vlmcsd_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <vlmcsd_strdup+0x2b>
mov    $0x0,%al
call   1030 <OutOfMemory@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlmcsd_strdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <vlmcsd_strdup+0x15>
xor    %eax,%eax
call   1030 <OutOfMemory@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @vlmcsd_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @OutOfMemory()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkfifoat(int, char const *, int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int
softboundcets_mkfifoat(int dirfd, const char *pathname, mode_t mode) {
  return mkfifoat(dirfd, pathname, mode);
}


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

x86 assembly (clang, -O2):
<softboundcets_mkfifoat>:
jmp    1030 <mkfifoat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_mkfifoat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @mkfifoat(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
main() {
  long n;
  for (n = 0; getchar() != EOF; ++n)
    ;
  printf("%ld", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     1164 <main+0x44>
jmp    1153 <main+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %8, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
br label %8
8: ; preds = %7
%9 = load i64, i64* %2
%10 = add nsw i64 %9, 1
store i64 %10, i64* %2
br label %3
11: ; preds = %3
%12 = load i64, i64* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %12)
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i64 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_startswith() {
  printf("NOT IMPLEMENTED:"
         "pa_startswith"
         "\n");
}


x86 assembly (clang, -O0):
<pa_startswith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"NOT IMPLEMENTED:pa_startswith\0A\00"
define i32 @pa_startswith() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_startswith\00"
define i32 @pa_startswith() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void bug(const char *str, int param) {
  char buf[8192];
  strcpy(buf, "[***] BUG: ");
  sprintf(buf + strlen(buf), str, param);
  log_string(buf);
  return;
}


x86 assembly (clang, -O0):
<bug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x2010(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x2010(%rbp),%rax
mov    %rax,-0x2018(%rbp)
lea    -0x2010(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x2018(%rbp),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x2010(%rbp),%rdi
mov    $0x0,%al
call   1040 <log_string@plt>
add    $0x2020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bug>:
push   %rbp
push   %r14
push   %rbx
sub    $0x2000,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
movabs $0x5542205d2a2a2a5b,%rax
20 42 55
mov    %rax,(%rsp)
movl   $0x203a47,0x8(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%rsp,%rax,1),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <log_string@plt>
add    $0x2000,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"[***] BUG: \00"
define void @bug(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [8192 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 0
%7 = call i8* @strcpy(i8* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 0
%10 = call i64 @strlen(i8* %9)
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 (i8*, i8*, ...) @sprintf(i8* %11, i8* %12, i32 %13)
%15 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 0
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @log_string to i32 (i8*, ...)*)(i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"[***] BUG: \00"
define void @bug(i8* nocapture %0, i32 %1) {
%3 = alloca [8192 x i8]
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%5 = call i64 @strlen(i8* %4)
%6 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 %5
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) %0, i32 %1)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @log_string to i32 (i8*, ...)*)(i8* %4)
ret void
}
int subOK(int x, int y) {
  long long a = x;
  long long b = y;
  long long z = a + ~b;
  int z2;
  ++z;
  z2 = z;
  return !(z2 ^ z);
}


x86 assembly (clang, -O0):
<subOK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
movslq -0x24(%rbp),%rax
xor    -0x20(%rbp),%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<subOK>:
movslq %edi,%rax
not    %esi
movslq %esi,%rcx
add    %rax,%rcx
mov    $0x80000001,%edx
add    %rcx,%rdx
xor    %eax,%eax
shr    $0x20,%rdx
sete   %al
ret

LLVM IR (-O0):
define i32 @subOK(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = xor i64 %14, -1
%16 = add nsw i64 %13, %15
store i64 %16, i64* %7
%17 = load i64, i64* %7
%18 = add nsw i64 %17, 1
store i64 %18, i64* %7
%19 = load i64, i64* %7
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = load i64, i64* %7
%24 = xor i64 %22, %23
%25 = icmp ne i64 %24, 0
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @subOK(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = xor i32 %1, -1
%5 = sext i32 %4 to i64
%6 = add nsw i64 %3, 2147483649
%7 = add nsw i64 %6, %5
%8 = icmp ult i64 %7, 4294967296
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_est_time(char *est_time) {
  write("json-task.json", "\"estimated-duration-hours\":\"%s\", ", est_time);
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [34 x i8] c"\22estimated-duration-hours\22:\22%s\22, \00"
define void @function_est_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [34 x i8] c"\22estimated-duration-hours\22:\22%s\22, \00"
define void @function_est_time(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
short h_abs(short *);
short intr_wrap_089(short p1) { return h_abs(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_089>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
call   1030 <h_abs@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_089>:
push   %rax
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
call   1030 <h_abs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_089(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call signext i16 @h_abs(i16* %2)
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @intr_wrap_089(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call signext i16 @h_abs(i16* %2)
ret i16 %3
}
/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ scanf(char *, int *);
int get_int() {
  int x;
  if (scanf("%d", &x) == EOF) {
    exit(0);
  }
  return x;
}


x86 assembly (clang, -O0):
<get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <scanf@plt>
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%rax
jne    114f <get_int+0x2f>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%rax
je     1144 <get_int+0x24>
mov    0x4(%rsp),%eax
pop    %rcx
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @get_int() {
%1 = alloca i32
%2 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @exit(i32 0)
unreachable
7: ; preds = %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @get_int() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
%9 = load i32, i32* %1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_int(int sig) { printf("INT\n"); }


x86 assembly (clang, -O0):
<catch_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"INT\0A\00"
define void @catch_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"INT\00"
define void @catch_int(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ExecCfg(char *);
void CDRabout() { ExecCfg("about"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"about\00"
define void @CDRabout() {
%1 = call i32 @ExecCfg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"about\00"
define void @CDRabout() {
%1 = tail call i32 @ExecCfg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  char x = 100;
  float y = 50;
  double z = x + y;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x64,-0x5(%rbp)
movss  0xee9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
cvtsi2ss %eax,%xmm0
addss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%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 i8
%3 = alloca float
%4 = alloca double
store i32 0, i32* %1
store i8 100, i8* %2
store float 5.000000e+01, float* %3
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sitofp i32 %6 to float
%8 = load float, float* %3
%9 = fadd float %7, %8
%10 = fpext float %9 to double
store double %10, double* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_client_conf_load_cookie_from_hex() {
  printf("NOT IMPLEMENTED:"
         "pa_client_conf_load_cookie_from_hex"
         "\n");
}


x86 assembly (clang, -O0):
<pa_client_conf_load_cookie_from_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [53 x i8] c"NOT IMPLEMENTED:pa_client_conf_load_cookie_from_hex\0A\00"
define i32 @pa_client_conf_load_cookie_from_hex() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [52 x i8] c"NOT IMPLEMENTED:pa_client_conf_load_cookie_from_hex\00"
define i32 @pa_client_conf_load_cookie_from_hex() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
diffBetweenSumSquaresAndSquareSums(int x) {
  int sumSquaresFrom1ToX(int x);
  int sumNumbersFrom1ToX(int x);
  return sumNumbersFrom1ToX(x) * sumNumbersFrom1ToX(x) - sumSquaresFrom1ToX(x);
}


x86 assembly (clang, -O0):
<diffBetweenSumSquaresAndSquareSums>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sumNumbersFrom1ToX@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sumNumbersFrom1ToX@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sumSquaresFrom1ToX@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diffBetweenSumSquaresAndSquareSums>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1030 <sumNumbersFrom1ToX@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <sumNumbersFrom1ToX@plt>
mov    %eax,%ebp
imul   %r14d,%ebp
mov    %ebx,%edi
call   1040 <sumSquaresFrom1ToX@plt>
sub    %eax,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @diffBetweenSumSquaresAndSquareSums(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sumNumbersFrom1ToX(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @sumNumbersFrom1ToX(i32 %5)
%7 = mul nsw i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @sumSquaresFrom1ToX(i32 %8)
%10 = sub nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @diffBetweenSumSquaresAndSquareSums(i32 %0) {
%2 = tail call i32 @sumNumbersFrom1ToX(i32 %0)
%3 = tail call i32 @sumNumbersFrom1ToX(i32 %0)
%4 = mul nsw i32 %3, %2
%5 = tail call i32 @sumSquaresFrom1ToX(i32 %0)
%6 = sub nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int test_sat_parser_should_fail(char *);
int test11(void) { return test_sat_parser_should_fail("(a or -b*c)"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"(a or -b*c)\00"
define i32 @test11() {
%1 = call i32 @test_sat_parser_should_fail(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [12 x i8] c"(a or -b*c)\00"
define i32 @test11() {
%1 = tail call i32 @test_sat_parser_should_fail(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ io_print(char const *);
int /*<<< orphan*/ tag_indent();
void tag_attr_open(const char *name) {
  io_print("\n");
  tag_indent();
  io_print(name);
  io_print("=\"");
}


x86 assembly (clang, -O0):
<tag_attr_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <io_print@plt>
mov    $0x0,%al
call   1040 <tag_indent@plt>
mov    -0x8(%rbp),%rdi
call   1030 <io_print@plt>
lea    0xeb3(%rip),%rdi
call   1030 <io_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_attr_open>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <io_print@plt>
xor    %eax,%eax
call   1040 <tag_indent@plt>
mov    %rbx,%rdi
call   1030 <io_print@plt>
lea    0xebc(%rip),%rdi
pop    %rbx
jmp    1030 <io_print@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"=\22\00"
define void @tag_attr_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @tag_indent()
%5 = load i8*, i8** %2
%6 = call i32 @io_print(i8* %5)
%7 = call i32 @io_print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"=\22\00"
define void @tag_attr_open(i8* %0) {
%2 = tail call i32 @io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @tag_indent()
%4 = tail call i32 @io_print(i8* %0)
%5 = tail call i32 @io_print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int __attribute__((visibility("default"))) myFunc() { return 55; }


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

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

LLVM IR (-O0):
define i32 @myFunc() {
ret i32 55
}

LLVM IR (-O2):
define i32 @myFunc() {
ret i32 55
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ x_lseek(int const, int /*<<< orphan*/, int /*<<< orphan*/);
off_t file_size(const int fd) { return x_lseek(fd, 0, SEEK_END); }


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <x_lseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <x_lseek@plt>

LLVM IR (-O0):
@SEEK_END = global i32 0
define i32 @file_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SEEK_END
%5 = call i32 @x_lseek(i32 %3, i32 0, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i32 @file_size(i32 %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @x_lseek(i32 %0, i32 0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double curr_time(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec + (double)tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<curr_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xec8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curr_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @curr_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @curr_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int b64_write(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int b64_puts(BIO *b, const char *str) { return b64_write(b, str, strlen(str)); }


x86 assembly (clang, -O0):
<b64_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <b64_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_puts>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <b64_write@plt>

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

LLVM IR (-O2):
define i32 @b64_puts(i32* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @b64_write(i32* %0, i8* %1, i32 %3)
ret i32 %4
}
unsigned char uchar_range(unsigned min, unsigned max) {
  extern unsigned rand(void);
  unsigned x;
  x = rand();
  if (x < min)
    x = min;
  else if (max < x)
    x = max;
  return x;
}


x86 assembly (clang, -O0):
<uchar_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
call   1030 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    113d <uchar_range+0x2d>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <uchar_range+0x44>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    114f <uchar_range+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <uchar_range+0x44>
mov    -0xc(%rbp),%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uchar_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <rand@plt>
cmp    %ebx,%eax
cmovbe %eax,%ebx
cmp    %ebp,%eax
cmovb  %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @uchar_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @rand()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %3
store i32 %11, i32* %5
br label %19
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = icmp ult i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %4
store i32 %17, i32* %5
br label %18
18: ; preds = %16, %12
br label %19
19: ; preds = %18, %10
%20 = load i32, i32* %5
%21 = trunc i32 %20 to i8
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @uchar_range(i32 %0, i32 %1) {
%3 = tail call i32 @rand()
%4 = icmp ult i32 %3, %0
%5 = icmp ugt i32 %3, %1
%6 = select i1 %5, i32 %1, i32 %3
%7 = select i1 %4, i32 %0, i32 %6
%8 = trunc i32 %7 to i8
ret i8 %8
}
/* Variables and functions */
int japi_sevensegment(int, int);
int j_sevensegment(int arg0, int arg1) {
  return (japi_sevensegment(arg0, arg1));
}


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

x86 assembly (clang, -O2):
<j_sevensegment>:
jmp    1030 <japi_sevensegment@plt>

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

LLVM IR (-O2):
define i32 @j_sevensegment(i32 %0, i32 %1) {
%3 = tail call i32 @japi_sevensegment(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test_default_values();
int /*<<< orphan*/ test_iniparser();
int /*<<< orphan*/ test_libconfig();
int main(void) {
  test_default_values();
  test_libconfig();
  test_iniparser();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_default_values@plt>
mov    $0x0,%al
call   1050 <test_libconfig@plt>
mov    $0x0,%al
call   1040 <test_iniparser@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_default_values@plt>
xor    %eax,%eax
call   1050 <test_libconfig@plt>
xor    %eax,%eax
call   1040 <test_iniparser@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_default_values()
%3 = call i32 (...) @test_libconfig()
%4 = call i32 (...) @test_iniparser()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @test_default_values()
%2 = tail call i32 (...) @test_libconfig()
%3 = tail call i32 (...) @test_iniparser()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void dy_stack_print_element(int *x) {
  printf("%1d", (*x));
  ;
}


x86 assembly (clang, -O0):
<dy_stack_print_element>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dy_stack_print_element>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%1d\00"
define void @dy_stack_print_element(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ klock_getT2();
int getTIssue() {
  int *a = (int *)klock_getT2();
  int *b = (int *)klock_getT2();
  int c = *a - *b;
  return c;
}


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

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

LLVM IR (-O0):
define i32 @getTIssue() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = call i64 (...) @klock_getT2()
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %1
%6 = call i64 (...) @klock_getT2()
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %2
%8 = load i32*, i32** %1
%9 = load i32, i32* %8
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = sub nsw i32 %9, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @getTIssue() {
%1 = tail call i64 (...) @klock_getT2()
%2 = inttoptr i64 %1 to i32*
%3 = tail call i64 (...) @klock_getT2()
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* %2
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ flush();
int /*<<< orphan*/ outPS(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ outputstr(char *);
void l_outimage(char *str) {
  char *tmp = str;
  flush();
  for (; (*tmp) != '\0'; tmp++)
    outPS(tmp, NULL);
  outputstr(str);
  outputstr("\n");
}


x86 assembly (clang, -O0):
<l_outimage>:
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 <flush@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1179 <l_outimage+0x49>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <outPS@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114b <l_outimage+0x1b>
mov    -0x8(%rbp),%rdi
call   1040 <outputstr@plt>
lea    0xe77(%rip),%rdi
call   1040 <outputstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_outimage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <flush@plt>
cmpb   $0x0,(%r14)
je     1164 <l_outimage+0x34>
mov    %r14,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <outPS@plt>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1150 <l_outimage+0x20>
mov    %r14,%rdi
call   1040 <outputstr@plt>
lea    0xe8d(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <outputstr@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @l_outimage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = call i32 (...) @flush()
br label %6
6: ; preds = %14, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = call i32 @outPS(i8* %12, i32* null)
br label %14
14: ; preds = %11
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %6
17: ; preds = %6
%18 = load i8*, i8** %2
%19 = call i32 @outputstr(i8* %18)
%20 = call i32 @outputstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @l_outimage(i8* %0) {
%2 = tail call i32 (...) @flush()
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %1, %5
%6 = phi i8* [ %8, %5 ], [ %0, %1 ]
%7 = tail call i32 @outPS(i8* %6, i32* null)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %5
11: ; preds = %5, %1
%12 = tail call i32 @outputstr(i8* %0)
%13 = tail call i32 @outputstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  signal(SIGINT, SIG_IGN);
  printf("You can not stop me!\n");
  while (true) {
    sleep(1);
    printf("UCCU (´∀`)σ)Д`)\n");
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <main+0x39>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@.str = [22 x i8] c"You can not stop me!\0A\00"
@.str.1 = [22 x i8] c"UCCU (\C2\B4\E2\88\80`)\CF\83)\D0\94`)\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @SIGINT
%7 = load i32, i32* @SIG_IGN
%8 = call i32 @signal(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %2, %10
%11 = call i32 @sleep(i32 1)
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %10
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@EXIT_SUCCESS = global i32 0
@str = [21 x i8] c"You can not stop me!\00"
@str.2 = [21 x i8] c"UCCU (\C2\B4\E2\88\80`)\CF\83)\D0\94`)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGINT
%4 = load i32, i32* @SIG_IGN
%5 = tail call i32 @signal(i32 %3, i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %2, %7
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.2, i64 0, i64 0))
br label %7
}
int test_imm_C6int16_reg(short val) {
  return ((val) & (0xC6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C6int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xc6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C6int16_reg>:
test   $0xc6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C6int16_reg(i16 signext %0) {
%2 = and i16 %0, 198
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}