xunge/DecIR huggingface dataset:
int cmpll(const void *ll1_, const void *ll2_) {
  long *ll1 = (long *)ll1_;
  long *ll2 = (long *)ll2_;
  if (*ll1 > *ll2)
    return 1;
  else if (*ll1 < *ll2)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmpll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jle    113c <cmpll+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <cmpll+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jge    115c <cmpll+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <cmpll+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpll>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmpll(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = icmp slt i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int is_bouncy(int);
void is_bouncy_test(void) {
  assert(is_bouncy(155349));
  assert(!is_bouncy(1559));
  assert(!is_bouncy(553));
}


x86 assembly (clang, -O0):
<is_bouncy_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x25ed5,%edi
call   1030 <is_bouncy@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    $0x617,%edi
call   1030 <is_bouncy@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x229,%edi
call   1030 <is_bouncy@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_bouncy_test>:
push   %rax
mov    $0x25ed5,%edi
call   1030 <is_bouncy@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    $0x617,%edi
call   1030 <is_bouncy@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x229,%edi
call   1030 <is_bouncy@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @is_bouncy_test() {
%1 = call i32 @is_bouncy(i32 155349)
%2 = call i32 @assert(i32 %1)
%3 = call i32 @is_bouncy(i32 1559)
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 @is_bouncy(i32 553)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
define void @is_bouncy_test() {
%1 = tail call i32 @is_bouncy(i32 155349)
%2 = tail call i32 @assert(i32 %1)
%3 = tail call i32 @is_bouncy(i32 1559)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @is_bouncy(i32 553)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret void
}
void gtk_widget_set_parent_window() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_parent_window() {
ret void
}
int frw_free(void *mem, int length) {
  if (mem) {
    return 0;
  } else
    return -1;
}


x86 assembly (clang, -O0):
<frw_free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1122 <frw_free+0x22>
movl   $0x0,-0x4(%rbp)
jmp    1129 <frw_free+0x29>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frw_free>:
cmp    $0x1,%rdi
sbb    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @frw_free(i8* readnone %0, i32 %1) {
%3 = icmp eq i8* %0, null
%4 = sext i1 %3 to i32
ret i32 %4
}
int isnan(double value) {
  return ({
    extern __typeof__(isnan) module_libc_isnan;
    &module_libc_isnan;
  })(value);
}


x86 assembly (clang, -O0):
<isnan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isnan(double %0) {
%2 = alloca double
%3 = alloca i32 (double)*
store double %0, double* %2
store i32 (double)* @module_libc_isnan, i32 (double)** %3
%4 = load i32 (double)*, i32 (double)** %3
%5 = load double, double* %2
%6 = call i32 %4(double %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @isnan(double %0) {
%2 = tail call i32 @module_libc_isnan(double %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int round(double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double input;
  printf("enter a number: ");
  scanf("%lf", &input);
  printf("rounded to the nearest whole number: %d", round(input));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <round@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@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   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
call   1050 <round@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [40 x i8] c"rounded to the nearest whole number: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call i32 @round(double %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [40 x i8] c"rounded to the nearest whole number: %d\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call i32 @round(double %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
float sq_area_perimeter(float perimeter) {
  float area = (perimeter / 4) * (perimeter / 4);
  return area;
}


x86 assembly (clang, -O0):
<sq_area_perimeter>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xed9(%rip),%xmm2
divss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq_area_perimeter>:
mulss  0xef8(%rip),%xmm0
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sq_area_perimeter(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fdiv float %4, 4.000000e+00
%6 = load float, float* %2
%7 = fdiv float %6, 4.000000e+00
%8 = fmul float %5, %7
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @sq_area_perimeter(float %0) {
%2 = fmul float %0, 2.500000e-01
%3 = fmul float %2, %2
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ata_intr(int inum) { printf("ATA interrupt\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"ATA interrupt\00"
define void @ata_intr(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qsort(void *, size_t, size_t,
                         int (*)(void const *, void const *));
void sort(void *base, size_t nmemb, size_t smemb,
          int (*comp)(const void *, const void *)) {
  qsort(base, nmemb, smemb, comp);
}


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

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

LLVM IR (-O0):
define void @sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%13 = call i32 @qsort(i8* %9, i64 %10, i64 %11, i32 (i8*, i8*)* %12)
ret void
}

LLVM IR (-O2):
define void @sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture %3) {
%5 = tail call i32 @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage_menu() {
  printf("Usage: md5 -option <string>|<input-file>\n");
  printf("  -s     Hash a string and print to the console\n");
  printf("  -f     Hash a file's contents and print to the console\n");
  printf("  -h     Display this help menu\n");
}


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

x86 assembly (clang, -O2):
<print_usage_menu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xf56(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Usage: md5 -option <string>|<input-file>\0A\00"
@.str.1 = [49 x i8] c" -s Hash a string and print to the console\0A\00"
@.str.2 = [58 x i8] c" -f Hash a file's contents and print to the console\0A\00"
@.str.3 = [33 x i8] c" -h Display this help menu\0A\00"
define void @print_usage_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"Usage: md5 -option <string>|<input-file>\00"
@str.4 = [48 x i8] c" -s Hash a string and print to the console\00"
@str.5 = [57 x i8] c" -f Hash a file's contents and print to the console\00"
@str.6 = [32 x i8] c" -h Display this help menu\00"
define void @print_usage_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Type definitions */
struct robot {
  int dummy;
};

/* Variables and functions */
int cannon(struct robot *, int, int);
int cmd_cannon(struct robot *robot, int *args) {
  return cannon(robot, args[0], args[1]);
}


x86 assembly (clang, -O0):
<cmd_cannon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
call   1030 <cannon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_cannon>:
mov    (%rsi),%eax
mov    0x4(%rsi),%edx
mov    %eax,%esi
jmp    1030 <cannon@plt>

LLVM IR (-O0):
%struct.robot = type { i32 }
define i32 @cmd_cannon(%struct.robot* %0, i32* %1) {
%3 = alloca %struct.robot*
%4 = alloca i32*
store %struct.robot* %0, %struct.robot** %3
store i32* %1, i32** %4
%5 = load %struct.robot*, %struct.robot** %3
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = call i32 @cannon(%struct.robot* %5, i32 %8, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.robot = type { i32 }
define i32 @cmd_cannon(%struct.robot* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @cannon(%struct.robot* %0, i32 %3, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int answer = 0;
  while (answer != 4) {
    printf("What is 2 + 2: ");
    scanf("%d", &answer);
    printf("\n");
  }
  printf("\nYou know your math!!!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     116d <main+0x4d>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xea8(%rip),%r14
lea    0xeb1(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x4,0xc(%rsp)
jne    1170 <main+0x30>
lea    0xe78(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [16 x i8] c"What is 2 + 2: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [24 x i8] c"\0AYou know your math!!!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 4
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %3
10: ; preds = %3
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"What is 2 + 2: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [23 x i8] c"\0AYou know your math!!!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 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 = call i32 @putchar(i32 10)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 4
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void pthread_condattr_destroy() {}


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

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

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

LLVM IR (-O2):
define void @pthread_condattr_destroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putstr(char *, int);
void term_down(void) { putstr("\x1b[B", 3); }


x86 assembly (clang, -O0):
<term_down>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3,%esi
call   1030 <putstr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_down>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <putstr@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[B\00"
define void @term_down() {
%1 = call i32 @putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[B\00"
define void @term_down() {
%1 = tail call i32 @putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
int mergeSort(theArray, p, r)
int theArray[], p, r;
{
  int q = 0;
  if (p < r) {
    q = (p + r) / 2;
    mergeSort(theArray, p, q);
    mergeSort(theArray, q + 1, r);
    merge(theArray, p, q, r);
  }
  return 0;
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    118b <mergeSort+0x6b>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x0,%al
call   1040 <merge@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %edx,%esi
jge    1174 <mergeSort+0x54>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <merge@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %30
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
%15 = sdiv i32 %14, 2
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = call i32 @mergeSort(i32* %16, i32 %17, i32 %18)
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
%24 = call i32 @mergeSort(i32* %20, i32 %22, i32 %23)
%25 = load i32*, i32** %4
%26 = load i32, i32* %5
%27 = load i32, i32* %7
%28 = load i32, i32* %6
%29 = call i32 (i32*, i32, i32, i32, ...) bitcast (i32 (...)* @merge to i32 (i32*, i32, i32, i32, ...)*)(i32* %25, i32 %26, i32 %27, i32 %28)
br label %30
30: ; preds = %11, %3
ret i32 0
}

LLVM IR (-O2):
define i32 @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret i32 0
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
%9 = tail call i32 @mergeSort(i32* %0, i32 %1, i32 %8)
%10 = add nsw i32 %8, 1
%11 = tail call i32 @mergeSort(i32* %0, i32 %10, i32 %2)
%12 = tail call i32 (i32*, i32, i32, i32, ...) bitcast (i32 (...)* @merge to i32 (i32*, i32, i32, i32, ...)*)(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float get_random_float(float a) {
  return ((float)rand() / (float)(RAND_MAX)) * a;
}


x86 assembly (clang, -O0):
<get_random_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_random_float>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm2
mov    0x2ebe(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm2
movss  0x4(%rsp),%xmm0
mulss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @get_random_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @get_random_float(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %3, %5
%7 = fmul float %6, %0
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_least32_t;

/* Variables and functions */
int /*<<< orphan*/ md4step(int /*<<< orphan*/ *, unsigned char *);
void md4sum(void) {
  unsigned char final[128];
  uint_least32_t state[4];
  md4step(state, final);
  md4step(state, final + 64);
}


x86 assembly (clang, -O0):
<md4sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x90(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <md4step@plt>
lea    -0x90(%rbp),%rdi
lea    -0x80(%rbp),%rsi
add    $0x40,%rsi
call   1030 <md4step@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md4sum>:
push   %rbx
sub    $0x90,%rsp
mov    %rsp,%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <md4step@plt>
lea    0x50(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <md4step@plt>
add    $0x90,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @md4sum() {
%1 = alloca [128 x i8]
%2 = alloca [4 x i32]
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = call i32 @md4step(i32* %3, i8* %4)
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds i8, i8* %7, i64 64
%9 = call i32 @md4step(i32* %6, i8* %8)
ret void
}

LLVM IR (-O2):
define void @md4sum() {
%1 = alloca [128 x i8]
%2 = alloca [4 x i32]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%4 = bitcast [4 x i32]* %2 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%6 = call i32 @md4step(i32* %5, i8* %3)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 64
%8 = call i32 @md4step(i32* %5, i8* %7)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlReset(void) {
  (*((volatile uint32_t *)(0xE000ED0C))) = 0x05FA0000 | 0x00000004;
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SysCtlReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed0c,%eax
movl   $0x5fa0004,(%rax)
jmp    110f <SysCtlReset+0xf>

x86 assembly (clang, -O2):
<SysCtlReset>:
mov    $0xe000ed0c,%eax
movl   $0x5fa0004,(%rax)
nopl   0x0(%rax,%rax,1)
jmp    1110 <SysCtlReset+0x10>

LLVM IR (-O0):
define void @SysCtlReset() {
store volatile i32 100270084, i32* inttoptr (i64 3758157068 to i32*)
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SysCtlReset() {
store volatile i32 100270084, i32* inttoptr (i64 3758157068 to i32*)
br label %1
1: ; preds = %0, %1
br label %1
}
void rcu_read_lock_sched(void) {
  do {
  } while (0);
  (void)0;
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<rcu_read_lock_sched>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <rcu_read_lock_sched+0x9>
jmp    110e <rcu_read_lock_sched+0xe>
jmp    1113 <rcu_read_lock_sched+0x13>
jmp    1118 <rcu_read_lock_sched+0x18>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rcu_read_lock_sched() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @rcu_read_lock_sched() {
ret void
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ write(int, char *, scalar_t__);
int main() {
  char buf[128];
  ssize_t nread;
  nread = read(0, buf, 1);
  if (nread > 0) {
    write(1, buf, nread);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %rax,-0x98(%rbp)
cmpq   $0x0,-0x98(%rbp)
jle    1172 <main+0x52>
lea    -0x90(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    $0x1,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
mov    %rsp,%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
test   %rax,%rax
jle    114b <main+0x2b>
mov    %rsp,%rsi
mov    $0x1,%edi
mov    %rax,%rdx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i64
store i32 0, i32* %1
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = call i64 @read(i32 0, i8* %4, i32 1)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%10 = load i64, i64* %3
%11 = call i32 @write(i32 1, i8* %9, i64 %10)
br label %12
12: ; preds = %8, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i64 @read(i32 0, i8* %2, i32 1)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @write(i32 1, i8* %2, i64 %3)
br label %7
7: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
unsigned long long fac_intern(int, int);
unsigned long long fac(int n) { return fac_intern(n, 1); }


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

x86 assembly (clang, -O2):
<fac>:
mov    $0x1,%esi
jmp    1030 <fac_intern@plt>

LLVM IR (-O0):
define i64 @fac(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @fac_intern(i32 %3, i32 1)
ret i64 %4
}

LLVM IR (-O2):
define i64 @fac(i32 %0) {
%2 = tail call i64 @fac_intern(i32 %0, i32 1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ list_get_filter();
int /*<<< orphan*/ list_set_filter(int);
void button_filter_friends_onpress(void) {
  list_set_filter(!list_get_filter());
}


x86 assembly (clang, -O0):
<button_filter_friends_onpress>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <list_get_filter@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <list_set_filter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<button_filter_friends_onpress>:
push   %rax
xor    %eax,%eax
call   1040 <list_get_filter@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <list_set_filter@plt>

LLVM IR (-O0):
define void @button_filter_friends_onpress() {
%1 = call i32 (...) @list_get_filter()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = call i32 @list_set_filter(i32 %4)
ret void
}

LLVM IR (-O2):
define void @button_filter_friends_onpress() {
%1 = tail call i32 (...) @list_get_filter()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @list_set_filter(i32 %3)
ret void
}
void s2argv_free(char **argv) {
  char **scan;
  for (scan = argv; *scan != (char *)0; scan++) {
    for (; *scan != (char *)0; scan++)
      free(*scan);
  }
  free(argv);
}


x86 assembly (clang, -O0):
<s2argv_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1178 <s2argv_free+0x68>
jmp    1137 <s2argv_free+0x27>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1162 <s2argv_free+0x52>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <s2argv_free+0x27>
jmp    1167 <s2argv_free+0x57>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <s2argv_free+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2argv_free>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1155 <s2argv_free+0x45>
mov    %r14,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rax,%rbx
call   1030 <free@plt>
lea    0x8(%rbx),%rax
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
jne    1130 <s2argv_free+0x20>
mov    0x10(%rbx),%rdi
add    $0x10,%rbx
mov    %rbx,%rax
test   %rdi,%rdi
jne    1130 <s2argv_free+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @s2argv_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %17, label %4
4: ; preds = %1, %10
%5 = phi i8** [ %11, %10 ], [ %0, %1 ]
%6 = phi i8* [ %12, %10 ], [ %2, %1 ]
tail call void @free(i8* %6)
%7 = getelementptr inbounds i8*, i8** %5, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %4, %13
%11 = phi i8** [ %7, %4 ], [ %14, %13 ]
%12 = phi i8* [ %8, %4 ], [ %15, %13 ]
br label %4
13: ; preds = %4
%14 = getelementptr inbounds i8*, i8** %5, i64 2
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %10
17: ; preds = %13, %1
%18 = bitcast i8** %0 to i8*
tail call void @free(i8* %18)
ret void
}
void acpi_lpss_init(void) {}


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

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

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

LLVM IR (-O2):
define void @acpi_lpss_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_DUPFD;
int /*<<< orphan*/ close(int);
int fcntl(int, int /*<<< orphan*/, int);
int dup2(int fd1, int fd2) {
  close(fd2);
  return (fcntl(fd1, F_DUPFD, fd2));
}


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
mov    -0x4(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1040 <close@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_DUPFD = global i32 0
define i32 @dup2(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 = call i32 @close(i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* @F_DUPFD
%9 = load i32, i32* %4
%10 = call i32 @fcntl(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@F_DUPFD = global i32 0
define i32 @dup2(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %1)
%4 = load i32, i32* @F_DUPFD
%5 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %1)
ret i32 %5
}
void sum_sse(double *restrict v, int n) {}


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

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

LLVM IR (-O0):
define void @sum_sse(double* noalias %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @sum_sse(double* noalias nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
void *memchr(const void *s, int c, size_t n) {
  const unsigned char *src = (const unsigned char *)s;
  unsigned char d = c;
  while (n--) {
    if (*src == d)
      return (void *)src;
    src++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x29(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1167 <memchr+0x67>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x29(%rbp),%ecx
cmp    %ecx,%eax
jne    1156 <memchr+0x56>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <memchr+0x6f>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    111d <memchr+0x1d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
test   %rdx,%rdx
je     1122 <memchr+0x22>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %sil,(%rax)
je     1124 <memchr+0x24>
add    $0xffffffffffffffff,%rdx
add    $0x1,%rax
test   %rdx,%rdx
jne    1110 <memchr+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%10 = load i8*, i8** %5
store i8* %10, i8** %8
%11 = load i32, i32* %6
%12 = trunc i32 %11 to i8
store i8 %12, i8* %9
br label %13
13: ; preds = %26, %3
%14 = load i64, i64* %7
%15 = add i64 %14, -1
store i64 %15, i64* %7
%16 = icmp ne i64 %14, 0
br i1 %16, label %17, label %29
17: ; preds = %13
%18 = load i8*, i8** %8
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i8, i8* %9
%22 = zext i8 %21 to i32
%23 = icmp eq i32 %20, %22
br i1 %23, label %24, label %26
24: ; preds = %17
%25 = load i8*, i8** %8
store i8* %25, i8** %4
br label %30
26: ; preds = %17
%27 = load i8*, i8** %8
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %8
br label %13
29: ; preds = %13
store i8* null, i8** %4
br label %30
30: ; preds = %29, %24
%31 = load i8*, i8** %4
ret i8* %31
}

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %13
%8 = phi i64 [ %2, %5 ], [ %10, %13 ]
%9 = phi i8* [ %0, %5 ], [ %14, %13 ]
%10 = add i64 %8, -1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, %6
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = icmp eq i64 %10, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %13, %3
%17 = phi i8* [ null, %3 ], [ null, %13 ], [ %9, %7 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ http_server_version(char *);
int configure_http_server_version(char *version) {
  http_server_version(version);
  return (1);
}


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

x86 assembly (clang, -O2):
<configure_http_server_version>:
push   %rax
call   1030 <http_server_version@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @configure_http_server_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @http_server_version(i8* %3)
ret i32 1
}

LLVM IR (-O2):
define i32 @configure_http_server_version(i8* %0) {
%2 = tail call i32 @http_server_version(i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *argv0) {
  printf(
      "Usage: %s [OPTIONS]\n"
      "  -e, --eng             start with English-Polish dictionary (default)\n"
      "  -p, --pol             start with Polish-English dictionary\n"
      "  -g, --ger-pol         start with German-Polish dictionary\n"
      "  -o, --pol-ger         start with Polish-German dictionary\n"
      "  -f, --path=PATH       set database path\n"
      "  -c, --cdpath=PATH     set CD-ROM path\n"
      "  -P, --player=PATH     set sound player path\n"
      "  -w, --word=WORD       start with selected WORD's definition\n"
      "  -A, --audio=DEVICE    set default audio device\n"
      "  -V, --version         print program version\n"
      "  -h, --help            print this message\n"
      "\n",
      argv0);
}


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
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [602 x i8] c"Usage: %s [OPTIONS]\0A -e, --eng start with English-Polish dictionary (default)\0A -p, --pol start with Polish-English dictionary\0A -g, --ger-pol start with German-Polish dictionary\0A -o, --pol-ger start with Polish-German dictionary\0A -f, --path=PATH set database path\0A -c, --cdpath=PATH set CD-ROM path\0A -P, --player=PATH set sound player path\0A -w, --word=WORD start with selected WORD's definition\0A -A, --audio=DEVICE set default audio device\0A -V, --version print program version\0A -h, --help print this message\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([602 x i8], [602 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [602 x i8] c"Usage: %s [OPTIONS]\0A -e, --eng start with English-Polish dictionary (default)\0A -p, --pol start with Polish-English dictionary\0A -g, --ger-pol start with German-Polish dictionary\0A -o, --pol-ger start with Polish-German dictionary\0A -f, --path=PATH set database path\0A -c, --cdpath=PATH set CD-ROM path\0A -P, --player=PATH set sound player path\0A -w, --word=WORD start with selected WORD's definition\0A -A, --audio=DEVICE set default audio device\0A -V, --version print program version\0A -h, --help print this message\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([602 x i8], [602 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strerror(int);
char *strncpy(char *, int /*<<< orphan*/, size_t);
char *__strerror_r(int errnum, char *buf, size_t buflen) {
  return strncpy(buf, strerror(errnum), buflen);
}


x86 assembly (clang, -O0):
<__strerror_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <strerror@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @__strerror_r(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @strerror(i32 %0)
%5 = tail call i8* @strncpy(i8* %1, i32 %4, i64 %2)
ret i8* %5
}
/* Variables and functions */
scalar_t__ _syscall(int, int /*<<< orphan*/, int /*<<< orphan*/,
                    int /*<<< orphan*/);
int syscall_fork() { return (int)_syscall(0x104, 0, 0, 0); }


x86 assembly (clang, -O0):
<syscall_fork>:
push   %rbp
mov    %rsp,%rbp
mov    $0x104,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <_syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_fork>:
mov    $0x104,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <_syscall@plt>

LLVM IR (-O0):
define i32 @syscall_fork() {
%1 = call i64 @_syscall(i32 260, i32 0, i32 0, i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @syscall_fork() {
%1 = tail call i64 @_syscall(i32 260, i32 0, i32 0, i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}
int main(int argc, char *args[]) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_flow_mod_command_print(int /*<<< orphan*/ *,
                                              int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_flow_mod_command_to_string(uint8_t command) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_flow_mod_command_print(stream, command);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_flow_mod_command_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <ofl_flow_mod_command_print@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_flow_mod_command_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <ofl_flow_mod_command_print@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_flow_mod_command_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_flow_mod_command_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_flow_mod_command_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_flow_mod_command_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ my_strtod();
int /*<<< orphan*/ my_strtod2();
int main(void) {
  my_strtod();
  my_strtod2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @my_strtod()
%2 = tail call i32 (...) @my_strtod2()
ret i32 0
}
int is_alive_cpu(int cpu) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @is_alive_cpu(i32 %0) {
ret i32 1
}
void gtk_widget_modify_font() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_modify_font() {
ret void
}