xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("control usb bus:\n");
  printf("\tusb_ctl on : usb connect\n");
  printf("\tusb_ctl off : usb disconnect\n");
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"control usb bus:\0A\00"
@.str.1 = [27 x i8] c"\09usb_ctl on : usb connect\0A\00"
@.str.2 = [31 x i8] c"\09usb_ctl off : usb disconnect\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"control usb bus:\00"
@str.3 = [26 x i8] c"\09usb_ctl on : usb connect\00"
@str.4 = [30 x i8] c"\09usb_ctl off : usb disconnect\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgNum();
int /*<<< orphan*/ ArgText();
int /*<<< orphan*/ Broadcast(char *, int /*<<< orphan*/);
char *TextOf(int /*<<< orphan*/);
void Act_Broadcast(void) {
  char *t = TextOf(ArgText());
  Broadcast(t, ArgNum());
}


x86 assembly (clang, -O0):
<Act_Broadcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1060 <TextOf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <ArgNum@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <Broadcast@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_Broadcast>:
push   %rbx
xor    %eax,%eax
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1060 <TextOf@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <ArgNum@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <Broadcast@plt>

LLVM IR (-O0):
define void @Act_Broadcast() {
%1 = alloca i8*
%2 = call i32 (...) @ArgText()
%3 = call i8* @TextOf(i32 %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 (...) @ArgNum()
%6 = call i32 @Broadcast(i8* %4, i32 %5)
ret void
}

LLVM IR (-O2):
define void @Act_Broadcast() {
%1 = tail call i32 (...) @ArgText()
%2 = tail call i8* @TextOf(i32 %1)
%3 = tail call i32 (...) @ArgNum()
%4 = tail call i32 @Broadcast(i8* %2, i32 %3)
ret void
}
/* Variables and functions */
int havege_random(void *, char *, size_t);
int random_stub_sign(void *havege_state, char *output, size_t len) {
  return havege_random(havege_state, output, len);
}


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

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

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

LLVM IR (-O2):
define i32 @random_stub_sign(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @havege_random(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ CLOCKS_PER_SEC;
double clock();
double tic(void) { return (clock() / (double)CLOCKS_PER_SEC); }


x86 assembly (clang, -O0):
<tic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clock@plt>
mov    0x2ec6(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tic>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
mov    0x2ec9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i64 0
define double @tic() {
%1 = call double (...) @clock()
%2 = load i64, i64* @CLOCKS_PER_SEC
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i64 0
define double @tic() {
%1 = tail call double (...) @clock()
%2 = load i64, i64* @CLOCKS_PER_SEC
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}
char *freestrarr(char **buf_ptr_ptr, int isfreeall) {
  char **ptr_ptr = buf_ptr_ptr;
  while (*ptr_ptr != 0x0) {
    free(*ptr_ptr);
    ptr_ptr += 1;
  }
  if (isfreeall == 1) {
    free(buf_ptr_ptr);
  }
  return 0x0;
}


x86 assembly (clang, -O0):
<freestrarr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1152 <freestrarr+0x42>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1127 <freestrarr+0x17>
cmpl   $0x1,-0xc(%rbp)
jne    1165 <freestrarr+0x55>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freestrarr>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1142 <freestrarr+0x32>
lea    0x8(%rbx),%rbp
cs nopw 0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    0x0(%rbp),%rdi
add    $0x8,%rbp
test   %rdi,%rdi
jne    1130 <freestrarr+0x20>
cmp    $0x1,%r14d
jne    1150 <freestrarr+0x40>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define noalias i8* @freestrarr(i8** nocapture %0, i32 %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %3, %2 ]
%7 = phi i8** [ %8, %5 ], [ %0, %2 ]
tail call void @free(i8* %6)
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %5
11: ; preds = %5, %2
%12 = icmp eq i32 %1, 1
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = bitcast i8** %0 to i8*
tail call void @free(i8* %14)
br label %15
15: ; preds = %13, %11
ret i8* null
}
/* Variables and functions */
int kb_lock_data(void const *, char const *);
int kb_lock_var(const void *addr, unsigned size) {
  return kb_lock_data(addr, (const char *)addr + size);
}


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

x86 assembly (clang, -O2):
<kb_lock_var>:
mov    %esi,%esi
add    %rdi,%rsi
jmp    1030 <kb_lock_data@plt>

LLVM IR (-O0):
define i32 @kb_lock_var(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = call i32 @kb_lock_data(i8* %5, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @kb_lock_var(i8* %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @kb_lock_data(i8* %0, i8* %4)
ret i32 %5
}
void cfun(char x) {}


x86 assembly (clang, -O0):
<cfun>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cfun(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
ret void
}

LLVM IR (-O2):
define void @cfun(i8 signext %0) {
ret void
}
void RTAvlrU64Remove(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrU64Remove() {
ret void
}
/* Variables and functions */
long htonl(int);
int bigendian() { return htonl(1) == 1L; }


x86 assembly (clang, -O0):
<bigendian>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <htonl@plt>
cmp    $0x1,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigendian>:
push   %rax
mov    $0x1,%edi
call   1030 <htonl@plt>
xor    %ecx,%ecx
cmp    $0x1,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bigendian() {
%1 = call i64 @htonl(i32 1)
%2 = icmp eq i64 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @bigendian() {
%1 = tail call i64 @htonl(i32 1)
%2 = icmp eq i64 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint16_t;
struct s_cell {
  int dummy;
};

/* Variables and functions */
uint16_t ai_select_nb_pawns(struct s_cell *src_cell) { return 1; }


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

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

LLVM IR (-O0):
%struct.s_cell = type { i32 }
define i32 @ai_select_nb_pawns(%struct.s_cell* %0) {
%2 = alloca %struct.s_cell*
store %struct.s_cell* %0, %struct.s_cell** %2
ret i32 1
}

LLVM IR (-O2):
%struct.s_cell = type { i32 }
define i32 @ai_select_nb_pawns(%struct.s_cell* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct L0 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ l0_destroy(struct L0 *);
int /*<<< orphan*/ l0_insert(struct L0 **);
int main() {
  static struct L0 *list;
  int c = 0;
  do {
    c++;
    l0_insert(&list);
  } while (c < 2);
  l0_destroy(list);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x2ef2(%rip),%rdi
call   1040 <l0_insert@plt>
cmpl   $0x2,-0x8(%rbp)
jl     1136 <main+0x16>
mov    0x2edc(%rip),%rdi
call   1030 <l0_destroy@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0x2f10(%rip),%rbx
mov    %rbx,%rdi
call   1040 <l0_insert@plt>
mov    %rbx,%rdi
call   1040 <l0_insert@plt>
mov    0x2ef9(%rip),%rdi
call   1030 <l0_destroy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.L0 = type { i32 }
@main.list = internal global %struct.L0* null
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
%6 = call i32 @l0_insert(%struct.L0** @main.list)
br label %7
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 2
br i1 %9, label %3, label %10
10: ; preds = %7
%11 = load %struct.L0*, %struct.L0** @main.list
%12 = call i32 @l0_destroy(%struct.L0* %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
%struct.L0 = type { i32 }
@main.list = internal global %struct.L0* null
define i32 @main() {
%1 = tail call i32 @l0_insert(%struct.L0** @main.list)
%2 = tail call i32 @l0_insert(%struct.L0** @main.list)
%3 = load %struct.L0*, %struct.L0** @main.list
%4 = tail call i32 @l0_destroy(%struct.L0* %3)
ret i32 0
}
/* Variables and functions */
double babl_pow_1_24(double);
double babl_linear_to_gamma_2_2(double value) {
  if (value > 0.003130804954)
    return 1.055 * babl_pow_1_24(value) - 0.055;
  return 12.92 * value;
}


x86 assembly (clang, -O0):
<babl_linear_to_gamma_2_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <babl_linear_to_gamma_2_2+0x50>
movsd  -0x10(%rbp),%xmm0
call   1030 <babl_pow_1_24@plt>
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1172 <babl_linear_to_gamma_2_2+0x62>
movsd  0xea0(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<babl_linear_to_gamma_2_2>:
push   %rax
ucomisd 0xee7(%rip),%xmm0
jbe    1132 <babl_linear_to_gamma_2_2+0x22>
call   1030 <babl_pow_1_24@plt>
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
pop    %rax
ret
mulsd  0xece(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @babl_linear_to_gamma_2_2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0x3F69A5C61C671835
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = call double @babl_pow_1_24(double %7)
%9 = call double @llvm.fmuladd.f64(double 1.055000e+00, double %8, double -5.500000e-02)
store double %9, double* %2
br label %13
10: ; preds = %1
%11 = load double, double* %3
%12 = fmul double 1.292000e+01, %11
store double %12, double* %2
br label %13
13: ; preds = %10, %6
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @babl_linear_to_gamma_2_2(double %0) {
%2 = fcmp ogt double %0, 0x3F69A5C61C671835
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call double @babl_pow_1_24(double %0)
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.055000e+00, double -5.500000e-02)
br label %8
6: ; preds = %1
%7 = fmul double %0, 1.292000e+01
br label %8
8: ; preds = %6, %3
%9 = phi double [ %5, %3 ], [ %7, %6 ]
ret double %9
}
/* Variables and functions */
char *bus_label_unescape_n(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen_ptr(char const *);
char *bus_label_unescape(const char *f) {
  return bus_label_unescape_n(f, strlen_ptr(f));
}


x86 assembly (clang, -O0):
<bus_label_unescape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen_ptr@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <bus_label_unescape_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bus_label_unescape>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen_ptr@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <bus_label_unescape_n@plt>

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

LLVM IR (-O2):
define i8* @bus_label_unescape(i8* %0) {
%2 = tail call i32 @strlen_ptr(i8* %0)
%3 = tail call i8* @bus_label_unescape_n(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
struct connection {
  int dummy;
};

/* Variables and functions */
int connection_free(struct connection *);
int server_connection_free(void *connection) {
  return connection_free((struct connection *)connection);
}


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

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

LLVM IR (-O0):
%struct.connection = type { i32 }
define i32 @server_connection_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.connection*
%5 = call i32 @connection_free(%struct.connection* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.connection = type { i32 }
define i32 @server_connection_free(i8* %0) {
%2 = bitcast i8* %0 to %struct.connection*
%3 = tail call i32 @connection_free(%struct.connection* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float R;
  float pi;
  float div_result;
  scanf("%f", &R);
  pi = 3.14159;
  div_result = 4 / 3;
  printf("VOLUME = %.3f\n", div_result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xece(%rip),%rdi
movss  0xebf(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [15 x i8] c"VOLUME = %.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
store float 0x400921FA00000000, float* %3
store float 1.000000e+00, float* %4
%6 = load float, float* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [15 x i8] c"VOLUME = %.3f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float 1.000000e+00)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ NID_md5;
int jksengine_digests_final(int /*<<< orphan*/ *, unsigned char *,
                            int /*<<< orphan*/);
int jksengine_md5_final(EVP_MD_CTX *ctx, unsigned char *md) {
  ;
  return (jksengine_digests_final(ctx, md, NID_md5));
}


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

x86 assembly (clang, -O2):
<jksengine_md5_final>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <jksengine_digests_final@plt>

LLVM IR (-O0):
@NID_md5 = global i32 0
define i32 @jksengine_md5_final(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @NID_md5
%8 = call i32 @jksengine_digests_final(i32* %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@NID_md5 = global i32 0
define i32 @jksengine_md5_final(i32* %0, i8* %1) {
%3 = load i32, i32* @NID_md5
%4 = tail call i32 @jksengine_digests_final(i32* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void list_quiries() { printf("Here are all the quiries:\n"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Here are all the quiries:\0A\00"
define void @list_quiries() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"Here are all the quiries:\00"
define void @list_quiries() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}
int isnum(char c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<isnum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isnum+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnum>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isnum(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
setgmode(f, n) int f, n;
{ return (adjustmode(1, 1)); }


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

x86 assembly (clang, -O2):
<setgmode>:
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <adjustmode@plt>

LLVM IR (-O0):
define i32 @setgmode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 1, i32 1)
ret i32 %5
}

LLVM IR (-O2):
define i32 @setgmode(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 1, i32 1)
ret i32 %3
}
void yy_1_pExtWsStarTransient(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_pExtWsStarTransient(i8* nocapture %0, i32 %1) {
ret void
}
void setSize(void *mem, int size) {
  int *p = mem;
  p[(0)] = size;
}


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

x86 assembly (clang, -O2):
<setSize>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @setSize(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %8, i32* %10
ret void
}

LLVM IR (-O2):
define void @setSize(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XShmPutImage() {
  printf("XShmPutImage called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"XShmPutImage called\00"
define i32 @XShmPutImage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct tokenizer {
  int dummy;
};

/* Variables and functions */
scalar_t__ is_whitespace(int /*<<< orphan*/);
int /*<<< orphan*/ tokenizer_drop(struct tokenizer *);
int /*<<< orphan*/ tokenizer_peek(struct tokenizer *);
void tokenizer_skip_whitespace(struct tokenizer *tokenizer) {
  while (is_whitespace(tokenizer_peek(tokenizer))) {
    tokenizer_drop(tokenizer);
  }
}


x86 assembly (clang, -O0):
<tokenizer_skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <tokenizer_peek@plt>
mov    %eax,%edi
call   1040 <is_whitespace@plt>
cmp    $0x0,%rax
je     1164 <tokenizer_skip_whitespace+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <tokenizer_drop@plt>
jmp    113c <tokenizer_skip_whitespace+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tokenizer_skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1050 <tokenizer_peek@plt>
mov    %eax,%edi
call   1040 <is_whitespace@plt>
test   %rax,%rax
je     115e <tokenizer_skip_whitespace+0x2e>
mov    %rbx,%rdi
call   1030 <tokenizer_drop@plt>
mov    %rbx,%rdi
jmp    1140 <tokenizer_skip_whitespace+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.tokenizer = type { i32 }
define void @tokenizer_skip_whitespace(%struct.tokenizer* %0) {
%2 = alloca %struct.tokenizer*
store %struct.tokenizer* %0, %struct.tokenizer** %2
br label %3
3: ; preds = %8, %1
%4 = load %struct.tokenizer*, %struct.tokenizer** %2
%5 = call i32 @tokenizer_peek(%struct.tokenizer* %4)
%6 = call i64 @is_whitespace(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load %struct.tokenizer*, %struct.tokenizer** %2
%10 = call i32 @tokenizer_drop(%struct.tokenizer* %9)
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.tokenizer = type { i32 }
define void @tokenizer_skip_whitespace(%struct.tokenizer* %0) {
%2 = tail call i32 @tokenizer_peek(%struct.tokenizer* %0)
%3 = tail call i64 @is_whitespace(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = tail call i32 @tokenizer_drop(%struct.tokenizer* %0)
%7 = tail call i32 @tokenizer_peek(%struct.tokenizer* %0)
%8 = tail call i64 @is_whitespace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %1
ret void
}
marker3() {}


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

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

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

LLVM IR (-O2):
define i32 @marker3() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ evenTreeCpp();
void evenTreeC() { evenTreeCpp(); }


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

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

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

LLVM IR (-O2):
define void @evenTreeC() {
%1 = tail call i32 (...) @evenTreeCpp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
float f(char *str, int n) {
  printf("str is: %s\nn is: %d\n", str, n);
  return n * n;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
imul   %ebx,%ebx
cvtsi2ss %ebx,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"str is: %s\0An is: %d\0A\00"
define float @f(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = sitofp i32 %10 to float
ret float %11
}

LLVM IR (-O2):
@.str = [21 x i8] c"str is: %s\0An is: %d\0A\00"
define float @f(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = mul nsw i32 %1, %1
%5 = sitofp i32 %4 to float
ret float %5
}
void INT_Excep_SCI9_RXI9(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @i2d_ACCESS_DESCRIPTION() {
ret void
}
const char *__attribute__((long_call)) __attribute__((no)) strong_l1(void) {
  return "strong_l1";
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"strong_l1\00"
define i8* @strong_l1() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int tarai(int, int, int);
int main() {
  int x, y, z;
  x = 12;
  y = 6;
  z = 0;
  printf("%d\n", tarai(x, y, z));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <tarai@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0x6,%esi
xor    %edx,%edx
call   1040 <tarai@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @tarai(i32 12, i32 6, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *, int *, int *,
                          int *);
void get_range(FILE *fp, int *sx, int *sy, int *ex, int *ey) {
  char garbage[16];
  fscanf(fp, "%d,%d through %d,%d", sx, sy, ex, ey);
}


x86 assembly (clang, -O0):
<get_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    0xeb9(%rip),%rsi
call   1030 <fscanf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_range>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xedd(%rip),%rsi
jmp    1030 <fscanf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"%d,%d through %d,%d\00"
define void @get_range(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca [16 x i8]
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%12 = load i32*, i32** %6
%13 = load i32*, i32** %7
%14 = load i32*, i32** %8
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = call i32 @fscanf(i32* %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32* %13, i32* %14, i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%d,%d through %d,%d\00"
define void @get_range(i32* nocapture %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int regcomp(int /*<<< orphan*/ *, char const *, int);
__attribute__((__weak__, __always___)) int
softboundmpx_regcomp(regex_t *preg, const char *regex, int cflags) {
  return regcomp(preg, regex, cflags);
}


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

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

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

LLVM IR (-O2):
define weak i32 @softboundmpx_regcomp(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @regcomp(i32* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ es2(int *, int);
int main() {
  int array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  es2(array, sizeof(array) / sizeof(array[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <es2@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <es2@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @es2(i32* %3, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @es2(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ warning(char *);
int pRecSwitch(int argc) {
  if (argc == 2) {
    warning("probable unsupported switch construct");
  }
  return (argc > 2);
}


x86 assembly (clang, -O0):
<pRecSwitch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1131 <pRecSwitch+0x21>
lea    0xed4(%rip),%rdi
call   1030 <warning@plt>
cmpl   $0x2,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pRecSwitch>:
push   %rbx
mov    %edi,%ebx
cmp    $0x2,%edi
jne    1124 <pRecSwitch+0x14>
lea    0xee1(%rip),%rdi
call   1030 <warning@plt>
xor    %eax,%eax
cmp    $0x3,%ebx
setge  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"probable unsupported switch construct\00"
define i32 @pRecSwitch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @warning(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 2
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [38 x i8] c"probable unsupported switch construct\00"
define i32 @pRecSwitch(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @warning(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = icmp sgt i32 %0, 2
%7 = zext i1 %6 to i32
ret i32 %7
}
void resolver_init() {}


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

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

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

LLVM IR (-O2):
define void @resolver_init() {
ret void
}
int fun1080() { return 1080; }


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

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

LLVM IR (-O0):
define i32 @fun1080() {
ret i32 1080
}

LLVM IR (-O2):
define i32 @fun1080() {
ret i32 1080
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_clear_standard_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(127, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_clear_standard_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x7f,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_clear_standard_Laurent_system>:
mov    $0x7f,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @syscon_clear_standard_Laurent_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 127, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_clear_standard_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 127, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ ft_putendl_fd(char *, int);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
int put_error(char *str) {
  ft_putendl_fd(str, 2);
  if (errno)
    perror(NULL);
  return (1);
}


x86 assembly (clang, -O0):
<put_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1040 <ft_putendl_fd@plt>
mov    0x2e9f(%rip),%rax
cmpq   $0x0,(%rax)
je     1154 <put_error+0x34>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <perror@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_error>:
push   %rax
mov    $0x2,%esi
call   1040 <ft_putendl_fd@plt>
mov    0x2eae(%rip),%rax
cmpq   $0x0,(%rax)
jne    113f <put_error+0x1f>
mov    $0x1,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1030 <perror@plt>
jmp    1138 <put_error+0x18>

LLVM IR (-O0):
@errno = global i64 0
define i32 @put_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ft_putendl_fd(i8* %3, i32 2)
%5 = load i64, i64* @errno
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perror(i32* null)
br label %9
9: ; preds = %7, %1
ret i32 1
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @put_error(i8* %0) {
%2 = tail call i32 @ft_putendl_fd(i8* %0, i32 2)
%3 = load i64, i64* @errno
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @perror(i32* null)
br label %7
7: ; preds = %5, %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int MPI_Rsend(void *buf, int count, int datatype, int dest, int tag, int comm) {
  printf("MPI Stub WARNING: Should not rsend message to self\n");
  return 0;
}


x86 assembly (clang, -O0):
<MPI_Rsend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [52 x i8] c"MPI Stub WARNING: Should not rsend message to self\0A\00"
define i32 @MPI_Rsend(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [51 x i8] c"MPI Stub WARNING: Should not rsend message to self\00"
define i32 @MPI_Rsend(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int mmu_check_flags(int table_flags, int user_flags) {
  if (user_flags & 16) {
    return 1;
  } else if (table_flags & 16) {
    return 0;
  }
  if ((user_flags & (2 | 4 | 8)) == (table_flags & (2 | 4 | 8))) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<mmu_check_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1125 <mmu_check_flags+0x25>
movl   $0x1,-0x4(%rbp)
jmp    116c <mmu_check_flags+0x6c>
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1140 <mmu_check_flags+0x40>
movl   $0x0,-0x4(%rbp)
jmp    116c <mmu_check_flags+0x6c>
jmp    1145 <mmu_check_flags+0x45>
mov    -0xc(%rbp),%eax
and    $0xe,%eax
mov    -0x8(%rbp),%ecx
and    $0xe,%ecx
cmp    %ecx,%eax
jne    1165 <mmu_check_flags+0x65>
movl   $0x1,-0x4(%rbp)
jmp    116c <mmu_check_flags+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmu_check_flags>:
mov    $0x1,%eax
test   $0x10,%sil
jne    111e <mmu_check_flags+0x1e>
xor    %eax,%eax
test   $0x10,%dil
jne    111e <mmu_check_flags+0x1e>
xor    %edi,%esi
xor    %eax,%eax
test   $0xe,%sil
sete   %al
ret

LLVM IR (-O0):
define i32 @mmu_check_flags(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* %5
%7 = and i32 %6, 16
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %24
10: ; preds = %2
%11 = load i32, i32* %4
%12 = and i32 %11, 16
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %3
br label %24
15: ; preds = %10
br label %16
16: ; preds = %15
%17 = load i32, i32* %5
%18 = and i32 %17, 14
%19 = load i32, i32* %4
%20 = and i32 %19, 14
%21 = icmp eq i32 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 1, i32* %3
br label %24
23: ; preds = %16
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %14, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @mmu_check_flags(i32 %0, i32 %1) {
%3 = and i32 %1, 16
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = and i32 %0, 16
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = xor i32 %1, %0
%10 = and i32 %9, 14
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %5, %2
%14 = phi i32 [ 1, %2 ], [ 0, %5 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
void count_printf(void *ctx, const char *format, ...) {
  int *c = ctx;
  c++;
  return;
}


x86 assembly (clang, -O0):
<count_printf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @count_printf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %5
ret void
}

LLVM IR (-O2):
define void @count_printf(i8* nocapture %0, i8* nocapture %1, ...) {
ret void
}