xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ wfunc();
void main(void) { wfunc(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @wfunc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int led_control(int num) {
  printf("hello world\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @led_control(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long);
extern long Blue3(long one, long two) {
  printf(" Hello from Blue3: one = %d, two = %d!\n ", one, two);
  return one + two;
}


x86 assembly (clang, -O0):
<Blue3>:
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    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Blue3>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xedf(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [41 x i8] c" Hello from Blue3: one = %d, two = %d!\0A \00"
define i64 @Blue3(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %6)
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = add nsw i64 %8, %9
ret i64 %10
}

LLVM IR (-O2):
@.str = [41 x i8] c" Hello from Blue3: one = %d, two = %d!\0A \00"
define i64 @Blue3(i64 %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%4 = add nsw i64 %1, %0
ret i64 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int lstat(char *, struct stat *);
int ss_fileexists(char *path) {
  struct stat st;
  int rc = lstat(path, &st);
  return rc == 0;
}


x86 assembly (clang, -O0):
<ss_fileexists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <lstat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss_fileexists>:
push   %rax
mov    %rsp,%rsi
call   1030 <lstat@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @ss_fileexists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @lstat(i8* %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @ss_fileexists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @lstat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
uint16_t get_in_port(struct sockaddr *sa) {
  return (((struct sockaddr_in *)sa)->sin_port);
}


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

x86 assembly (clang, -O2):
<get_in_port>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.sockaddr_in = type { i32 }
define i32 @get_in_port(%struct.sockaddr* %0) {
%2 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %2
%3 = load %struct.sockaddr*, %struct.sockaddr** %2
%4 = bitcast %struct.sockaddr* %3 to %struct.sockaddr_in*
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @get_in_port(%struct.sockaddr* nocapture %0) {
%2 = getelementptr %struct.sockaddr, %struct.sockaddr* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void close() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @close() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
int sorted_order(int a, int b) { return a - b; }


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

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

LLVM IR (-O0):
define i32 @sorted_order(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sorted_order(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *my_strcpy(char *StringOne, const char *StringTwo, int Size) {
  strncpy(StringOne, StringTwo, Size);
  StringOne[Size - 1] = '\0';
  return StringOne;
}


x86 assembly (clang, -O0):
<my_strcpy>:
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),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @my_strcpy(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 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @my_strcpy(i8* returned %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = add nsw i32 %2, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret i8* %0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR7F_get(void) { return U_WMRCORENONE_get("U_WMR7F"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR7F\00"
define i32 @U_WMR7F_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR7F\00"
define i32 @U_WMR7F_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int main() { return 1 ^ 2; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keccak_absorb(scalar_t__ *, int, unsigned char const *,
                                 unsigned int, int);
void shake128_absorb(uint64_t *s, const unsigned char *input,
                     unsigned int inputByteLen) {
  int i;
  for (i = 0; i < 25; i++)
    s[i] = 0;
  keccak_absorb(s, 168, input, inputByteLen, 0x1F);
}


x86 assembly (clang, -O0):
<shake128_absorb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x19,-0x18(%rbp)
jge    1152 <shake128_absorb+0x42>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <shake128_absorb+0x1a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0xa8,%esi
mov    $0x1f,%r8d
call   1030 <keccak_absorb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shake128_absorb>:
mov    %edx,%ecx
mov    %rsi,%rdx
xorps  %xmm0,%xmm0
movups %xmm0,0xb0(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0xc0(%rdi)
mov    $0xa8,%esi
mov    $0x1f,%r8d
jmp    1030 <keccak_absorb@plt>

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

LLVM IR (-O2):
define void @shake128_absorb(i64* %0, i8* %1, i32 %2) {
%4 = bitcast i64* %0 to i8*
%5 = tail call i32 @keccak_absorb(i64* %0, i32 168, i8* %1, i32 %2, i32 31)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int num = 1;
  printf("I am a simple ");
  printf("computer,\n");
  printf("My favourite number is %d because it is first.\n", num);
  getchar();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"I am a simple \00"
@.str.1 = [11 x i8] c"computer,\0A\00"
@.str.2 = [48 x i8] c"My favourite number is %d because it is first.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"I am a simple \00"
@.str.2 = [48 x i8] c"My favourite number is %d because it is first.\0A\00"
@str = [10 x i8] c"computer,\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 (...) @getchar()
ret i32 0
}
int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg,
                  struct logical_volume *lv, struct lvcreate_params *lp) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
%struct.logical_volume = type opaque
%struct.lvcreate_params = type opaque
define i32 @lockd_init_lv(%struct.cmd_context* %0, %struct.volume_group* %1, %struct.logical_volume* %2, %struct.lvcreate_params* %3) {
%5 = alloca %struct.cmd_context*
%6 = alloca %struct.volume_group*
%7 = alloca %struct.logical_volume*
%8 = alloca %struct.lvcreate_params*
store %struct.cmd_context* %0, %struct.cmd_context** %5
store %struct.volume_group* %1, %struct.volume_group** %6
store %struct.logical_volume* %2, %struct.logical_volume** %7
store %struct.lvcreate_params* %3, %struct.lvcreate_params** %8
ret i32 1
}

LLVM IR (-O2):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
%struct.logical_volume = type opaque
%struct.lvcreate_params = type opaque
define i32 @lockd_init_lv(%struct.cmd_context* nocapture readnone %0, %struct.volume_group* nocapture readnone %1, %struct.logical_volume* nocapture readnone %2, %struct.lvcreate_params* nocapture readnone %3) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ genmerge(int, int);
void genmergerec(int ofs, int len) {
  int lenl = len / 2, lenr = len - lenl;
  if (len <= 1)
    return;
  genmergerec(ofs, lenl);
  genmergerec(ofs + lenl, lenr);
  genmerge(ofs, len);
}


x86 assembly (clang, -O0):
<genmergerec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1154 <genmergerec+0x34>
jmp    1178 <genmergerec+0x58>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <genmergerec@plt>
mov    -0x4(%rbp),%edi
add    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <genmergerec@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <genmerge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genmergerec>:
cmp    $0x1,%esi
jg     1126 <genmergerec+0x6>
ret
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%r14d
mov    %esi,%ebx
shr    $0x1f,%ebx
add    %esi,%ebx
sar    %ebx
mov    %esi,%r15d
sub    %ebx,%r15d
mov    %ebx,%esi
call   1030 <genmergerec@plt>
add    %r14d,%ebx
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <genmergerec@plt>
mov    %r14d,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <genmerge@plt>

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

LLVM IR (-O2):
define void @genmergerec(i32 %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = icmp slt i32 %1, 2
br i1 %4, label %5, label %6
5: ; preds = %2, %6
ret void
6: ; preds = %2
%7 = sub nsw i32 %1, %3
tail call void @genmergerec(i32 %0, i32 %3)
%8 = add nsw i32 %3, %0
tail call void @genmergerec(i32 %8, i32 %7)
%9 = tail call i32 @genmerge(i32 %0, i32 %1)
br label %5
}
void modif_rear_unit2MODIF_CASELESS() {}


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

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

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

LLVM IR (-O2):
define void @modif_rear_unit2MODIF_CASELESS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int clave;
  do {
    printf("\nIngrese la clave: ");
    scanf("%d", &clave);
  } while (clave != 23645);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5c5d,-0x8(%rbp)
jne    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%r14
lea    0xedd(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmpl   $0x5c5d,0xc(%rsp)
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0AIngrese la clave: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 23645
br i1 %8, label %3, label %9
9: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0AIngrese la clave: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 23645
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t ev3_sdcard_closedir(int32_t dirid) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_sdcard_closedir(i32 %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
void allocateMem(int **x, int n) { *x = (int *)malloc(sizeof(int) * n); }


x86 assembly (clang, -O0):
<allocateMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocateMem>:
push   %rbx
mov    %rdi,%rbx
lea    0x0(,%rsi,4),%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @allocateMem(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = mul i64 4, %6
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i32*
%11 = load i32**, i32*** %3
store i32* %10, i32** %11
ret void
}

LLVM IR (-O2):
define void @allocateMem(i32** nocapture writeonly %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %0
ret void
}
/* Type definitions */
struct ts_node {
  int dummy;
};
struct ts_io {
  int dummy;
};

/* Variables and functions */
struct ts_node *ts_text_load(struct ts_io *);
struct ts_node *ts_load_io(struct ts_io *io) {
  return ts_text_load(io);
}


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

x86 assembly (clang, -O2):
<ts_load_io>:
jmp    1030 <ts_text_load@plt>

LLVM IR (-O0):
%struct.ts_node = type { i32 }
%struct.ts_io = type { i32 }
define %struct.ts_node* @ts_load_io(%struct.ts_io* %0) {
%2 = alloca %struct.ts_io*
store %struct.ts_io* %0, %struct.ts_io** %2
%3 = load %struct.ts_io*, %struct.ts_io** %2
%4 = call %struct.ts_node* @ts_text_load(%struct.ts_io* %3)
ret %struct.ts_node* %4
}

LLVM IR (-O2):
%struct.ts_node = type { i32 }
%struct.ts_io = type { i32 }
define %struct.ts_node* @ts_load_io(%struct.ts_io* %0) {
%2 = tail call %struct.ts_node* @ts_text_load(%struct.ts_io* %0)
ret %struct.ts_node* %2
}
char *sigar_error_string(int err) {
  switch (err) {
  case (20000 + 1):
    return "This function has not been implemented on this platform";
  default:
    return "Error string not specified yet";
  }
}


x86 assembly (clang, -O0):
<sigar_error_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x4e21,%eax
jne    112a <sigar_error_string+0x2a>
jmp    111a <sigar_error_string+0x1a>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1135 <sigar_error_string+0x35>
lea    0xf07(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigar_error_string>:
cmp    $0x4e21,%edi
lea    0xef3(%rip),%rcx
lea    0xf24(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [56 x i8] c"This function has not been implemented on this platform\00"
@.str.1 = [31 x i8] c"Error string not specified yet\00"
define i8* @sigar_error_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 20001, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [56 x i8] c"This function has not been implemented on this platform\00"
@.str.1 = [31 x i8] c"Error string not specified yet\00"
define i8* @sigar_error_string(i32 %0) {
%2 = icmp eq i32 %0, 20001
%3 = select i1 %2, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void b(int x) {
  if (-(-x) - (-x))
    link_error();
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
je     113b <b+0x2b>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
test   %edi,%edi
je     111b <b+0xb>
xor    %eax,%eax
jmp    1030 <link_error@plt>
ret

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

LLVM IR (-O2):
define void @b(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @link_error()
br label %5
5: ; preds = %3, %1
ret void
}
void glTranslatef(int a, int b, int c) {}


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

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

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

LLVM IR (-O2):
define void @glTranslatef(i32 %0, i32 %1, i32 %2) {
ret void
}
__attribute__((no)) int zip() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @zip() {
ret i32 0
}
/* Variables and functions */
double cos(double);
double sin(double);
double internal_cot_d(double value) { return cos(value) / sin(value); }


x86 assembly (clang, -O0):
<internal_cot_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_cot_d>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @internal_cot_d(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @cos(double %3)
%5 = load double, double* %2
%6 = call double @sin(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @internal_cot_d(double %0) {
%2 = tail call double @cos(double %0)
%3 = tail call double @sin(double %0)
%4 = fdiv double %2, %3
ret double %4
}
void sws_getContext() {}


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

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

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

LLVM IR (-O2):
define void @sws_getContext() {
ret void
}
int test_imm_E4uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xE4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E4uint64_highword_reg>:
movabs $0xe400000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E4uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 979252543488
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef union bpf_attr {
  int dummy;
} bpf_attr;

/* Variables and functions */
scalar_t__ syscall(int, int, union bpf_attr *, size_t);
int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
  return (int)syscall(321, cmd, attr, size);
}


x86 assembly (clang, -O0):
<missing_bpf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x141,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<missing_bpf>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x141,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%union.bpf_attr = type { i32 }
define i32 @missing_bpf(i32 %0, %union.bpf_attr* %1, i64 %2) {
%4 = alloca i32
%5 = alloca %union.bpf_attr*
%6 = alloca i64
store i32 %0, i32* %4
store %union.bpf_attr* %1, %union.bpf_attr** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load %union.bpf_attr*, %union.bpf_attr** %5
%9 = load i64, i64* %6
%10 = call i64 @syscall(i32 321, i32 %7, %union.bpf_attr* %8, i64 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%union.bpf_attr = type { i32 }
define i32 @missing_bpf(i32 %0, %union.bpf_attr* %1, i64 %2) {
%4 = tail call i64 @syscall(i32 321, i32 %0, %union.bpf_attr* %1, i64 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Cross_init(void) {
  _hmt_register_covercase("HMM_Cross", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Cross_init>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Cross\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Cross_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Cross\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Cross_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_STORE_CTX;

/* Variables and functions */
int null_callback(int ok, X509_STORE_CTX *e) { return ok; }


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

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

LLVM IR (-O0):
define i32 @null_callback(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @null_callback(i32 returned %0, i32* nocapture readnone %1) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ z;

/* Variables and functions */
int foo(size_t z) {
  if (z / sizeof(z) == 10)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
cmp    $0xa,%rax
jne    1126 <foo+0x26>
movl   $0x1,-0x4(%rbp)
jmp    112d <foo+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
and    $0xfffffffffffffff8,%rdi
xor    %eax,%eax
cmp    $0x50,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @foo(i64 %0) {
%2 = and i64 %0, -8
%3 = icmp eq i64 %2, 80
%4 = zext i1 %3 to i32
ret i32 %4
}
void foo_2_1_1_1_1_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_2_1_1_1() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *makeString(char *buf) {
  char *ret;
  buf[strlen(buf) - 1] = '\0';
  int len = strlen(buf);
  ret = (char *)malloc(len + 1);
  strcpy(ret, buf);
  return ret;
}


x86 assembly (clang, -O0):
<makeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @makeString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %2
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
%15 = call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %3
%17 = load i8*, i8** %3
%18 = load i8*, i8** %2
%19 = call i32 @strcpy(i8* %17, i8* %18)
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @makeString(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, 1
%8 = tail call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @strcpy(i8* %9, i8* %0)
ret i8* %9
}
int test00(const char *s1) { return __builtin_strlen(s1); }


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

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

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

LLVM IR (-O2):
define i32 @test00(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort_if_false(int);
int /*<<< orphan*/ expect_ptreq(char const *, int, void const *, void const *);
void assert_ptreq(const char *file, int line, const void *p1, const void *p2) {
  expect_ptreq(file, line, p1, p2);
  abort_if_false(p1 == p2);
}


x86 assembly (clang, -O0):
<assert_ptreq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <expect_ptreq@plt>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <abort_if_false@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_ptreq>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
call   1040 <expect_ptreq@plt>
xor    %edi,%edi
cmp    %r14,%rbx
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <abort_if_false@plt>

LLVM IR (-O0):
define void @assert_ptreq(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @expect_ptreq(i8* %9, i32 %10, i8* %11, i8* %12)
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = icmp eq i8* %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @abort_if_false(i32 %17)
ret void
}

LLVM IR (-O2):
define void @assert_ptreq(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @expect_ptreq(i8* %0, i32 %1, i8* %2, i8* %3)
%6 = icmp eq i8* %2, %3
%7 = zext i1 %6 to i32
%8 = tail call i32 @abort_if_false(i32 %7)
ret void
}
int qp_code(int x) {
  if (x >= '0' && x <= '9')
    return x - '0';
  if (x >= 'a' && x <= 'f')
    return x - 'a' + 10;
  if (x >= 'A' && x <= 'F')
    return x - 'A' + 10;
  return -1;
}


x86 assembly (clang, -O0):
<qp_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <qp_code+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <qp_code+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <qp_code+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     114e <qp_code+0x4e>
cmpl   $0x66,-0x8(%rbp)
jg     114e <qp_code+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <qp_code+0x7a>
cmpl   $0x41,-0x8(%rbp)
jl     1173 <qp_code+0x73>
cmpl   $0x46,-0x8(%rbp)
jg     1173 <qp_code+0x73>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <qp_code+0x7a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qp_code>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <qp_code+0x27>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <qp_code+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @qp_code(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %33
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 102
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 97
%21 = add nsw i32 %20, 10
store i32 %21, i32* %2
br label %33
22: ; preds = %15, %12
%23 = load i32, i32* %3
%24 = icmp sge i32 %23, 65
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i32, i32* %3
%27 = icmp sle i32 %26, 70
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %3
%30 = sub nsw i32 %29, 65
%31 = add nsw i32 %30, 10
store i32 %31, i32* %2
br label %33
32: ; preds = %25, %22
store i32 -1, i32* %2
br label %33
33: ; preds = %32, %28, %18, %9
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @qp_code(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %14
9: ; preds = %4
%10 = add i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -55
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
/* Type definitions */
struct CLString {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLString_appendCString(struct CLString *, char *);
int /*<<< orphan*/ CLString_init(struct CLString *);
void CLString_initWithCString(struct CLString *self, char *theString) {
  CLString_init(self);
  CLString_appendCString(self, theString);
}


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

x86 assembly (clang, -O2):
<CLString_initWithCString>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <CLString_init@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <CLString_appendCString@plt>

LLVM IR (-O0):
%struct.CLString = type { i32 }
define void @CLString_initWithCString(%struct.CLString* %0, i8* %1) {
%3 = alloca %struct.CLString*
%4 = alloca i8*
store %struct.CLString* %0, %struct.CLString** %3
store i8* %1, i8** %4
%5 = load %struct.CLString*, %struct.CLString** %3
%6 = call i32 @CLString_init(%struct.CLString* %5)
%7 = load %struct.CLString*, %struct.CLString** %3
%8 = load i8*, i8** %4
%9 = call i32 @CLString_appendCString(%struct.CLString* %7, i8* %8)
ret void
}

LLVM IR (-O2):
%struct.CLString = type { i32 }
define void @CLString_initWithCString(%struct.CLString* %0, i8* %1) {
%3 = tail call i32 @CLString_init(%struct.CLString* %0)
%4 = tail call i32 @CLString_appendCString(%struct.CLString* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_help(const char *argv0) {
  printf("Usage: %s { ERRNO | --help }\n", argv0);
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: %s { ERRNO | --help }\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: %s { ERRNO | --help }\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int I2C_Write_nbyte(unsigned char, unsigned char, unsigned char *, int);
int I2C_Write_1byte(unsigned char address, unsigned char reg,
                    unsigned char data) {
  return I2C_Write_nbyte(address, reg, &data, 1);
}


x86 assembly (clang, -O0):
<I2C_Write_1byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%al
lea    -0x3(%rbp),%rdx
mov    $0x1,%ecx
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1030 <I2C_Write_nbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2C_Write_1byte>:
push   %rax
mov    %dl,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0x1,%ecx
call   1030 <I2C_Write_nbyte@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @I2C_Write_1byte(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
store i8 %2, i8* %4
%5 = call i32 @I2C_Write_nbyte(i8 zeroext %0, i8 zeroext %1, i8* %4, i32 1)
ret i32 %5
}
/* Variables and functions */
float __infer_nondet_float();
float rintf(float x) { return __infer_nondet_float(); }


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

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

LLVM IR (-O0):
define float @rintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @rintf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
void g_utf8_casefold() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_casefold() {
ret void
}
/* Variables and functions */
short ntohs(short);
short ILibWrapper_ReadShort(char *buffer, int offset) {
  return (ntohs(((short *)(buffer + offset))[0]));
}


x86 assembly (clang, -O0):
<ILibWrapper_ReadShort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,1),%edi
call   1030 <ntohs@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ILibWrapper_ReadShort>:
movslq %esi,%rax
movswl (%rdi,%rax,1),%edi
jmp    1030 <ntohs@plt>

LLVM IR (-O0):
define signext i16 @ILibWrapper_ReadShort(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = bitcast i8* %8 to i16*
%10 = getelementptr inbounds i16, i16* %9, i64 0
%11 = load i16, i16* %10
%12 = call signext i16 @ntohs(i16 signext %11)
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @ILibWrapper_ReadShort(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to i16*
%6 = load i16, i16* %5
%7 = tail call signext i16 @ntohs(i16 signext %6)
ret i16 %7
}
int repl() { return 0; }


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

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

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

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