xunge/DecIR huggingface dataset:
/* Type definitions */
struct buffer_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tux3_mark_buffer_unify(struct buffer_head *);
void mark_buffer_unify_atomic(struct buffer_head *buffer) {
  tux3_mark_buffer_unify(buffer);
}


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

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

LLVM IR (-O0):
%struct.buffer_head = type { i32 }
define void @mark_buffer_unify_atomic(%struct.buffer_head* %0) {
%2 = alloca %struct.buffer_head*
store %struct.buffer_head* %0, %struct.buffer_head** %2
%3 = load %struct.buffer_head*, %struct.buffer_head** %2
%4 = call i32 @tux3_mark_buffer_unify(%struct.buffer_head* %3)
ret void
}

LLVM IR (-O2):
%struct.buffer_head = type { i32 }
define void @mark_buffer_unify_atomic(%struct.buffer_head* %0) {
%2 = tail call i32 @tux3_mark_buffer_unify(%struct.buffer_head* %0)
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
main() { printf("%d\n", EOF); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("XXXXX\n");
  printf("X   X\n");
  printf("X   X\n");
  printf("X   X\n");
  printf("XXXXX\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeeb(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@str.4 = [6 x i8] c"X X\00"
@str.5 = [6 x i8] c"XXXXX\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ chown(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int main(void) {
  if (chown("foo", 0, 0) < 0) {
    perror("chow");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <chown@plt>
cmp    $0x0,%rax
jge    1155 <main+0x35>
lea    0xeb4(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <chown@plt>
test   %rax,%rax
js     113a <main+0x1a>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec3(%rip),%rdi
call   1040 <perror@plt>
jmp    1136 <main+0x16>

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@.str.1 = [5 x i8] c"chow\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @chown(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@.str.1 = [5 x i8] c"chow\00"
define i32 @main() {
%1 = tail call i64 @chown(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ nexttoward(double, double);
float nexttowardf(float x, long double y) {
  return (float)nexttoward((double)x, (double)y);
}


x86 assembly (clang, -O0):
<nexttowardf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
movss  %xmm0,-0x4(%rbp)
fstpt  -0x20(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
call   1030 <nexttoward@plt>
cvtsi2ss %rax,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nexttowardf>:
push   %rax
fldt   0x10(%rsp)
cvtss2sd %xmm0,%xmm0
fstpl  (%rsp)
movsd  (%rsp),%xmm1
call   1030 <nexttoward@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @nexttowardf(float %0, x86_fp80 %1) {
%3 = alloca float
%4 = alloca x86_fp80
store float %0, float* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call i64 @nexttoward(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @nexttowardf(float %0, x86_fp80 %1) {
%3 = fpext float %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call i64 @nexttoward(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ debug_putc(int /*<<< orphan*/);
void debug_puts(char *str) {
  while (*str) {
    debug_putc(*(str++));
  }
}


x86 assembly (clang, -O0):
<debug_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <debug_puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <debug_putc@plt>
jmp    111c <debug_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <debug_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <debug_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <debug_puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @debug_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @debug_putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("usage: carve <-h|-s|-b|-e|-p <num>|-n <num>> [imgPath]\n");
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"usage: carve <-h|-s|-b|-e|-p <num>|-n <num>> [imgPath]\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [55 x i8] c"usage: carve <-h|-s|-b|-e|-p <num>|-n <num>> [imgPath]\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret void
}
int main() {
  int var = 100;
  int *p1 = &var;
  int *p2 = p1;
  if (p1 != p2) {
  }
  if (p1 == p2) {
    return 0;
  } else {
  ERROR:
    return -1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1135 <main+0x35>
jmp    1135 <main+0x35>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    114f <main+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    115b <main+0x5b>
jmp    1154 <main+0x54>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int bar(void) { return 10; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 10
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 10
}
/* Type definitions */
struct task_struct {
  int dummy;
};
struct rq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
void prio_changed_stop(struct rq *rq, struct task_struct *p, int oldprio,
                       int running) {
  BUG();
}


x86 assembly (clang, -O0):
<prio_changed_stop>:
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    $0x0,%al
call   1030 <BUG@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rq = type { i32 }
%struct.task_struct = type { i32 }
define void @prio_changed_stop(%struct.rq* %0, %struct.task_struct* %1, i32 %2, i32 %3) {
%5 = alloca %struct.rq*
%6 = alloca %struct.task_struct*
%7 = alloca i32
%8 = alloca i32
store %struct.rq* %0, %struct.rq** %5
store %struct.task_struct* %1, %struct.task_struct** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 (...) @BUG()
ret void
}

LLVM IR (-O2):
%struct.rq = type { i32 }
%struct.task_struct = type { i32 }
define void @prio_changed_stop(%struct.rq* nocapture readnone %0, %struct.task_struct* nocapture readnone %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @BUG()
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv48_12_sse4() {
ret void
}
void bu_compile_numbp(args) struct conscell *args;
{
  int n = bu_compile_arg_list(args);
  if (n != 1)
    goto er;
  EMIT1ATM("NUMBP");
  EMITEND();
  return;
er:
  cerror("numbp: wrong # of args", args);
}


x86 assembly (clang, -O0):
<bu_compile_numbp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <bu_compile_arg_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1169 <bu_compile_numbp+0x29>
jmp    1183 <bu_compile_numbp+0x43>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <EMIT1ATM@plt>
mov    $0x0,%al
call   1030 <EMITEND@plt>
jmp    1195 <bu_compile_numbp+0x55>
mov    -0x8(%rbp),%rsi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1060 <cerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bu_compile_numbp>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <bu_compile_arg_list@plt>
cmp    $0x1,%eax
jne    1166 <bu_compile_numbp+0x26>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <EMIT1ATM@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <EMITEND@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1060 <cerror@plt>

LLVM IR (-O0):
%struct.conscell = type opaque
@.str = [6 x i8] c"NUMBP\00"
@.str.1 = [23 x i8] c"numbp: wrong # of args\00"
define void @bu_compile_numbp(%struct.conscell* %0) {
%2 = alloca %struct.conscell*
%3 = alloca i32
store %struct.conscell* %0, %struct.conscell** %2
%4 = load %struct.conscell*, %struct.conscell** %2
%5 = call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @EMITEND()
br label %15
12: ; preds = %8
%13 = load %struct.conscell*, %struct.conscell** %2
%14 = call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %13)
br label %15
15: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
%struct.conscell = type opaque
@.str = [6 x i8] c"NUMBP\00"
@.str.1 = [23 x i8] c"numbp: wrong # of args\00"
define void @bu_compile_numbp(%struct.conscell* %0) {
%2 = tail call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @EMITEND()
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %0)
br label %9
9: ; preds = %7, %4
ret void
}
__attribute__((weak)) void fd_nrf8001_bond_success(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_bond_success() {
ret void
}
int test_imm_1Fuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x1F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Fuint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 31
%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_1Fuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 133143986176
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ USB_Dp_ClearInterrupt();
void USB_DP_ISR(void) { (void)USB_Dp_ClearInterrupt(); }


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

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

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

LLVM IR (-O2):
define void @USB_DP_ISR() {
%1 = tail call i32 (...) @USB_Dp_ClearInterrupt()
ret void
}
void gtk_tree_model_filter_set_visible_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_filter_set_visible_column() {
ret void
}
double pathcon_nm7_twice(double x) { return x + x; }


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

x86 assembly (clang, -O2):
<pathcon_nm7_twice>:
addsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @pathcon_nm7_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
/* Variables and functions */
double absd(double const);
int iszerod(const double x) { return (absd(x) < (double)1.19209290e-5f); }


x86 assembly (clang, -O0):
<iszerod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <absd@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iszerod>:
push   %rax
call   1030 <absd@plt>
movsd  0xee2(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @iszerod(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @absd(double %3)
%5 = fcmp olt double %4, 0x3EE9000000000000
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @iszerod(double %0) {
%2 = tail call double @absd(double %0)
%3 = fcmp olt double %2, 0x3EE9000000000000
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ PTHREAD_MUTEX_INITIALIZER;
int /*<<< orphan*/ pthread_mutex_lock(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  pthread_mutex_t main_thread_mutex = PTHREAD_MUTEX_INITIALIZER;
  (void)(argv);
  pthread_mutex_lock(&main_thread_mutex);
  if (argc > 1)
    pthread_mutex_lock(&main_thread_mutex);
  return EXIT_SUCCESS;
}


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    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <pthread_mutex_lock@plt>
cmpl   $0x1,-0x8(%rbp)
jle    114e <main+0x3e>
lea    -0x14(%rbp),%rdi
call   1030 <pthread_mutex_lock@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <pthread_mutex_lock@plt>
cmp    $0x2,%ebx
jl     113d <main+0x2d>
lea    0xc(%rsp),%rdi
call   1030 <pthread_mutex_lock@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@PTHREAD_MUTEX_INITIALIZER = global i32 0
@EXIT_SUCCESS = global i32 0
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* @PTHREAD_MUTEX_INITIALIZER
store i32 %7, i32* %6
%8 = load i8**, i8*** %5
%9 = call i32 @pthread_mutex_lock(i32* %6)
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @pthread_mutex_lock(i32* %6)
br label %14
14: ; preds = %12, %2
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}

LLVM IR (-O2):
@PTHREAD_MUTEX_INITIALIZER = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @PTHREAD_MUTEX_INITIALIZER
store i32 %5, i32* %3
%6 = call i32 @pthread_mutex_lock(i32* %3)
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @pthread_mutex_lock(i32* %3)
br label %10
10: ; preds = %8, %2
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void i830_debug_vgacntrl(char *result, int len, int reg, uint32_t val,
                         uint32_t devid) {
  snprintf(result, len, "%s", val & (1 << 31) ? "disabled" : "enabled");
}


x86 assembly (clang, -O0):
<i830_debug_vgacntrl>:
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    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
and    $0x80000000,%edx
lea    0xecc(%rip),%rcx
lea    0xebc(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rcx
lea    0xeab(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i830_debug_vgacntrl>:
test   %ecx,%ecx
lea    0xef3(%rip),%rax
lea    0xee3(%rip),%rcx
cmovns %rax,%rcx
lea    0xed5(%rip),%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"disabled\00"
@.str.2 = [8 x i8] c"enabled\00"
define void @i830_debug_vgacntrl(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %9
%14 = and i32 %13, -2147483648
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"disabled\00"
@.str.2 = [8 x i8] c"enabled\00"
define void @i830_debug_vgacntrl(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp sgt i32 %3, -1
%7 = select i1 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char **argv) {
  printf("Usage: %s matrix-file matrix-trans-file p q"
         "sing-vals-file\n",
         argv[0]);
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"Usage: %s matrix-file matrix-trans-file p qsing-vals-file\0A\00"
define void @print_usage(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 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Usage: %s matrix-file matrix-trans-file p qsing-vals-file\0A\00"
define void @print_usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ one;

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
void set_tcp_nodelay(int fd) {
  int one = 1;
  setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
}


x86 assembly (clang, -O0):
<set_tcp_nodelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_tcp_nodelay>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @set_tcp_nodelay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @IPPROTO_TCP
%6 = load i32, i32* @TCP_NODELAY
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @set_tcp_nodelay(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = load i32, i32* @TCP_NODELAY
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
ret void
}
/* Variables and functions */
int ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(const char *s) {
  if (!s)
    write(1, "(null)", 6);
  else
    write(1, s, ft_strlen(s));
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1152 <ft_putstr+0x32>
mov    $0x1,%edi
lea    0xebd(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
jmp    1173 <ft_putstr+0x53>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
test   %rdi,%rdi
je     113e <ft_putstr+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>
lea    0xebb(%rip),%rsi
mov    $0x1,%edi
mov    $0x6,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
define void @ft_putstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
br label %8
5: ; preds = %1
%6 = tail call i32 @ft_strlen(i8* %0)
%7 = tail call i32 @write(i32 1, i8* %0, i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}
OP(fd, b8) { op_b8(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_b8()
ret i32 undef
}
/* Type definitions */
struct arg_str {
  int dummy;
};

/* Variables and functions */
struct arg_str *arg_strn(char const *, char const *, char const *,
                         int /*<<< orphan*/, int, char const *);
struct arg_str *arg_str0(const char *shortopts, const char *longopts,
                         const char *datatype, const char *glossary) {
  return arg_strn(shortopts, longopts, datatype, 0, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_str0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <arg_strn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_str0>:
mov    %rcx,%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_strn@plt>

LLVM IR (-O0):
%struct.arg_str = type { i32 }
define %struct.arg_str* @arg_str0(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call %struct.arg_str* @arg_strn(i8* %9, i8* %10, i8* %11, i32 0, i32 1, i8* %12)
ret %struct.arg_str* %13
}

LLVM IR (-O2):
%struct.arg_str = type { i32 }
define %struct.arg_str* @arg_str0(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call %struct.arg_str* @arg_strn(i8* %0, i8* %1, i8* %2, i32 0, i32 1, i8* %3)
ret %struct.arg_str* %5
}
/* Variables and functions */
int /*<<< orphan*/ fd_lis3dh_initialize();
void fd_hal_accelerometer_initialize(void) { fd_lis3dh_initialize(); }


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

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

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

LLVM IR (-O2):
define void @fd_hal_accelerometer_initialize() {
%1 = tail call i32 (...) @fd_lis3dh_initialize()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void gfxpoint_destroy(void *c) { free(c); }


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

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

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

LLVM IR (-O2):
define void @gfxpoint_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void led_init() {}


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

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

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

LLVM IR (-O2):
define void @led_init() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_get_number_of_equations(int *n) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(612, n, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_number_of_equations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x264,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_get_number_of_equations>:
mov    %rdi,%rsi
mov    $0x264,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @sweep_get_number_of_equations(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 612, i32* %0, i32* undef, double* undef)
ret i32 %2
}
int sys_sprint(const char *p1) {
  int a;
  asm volatile("int $0x80" : "=a"(a) : "0"(1), "b"((int)p1));
  return a;
}


x86 assembly (clang, -O0):
<sys_sprint>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ebx
mov    $0x1,%eax
int    $0x80
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_sprint>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sys_sprint(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
%6 = call i32 asm sideeffect "int $$0x80", "={ax},0,{bx},~{dirflag},~{fpsr},~{flags}"(i32 1, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @sys_sprint(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 asm sideeffect "int $$0x80", "={ax},0,{bx},~{dirflag},~{fpsr},~{flags}"(i32 1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, double);
void cgiMakeDoubleVar(char *varName, double initialVal, int maxDigits) {
  if (maxDigits == 0)
    maxDigits = 4;
  printf("<INPUT TYPE=TEXT NAME=\"%s\" SIZE=%d VALUE=%g>", varName, maxDigits,
         initialVal);
}


x86 assembly (clang, -O0):
<cgiMakeDoubleVar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1135 <cgiMakeDoubleVar+0x25>
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeDoubleVar>:
mov    %rdi,%rax
test   %esi,%esi
mov    $0x4,%edx
cmovne %esi,%edx
lea    0xedc(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"<INPUT TYPE=TEXT NAME=\22%s\22 SIZE=%d VALUE=%g>\00"
define void @cgiMakeDoubleVar(i8* %0, double %1, i32 %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca i32
store i8* %0, i8** %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
store i32 4, i32* %6
br label %10
10: ; preds = %9, %3
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = load double, double* %5
%14 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12, double %13)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"<INPUT TYPE=TEXT NAME=\22%s\22 SIZE=%d VALUE=%g>\00"
define void @cgiMakeDoubleVar(i8* %0, double %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i32 4, i32 %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5, double %1)
ret void
}
/* Variables and functions */
double moonphase(double, int);
double moonphasebylunation(int lun, int phi) {
  double k;
  k = lun - 953 + phi / 4.0;
  return moonphase(k, phi);
}


x86 assembly (clang, -O0):
<moonphasebylunation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x3b9,%eax
cvtsi2sd %eax,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1030 <moonphase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moonphasebylunation>:
add    $0xfffffc47,%edi
cvtsi2sd %edi,%xmm1
cvtsi2sd %esi,%xmm0
mulsd  0xeda(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    %esi,%edi
jmp    1030 <moonphase@plt>

LLVM IR (-O0):
define double @moonphasebylunation(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 953
%8 = sitofp i32 %7 to double
%9 = load i32, i32* %4
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 4.000000e+00
%12 = fadd double %8, %11
store double %12, double* %5
%13 = load double, double* %5
%14 = load i32, i32* %4
%15 = call double @moonphase(double %13, i32 %14)
ret double %15
}

LLVM IR (-O2):
define double @moonphasebylunation(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -953
%4 = sitofp i32 %3 to double
%5 = sitofp i32 %1 to double
%6 = fmul double %5, 2.500000e-01
%7 = fadd double %6, %4
%8 = tail call double @moonphase(double %7, i32 %1)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int bar(void) { printf("Hello\n"); }


x86 assembly (clang, -O0):
<bar>:
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):
<bar>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define i32 @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main() {
  float num;
  num = 1.2;
  printf("%.2f\n", num);
  printf("%.2f\n", num);
  printf("%.2f\n", num);
  printf("%.2f\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeec(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0xecd(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0xebd(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0xead(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 0x3FF3333340000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 0x3FF3333340000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 0x3FF3333340000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 0x3FF3333340000000)
ret i32 0
}
/* Variables and functions */
double derotate_90_double(double);
double derotate_90_small_double(double a) {
  double y;
  y = derotate_90_double(a);
  if (y >= 45.0)
    y = y - 90.0;
  return y;
}


x86 assembly (clang, -O0):
<derotate_90_small_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <derotate_90_double@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1159 <derotate_90_small_double+0x49>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<derotate_90_small_double>:
push   %rax
call   1030 <derotate_90_double@plt>
movsd  0xee2(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xede(%rip),%xmm2
cmpnlesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @derotate_90_small_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @derotate_90_double(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fcmp oge double %6, 4.500000e+01
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fsub double %9, 9.000000e+01
store double %10, double* %3
br label %11
11: ; preds = %8, %1
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @derotate_90_small_double(double %0) {
%2 = tail call double @derotate_90_double(double %0)
%3 = fcmp ult double %2, 4.500000e+01
%4 = fadd double %2, -9.000000e+01
%5 = select i1 %3, double %2, double %4
ret double %5
}
/* Variables and functions */
int setgid(int);
int setgroups(int, int *);
int prot_gid(int gid) {
  if (setgroups(1, &gid) == -1)
    return -1;
  return setgid(gid);
}


x86 assembly (clang, -O0):
<prot_gid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
call   1030 <setgroups@plt>
cmp    $0xffffffff,%eax
jne    114e <prot_gid+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <prot_gid+0x39>
mov    -0x8(%rbp),%edi
call   1040 <setgid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prot_gid>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
call   1030 <setgroups@plt>
cmp    $0xffffffff,%eax
je     1144 <prot_gid+0x24>
mov    0x4(%rsp),%edi
call   1040 <setgid@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @prot_gid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @setgroups(i32 1, i32* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @setgid(i32 %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ -1, %1 ]
ret i32 %9
}
/* Type definitions */
typedef unsigned int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int pcg_rotr_32(int, unsigned int);
uint32_t pcg_output_xsl_rr_64_32(uint64_t state) {
  return pcg_rotr_32(((uint32_t)(state >> 32u)) ^ (uint32_t)state,
                     state >> 59u);
}


x86 assembly (clang, -O0):
<pcg_output_xsl_rr_64_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x20,%ecx
shr    %cl,%edi
xor    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    $0x3b,%ecx
shr    %cl,%esi
call   1030 <pcg_rotr_32@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pcg_output_xsl_rr_64_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 32
%5 = load i32, i32* %2
%6 = xor i32 %4, %5
%7 = load i32, i32* %2
%8 = lshr i32 %7, 59
%9 = call i32 @pcg_rotr_32(i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @pcg_output_xsl_rr_64_32(i32 %0) {
%2 = tail call i32 @pcg_rotr_32(i32 poison, i32 poison)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ executeApplescriptToGetString(char *, char *, char *);
int strlen(char *);
int getSongName(char *name) {
  executeApplescriptToGetString("iTunes", "name of current track as string",
                                name);
  return strlen(name);
}


x86 assembly (clang, -O0):
<getSongName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xec9(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1030 <executeApplescriptToGetString@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSongName>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    %rbx,%rdx
call   1030 <executeApplescriptToGetString@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strlen@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"iTunes\00"
@.str.1 = [32 x i8] c"name of current track as string\00"
define i32 @getSongName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @executeApplescriptToGetString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"iTunes\00"
@.str.1 = [32 x i8] c"name of current track as string\00"
define i32 @getSongName(i8* %0) {
%2 = tail call i32 @executeApplescriptToGetString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 @strlen(i8* %0)
ret i32 %3
}