xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ char_class(char const, unsigned int const);
int char_inc_exc(const char c, const unsigned int inclusive,
                 const unsigned int exclusive) {
  return char_class(c, inclusive) && !char_class(c, exclusive);
}


x86 assembly (clang, -O0):
<char_inc_exc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movsbl %al,%edi
call   1030 <char_class@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
je     115e <char_inc_exc+0x4e>
mov    -0x1(%rbp),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <char_class@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_inc_exc>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %edi,%ebp
call   1030 <char_class@plt>
test   %rax,%rax
je     1139 <char_inc_exc+0x29>
movsbl %bpl,%edi
mov    %ebx,%esi
call   1030 <char_class@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
jmp    113b <char_inc_exc+0x2b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @char_inc_exc(i8 signext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = load i32, i32* %5
%9 = call i64 @char_class(i8 signext %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load i8, i8* %4
%13 = load i32, i32* %6
%14 = call i64 @char_class(i8 signext %12, i32 %13)
%15 = icmp ne i64 %14, 0
%16 = xor i1 %15, true
br label %17
17: ; preds = %11, %3
%18 = phi i1 [ false, %3 ], [ %16, %11 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @char_inc_exc(i8 signext %0, i32 %1, i32 %2) {
%4 = tail call i64 @char_class(i8 signext %0, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @char_class(i8 signext %0, i32 %2)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3
%11 = phi i32 [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int printf(char *, char *);
int print_string(char *s) { return printf("%s", s); }


x86 assembly (clang, -O0):
<print_string>:
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):
<print_string>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @print_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ROM_crcByte(unsigned char);
void crc(void *ptr, int length) {
  unsigned char *p = (unsigned char *)ptr;
  for (int i = 0; i < length; i++) {
    ROM_crcByte(*p);
    p++;
  }
}


x86 assembly (clang, -O0):
<crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <crc+0x50>
mov    -0x18(%rbp),%rax
movzbl (%rax),%edi
call   1030 <ROM_crcByte@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <crc+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <crc+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%edi
call   1030 <ROM_crcByte@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <crc+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @crc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = call i32 @ROM_crcByte(i8 zeroext %14)
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %5
br label %18
18: ; preds = %12
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @crc(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ 0, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = load i8, i8* %7
%9 = tail call i32 @ROM_crcByte(i8 zeroext %8)
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %4, label %5
}
int quotient(int dividend, int divisor) {
  if (dividend >= divisor) {
    dividend -= divisor;
    return 1 + quotient(dividend, divisor);
  }
  return 0;
}


x86 assembly (clang, -O0):
<quotient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     114b <quotient+0x3b>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <quotient@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <quotient+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quotient>:
xor    %eax,%eax
cmp    %esi,%edi
jl     1119 <quotient+0x19>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
sub    %esi,%edi
add    $0x1,%eax
cmp    %esi,%edi
jge    1110 <quotient+0x10>
ret

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

LLVM IR (-O2):
define i32 @quotient(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %8, %4 ], [ 0, %2 ]
%7 = sub nsw i32 %5, %1
%8 = add nuw nsw i32 %6, 1
%9 = icmp slt i32 %7, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %8, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int caller(int);
int main(int argc, const char **argv) {
  int result = caller(5);
  if (result != 36)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
call   1040 <caller@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x24,-0x14(%rbp)
je     1154 <main+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <caller@plt>
cmp    $0x24,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
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 = call i32 @caller(i32 5)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 36
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @caller(i32 5)
%4 = icmp eq i32 %3, 36
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
long heap_right(long index) { return index * 2 + 1; }


x86 assembly (clang, -O0):
<heap_right>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<heap_right>:
lea    (%rdi,%rdi,1),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @heap_right(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 2
%5 = add nsw i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @heap_right(i64 %0) {
%2 = shl nsw i64 %0, 1
%3 = or i64 %2, 1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ init_gdt();
int /*<<< orphan*/ init_idt();
void desctab_initialize(void) {
  init_gdt();
  init_idt();
}


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

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

LLVM IR (-O0):
define void @desctab_initialize() {
%1 = call i32 (...) @init_gdt()
%2 = call i32 (...) @init_idt()
ret void
}

LLVM IR (-O2):
define void @desctab_initialize() {
%1 = tail call i32 (...) @init_gdt()
%2 = tail call i32 (...) @init_idt()
ret void
}
/* Variables and functions */
scalar_t__ pow(double, int);
double sqrt(scalar_t__);
double nmea_calc_pdop(double hdop, double vdop) {
  return sqrt(pow(hdop, 2) + pow(vdop, 2));
}


x86 assembly (clang, -O0):
<nmea_calc_pdop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmea_calc_pdop>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @nmea_calc_pdop(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call i64 @pow(double %5, i32 2)
%7 = load double, double* %4
%8 = call i64 @pow(double %7, i32 2)
%9 = add nsw i64 %6, %8
%10 = call double @sqrt(i64 %9)
ret double %10
}

LLVM IR (-O2):
define double @nmea_calc_pdop(double %0, double %1) {
%3 = tail call i64 @pow(double %0, i32 2)
%4 = tail call i64 @pow(double %1, i32 2)
%5 = add nsw i64 %4, %3
%6 = tail call double @sqrt(i64 %5)
ret double %6
}
const char *jac_chain_nm5_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<jac_chain_nm5_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <jac_chain_nm5_name_in+0x2b>
jmp    111a <jac_chain_nm5_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <jac_chain_nm5_name_in+0x3b>
jmp    114b <jac_chain_nm5_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm5_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm5_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm5_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @jac_chain_nm5_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @jac_chain_nm5_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *program) {
  fprintf(stderr,
          "usage: %s [-t] [-v] [-p port] [-s source-ip] [-d dest-ip|-]\n",
          program);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"usage: %s [-t] [-v] [-p port] [-s source-ip] [-d dest-ip|-]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"usage: %s [-t] [-v] [-p port] [-s source-ip] [-d dest-ip|-]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ CPI(int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0xa1(void) {
  CPI(4);
  T_WAIT_UNTIL(12);
  return;
}


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

x86 assembly (clang, -O2):
<op_ED_0xa1>:
push   %rax
mov    $0x4,%edi
call   1040 <CPI@plt>
mov    $0xc,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0xa1() {
%1 = call i32 @CPI(i32 4)
%2 = call i32 @T_WAIT_UNTIL(i32 12)
ret void
}

LLVM IR (-O2):
define void @op_ED_0xa1() {
%1 = tail call i32 @CPI(i32 4)
%2 = tail call i32 @T_WAIT_UNTIL(i32 12)
ret void
}
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ emergency_help_message();
int flashrom_flash_erase(struct flashrom_flashctx *const);
int do_erase(struct flashrom_flashctx *const flash) {
  const int ret = flashrom_flash_erase(flash);
  if (ret)
    emergency_help_message();
  return ret;
}


x86 assembly (clang, -O0):
<do_erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <flashrom_flash_erase@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1149 <do_erase+0x29>
mov    $0x0,%al
call   1030 <emergency_help_message@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_erase>:
push   %rbx
call   1040 <flashrom_flash_erase@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1133 <do_erase+0x13>
xor    %eax,%eax
call   1030 <emergency_help_message@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.flashrom_flashctx = type { i32 }
define i32 @do_erase(%struct.flashrom_flashctx* %0) {
%2 = alloca %struct.flashrom_flashctx*
%3 = alloca i32
store %struct.flashrom_flashctx* %0, %struct.flashrom_flashctx** %2
%4 = load %struct.flashrom_flashctx*, %struct.flashrom_flashctx** %2
%5 = call i32 @flashrom_flash_erase(%struct.flashrom_flashctx* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @emergency_help_message()
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @do_erase(%struct.flashrom_flashctx* %0) {
%2 = tail call i32 @flashrom_flash_erase(%struct.flashrom_flashctx* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @emergency_help_message()
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char const *);
int platform_chdir(const char *path) { return !chdir(path); }


x86 assembly (clang, -O0):
<platform_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_chdir>:
push   %rax
call   1030 <chdir@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @platform_chdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @chdir(i8* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @platform_chdir(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ get_filename(int, char *);
int /*<<< orphan*/ perror(char *);
void error(int fd) {
  char filename[80];
  get_filename(fd, filename);
  perror(filename);
  exit(0);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x60(%rbp),%rsi
call   1030 <get_filename@plt>
lea    -0x60(%rbp),%rdi
call   1040 <perror@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <get_filename@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @error(i32 %0) {
%2 = alloca i32
%3 = alloca [80 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%6 = call i32 @get_filename(i32 %4, i8* %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = call i32 @perror(i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @error(i32 %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_filename(i32 %0, i8* %3)
%5 = call i32 @perror(i8* %3)
%6 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEiload(int, int /*<<< orphan*/ *);
void code_iload(int arg) { appendCODE(makeCODEiload(arg, NULL)); }


x86 assembly (clang, -O0):
<code_iload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <makeCODEiload@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_iload>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEiload@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_iload(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEiload(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_iload(i32 %0) {
%2 = tail call i32 @makeCODEiload(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_close_solution_input_file(int k) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(137, &k, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_close_solution_input_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x89,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_close_solution_input_file>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x89,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solcon_close_solution_input_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 137, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_TEXTURE_ENV_COLOR 129
#define GL_TEXTURE_ENV_MODE 128
GLint __glTexEnvfv_size(GLenum e) {
  switch (e) {
  case GL_TEXTURE_ENV_MODE:
    return 1;
  case GL_TEXTURE_ENV_COLOR:
    return 4;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__glTexEnvfv_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x80,%eax
je     1130 <__glTexEnvfv_size+0x30>
jmp    111d <__glTexEnvfv_size+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x81,%eax
je     113c <__glTexEnvfv_size+0x3c>
jmp    1148 <__glTexEnvfv_size+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <__glTexEnvfv_size+0x4f>
movl   $0x4,-0x4(%rbp)
jmp    114f <__glTexEnvfv_size+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glTexEnvfv_size>:
xor    %ecx,%ecx
cmp    $0x81,%edi
sete   %cl
shl    $0x2,%ecx
cmp    $0x80,%edi
mov    $0x1,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__glTexEnvfv_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 128, label %5
i32 129, label %6
]
5: ; preds = %1
store i32 1, i32* %2
br label %8
6: ; preds = %1
store i32 4, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @__glTexEnvfv_size(i32 %0) {
%2 = icmp eq i32 %0, 129
%3 = select i1 %2, i32 4, i32 0
%4 = icmp eq i32 %0, 128
%5 = select i1 %4, i32 1, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ aztSendCmd(int);
int /*<<< orphan*/ sten_low();
void aztLockDoor(void) {
  {
    aztSendCmd(113);
    sten_low();
    return;
  }
}


x86 assembly (clang, -O0):
<aztLockDoor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x71,%edi
call   1030 <aztSendCmd@plt>
mov    $0x0,%al
call   1040 <sten_low@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aztLockDoor>:
push   %rax
mov    $0x71,%edi
call   1030 <aztSendCmd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <sten_low@plt>

LLVM IR (-O0):
define void @aztLockDoor() {
%1 = call i32 @aztSendCmd(i32 113)
%2 = call i32 (...) @sten_low()
ret void
}

LLVM IR (-O2):
define void @aztLockDoor() {
%1 = tail call i32 @aztSendCmd(i32 113)
%2 = tail call i32 (...) @sten_low()
ret void
}
/* Variables and functions */
unsigned int csum_partial(char *, int, int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
extern unsigned int csum_partial_copy_from_user(const char *src, char *dst,
                                                int len, int sum,
                                                int *csum_err) {
  if (csum_err)
    *csum_err = 0;
  memcpy(dst, src, len);
  return csum_partial(dst, len, sum);
}


x86 assembly (clang, -O0):
<csum_partial_copy_from_user>:
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    %r8,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114f <csum_partial_copy_from_user+0x2f>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <csum_partial@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_partial_copy_from_user>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
test   %r8,%r8
je     113b <csum_partial_copy_from_user+0x1b>
movl   $0x0,(%r8)
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <csum_partial@plt>

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

LLVM IR (-O2):
define i32 @csum_partial_copy_from_user(i8* %0, i8* %1, i32 %2, i32 %3, i32* writeonly %4) {
%6 = icmp eq i32* %4, null
br i1 %6, label %8, label %7
7: ; preds = %5
store i32 0, i32* %4
br label %8
8: ; preds = %7, %5
%9 = tail call i32 @memcpy(i8* %1, i8* %0, i32 %2)
%10 = tail call i32 @csum_partial(i8* %1, i32 %2, i32 %3)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recvfrom(int, void *, size_t, int, int /*<<< orphan*/ *,
                            int /*<<< orphan*/);
ssize_t recv(int s, void *buf, size_t len, int flags) {
  return (recvfrom(s, buf, len, flags, NULL, 0));
}


x86 assembly (clang, -O0):
<recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <recvfrom@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recv>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <recvfrom@plt>

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

LLVM IR (-O2):
define i32 @recv(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, i32* null, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ test_sub_num_num(unsigned int, unsigned int);
void check_sub_num_num(unsigned int number_of_tests, unsigned int seed) {
  printf("Sub:\n");
  if (test_sub_num_num(number_of_tests, seed)) {
    printf("Success\n");
  } else {
    printf("Failed\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<check_sub_num_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <test_sub_num_num@plt>
cmp    $0x0,%rax
je     1160 <check_sub_num_num+0x40>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <check_sub_num_num+0x4c>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_sub_num_num>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <test_sub_num_num@plt>
test   %rax,%rax
lea    0xeaf(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@str = [5 x i8] c"Sub:\00"
@str.4 = [7 x i8] c"Failed\00"
@str.5 = [8 x i8] c"Success\00"
define void @check_sub_num_num(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = tail call i64 @test_sub_num_num(i32 %0, i32 %1)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
%8 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int munmap(void *, int);
int vispo_free_pages(void *address, int length) {
  return munmap(address, length);
}


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

x86 assembly (clang, -O2):
<vispo_free_pages>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define i32 @vispo_free_pages(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void my_ui_message(signed int a, char *msg) { printf("%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @my_ui_message(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_printf_fd(int, char *, char *, ...);
int ft_usage(char *prg_name, char *usage, char illegal_char) {
  if (illegal_char)
    ft_printf_fd(2, "%s: illegal option -- %c\n", prg_name, illegal_char);
  ft_printf_fd(2, "usage: %s %s\n", prg_name, usage);
  return (1);
}


x86 assembly (clang, -O0):
<ft_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
cmpb   $0x0,-0x11(%rbp)
je     114a <ft_usage+0x3a>
mov    -0x8(%rbp),%rdx
movsbl -0x11(%rbp),%ecx
mov    $0x2,%edi
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <ft_printf_fd@plt>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x2,%edi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <ft_printf_fd@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_usage>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %dl,%dl
je     1137 <ft_usage+0x27>
movsbl %dl,%ecx
lea    0xed8(%rip),%rsi
mov    $0x2,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <ft_printf_fd@plt>
lea    0xedc(%rip),%rsi
mov    $0x2,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <ft_printf_fd@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%s: illegal option -- %c\0A\00"
@.str.1 = [14 x i8] c"usage: %s %s\0A\00"
define i32 @ft_usage(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = load i8, i8* %6
%12 = sext i8 %11 to i32
%13 = call i32 (i32, i8*, i8*, ...) @ft_printf_fd(i32 2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %12)
br label %14
14: ; preds = %9, %3
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = call i32 (i32, i8*, i8*, ...) @ft_printf_fd(i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %15, i8* %16)
ret i32 1
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s: illegal option -- %c\0A\00"
@.str.1 = [14 x i8] c"usage: %s %s\0A\00"
define i32 @ft_usage(i8* %0, i8* %1, i8 signext %2) {
%4 = icmp eq i8 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = sext i8 %2 to i32
%7 = tail call i32 (i32, i8*, i8*, ...) @ft_printf_fd(i32 2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %6)
br label %8
8: ; preds = %5, %3
%9 = tail call i32 (i32, i8*, i8*, ...) @ft_printf_fd(i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
ret i32 1
}
void PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen,
                         unsigned long ulIntTrig) {
  ;
  ;

  ;
  (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000004))) |=
      ulIntTrig;
}


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

x86 assembly (clang, -O2):
<PWMGenIntTrigEnable>:
or     %rdx,0x4(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @PWMGenIntTrigEnable(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = add i64 %8, %9
%11 = add i64 %10, 4
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = or i64 %13, %7
store volatile i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @PWMGenIntTrigEnable(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 4
%5 = add i64 %4, %1
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = or i64 %7, %2
store volatile i64 %8, i64* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pound(int);
int main(void) {
  int times = 5;
  char ch = '!';
  float f = 6.0;
  pound(times);
  pound(ch);
  pound((int)f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movb   $0x21,-0x9(%rbp)
movss  0xece(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <pound@plt>
movsbl -0x9(%rbp),%edi
call   1030 <pound@plt>
cvttss2si -0x10(%rbp),%edi
call   1030 <pound@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <pound@plt>
mov    $0x21,%edi
call   1030 <pound@plt>
mov    $0x6,%edi
call   1030 <pound@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
store i32 0, i32* %1
store i32 5, i32* %2
store i8 33, i8* %3
store float 6.000000e+00, float* %4
%5 = load i32, i32* %2
%6 = call i32 @pound(i32 %5)
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = call i32 @pound(i32 %8)
%10 = load float, float* %4
%11 = fptosi float %10 to i32
%12 = call i32 @pound(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @pound(i32 5)
%2 = tail call i32 @pound(i32 33)
%3 = tail call i32 @pound(i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (argc == 1) {
    printf("more arguments are required\n");
  } else {
    printf("argc = %d\n", argc);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1143 <main+0x33>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1154 <main+0x44>
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jne    1134 <main+0x14>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
jmp    1144 <main+0x24>
mov    %edi,%esi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"more arguments are required\0A\00"
@.str.1 = [11 x i8] c"argc = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %13
10: ; preds = %2
%11 = load i32, i32* %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"argc = %d\0A\00"
@str = [28 x i8] c"more arguments are required\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ consumer();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ producer();
int /*<<< orphan*/ sleep(int);
int main() {
  if (fork() == 0) {
    producer();
    exit(0);
  }
  sleep(1);
  consumer();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <fork@plt>
cmp    $0x0,%rax
jne    117e <main+0x2e>
mov    $0x0,%al
call   1030 <producer@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1040 <consumer@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <fork@plt>
test   %rax,%rax
jne    116b <main+0x1b>
xor    %eax,%eax
call   1030 <producer@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1040 <consumer@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @fork()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (...) @producer()
%6 = call i32 @exit(i32 0)
unreachable
7: ; preds = %0
%8 = call i32 @sleep(i32 1)
%9 = call i32 (...) @consumer()
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @producer()
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = tail call i32 @sleep(i32 1)
%8 = tail call i32 (...) @consumer()
%9 = tail call i32 @exit(i32 0)
unreachable
}
int do_493() { return 493; }


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

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

LLVM IR (-O0):
define i32 @do_493() {
ret i32 493
}

LLVM IR (-O2):
define i32 @do_493() {
ret i32 493
}
int pm2xxx_ddbg_exit(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @pm2xxx_ddbg_exit() {
ret i32 0
}

LLVM IR (-O2):
define i32 @pm2xxx_ddbg_exit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rdelay(int);
void start_up(void) { rdelay(2); }


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

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

LLVM IR (-O0):
define void @start_up() {
%1 = call i32 @rdelay(i32 2)
ret void
}

LLVM IR (-O2):
define void @start_up() {
%1 = tail call i32 @rdelay(i32 2)
ret void
}
int f(void) {
  _Complex int t = 0;
  int i, j;
  __real__ t += 2;
  __imag__ t += 2;
  return g(&t);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movabs $0x200000002,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <g@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f() {
%1 = alloca { i32, i32 }
%2 = alloca i32
%3 = alloca i32
%4 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 0
%5 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 1
store i32 0, i32* %4
store i32 0, i32* %5
%6 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 2
store i32 %8, i32* %6
%9 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 1
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 2
store i32 %11, i32* %9
%12 = call i32 ({ i32, i32 }*, ...) bitcast (i32 (...)* @g to i32 ({ i32, i32 }*, ...)*)({ i32, i32 }* %1)
ret i32 %12
}

LLVM IR (-O2):
define i32 @f() {
%1 = alloca { i32, i32 }
%2 = bitcast { i32, i32 }* %1 to i8*
%3 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i64 0, i32 0
%4 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i64 0, i32 1
store i32 2, i32* %3
store i32 2, i32* %4
%5 = call i32 ({ i32, i32 }*, ...) bitcast (i32 (...)* @g to i32 ({ i32, i32 }*, ...)*)({ i32, i32 }* %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void g(void *p, long a, long b) { assert(a == 8); }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x8,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
xor    %edi,%edi
cmp    $0x8,%rsi
sete   %dil
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @g(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = icmp eq i64 %7, 8
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
ret void
}

LLVM IR (-O2):
define void @g(i8* nocapture readnone %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %1, 8
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ KTraderParse_initFlex(char const *);
int /*<<< orphan*/ kiotraderparse();
void KTraderParse_mainParse(const char *_code) {
  KTraderParse_initFlex(_code);
  kiotraderparse();
}


x86 assembly (clang, -O0):
<KTraderParse_mainParse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <KTraderParse_initFlex@plt>
mov    $0x0,%al
call   1040 <kiotraderparse@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @KTraderParse_mainParse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @KTraderParse_initFlex(i8* %3)
%5 = call i32 (...) @kiotraderparse()
ret void
}

LLVM IR (-O2):
define void @KTraderParse_mainParse(i8* %0) {
%2 = tail call i32 @KTraderParse_initFlex(i8* %0)
%3 = tail call i32 (...) @kiotraderparse()
ret void
}
void fc3b(x) _Atomic short x;
{}


x86 assembly (clang, -O0):
<fc3b>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @fc3b(i16 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int test(int);
int main(void) {
  if (test(5) != 2)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1050 <test@plt>
cmp    $0x2,%eax
je     1159 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1050 <test@plt>
cmp    $0x2,%eax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 5)
%3 = icmp ne i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 5)
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}