xunge/DecIR huggingface dataset:
void getsprec_(buffer, ind, phase, rec, errcode) int *buffer, *ind, *phase,
    *rec, *errcode;
{ *errcode = 1; }


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

x86 assembly (clang, -O2):
<getsprec_>:
movl   $0x1,(%r8)
ret

LLVM IR (-O0):
define void @getsprec_(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*
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
%11 = load i32*, i32** %10
store i32 1, i32* %11
ret void
}

LLVM IR (-O2):
define void @getsprec_(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32* nocapture writeonly %4) {
store i32 1, i32* %4
ret void
}
void gtk_tree_view_column_cell_get_size() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_cell_get_size() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TTA_Done();
void DLLUnRegister() { TTA_Done(); }


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

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

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

LLVM IR (-O2):
define void @DLLUnRegister() {
%1 = tail call i32 (...) @TTA_Done()
ret void
}
unsigned int pages_per_huge_page(struct hstate *h) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.hstate = type opaque
define i32 @pages_per_huge_page(%struct.hstate* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ doga();
main() { doga(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doga()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  int i;
  printf("#Args = %d. They are:\n", argc - 1);
  for (i = 1; i < argc; ++i)
    puts(argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117a <main+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %edi,%r14d
lea    -0x1(%r14),%esi
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x2,%r14d
jl     1162 <main+0x42>
mov    %r14d,%r14d
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"#Args = %d. They are:\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 1, i32* %6
br label %10
10: ; preds = %21, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %24
14: ; preds = %10
%15 = load i8**, i8*** %5
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @puts(i8* %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %10
24: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"#Args = %d. They are:\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 1, %6 ], [ %13, %8 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 @puts(i8* dereferenceable(1) %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ be64toh(int /*<<< orphan*/);
uint64_t jet_be64toh(uint64_t big_endian_64bits) {
  return be64toh(big_endian_64bits);
}


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

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

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

LLVM IR (-O2):
define i32 @jet_be64toh(i32 %0) {
%2 = tail call i32 @be64toh(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ prog_GC();
int /*<<< orphan*/ sort_prog();
void prog_flush(void) {
  sort_prog();
  prog_GC();
}


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

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

LLVM IR (-O0):
define void @prog_flush() {
%1 = call i32 (...) @sort_prog()
%2 = call i32 (...) @prog_GC()
ret void
}

LLVM IR (-O2):
define void @prog_flush() {
%1 = tail call i32 (...) @sort_prog()
%2 = tail call i32 (...) @prog_GC()
ret void
}
void pcp_print_serial_stats(struct activity *a, int curr) {}


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

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

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

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_print_serial_stats(%struct.activity* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_tile_size() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_tile_size"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_context_get_tile_size\0A\00"
define i32 @pa_context_get_tile_size() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_context_get_tile_size\00"
define i32 @pa_context_get_tile_size() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
double exp(int);
double HHNa_beta2(const double v) { return 1.0 / (exp(3 - 0.1 * v) + 1.0); }


x86 assembly (clang, -O0):
<HHNa_beta2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xea6(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HHNa_beta2>:
push   %rax
mulsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  0xede(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @HHNa_beta2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double -1.000000e-01, double %3, double 3.000000e+00)
%5 = fptosi double %4 to i32
%6 = call double @exp(i32 %5)
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double 1.000000e+00, %7
ret double %8
}

LLVM IR (-O2):
define double @HHNa_beta2(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double -1.000000e-01, double 3.000000e+00)
%3 = fptosi double %2 to i32
%4 = tail call double @exp(i32 %3)
%5 = fadd double %4, 1.000000e+00
%6 = fdiv double 1.000000e+00, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("Hello world!\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int main() {
  static int x = 20;
  struct X {
    int x;
    int y;
  };
}


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

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

LLVM IR (-O0):
@main.x = internal global i32 20
define i32 @main() {
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
int trailing_whitespace(const char *s) {
  for (;;) {
    char c = *s++;
    if (c == 0)
      return 1;
    if (!isspace(c))
      return 0;
  }
}


x86 assembly (clang, -O0):
<trailing_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
jne    1149 <trailing_whitespace+0x39>
movl   $0x1,-0x4(%rbp)
jmp    116c <trailing_whitespace+0x5c>
movsbl -0x11(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    1167 <trailing_whitespace+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <trailing_whitespace+0x5c>
jmp    111c <trailing_whitespace+0xc>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trailing_whitespace>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     113b <trailing_whitespace+0x2b>
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1120 <trailing_whitespace+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @trailing_whitespace(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = tail call i32 @isspace(i8 signext %4)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %2, %6
%11 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %11
}
void gtk_tree_selection_get_user_data() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_get_user_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MAILBOX_DriverIRQHandler();
__attribute__((weak)) void MAILBOX_IRQHandler(void) {
  MAILBOX_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @MAILBOX_IRQHandler() {
%1 = call i32 (...) @MAILBOX_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @MAILBOX_IRQHandler() {
%1 = tail call i32 (...) @MAILBOX_DriverIRQHandler()
ret void
}
double pmod(x, y)
double x, y;
{
  double z = fmod(x, y);
  if (z < 0)
    z += y;
  return (z);
}


x86 assembly (clang, -O0):
<pmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1153 <pmod+0x43>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmod>:
sub    $0x18,%rsp
movapd %xmm1,(%rsp)
call   1030 <fmod@plt>
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
cmpltsd %xmm1,%xmm2
movapd (%rsp),%xmm3
andpd  %xmm2,%xmm3
movsd  0xec4(%rip),%xmm1
andnpd %xmm1,%xmm2
orpd   %xmm3,%xmm2
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @pmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = call double @fmod(double %6, double %7)
store double %8, double* %5
%9 = load double, double* %5
%10 = fcmp olt double %9, 0.000000e+00
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load double, double* %4
%13 = load double, double* %5
%14 = fadd double %13, %12
store double %14, double* %5
br label %15
15: ; preds = %11, %2
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @pmod(double %0, double %1) {
%3 = tail call double @fmod(double %0, double %1)
%4 = fcmp olt double %3, 0.000000e+00
%5 = select i1 %4, double %1, double -0.000000e+00
%6 = fadd double %3, %5
ret double %6
}
const char *proginfo_name(void) { return "didimama"; }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"didimama\00"
define i8* @proginfo_name() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ free(void *);
void free_data(void *data, void *ifdata) {
  int saved_errno = errno;
  if (data != NULL)
    free(data);
  if (ifdata != NULL)
    free(ifdata);
  errno = (saved_errno);
}


x86 assembly (clang, -O0):
<free_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <free_data+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
je     1154 <free_data+0x44>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%ecx
mov    0x2e82(%rip),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_data>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%ebp
test   %rdi,%rdi
je     112b <free_data+0x1b>
call   1030 <free@plt>
test   %rbx,%rbx
je     1138 <free_data+0x28>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define void @free_data(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 i32, i32* @errno
store i32 %6, i32* %5
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %9, %2
%13 = load i8*, i8** %4
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i8*, i8** %4
%17 = call i32 @free(i8* %16)
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %5
store i32 %19, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @free_data(i8* %0, i8* %1) {
%3 = load i32, i32* @errno
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @free(i8* %1)
br label %11
11: ; preds = %9, %7
store i32 %3, i32* @errno
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int);
void add_run(int class, int win, int lost) {
  FILE *file;
  file = fopen("Stats.txt", "a");
  fprintf(file, " %d %d %d ", class, win, lost);
  fclose(file);
}


x86 assembly (clang, -O0):
<add_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xeb8(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
lea    0xe9f(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_run>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
lea    0xeba(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbp
lea    0xeb0(%rip),%rsi
mov    %rax,%rdi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <fprintf@plt>
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Stats.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [11 x i8] c" %d %d %d \00"
define void @add_run(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
%8 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %7
%9 = load i32*, i32** %7
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
%14 = load i32*, i32** %7
%15 = call i32 @fclose(i32* %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Stats.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [11 x i8] c" %d %d %d \00"
define void @add_run(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%6 = tail call i32 @fclose(i32* %4)
ret void
}
int test_imm_CCuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xCC << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_CCuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 876173328384
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ logger(int /*<<< orphan*/, char *, int);
int ntohl(int);
int read_int4(char const *);
int read_mysql_timestamp2(const char *buf) {
  uint32_t value = 0;
  value = read_int4(buf);
  value = ntohl(value);
  logger(0, "TIMESTAMP2: %d\n", value);
  return value;
}


x86 assembly (clang, -O0):
<read_mysql_timestamp2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_int4@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <ntohl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    %edi,%edi
lea    0xe9a(%rip),%rsi
call   1040 <logger@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_mysql_timestamp2>:
push   %rbx
call   1030 <read_int4@plt>
mov    %eax,%edi
call   1050 <ntohl@plt>
mov    %eax,%ebx
lea    0xeba(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1040 <logger@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"TIMESTAMP2: %d\0A\00"
define i32 @read_mysql_timestamp2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @read_int4(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @ntohl(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @logger(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [16 x i8] c"TIMESTAMP2: %d\0A\00"
define i32 @read_mysql_timestamp2(i8* %0) {
%2 = tail call i32 @read_int4(i8* %0)
%3 = tail call i32 @ntohl(i32 %2)
%4 = tail call i32 @logger(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %3
}
/* Variables and functions */
int verificaParImpar(int *, int *, int, int, int);
int verificaPar(int *vet, int *vetPar, int tamVet, int tamVetPar) {
  return verificaParImpar(vet, vetPar, tamVet, tamVetPar, 1);
}


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

x86 assembly (clang, -O2):
<verificaPar>:
mov    $0x1,%r8d
jmp    1030 <verificaParImpar@plt>

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

LLVM IR (-O2):
define i32 @verificaPar(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @verificaParImpar(i32* %0, i32* %1, i32 %2, i32 %3, i32 1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main1() {
  long long unsigned int ca[16];
  int i;
  for (i = 0; i < 16; i++) {
    ca[i] = 2;
  }
  for (i = 0; i < 16; i++) {
    if (ca[i] != 2)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x84(%rbp)
cmpl   $0x10,-0x84(%rbp)
jge    1156 <main1+0x46>
movslq -0x84(%rbp),%rax
movq   $0x2,-0x80(%rbp,%rax,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1125 <main1+0x15>
movl   $0x0,-0x84(%rbp)
cmpl   $0x10,-0x84(%rbp)
jge    11a0 <main1+0x90>
movslq -0x84(%rbp),%rax
cmpq   $0x2,-0x80(%rbp,%rax,8)
je     1187 <main1+0x77>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    118c <main1+0x7c>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1160 <main1+0x50>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main1() {
%1 = alloca [16 x i64]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [16 x i64], [16 x i64]* %1, i64 0, i64 %8
store i64 2, i64* %9
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
store i32 0, i32* %2
br label %14
14: ; preds = %26, %13
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 16
br i1 %16, label %17, label %29
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [16 x i64], [16 x i64]* %1, i64 0, i64 %19
%21 = load i64, i64* %20
%22 = icmp ne i64 %21, 2
br i1 %22, label %23, label %25
23: ; preds = %17
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %17
br label %26
26: ; preds = %25
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %14
29: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main1() {
ret i32 0
}
/* Variables and functions */
bool is_long_flag(const char *s) {
  return (s[0] == '-' && s[1] == '-' && s[2] != '\0');
}


x86 assembly (clang, -O0):
<is_long_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1144 <is_long_flag+0x44>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1144 <is_long_flag+0x44>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_long_flag>:
xor    %eax,%eax
cmpb   $0x2d,(%rdi)
jne    1116 <is_long_flag+0x16>
cmpb   $0x2d,0x1(%rdi)
jne    1116 <is_long_flag+0x16>
xor    %eax,%eax
cmpb   $0x0,0x2(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @is_long_flag(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 45
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %4, %1
%14 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %12, %8 ]
ret i32 %14
}
int test_imm_46int64_lowword_mem(long long *val) {
  return ((*val) & (0x46 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_46int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 70
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char *argv[]) {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d", a + b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %9, %8
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
char *strtok(char *, char *);
int /*<<< orphan*/ xmp_enable_format(char *, int /*<<< orphan*/);
void exclude_formats(char *list) {
  char *tok;
  tok = strtok(list, ", ");
  while (tok) {
    xmp_enable_format(tok, 0);
    tok = strtok(NULL, ", ");
  }
}


x86 assembly (clang, -O0):
<exclude_formats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116f <exclude_formats+0x4f>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <xmp_enable_format@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe9f(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x10(%rbp)
jmp    1140 <exclude_formats+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exclude_formats>:
push   %rbx
lea    0xed8(%rip),%rsi
call   1040 <strtok@plt>
test   %rax,%rax
je     1159 <exclude_formats+0x39>
lea    0xec7(%rip),%rbx
nopl   0x0(%rax)
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <xmp_enable_format@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1040 <strtok@plt>
test   %rax,%rax
jne    1140 <exclude_formats+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c", \00"
define void @exclude_formats(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %2, %1 ]
%6 = tail call i32 @xmp_enable_format(i8* %5, i32 0)
%7 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void main() { system("/usr/bin/cal"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"/usr/bin/cal\00"
define void @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"/usr/bin/cal\00"
define void @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_debug(char const *);
void main(void) {
  static const int value[] = {1};
  const char *str;
  if (value[1]) {
    print_debug("A\r\n");
    str = "Unbuffered\r\n";
  } else {
    print_debug("B\r\n");
    str = "Registered\r\n";
  }
  print_debug(str);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0xed5(%rip)
je     1151 <main+0x31>
lea    0xec8(%rip),%rdi
call   1040 <print_debug@plt>
lea    0xec0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <main+0x48>
lea    0xebd(%rip),%rdi
call   1040 <print_debug@plt>
lea    0xeb5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print_debug@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <print_debug@plt>
lea    0xed0(%rip),%rdi
call   1040 <print_debug@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@main.value = internal constant [1 x i32] [i32 1]
@.str = [4 x i8] c"A\0D\0A\00"
@.str.1 = [13 x i8] c"Unbuffered\0D\0A\00"
@.str.2 = [4 x i8] c"B\0D\0A\00"
@.str.3 = [13 x i8] c"Registered\0D\0A\00"
define void @main() {
%1 = alloca i8*
%2 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @main.value, i64 1, i64 0)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %0
%7 = call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8** %1
br label %8
8: ; preds = %6, %4
%9 = load i8*, i8** %1
%10 = call i32 @print_debug(i8* %9)
%11 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"B\0D\0A\00"
@.str.3 = [13 x i8] c"Registered\0D\0A\00"
define void @main() {
%1 = tail call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @print_debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
char fgetc(int /*<<< orphan*/ *);
int countline(FILE *in) {
  int count = 0;
  char ch;
  while ((ch = fgetc(in)) != EOF) {
    if (ch == '\n') {
      count++;
    }
  }
  return count;
}


x86 assembly (clang, -O0):
<countline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0xd(%rbp)
movsbl %al,%eax
mov    0x2eaf(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     115f <countline+0x4f>
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    115a <countline+0x4a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <countline+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countline>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    0x2ec5(%rip),%r14
xor    %ebp,%ebp
cmp    (%r14),%al
je     1146 <countline+0x36>
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %ecx,%ecx
cmp    $0xa,%al
sete   %cl
add    %ecx,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%al
jne    1130 <countline+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i8 0
define i32 @countline(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8
store i32* %0, i32** %2
store i32 0, i32* %3
br label %5
5: ; preds = %19, %1
%6 = load i32*, i32** %2
%7 = call signext i8 @fgetc(i32* %6)
store i8 %7, i8* %4
%8 = sext i8 %7 to i32
%9 = load i8, i8* @EOF
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %8, %10
br i1 %11, label %12, label %20
12: ; preds = %5
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 10
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %12
br label %5
20: ; preds = %5
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@EOF = global i8 0
define i32 @countline(i32* nocapture %0) {
%2 = tail call signext i8 @fgetc(i32* %0)
%3 = load i8, i8* @EOF
%4 = icmp eq i8 %2, %3
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %11, %5 ], [ %2, %1 ]
%7 = phi i32 [ %10, %5 ], [ 0, %1 ]
%8 = icmp eq i8 %6, 10
%9 = zext i1 %8 to i32
%10 = add nuw nsw i32 %7, %9
%11 = tail call signext i8 @fgetc(i32* %0)
%12 = load i8, i8* @EOF
%13 = icmp eq i8 %11, %12
br i1 %13, label %14, label %5
14: ; preds = %5, %1
%15 = phi i32 [ 0, %1 ], [ %10, %5 ]
ret i32 %15
}
/* Variables and functions */
int two(int);
int one(int a, int b) { return two(a) + two(b); }


x86 assembly (clang, -O0):
<one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <two@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <two@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <two@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <two@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @one(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @two(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @two(i32 %7)
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @one(i32 %0, i32 %1) {
%3 = tail call i32 @two(i32 %0)
%4 = tail call i32 @two(i32 %1)
%5 = add nsw i32 %4, %3
ret i32 %5
}
unsigned int sec_firmware_support_psci_version(void) { return 0xffffffff; }


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

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

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

LLVM IR (-O2):
define i32 @sec_firmware_support_psci_version() {
ret i32 -1
}
int test_imm_21int8_reg(signed char val) {
  return ((val) & (-0x21 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_21int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffdf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_21int8_reg>:
test   $0xdf,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_21int8_reg(i8 signext %0) {
%2 = and i8 %0, -33
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CL_UpdateCommandInput();
void CL_GameModule_RefreshMouseAngles(void) { CL_UpdateCommandInput(); }


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

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

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

LLVM IR (-O2):
define void @CL_GameModule_RefreshMouseAngles() {
%1 = tail call i32 (...) @CL_UpdateCommandInput()
ret void
}
/* Variables and functions */
float cos(float);
float sine_easeIn(float t, float b, float c, float d) {
  return -c * cos(t / d * (3.14159265f / 2)) + c + b;
}


x86 assembly (clang, -O0):
<sine_easeIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  0xeab(%rip),%xmm1
mulss  %xmm1,%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_easeIn>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
mulss  0xed8(%rip),%xmm0
call   1030 <cos@plt>
movss  (%rsp),%xmm1
mulss  %xmm1,%xmm0
subss  %xmm0,%xmm1
addss  0x4(%rsp),%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sine_easeIn(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = fneg float %9
%11 = load float, float* %5
%12 = load float, float* %8
%13 = fdiv float %11, %12
%14 = fmul float %13, 0x3FF921FB60000000
%15 = call float @cos(float %14)
%16 = load float, float* %7
%17 = call float @llvm.fmuladd.f32(float %10, float %15, float %16)
%18 = load float, float* %6
%19 = fadd float %17, %18
ret float %19
}

LLVM IR (-O2):
define float @sine_easeIn(float %0, float %1, float %2, float %3) {
%5 = fneg float %2
%6 = fdiv float %0, %3
%7 = fmul float %6, 0x3FF921FB60000000
%8 = tail call float @cos(float %7)
%9 = tail call float @llvm.fmuladd.f32(float %5, float %8, float %2)
%10 = fadd float %9, %1
ret float %10
}
/* Variables and functions */
double JetPaletteBase(double);
double JetPaletteBlue(double gray) { return JetPaletteBase(gray + 0.5); }


x86 assembly (clang, -O0):
<JetPaletteBlue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <JetPaletteBase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JetPaletteBlue>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <JetPaletteBase@plt>

LLVM IR (-O0):
define double @JetPaletteBlue(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call double @JetPaletteBase(double %4)
ret double %5
}

LLVM IR (-O2):
define double @JetPaletteBlue(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call double @JetPaletteBase(double %2)
ret double %3
}
char *fb_hGetExeName(char *dst, int maxlen) {
  dst[0] = '\0';
  return dst;
}


x86 assembly (clang, -O0):
<fb_hGetExeName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_hGetExeName>:
mov    %rdi,%rax
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define i8* @fb_hGetExeName(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 = getelementptr inbounds i8, i8* %5, i64 0
store i8 0, i8* %6
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define i8* @fb_hGetExeName(i8* returned writeonly %0, i32 %1) {
store i8 0, i8* %0
ret i8* %0
}