xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, unsigned char *, int);
float R4(unsigned char *p) {
  float r;
  memcpy(&r, p, 4);
  return r;
}


x86 assembly (clang, -O0):
<R4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R4>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @R4(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(float* %3, i8* %4, i32 4)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @R4(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @memcpy(float* %2, i8* %0, i32 4)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ amcl_version();
int main() {
  amcl_version();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <amcl_version@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @amcl_version()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @amcl_version()
ret i32 0
}
int islower(const int c) { return (c >= (int)'a' && c <= (int)'z') ? 1 : 0; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void erase_line() {
  printf("\r                                                              \r");
}


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

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

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

LLVM IR (-O2):
@.str = [65 x i8] c"\0D \0D\00"
define void @erase_line() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_integers_to_defined_output_file(int n, int *a) {
  int i, fail;
  double *c;
  fail = _ada_use_c2phc(159, &n, a, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_integers_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x9f,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_integers_to_defined_output_file>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x9f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @write_integers_to_defined_output_file(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 159, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("Multiply matrix by vector via 3 processors with common memory\n");
  printf("using posix threads\n");
  printf("\E[1;11mUsage:\E[0;11m main --matr_path [file containing matrix] "
         "--vector_path [file containing vector]\n");
}


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

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

LLVM IR (-O0):
@.str = [63 x i8] c"Multiply matrix by vector via 3 processors with common memory\0A\00"
@.str.1 = [21 x i8] c"using posix threads\0A\00"
@.str.2 = [103 x i8] c"\1B[1;11mUsage:\1B[0;11m main --matr_path [file containing matrix] --vector_path [file containing vector]\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [62 x i8] c"Multiply matrix by vector via 3 processors with common memory\00"
@str.3 = [20 x i8] c"using posix threads\00"
@str.4 = [102 x i8] c"\1B[1;11mUsage:\1B[0;11m main --matr_path [file containing matrix] --vector_path [file containing vector]\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char);
void parameters(int five_letters, char letter_a) {
  int i;
  for (i = 0; i < five_letters; i++) {
    printf("%c", letter_a);
  }
  getchar();
}


x86 assembly (clang, -O0):
<parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1162 <parameters+0x42>
lea    0xeb5(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <parameters+0x18>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parameters>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    114f <parameters+0x2f>
mov    %edi,%ebx
movsbl %sil,%ebp
lea    0xecb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <parameters+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <getchar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @parameters(i32 %0, i8 signext %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %1)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
long random();
long int jrand48(long int seedval) { return random(); }


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

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

LLVM IR (-O0):
define i64 @jrand48(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @random()
ret i64 %3
}

LLVM IR (-O2):
define i64 @jrand48(i64 %0) {
%2 = tail call i64 (...) @random()
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ init_condattr();
void PyThread__init_thread(void) { init_condattr(); }


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

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

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

LLVM IR (-O2):
define void @PyThread__init_thread() {
%1 = tail call i32 (...) @init_condattr()
ret void
}
int _stub(int err) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_stub(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char *prog_name, char *filename) {
  printf("Usage: %s <data to add to %s>\n", prog_name, filename);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: %s <data to add to %s>\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage: %s <data to add to %s>\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int FILENAME_MAX;
int NAME_MAX;
int PATH_MAX;
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("FILENAME_MAX   : %d\n", FILENAME_MAX);
  printf("NAME_MAX: %d\n", NAME_MAX);
  printf("PATH_MAX : %d\n", PATH_MAX);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"FILENAME_MAX : %d\0A\00"
@FILENAME_MAX = global i32 0
@.str.1 = [14 x i8] c"NAME_MAX: %d\0A\00"
@NAME_MAX = global i32 0
@.str.2 = [15 x i8] c"PATH_MAX : %d\0A\00"
@PATH_MAX = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @FILENAME_MAX
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @NAME_MAX
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @PATH_MAX
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"FILENAME_MAX : %d\0A\00"
@FILENAME_MAX = global i32 0
@.str.1 = [14 x i8] c"NAME_MAX: %d\0A\00"
@NAME_MAX = global i32 0
@.str.2 = [15 x i8] c"PATH_MAX : %d\0A\00"
@PATH_MAX = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @FILENAME_MAX
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @NAME_MAX
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @PATH_MAX
%8 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
int tcsetattr(void) {
  ;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @tcsetattr() {
ret i32 -1
}
int sys_dprint(int p1, int p2) {
  int a;
  asm volatile("int $0x80" : "=a"(a) : "0"(2), "b"((int)p1), "c"((int)p2));
  return a;
}


x86 assembly (clang, -O0):
<sys_dprint>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%ebx
mov    -0x10(%rbp),%ecx
mov    $0x2,%eax
int    $0x80
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_dprint>:
push   %rbx
mov    %esi,%ecx
mov    %edi,%ebx
mov    $0x2,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sys_dprint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 2, i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @sys_dprint(i32 %0, i32 %1) {
%3 = tail call i32 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 2, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
float _hypotf(float, float);
float hypotf(float x, float y) { return _hypotf(x, y); }


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

x86 assembly (clang, -O2):
<hypotf>:
jmp    1030 <_hypotf@plt>

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

LLVM IR (-O2):
define float @hypotf(float %0, float %1) {
%3 = tail call float @_hypotf(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ nondet_bool();
void main() {
  int i = 2, j;
  if (nondet_bool())
    i++;
  j = (i /= 2);
  assert(i == 1);
  assert(j == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
mov    $0x0,%al
call   1040 <nondet_bool@plt>
cmp    $0x0,%rax
je     1149 <main+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <nondet_bool@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
%3 = call i64 (...) @nondet_bool()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %8
8: ; preds = %5, %0
%9 = load i32, i32* %1
%10 = sdiv i32 %9, 2
store i32 %10, i32* %1
store i32 %10, i32* %2
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 1
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 1
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @nondet_bool()
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t unaligned16_le(const uint8_t *ptr) {
  return (int16_t)(ptr[0] | (ptr[1] << 8));
}


x86 assembly (clang, -O0):
<unaligned16_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned16_le>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @unaligned16_le(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @unaligned16_le(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %4, 8
%6 = or i32 %5, %2
ret i32 %6
}
int insert() {
  printf("%s, %s, %d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/"
         "base-usage/make_study/insert.c",
         __func__, 15);
  return 0;
}


x86 assembly (clang, -O0):
<insert>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xf86(%rip),%rdx
mov    $0xf,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xf89(%rip),%rdx
mov    $0xf,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/insert.c\00"
@__func__.insert = [7 x i8] c"insert\00"
define i32 @insert() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.insert, i64 0, i64 0), i32 15)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/insert.c\00"
@__func__.insert = [7 x i8] c"insert\00"
define i32 @insert() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.insert, i64 0, i64 0), i32 15)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ltrim(char *);
int /*<<< orphan*/ rtrim(char *);
void trim(char *buf) {
  ltrim(buf);
  rtrim(buf);
}


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

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ltrim@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <rtrim@plt>

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

LLVM IR (-O2):
define void @trim(i8* %0) {
%2 = tail call i32 @ltrim(i8* %0)
%3 = tail call i32 @rtrim(i8* %0)
ret void
}
/* Type definitions */
struct session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ socket_printf(struct session *, int, char *, int, int, int);
int /*<<< orphan*/ telopt_debug(struct session *, char *);
int send_dont_sga(struct session *ses, int cplen, unsigned char *cpsrc) {
  socket_printf(ses, 3, "%c%c%c", 255, 254, 3);
  telopt_debug(ses, "SENT IAC DONT SGA");
  return 3;
}


x86 assembly (clang, -O0):
<send_dont_sga>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%r9d
lea    0xebc(%rip),%rdx
mov    $0xff,%ecx
mov    $0xfe,%r8d
mov    %r9d,%esi
call   1040 <socket_printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1030 <telopt_debug@plt>
mov    $0x3,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_dont_sga>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdx
mov    $0x3,%esi
mov    $0xff,%ecx
mov    $0xfe,%r8d
mov    $0x3,%r9d
call   1040 <socket_printf@plt>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <telopt_debug@plt>
mov    $0x3,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.session = type { i32 }
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [18 x i8] c"SENT IAC DONT SGA\00"
define i32 @send_dont_sga(%struct.session* %0, i32 %1, i8* %2) {
%4 = alloca %struct.session*
%5 = alloca i32
%6 = alloca i8*
store %struct.session* %0, %struct.session** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.session*, %struct.session** %4
%8 = call i32 @socket_printf(%struct.session* %7, i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255, i32 254, i32 3)
%9 = load %struct.session*, %struct.session** %4
%10 = call i32 @telopt_debug(%struct.session* %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
%struct.session = type { i32 }
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [18 x i8] c"SENT IAC DONT SGA\00"
define i32 @send_dont_sga(%struct.session* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @socket_printf(%struct.session* %0, i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255, i32 254, i32 3)
%5 = tail call i32 @telopt_debug(%struct.session* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c))
    c = c - 'A' + 'a';
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     1139 <tolower+0x29>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 65
%9 = add nsw i32 %8, 97
store i32 %9, i32* %2
br label %10
10: ; preds = %6, %1
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void smp_restart_with_online_cpu(void) {}


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

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

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

LLVM IR (-O2):
define void @smp_restart_with_online_cpu() {
ret void
}
void test_toupper(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, toupper(i++));
}


x86 assembly (clang, -O0):
<test_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1177 <test_toupper+0x57>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1030 <toupper@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xe9c(%rip),%rdi
lea    0xea3(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    112f <test_toupper+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_toupper>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1030 <toupper@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_toupper+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_toupper = [13 x i8] c"test_toupper\00"
define void @test_toupper() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 @toupper(i32 %9)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_toupper, i64 0, i64 0), i32 %8, i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_toupper = [13 x i8] c"test_toupper\00"
define void @test_toupper() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 @toupper(i32 %2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_toupper, i64 0, i64 0), i32 %2, i32 %4)
%6 = icmp eq i32 %3, 256
br i1 %6, label %7, label %1
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ n2o_thermo_init_1();
int /*<<< orphan*/ n2o_thermo_init_2();
void n2o_thermo_init() {
  n2o_thermo_init_1();
  n2o_thermo_init_2();
}


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

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

LLVM IR (-O0):
define void @n2o_thermo_init() {
%1 = call i32 (...) @n2o_thermo_init_1()
%2 = call i32 (...) @n2o_thermo_init_2()
ret void
}

LLVM IR (-O2):
define void @n2o_thermo_init() {
%1 = tail call i32 (...) @n2o_thermo_init_1()
%2 = tail call i32 (...) @n2o_thermo_init_2()
ret void
}
int Cyc_IOEffect_contains_e(struct Cyc_IOEffect_Contains *ret,
                            struct Cyc_Absyn_Exp *e) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct.Cyc_IOEffect_Contains = type opaque
%struct.Cyc_Absyn_Exp = type opaque
define i32 @Cyc_IOEffect_contains_e(%struct.Cyc_IOEffect_Contains* nocapture readnone %0, %struct.Cyc_Absyn_Exp* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ acct(char *);
int main() {
  acct("foobar");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <acct@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"foobar\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @acct(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"foobar\00"
define i32 @main() {
%1 = tail call i32 @acct(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lineprint2(char *, long, unsigned char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, unsigned char);
void ind_zpy(char *outf, long ctr, unsigned char *op, char *str) {
  char buf[256];
  sprintf(buf, "%-4s $%02X,Y", str, *(op + 1));
  lineprint2(outf, ctr, op, buf);
}


x86 assembly (clang, -O0):
<ind_zpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rax
lea    0xeaf(%rip),%rsi
movzbl 0x1(%rax),%ecx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1030 <lineprint2@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind_zpy>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
movzbl 0x1(%rdx),%eax
lea    0xebe(%rip),%rsi
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rcx,%rdx
mov    %eax,%ecx
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1030 <lineprint2@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%-4s $%02X,Y\00"
define void @ind_zpy(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [256 x i8]
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %8
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11, i8 zeroext %14)
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = load i8*, i8** %7
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%20 = call i32 @lineprint2(i8* %16, i64 %17, i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%-4s $%02X,Y\00"
define void @ind_zpy(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = load i8, i8* %7
%9 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3, i8 zeroext %8)
%10 = call i32 @lineprint2(i8* %0, i64 %1, i8* %2, i8* %6)
ret void
}
int fun1053() { return 1053; }


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

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

LLVM IR (-O0):
define i32 @fun1053() {
ret i32 1053
}

LLVM IR (-O2):
define i32 @fun1053() {
ret i32 1053
}
/* Type definitions */
struct list_it {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
int list_it_prepend_(struct list *, struct list_it *, int /*<<< orphan*/);
int /*<<< orphan*/ object_copy(void const *);
int list_it_prepend(struct list *list, struct list_it *it, const void *data) {
  return list_it_prepend_(list, it, object_copy(data));
}


x86 assembly (clang, -O0):
<list_it_prepend>:
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 <object_copy@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <list_it_prepend_@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.list = type { i32 }
%struct.list_it = type { i32 }
define i32 @list_it_prepend(%struct.list* %0, %struct.list_it* %1, i8* %2) {
%4 = alloca %struct.list*
%5 = alloca %struct.list_it*
%6 = alloca i8*
store %struct.list* %0, %struct.list** %4
store %struct.list_it* %1, %struct.list_it** %5
store i8* %2, i8** %6
%7 = load %struct.list*, %struct.list** %4
%8 = load %struct.list_it*, %struct.list_it** %5
%9 = load i8*, i8** %6
%10 = call i32 @object_copy(i8* %9)
%11 = call i32 @list_it_prepend_(%struct.list* %7, %struct.list_it* %8, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.list = type { i32 }
%struct.list_it = type { i32 }
define i32 @list_it_prepend(%struct.list* %0, %struct.list_it* %1, i8* %2) {
%4 = tail call i32 @object_copy(i8* %2)
%5 = tail call i32 @list_it_prepend_(%struct.list* %0, %struct.list_it* %1, i32 %4)
ret i32 %5
}
int test_imm_95uint8_mem(unsigned char *val) {
  return ((*val) & (-0x95 << 0)) ? -20 : -40;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_set_row_drag_data() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char *malloc(int);
int snprintf(char *, int, char *, char *, int);
char *makeAddress(char *prefix, uint8_t i) {
  int l = snprintf(NULL, 0, "%s.%d", prefix, i);
  char *address = malloc(l + 1);
  snprintf(address, l + 1, "%s.%d", prefix, i);
  return address;
}


x86 assembly (clang, -O0):
<makeAddress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
lea    0xe8c(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeAddress>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r12
lea    0xecb(%rip),%r14
xor    %edi,%edi
xor    %esi,%esi
mov    %r14,%rdx
mov    %r12,%rcx
mov    %r15d,%r8d
call   1030 <snprintf@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r12,%rcx
mov    %r15d,%r8d
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s.%d\00"
define i8* @makeAddress(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @snprintf(i8* null, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
%16 = load i8*, i8** %3
%17 = load i32, i32* %4
%18 = call i32 @snprintf(i8* %13, i32 %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17)
%19 = load i8*, i8** %6
ret i8* %19
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s.%d\00"
define i8* @makeAddress(i8* %0, i32 %1) {
%3 = tail call i32 @snprintf(i8* null, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = add nsw i32 %3, 1
%5 = tail call i8* @malloc(i32 %4)
%6 = tail call i32 @snprintf(i8* %5, i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int iec_vasnprintf(char **, int /*<<< orphan*/, char const *,
                   int /*<<< orphan*/);
int iec_vasprintf(char **buf, const char *format, va_list arg) {
  return iec_vasnprintf(buf, 0, format, arg);
}


x86 assembly (clang, -O0):
<iec_vasprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %esi,%esi
call   1030 <iec_vasnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iec_vasprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <iec_vasnprintf@plt>

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

LLVM IR (-O2):
define i32 @iec_vasprintf(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @iec_vasnprintf(i8** %0, i32 0, i8* %1, i32 %2)
ret i32 %4
}
__attribute__((used)) int _read(int file, char *ptr, int len) { return len; }


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read>:
mov    %edx,%eax
ret

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, i8*, i32)* @_read to i8*)], section "llvm.metadata"
define i32 @_read(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* %6
ret i32 %7
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, i8*, i32)* @_read to i8*)], section "llvm.metadata"
define i32 @_read(i32 %0, i8* nocapture readnone %1, i32 returned %2) {
ret i32 %2
}
void copyline(void) {
  int i;
  extern char line[], longest[];
  i = 0;
  while ((longest[i] = line[i]) != '\0')
    ++i;
}


x86 assembly (clang, -O0):
<copyline>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2ed2(%rip),%rax
mov    (%rax,%rcx,1),%al
movslq -0x4(%rbp),%rdx
mov    0x2eb4(%rip),%rcx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <copyline+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copyline+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyline>:
xor    %eax,%eax
mov    0x2edf(%rip),%rsi
mov    0x2ec8(%rip),%rdx
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copyline+0x10>
ret

LLVM IR (-O0):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copyline() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %8
store i8 %6, i8* %9
%10 = sext i8 %6 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copyline() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %2
store i8 %4, i8* %5
%6 = icmp eq i8 %4, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
scalar_t__ get_cr3();
int guest_page_order(unsigned long *, unsigned long);
int /*<<< orphan*/ test(int, char *, char *, char *);
void test_guest(char *title, void *addr, int expected_order) {
  int order;
  order = guest_page_order((unsigned long *)get_cr3(), (unsigned long)addr);
  test(order == expected_order, "%s - %-16s", title, "guest");
}


x86 assembly (clang, -O0):
<test_guest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_cr3@plt>
mov    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <guest_page_order@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x8(%rbp),%rdx
lea    0xe8e(%rip),%rsi
lea    0xe92(%rip),%rcx
call   1050 <test@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_guest>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <get_cr3@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <guest_page_order@plt>
xor    %edi,%edi
cmp    %ebp,%eax
sete   %dil
lea    0xea3(%rip),%rsi
lea    0xea7(%rip),%rcx
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <test@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s - %-16s\00"
@.str.1 = [6 x i8] c"guest\00"
define void @test_guest(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = call i64 (...) @get_cr3()
%9 = inttoptr i64 %8 to i64*
%10 = load i8*, i8** %5
%11 = ptrtoint i8* %10 to i64
%12 = call i32 @guest_page_order(i64* %9, i64 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
%17 = load i8*, i8** %4
%18 = call i32 @test(i32 %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s - %-16s\00"
@.str.1 = [6 x i8] c"guest\00"
define void @test_guest(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 (...) @get_cr3()
%5 = inttoptr i64 %4 to i64*
%6 = ptrtoint i8* %1 to i64
%7 = tail call i32 @guest_page_order(i64* %5, i64 %6)
%8 = icmp eq i32 %7, %2
%9 = zext i1 %8 to i32
%10 = tail call i32 @test(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}