xunge/DecIR huggingface dataset:
int has_goal_on(char ch) { return ch == '.' || ch == '*'; }


x86 assembly (clang, -O0):
<has_goal_on>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     1129 <has_goal_on+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x2a,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_goal_on>:
and    $0xfb,%dil
xor    %eax,%eax
cmp    $0x2a,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @has_goal_on(i8 signext %0) {
%2 = and i8 %0, -5
%3 = icmp eq i8 %2, 42
%4 = zext i1 %3 to i32
ret i32 %4
}
void some_function(void) {}


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

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

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

LLVM IR (-O2):
define void @some_function() {
ret void
}
unsigned long hashString(char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hashString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hashString+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hashString+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashString>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hashString+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashString+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hashString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int isinf(double);
int igraph_is_neginf(double x) { return isinf(x) == -1; }


x86 assembly (clang, -O0):
<igraph_is_neginf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <isinf@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @igraph_is_neginf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @isinf(double %3)
%5 = icmp eq i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @igraph_is_neginf(double %0) {
%2 = tail call i32 @isinf(double %0)
%3 = icmp eq i32 %2, -1
%4 = zext i1 %3 to i32
ret i32 %4
}
void test___atomic_nand_fetch_1(short *mem) { __atomic_nand_fetch(mem, -1, 4); }


x86 assembly (clang, -O0):
<test___atomic_nand_fetch_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0xffff,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x28(%rbp)
and    %esi,%edx
mov    %edx,-0x24(%rbp)
not    %edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    1162 <test___atomic_nand_fetch_1+0x62>
jmp    1125 <test___atomic_nand_fetch_1+0x25>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
and    %cx,%ax
xor    $0xffff,%ax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_nand_fetch_1>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <test___atomic_nand_fetch_1+0x10>
ret

LLVM IR (-O0):
define void @test___atomic_nand_fetch_1(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
store i16 -1, i16* %3
%6 = load i16, i16* %3
%7 = atomicrmw nand i16* %5, i16 %6 acq_rel
%8 = and i16 %7, %6
%9 = xor i16 %8, -1
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_nand_fetch_1(i16* nocapture %0) {
%2 = atomicrmw nand i16* %0, i16 -1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NEG();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0x54(void) {
  NEG();
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0x54>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <NEG@plt>
mov    $0x4,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0x54>:
push   %rax
xor    %eax,%eax
call   1040 <NEG@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0x54() {
%1 = call i32 (...) @NEG()
%2 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_ED_0x54() {
%1 = tail call i32 (...) @NEG()
%2 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
int Cyc_Vcgen_hash_ptr(void *s) {
  void *_T0;
  int _T1;
  _T0 = s;
  _T1 = (int)_T0;
  return _T1;
}


x86 assembly (clang, -O0):
<Cyc_Vcgen_hash_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Vcgen_hash_ptr>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i32 @Cyc_Vcgen_hash_ptr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @Cyc_Vcgen_hash_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
imm0indreg1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (22 <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0indreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     113e <imm0indreg1+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <imm0indreg1+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0indreg1>:
xor    %eax,%eax
cmpb   $0x16,(%r9)
setae  %al
ret

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

LLVM IR (-O2):
define i32 @imm0indreg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = load i8, i8* %5
%8 = icmp ugt i8 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
int ioprio_prio_value(int class, int data) { return (class << 13) | data; }


x86 assembly (clang, -O0):
<ioprio_prio_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xd,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioprio_prio_value>:
mov    %edi,%eax
shl    $0xd,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @ioprio_prio_value(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 = shl i32 %5, 13
%7 = load i32, i32* %4
%8 = or i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ioprio_prio_value(i32 %0, i32 %1) {
%3 = shl i32 %0, 13
%4 = or i32 %3, %1
ret i32 %4
}
/* Variables and functions */
char *tigetstr(char *);
char *curses_str_cap(const char *name) {
  char *str = tigetstr((char *)name);
  if (str == (char *)-1) {
    return NULL;
  }
  return str;
}


x86 assembly (clang, -O0):
<curses_str_cap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <tigetstr@plt>
mov    %rax,-0x18(%rbp)
mov    $0xffffffffffffffff,%rax
cmp    %rax,-0x18(%rbp)
jne    1147 <curses_str_cap+0x37>
movq   $0x0,-0x8(%rbp)
jmp    114f <curses_str_cap+0x3f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curses_str_cap>:
push   %rax
call   1030 <tigetstr@plt>
xor    %ecx,%ecx
cmp    $0xffffffffffffffff,%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @curses_str_cap(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @tigetstr(i8* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, inttoptr (i64 -1 to i8*)
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* null, i8** %2
br label %12
10: ; preds = %1
%11 = load i8*, i8** %4
store i8* %11, i8** %2
br label %12
12: ; preds = %10, %9
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @curses_str_cap(i8* %0) {
%2 = tail call i8* @tigetstr(i8* %0)
%3 = icmp eq i8* %2, inttoptr (i64 -1 to i8*)
%4 = select i1 %3, i8* null, i8* %2
ret i8* %4
}
void mt_dcm_peri_off(void) {}


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

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

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

LLVM IR (-O2):
define void @mt_dcm_peri_off() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  i = 10;
  printf("i : %d\n", i);
  printf("sizeof(i++) is: %d\n", sizeof(i++));
  printf("i : %d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"i : %d\0A\00"
@.str.1 = [20 x i8] c"sizeof(i++) is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pic_send_EOI_normal(int);
void isr_irq_5() { pic_send_EOI_normal(5); }


x86 assembly (clang, -O0):
<isr_irq_5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <pic_send_EOI_normal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isr_irq_5>:
mov    $0x5,%edi
jmp    1030 <pic_send_EOI_normal@plt>

LLVM IR (-O0):
define void @isr_irq_5() {
%1 = call i32 @pic_send_EOI_normal(i32 5)
ret void
}

LLVM IR (-O2):
define void @isr_irq_5() {
%1 = tail call i32 @pic_send_EOI_normal(i32 5)
ret void
}
int __esp_check_ns(const char *a, void *b) { return (-1); }


x86 assembly (clang, -O0):
<__esp_check_ns>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__esp_check_ns(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int c_line0() { return fputs("[0;0H", stdout); }


x86 assembly (clang, -O0):
<c_line0>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_line0>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[0;0H\00"
@stdout = global i32 0
define i32 @c_line0() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[0;0H\00"
@stdout = global i32 0
define i32 @c_line0() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ errno_exit(char *);
scalar_t__ setsid();
void become_session_leader(void) {
  if (setsid() < 0)
    errno_exit("cannot create new session");
}


x86 assembly (clang, -O0):
<become_session_leader>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setsid@plt>
cmp    $0x0,%rax
jge    1141 <become_session_leader+0x21>
lea    0xec4(%rip),%rdi
call   1030 <errno_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<become_session_leader>:
push   %rax
xor    %eax,%eax
call   1040 <setsid@plt>
test   %rax,%rax
js     112f <become_session_leader+0xf>
pop    %rax
ret
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1030 <errno_exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"cannot create new session\00"
define void @become_session_leader() {
%1 = call i64 (...) @setsid()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @errno_exit(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"cannot create new session\00"
define void @become_session_leader() {
%1 = tail call i64 (...) @setsid()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @errno_exit(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int same_screen;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
void set_XKeyReleasedEvent_same_screen(void *_p, int _v) {
  ((XKeyReleasedEvent *)_p)->same_screen = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XKeyReleasedEvent_same_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ Machine_Check(int, char *);
int32_t get_byte(int32_t id, int32_t addr) {
  Machine_Check(0x00000008 | 0x00000002, "gen_io registers are word wide");
  return 0;
}


x86 assembly (clang, -O0):
<get_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xa,%edi
lea    0xed6(%rip),%rsi
call   1030 <Machine_Check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_byte>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xa,%edi
call   1030 <Machine_Check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"gen_io registers are word wide\00"
define i32 @get_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"gen_io registers are word wide\00"
define i32 @get_byte(i32 %0, i32 %1) {
%3 = tail call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct wl_shm_pool {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_destroy(struct wl_proxy *);
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int);
void wl_shm_pool_destroy(struct wl_shm_pool *wl_shm_pool) {
  wl_proxy_marshal((struct wl_proxy *)wl_shm_pool, 1);
  wl_proxy_destroy((struct wl_proxy *)wl_shm_pool);
}


x86 assembly (clang, -O0):
<wl_shm_pool_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <wl_proxy_marshal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wl_proxy_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_shm_pool_destroy>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <wl_proxy_marshal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wl_proxy_destroy@plt>

LLVM IR (-O0):
%struct.wl_shm_pool = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shm_pool_destroy(%struct.wl_shm_pool* %0) {
%2 = alloca %struct.wl_shm_pool*
store %struct.wl_shm_pool* %0, %struct.wl_shm_pool** %2
%3 = load %struct.wl_shm_pool*, %struct.wl_shm_pool** %2
%4 = bitcast %struct.wl_shm_pool* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 1)
%6 = load %struct.wl_shm_pool*, %struct.wl_shm_pool** %2
%7 = bitcast %struct.wl_shm_pool* %6 to %struct.wl_proxy*
%8 = call i32 @wl_proxy_destroy(%struct.wl_proxy* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_shm_pool = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shm_pool_destroy(%struct.wl_shm_pool* %0) {
%2 = bitcast %struct.wl_shm_pool* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %2, i32 1)
%4 = tail call i32 @wl_proxy_destroy(%struct.wl_proxy* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
void segv_handler(int args) {
  static int i = 1;
  printf("catch SIGSEGV signal...%d\n", i++);
  sleep(1);
}


x86 assembly (clang, -O0):
<segv_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eff(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2ef4(%rip)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<segv_handler>:
push   %rax
mov    0x2f09(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f00(%rip)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@segv_handler.i = internal global i32 1
@.str = [27 x i8] c"catch SIGSEGV signal...%d\0A\00"
define void @segv_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @segv_handler.i
%4 = add nsw i32 %3, 1
store i32 %4, i32* @segv_handler.i
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
@segv_handler.i = internal unnamed_addr global i32 1
@.str = [27 x i8] c"catch SIGSEGV signal...%d\0A\00"
define void @segv_handler(i32 %0) {
%2 = load i32, i32* @segv_handler.i
%3 = add nsw i32 %2, 1
store i32 %3, i32* @segv_handler.i
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
%5 = tail call i32 @sleep(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ wFree(char *);
char *wPopString();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasShell() {
  char *string;
  string = wPopString();
  system(string);
  wFree(string);
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasShell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <wPopString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <system@plt>
mov    -0x8(%rbp),%rdi
call   1060 <wFree@plt>
xor    %edi,%edi
call   1050 <wPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasShell>:
push   %rbx
xor    %eax,%eax
call   1030 <wPopString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <system@plt>
mov    %rbx,%rdi
call   1060 <wFree@plt>
xor    %edi,%edi
pop    %rbx
jmp    1050 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasShell() {
%1 = alloca i8*
%2 = call i8* (...) @wPopString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @system(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @wFree(i8* %5)
%7 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBasShell() {
%1 = tail call i8* (...) @wPopString()
%2 = tail call i32 @system(i8* %1)
%3 = tail call i32 @wFree(i8* %1)
%4 = tail call i32 @wPushNumber(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ panos_uart_char(char const);
void panos_uart_string(const char *str) {
  while (*str != '\0') {
    panos_uart_char(*str);
    ++str;
  }
}


x86 assembly (clang, -O0):
<panos_uart_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <panos_uart_string+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <panos_uart_char@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <panos_uart_string+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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

/* Variables and functions */
float vec2_distance_squared(float *, float *);
__attribute__((always_)) float psvec2_distance_squared(struct vec2 *a,
                                                       struct vec2 *b) {
  return vec2_distance_squared((float *)a, (float *)b);
}


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

x86 assembly (clang, -O2):
<psvec2_distance_squared>:
jmp    1030 <vec2_distance_squared@plt>

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define float @psvec2_distance_squared(%struct.vec2* %0, %struct.vec2* %1) {
%3 = alloca %struct.vec2*
%4 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %3
store %struct.vec2* %1, %struct.vec2** %4
%5 = load %struct.vec2*, %struct.vec2** %3
%6 = bitcast %struct.vec2* %5 to float*
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = call float @vec2_distance_squared(float* %6, float* %8)
ret float %9
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define float @psvec2_distance_squared(%struct.vec2* %0, %struct.vec2* %1) {
%3 = bitcast %struct.vec2* %0 to float*
%4 = bitcast %struct.vec2* %1 to float*
%5 = tail call float @vec2_distance_squared(float* %3, float* %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int /*<<< orphan*/ IntEnable(unsigned long);
int /*<<< orphan*/ IntRegister(unsigned long, void (*)());
unsigned long PWMFaultIntGet(unsigned long);
void PWMFaultIntRegister(unsigned long ulBase, void (*pfnIntHandler)(void)) {
  unsigned long ulInt;
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  ulInt = PWMFaultIntGet(ulBase);
  IntRegister(ulInt, pfnIntHandler);
  IntEnable(ulInt);
}


x86 assembly (clang, -O0):
<PWMFaultIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x19(%rbp)
je     1171 <PWMFaultIntRegister+0x31>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1040 <PWMFaultIntGet@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <IntRegister@plt>
mov    -0x18(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMFaultIntRegister>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1060 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1040 <PWMFaultIntGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <IntRegister@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @PWMFaultIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 1073905664
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i64, i64* %3
%10 = icmp eq i64 %9, 1073909760
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ true, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %3
%16 = call i64 @PWMFaultIntGet(i64 %15)
store i64 %16, i64* %5
%17 = load i64, i64* %5
%18 = load void ()*, void ()** %4
%19 = bitcast void ()* %18 to void (...)*
%20 = call i32 @IntRegister(i64 %17, void (...)* %19)
%21 = load i64, i64* %5
%22 = call i32 @IntEnable(i64 %21)
ret void
}

LLVM IR (-O2):
define void @PWMFaultIntRegister(i64 %0, void ()* %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = tail call i64 @PWMFaultIntGet(i64 %0)
%8 = bitcast void ()* %1 to void (...)*
%9 = tail call i32 @IntRegister(i64 %7, void (...)* %8)
%10 = tail call i32 @IntEnable(i64 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_char(unsigned int);
void print_hex(unsigned int i) {
  if (i > 0xf) {
    print_hex(i / 16);
    print_hex(i % 16);
  } else {
    print_char(i < 0xa ? i + '0' : i - 0xa + 'a');
  }
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
jbe    1150 <print_hex+0x30>
mov    -0x4(%rbp),%edi
shr    $0x4,%edi
call   1030 <print_hex@plt>
mov    -0x4(%rbp),%edi
and    $0xf,%edi
call   1030 <print_hex@plt>
jmp    117c <print_hex+0x5c>
cmpl   $0xa,-0x4(%rbp)
jae    1168 <print_hex+0x48>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1174 <print_hex+0x54>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
cmp    $0x10,%edi
jb     1136 <print_hex+0x16>
push   %rbx
mov    %edi,%ebx
and    $0xf,%ebx
shr    $0x4,%edi
call   1030 <print_hex@plt>
mov    %ebx,%edi
pop    %rbx
lea    0x57(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovae %ecx,%eax
mov    %eax,%edi
jmp    1040 <print_char@plt>

LLVM IR (-O0):
define void @print_hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 15
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = udiv i32 %6, 16
%8 = load i32, i32* %2
%9 = urem i32 %8, 16
br label %23
10: ; preds = %1
%11 = load i32, i32* %2
%12 = icmp ult i32 %11, 10
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %2
%15 = add i32 %14, 48
br label %20
16: ; preds = %10
%17 = load i32, i32* %2
%18 = sub i32 %17, 10
%19 = add i32 %18, 97
br label %20
20: ; preds = %16, %13
%21 = phi i32 [ %15, %13 ], [ %19, %16 ]
%22 = call i32 @print_char(i32 %21)
br label %23
23: ; preds = %20, %5
ret void
}

LLVM IR (-O2):
define void @print_hex(i32 %0) {
%2 = icmp ugt i32 %0, 15
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = and i32 %0, 15
%5 = lshr i32 %0, 4
tail call void @print_hex(i32 %5)
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %0, %1 ], [ %4, %3 ]
%8 = icmp ult i32 %7, 10
%9 = select i1 %8, i32 48, i32 87
%10 = add nuw nsw i32 %9, %7
%11 = tail call i32 @print_char(i32 %10)
ret void
}
__attribute__((always_, unused)) void ips_rmb() {
  asm volatile("" : : : "memory");
}


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

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

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

LLVM IR (-O2):
define void @ips_rmb() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void endifFile(void) { printf("[endif]\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"[endif]\00"
define void @endifFile() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
int do_109() { return 109; }


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

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

LLVM IR (-O0):
define i32 @do_109() {
ret i32 109
}

LLVM IR (-O2):
define i32 @do_109() {
ret i32 109
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _config_destroy();
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void _failure(const char *caller) {
  fprintf(stderr, "[daemonizer] %s() error: %s\n", caller, strerror(errno));
  _config_destroy();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe81(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <_config_destroy@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<_failure>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e93(%rip),%rax
mov    (%rax),%ebp
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe9c(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <_config_destroy@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"[daemonizer] %s() error: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @_failure(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
%8 = call i32 (...) @_config_destroy()
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"[daemonizer] %s() error: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @_failure(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = tail call i32 (...) @_config_destroy()
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
void test44_BlinkEnvPin_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test44_BlinkEnvPin_targetInit__I() {
ret void
}
/* Variables and functions */
int EcrireParametre(char *, char *, char *);
int ModifierInformationsConfig(char *parametreAMettreAJour,
                               char *valeurAMettreAJour) {
  return EcrireParametre("switchmanager.config", parametreAMettreAJour,
                         valeurAMettreAJour);
}


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

x86 assembly (clang, -O2):
<ModifierInformationsConfig>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <EcrireParametre@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"switchmanager.config\00"
define i32 @ModifierInformationsConfig(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @EcrireParametre(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [21 x i8] c"switchmanager.config\00"
define i32 @ModifierInformationsConfig(i8* %0, i8* %1) {
%3 = tail call i32 @EcrireParametre(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int *);
int main() {
  int i = 0x30011;
  foo(&i);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x30011,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x30011,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 196625, i32* %2
%3 = call i32 @foo(i32* %2)
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 196625, i32* %1
%3 = call i32 @foo(i32* %1)
%4 = call i32 @exit(i32 0)
unreachable
}
long double expl(long double x) {}


x86 assembly (clang, -O0):
<expl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @expl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @expl(x86_fp80 %0) {
ret x86_fp80 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void uart1_puts(const char *s) { printf("uart1_puts(%s)\n", s); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"uart1_puts(%s)\0A\00"
define void @uart1_puts(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ data_clr(int, int);
void rcv_off() { data_clr(2, 2); }


x86 assembly (clang, -O0):
<rcv_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%esi
mov    %esi,%edi
call   1030 <data_clr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcv_off>:
mov    $0x2,%edi
mov    $0x2,%esi
jmp    1030 <data_clr@plt>

LLVM IR (-O0):
define void @rcv_off() {
%1 = call i32 @data_clr(i32 2, i32 2)
ret void
}

LLVM IR (-O2):
define void @rcv_off() {
%1 = tail call i32 @data_clr(i32 2, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ unlink(char *);
void destroyFIFO(char *name) {
  if (unlink(name) < 0)
    printf("\t#ERROR# when destroying client FIFO '%s'\n", name);
  else if (0)
    printf("\t#FIFO# Client '%s' has been destroyed\n", name);
}


x86 assembly (clang, -O0):
<destroyFIFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
jge    1154 <destroyFIFO+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
jmp    1159 <destroyFIFO+0x39>
jmp    1159 <destroyFIFO+0x39>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroyFIFO>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlink@plt>
test   %rax,%rax
js     1130 <destroyFIFO+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\09#ERROR# when destroying client FIFO '%s'\0A\00"
define void @destroyFIFO(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @unlink(i8* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"\09#ERROR# when destroying client FIFO '%s'\0A\00"
define void @destroyFIFO(i8* %0) {
%2 = tail call i64 @unlink(i8* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
ret void
}
/* Variables and functions */
unsigned char *aes128ecb_encrypt(unsigned char *, size_t *,
                                 unsigned char const *, size_t,
                                 unsigned char const *, unsigned char const *);
unsigned char *crypt_encrypt_aes128ecb(unsigned char *out, size_t *out_len,
                                       const unsigned char *in, size_t in_len,
                                       const unsigned char *nonce,
                                       const unsigned char *key) {
  return aes128ecb_encrypt(out, out_len, in, in_len, nonce, key);
}


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

x86 assembly (clang, -O2):
<crypt_encrypt_aes128ecb>:
jmp    1030 <aes128ecb_encrypt@plt>

LLVM IR (-O0):
define i8* @crypt_encrypt_aes128ecb(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @aes128ecb_encrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_encrypt_aes128ecb(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @aes128ecb_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *,
                           unsigned long long volatile *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(void) {
  volatile unsigned long long var = 1;
  setvbuf(stdout, NULL, _IONBF, 0);
  fprintf(stdout, "%p\n", &var);
  for (; var;) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
cmp    $0x0,%rax
je     1180 <main+0x60>
jmp    116d <main+0x4d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x1,0x8(%rsp)
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
mov    (%rbx),%edi
lea    0xeae(%rip),%rsi
lea    0x8(%rsp),%rdx
call   1030 <fprintf@plt>
nopl   0x0(%rax)
cmpq   $0x0,0x8(%rsp)
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
@.str = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store volatile i64 1, i64* %1
%3 = load i32, i32* @stdout
%4 = load i32, i32* @_IONBF
%5 = tail call i32 @setvbuf(i32 %3, i32* null, i32 %4, i32 0)
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
br label %8
8: ; preds = %8, %0
%9 = load volatile i64, i64* %1
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %8
11: ; preds = %8
ret i32 0
}