xunge/DecIR huggingface dataset:
/* Variables and functions */
bool def_ss_inc_comp(int *x, int *y) {
  if (*x < *y)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<def_ss_inc_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <def_ss_inc_comp+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <def_ss_inc_comp+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_ss_inc_comp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

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

LLVM IR (-O2):
define i32 @def_ss_inc_comp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int atoi(char *);
char *getenv(char *);
int get_env_debug_level(void) {
  char *value = getenv("ERL_INET_GETHOST_DEBUG");
  if (!value)
    return 0;
  return atoi(value);
}


x86 assembly (clang, -O0):
<get_env_debug_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <get_env_debug_level+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115b <get_env_debug_level+0x3b>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_env_debug_level>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     113b <get_env_debug_level+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"ERL_INET_GETHOST_DEBUG\00"
define i32 @get_env_debug_level() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %0
store i32 0, i32* %1
br label %10
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = call i32 @atoi(i8* %8)
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [23 x i8] c"ERL_INET_GETHOST_DEBUG\00"
define i32 @get_env_debug_level() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @atoi(i8* %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main02() {
  int a = 0;
  int b = 0;
  scanf("%d", &a);
  scanf("%d", &b);
  printf("a + b = %d\n", a + b);
  return 0;
}


x86 assembly (clang, -O0):
<main02>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main02>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"a + b = %d\0A\00"
define i32 @main02() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"a + b = %d\0A\00"
define i32 @main02() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ calc_map_info(double *, unsigned long, double *, double *,
                                 double *, double *);
int /*<<< orphan*/ printf(char *, double, double, double, double);
void print_map_info(double *phi, unsigned long nvox) {
  double maxdens, mindens, sig, ave;
  calc_map_info(phi, nvox, &maxdens, &mindens, &ave, &sig);
  printf("lib_vwk> Map density info: max %f, min %f, ave %f, sig %f.\n",
         maxdens, mindens, ave, sig);
}


x86 assembly (clang, -O0):
<print_map_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x30(%rbp),%r8
lea    -0x28(%rbp),%r9
call   1040 <calc_map_info@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_map_info>:
sub    $0x28,%rsp
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x10(%rsp),%r9
call   1040 <calc_map_info@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [60 x i8] c"lib_vwk> Map density info: max %f, min %f, ave %f, sig %f.\0A\00"
define void @print_map_info(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double* %0, double** %3
store i64 %1, i64* %4
%9 = load double*, double** %3
%10 = load i64, i64* %4
%11 = call i32 @calc_map_info(double* %9, i64 %10, double* %5, double* %6, double* %8, double* %7)
%12 = load double, double* %5
%13 = load double, double* %6
%14 = load double, double* %8
%15 = load double, double* %7
%16 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), double %12, double %13, double %14, double %15)
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"lib_vwk> Map density info: max %f, min %f, ave %f, sig %f.\0A\00"
define void @print_map_info(double* %0, i64 %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
%9 = bitcast double* %5 to i8*
%10 = bitcast double* %6 to i8*
%11 = call i32 @calc_map_info(double* %0, i64 %1, double* %3, double* %4, double* %6, double* %5)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = load double, double* %6
%15 = load double, double* %5
%16 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), double %12, double %13, double %14, double %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr, "%s\n%s\n",
      "usage: mknetid [-q] [-g group_file] [-p passwd_file] [-h hosts_file]",
      "               [-n netid_file] [-d domain]");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xf0a(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xf0d(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [69 x i8] c"usage: mknetid [-q] [-g group_file] [-p passwd_file] [-h hosts_file]\00"
@.str.2 = [43 x i8] c" [-n netid_file] [-d domain]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [69 x i8] c"usage: mknetid [-q] [-g group_file] [-p passwd_file] [-h hosts_file]\00"
@.str.2 = [43 x i8] c" [-n netid_file] [-d domain]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ McDevIf_AddPacket(unsigned long, unsigned char const);
void McDevIf_AddPacketRepeat(unsigned long dDesc, const unsigned char *pbData,
                             unsigned short wDataCount) {
  unsigned short wCount;
  for (wCount = 0; wCount < wDataCount; wCount++) {
    McDevIf_AddPacket(dDesc, pbData[wCount]);
  }
}


x86 assembly (clang, -O0):
<McDevIf_AddPacketRepeat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp),%ecx
cmp    %ecx,%eax
jge    1163 <McDevIf_AddPacketRepeat+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movzwl -0x14(%rbp),%ecx
movzbl (%rax,%rcx,1),%esi
call   1030 <McDevIf_AddPacket@plt>
mov    -0x14(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x14(%rbp)
jmp    112d <McDevIf_AddPacketRepeat+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<McDevIf_AddPacketRepeat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
je     1146 <McDevIf_AddPacketRepeat+0x36>
mov    %rsi,%r14
mov    %rdi,%r15
movzwl %dx,%r12d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <McDevIf_AddPacket@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <McDevIf_AddPacketRepeat+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @McDevIf_AddPacketRepeat(i64 %0, i8* nocapture %1, i16 zeroext %2) {
%4 = icmp eq i16 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = zext i16 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @McDevIf_AddPacket(i64 %0, i8 zeroext %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
void Tiger_gc() {}


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

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

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

LLVM IR (-O2):
define void @Tiger_gc() {
ret void
}
/* Variables and functions */
unsigned int bar();
void foo0x7(void) {
  unsigned int a = bar();
  if (a <= 0x7)
    bar();
}


x86 assembly (clang, -O0):
<foo0x7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
ja     1133 <foo0x7+0x23>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo0x7>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x7,%eax
ja     1125 <foo0x7+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo0x7() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ule i32 %3, 7
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @bar()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @foo0x7() {
%1 = tail call i32 (...) @bar()
%2 = icmp ult i32 %1, 8
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
void __attribute__((
    warning("curl_easy_setopt expects a "
            "char buffer of CURL_ERROR_SIZE as argument for this option")))
__attribute__((unused)) __attribute__((no))
_curl_easy_setopt_err_error_buffer(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_error_buffer() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int Dayinmonth(int, int);
int Checkday(int day, int month, int year) {
  if (day < 1)
    return 0;
  if (day <= Dayinmonth(month, year)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Checkday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1137 <Checkday+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1168 <Checkday+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <Dayinmonth@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jg     1161 <Checkday+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1168 <Checkday+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Checkday>:
test   %edi,%edi
jle    112b <Checkday+0x1b>
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %edx,%esi
call   1030 <Dayinmonth@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setge  %al
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Checkday(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, 1
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = tail call i32 @Dayinmonth(i32 %1, i32 %2)
%7 = icmp sge i32 %6, %0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %3
%10 = phi i32 [ 0, %3 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int CPU_ISSET(int, int /*<<< orphan*/ *);
int cpu_affinity_p(int cpu, cpu_set_t *mask) { return CPU_ISSET(cpu, mask); }


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

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

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

LLVM IR (-O2):
define i32 @cpu_affinity_p(i32 %0, i32* %1) {
%3 = tail call i32 @CPU_ISSET(i32 %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int pigpio_command(int, int /*<<< orphan*/, unsigned int, unsigned int, int);
int set_mode(int pi, unsigned gpio, unsigned mode) {
  return pigpio_command(pi, 0, gpio, mode, 1);
}


x86 assembly (clang, -O0):
<set_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %esi,%esi
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_mode>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @set_mode(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 0, i32 %1, i32 %2, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ madvmerge_align(void *, size_t *, void **);
int /*<<< orphan*/ madvmerge_madvise_mergeable_page_aligned(void *, size_t);
void madvmerge_madvise_mergeable(void *ptr, size_t size) {
  void *aligned;
  madvmerge_align(ptr, &size, &aligned);
  madvmerge_madvise_mergeable_page_aligned(aligned, size);
}


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

x86 assembly (clang, -O2):
<madvmerge_madvise_mergeable>:
sub    $0x18,%rsp
mov    %rsi,0x8(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <madvmerge_align@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1030 <madvmerge_madvise_mergeable_page_aligned@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @madvmerge_madvise_mergeable(i8* %0, i64 %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %1, i64* %3
%5 = bitcast i8** %4 to i8*
%6 = call i32 @madvmerge_align(i8* %0, i64* %3, i8** %4)
%7 = load i8*, i8** %4
%8 = load i64, i64* %3
%9 = call i32 @madvmerge_madvise_mergeable_page_aligned(i8* %7, i64 %8)
ret void
}
void X509_ALGOR_free(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ALGOR_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s2arro(float, float, float, float, float, float);
void s2arro_(float *x1, float *y1, float *z1, float *x2, float *y2, float *z2) {
  s2arro(*x1, *y1, *z1, *x2, *y2, *z2);
}


x86 assembly (clang, -O0):
<s2arro_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm5
call   1030 <s2arro@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2arro_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
movss  (%r9),%xmm5
jmp    1030 <s2arro@plt>

LLVM IR (-O0):
define void @s2arro_(float* %0, float* %1, float* %2, float* %3, float* %4, float* %5) {
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
store float* %0, float** %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = load float*, float** %11
%22 = load float, float* %21
%23 = load float*, float** %12
%24 = load float, float* %23
%25 = call i32 @s2arro(float %14, float %16, float %18, float %20, float %22, float %24)
ret void
}

LLVM IR (-O2):
define void @s2arro_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4, float* nocapture %5) {
%7 = load float, float* %0
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = load float, float* %5
%13 = tail call i32 @s2arro(float %7, float %8, float %9, float %10, float %11, float %12)
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll53(struct __test_metadata *);
void wrapper_epoll53(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll53(_metadata);
}


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

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

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll53(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll53(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll53(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll53(%struct.__test_metadata* %0)
ret void
}
void gtk_radio_button_new_with_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_button_new_with_label() {
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int ilogb(double x) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @ilogb(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @ilogb(double %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
double glmMin2d(double a, double b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<glmMin2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <glmMin2d+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <glmMin2d+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMin2d>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @glmMin2d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @glmMin2d(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void *test_anti_range_62(signed char n) {
  extern void *alloc_anti_range_62(signed char) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_62(n);
}


x86 assembly (clang, -O0):
<test_anti_range_62>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jg     113d <test_anti_range_62+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jg     113d <test_anti_range_62+0x2d>
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_62@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_62>:
cmp    $0x1,%dil
sbb    %eax,%eax
or     %dil,%al
movsbl %al,%edi
jmp    1030 <alloc_anti_range_62@plt>

LLVM IR (-O0):
define i8* @test_anti_range_62(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 0, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 -1, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_62(i8 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_62(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i8 -1, i8 %0
%4 = tail call i8* @alloc_anti_range_62(i8 signext %3)
ret i8* %4
}
int main(void) {
  int f = 0;
  return 2 * f;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ KeyboardException();
void ExceptionHandler(unsigned int cause) {
  switch (cause) {
  case 0:
    KeyboardException();
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<ExceptionHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
test   %eax,%eax
jne    1137 <ExceptionHandler+0x27>
jmp    112b <ExceptionHandler+0x1b>
mov    $0x0,%al
call   1030 <KeyboardException@plt>
jmp    113c <ExceptionHandler+0x2c>
jmp    113c <ExceptionHandler+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExceptionHandler>:
test   %edi,%edi
je     1115 <ExceptionHandler+0x5>
ret
xor    %eax,%eax
jmp    1030 <KeyboardException@plt>

LLVM IR (-O0):
define void @ExceptionHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 0, label %4
]
4: ; preds = %1
%5 = call i32 (...) @KeyboardException()
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %4
ret void
}

LLVM IR (-O2):
define void @ExceptionHandler(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @KeyboardException()
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
struct sstream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double);
int /*<<< orphan*/ sstream_push_cstr(struct sstream *, char *);
void sstream_push_double(struct sstream *ctx, double val) {
  char buffer[128] = {0};
  sprintf(buffer, "%f", val);
  sstream_push_cstr(ctx, buffer);
}


x86 assembly (clang, -O0):
<sstream_push_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
lea    0xe96(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <sstream_push_cstr@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sstream_push_double>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
xorps  %xmm1,%xmm1
movaps %xmm1,0x70(%rsp)
movaps %xmm1,0x60(%rsp)
movaps %xmm1,0x50(%rsp)
movaps %xmm1,0x40(%rsp)
movaps %xmm1,0x30(%rsp)
movaps %xmm1,0x20(%rsp)
movaps %xmm1,0x10(%rsp)
movaps %xmm1,(%rsp)
lea    0xea2(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <sstream_push_cstr@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sstream = type { i32 }
@.str = [3 x i8] c"%f\00"
define void @sstream_push_double(%struct.sstream* %0, double %1) {
%3 = alloca %struct.sstream*
%4 = alloca double
%5 = alloca [128 x i8]
store %struct.sstream* %0, %struct.sstream** %3
store double %1, double* %4
%6 = bitcast [128 x i8]* %5 to i8*
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%8 = load double, double* %4
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load %struct.sstream*, %struct.sstream** %3
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%12 = call i32 @sstream_push_cstr(%struct.sstream* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.sstream = type { i32 }
@.str = [3 x i8] c"%f\00"
define void @sstream_push_double(%struct.sstream* %0, double %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %1)
%6 = call i32 @sstream_push_cstr(%struct.sstream* %0, i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
char *getusername(uid_t uid) {
  struct passwd *user = getpwuid(uid);
  char *username = user->pw_name;
  return username;
}


x86 assembly (clang, -O0):
<getusername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getusername>:
push   %rax
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @getusername(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.passwd*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call %struct.passwd* @getpwuid(i32 %5)
store %struct.passwd* %6, %struct.passwd** %3
%7 = load %struct.passwd*, %struct.passwd** %3
%8 = getelementptr inbounds %struct.passwd, %struct.passwd* %7, i32 0, i32 0
%9 = load i8*, i8** %8
store i8* %9, i8** %4
%10 = load i8*, i8** %4
ret i8* %10
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @getusername(i32 %0) {
%2 = tail call %struct.passwd* @getpwuid(i32 %0)
%3 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *prog) {
  printf("usage: %s ADDR\n", prog);
  printf("\n");
  printf("ADDR may be specified as hex values\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"usage: %s ADDR\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [37 x i8] c"ADDR may be specified as hex values\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"usage: %s ADDR\0A\00"
@str = [36 x i8] c"ADDR may be specified as hex values\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
int isServerDone() {
  int a = 0;
  while (a == 0) {
    if (access("done", F_OK) != -1) {
      a = 1;
    }
    return a;
  }
}


x86 assembly (clang, -O0):
<isServerDone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1154 <isServerDone+0x44>
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    0xec7(%rip),%rdi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     114e <isServerDone+0x3e>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isServerDone>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"done\00"
@F_OK = global i32 0
define i32 @isServerDone() {
%1 = load i32, i32* @F_OK
%2 = tail call i32 @access(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp ne i32 %2, -1
%4 = zext i1 %3 to i32
ret i32 %4
}
const char *New_Name(void) { return "New"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"New\00"
define i8* @New_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
double cub(double r) { return (r * r) * r; }


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

x86 assembly (clang, -O2):
<cub>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cub(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @cub(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
unsigned long unisize(const char *s) {
  unsigned long len = 0;
  while (*s)
    len += (*s++ & 0xc0) != 0x80;
  return len;
}


x86 assembly (clang, -O0):
<unisize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1150 <unisize+0x50>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <unisize+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unisize>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <unisize+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xc0,%cl
xor    %edx,%edx
cmp    $0x80,%cl
setne  %dl
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <unisize+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @unisize(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = and i32 %12, 192
%14 = icmp ne i32 %13, 128
%15 = zext i1 %14 to i32
%16 = sext i32 %15 to i64
%17 = load i64, i64* %3
%18 = add i64 %17, %16
store i64 %18, i64* %3
br label %4
19: ; preds = %4
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @unisize(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i64 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = and i8 %5, -64
%10 = icmp ne i8 %9, -128
%11 = zext i1 %10 to i64
%12 = add i64 %6, %11
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i64 [ 0, %1 ], [ %12, %4 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("ola mundo"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"ola mundo\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ LOG_DEBUG;
int SQLITE_OK;
int /*<<< orphan*/ beholddb_exec(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ sqlite3_extended_result_codes(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
int beholddb_init(sqlite3 *db) {
  beholddb_exec(db, "pragma foreign_keys = on;");
  sqlite3_extended_result_codes(db, 1);
  syslog(LOG_DEBUG, "beholddb_init: ok");
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<beholddb_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <beholddb_exec@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <sqlite3_extended_result_codes@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beholddb_init>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1030 <beholddb_exec@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <sqlite3_extended_result_codes@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"pragma foreign_keys = on;\00"
@LOG_DEBUG = global i32 0
@.str.1 = [18 x i8] c"beholddb_init: ok\00"
@SQLITE_OK = global i32 0
define i32 @beholddb_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @beholddb_exec(i32* %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @sqlite3_extended_result_codes(i32* %5, i32 1)
%7 = load i32, i32* @LOG_DEBUG
%8 = call i32 @syslog(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @SQLITE_OK
ret i32 %9
}

LLVM IR (-O2):
@.str = [26 x i8] c"pragma foreign_keys = on;\00"
@LOG_DEBUG = global i32 0
@.str.1 = [18 x i8] c"beholddb_init: ok\00"
@SQLITE_OK = global i32 0
define i32 @beholddb_init(i32* %0) {
%2 = tail call i32 @beholddb_exec(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sqlite3_extended_result_codes(i32* %0, i32 1)
%4 = load i32, i32* @LOG_DEBUG
%5 = tail call i32 @syslog(i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @SQLITE_OK
ret i32 %6
}
/* Variables and functions */
scalar_t__ CRYPTO_secure_malloc_init(int, int);
int /*<<< orphan*/ perror(char *);
int main(int argc, char **argv) {
  if (CRYPTO_secure_malloc_init(4096, 32)) {
    perror("failed "
           "171");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1000,%edi
mov    $0x20,%esi
call   1040 <CRYPTO_secure_malloc_init@plt>
cmp    $0x0,%rax
je     1167 <main+0x47>
lea    0xeaa(%rip),%rdi
call   1030 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    116e <main+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1000,%edi
mov    $0x20,%esi
call   1040 <CRYPTO_secure_malloc_init@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    113c <main+0x1c>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"failed 171\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @CRYPTO_secure_malloc_init(i32 4096, i32 32)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %11
10: ; preds = %2
store i32 0, i32* %3
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [11 x i8] c"failed 171\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @CRYPTO_secure_malloc_init(i32 4096, i32 32)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Type definitions */
struct j_state {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ i_instr_rm(struct j_state *, int /*<<< orphan*/, int,
                              int /*<<< orphan*/, int, int, int /*<<< orphan*/,
                              size_t);
void i_load(struct j_state *s, int reg, int base, int64_t off, size_t size) {
  i_instr_rm(s, 0, 0x8b, 0, reg, base, off, size);
}


x86 assembly (clang, -O0):
<i_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0x14(%rbp),%r10d
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    $0x8b,%edx
mov    %ecx,%esi
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <i_instr_rm@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_load>:
push   %rax
mov    %r8,%rax
mov    %ecx,%r10d
mov    %edx,%r9d
mov    %esi,%r8d
xor    %esi,%esi
mov    $0x8b,%edx
xor    %ecx,%ecx
push   %rax
push   %r10
call   1030 <i_instr_rm@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
%struct.j_state = type { i32 }
define void @i_load(%struct.j_state* %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = alloca %struct.j_state*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
store %struct.j_state* %0, %struct.j_state** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load %struct.j_state*, %struct.j_state** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i64, i64* %10
%16 = call i32 @i_instr_rm(%struct.j_state* %11, i32 0, i32 139, i32 0, i32 %12, i32 %13, i32 %14, i64 %15)
ret void
}

LLVM IR (-O2):
%struct.j_state = type { i32 }
define void @i_load(%struct.j_state* %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = tail call i32 @i_instr_rm(%struct.j_state* %0, i32 0, i32 139, i32 0, i32 %1, i32 %2, i32 %3, i64 %4)
ret void
}