xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ handyFunction(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Howdy world!\n");
  handyFunction(42);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2a,%edi
call   1040 <handyFunction@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [13 x i8] c"Howdy world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @handyFunction(i32 42)
ret i32 0
}
double calcSlope(double y2, double y1, double x2, double x1) {
  return (y2 - y1) / (x2 - x1);
}


x86 assembly (clang, -O0):
<calcSlope>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcSlope>:
subsd  %xmm1,%xmm0
subsd  %xmm3,%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @calcSlope(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fsub double %9, %10
%12 = load double, double* %7
%13 = load double, double* %8
%14 = fsub double %12, %13
%15 = fdiv double %11, %14
ret double %15
}

LLVM IR (-O2):
define double @calcSlope(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %1
%6 = fsub double %2, %3
%7 = fdiv double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ show_dec_locator_events(char const *, int, int);
int test_dec_locator_event_p(const char *the_title) {
  show_dec_locator_events(the_title, 2, (1));
  return 1;
}


x86 assembly (clang, -O0):
<test_dec_locator_event_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <show_dec_locator_events@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dec_locator_event_p>:
push   %rax
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <show_dec_locator_events@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test_dec_locator_event_p(i8* %0) {
%2 = tail call i32 @show_dec_locator_events(i8* %0, i32 2, i32 1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ArgItem();
int /*<<< orphan*/ ArgNum();
void Act_TiedTo(void) {
  ArgItem();
  ArgNum();
}


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

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

LLVM IR (-O0):
define void @Act_TiedTo() {
%1 = call i32 (...) @ArgItem()
%2 = call i32 (...) @ArgNum()
ret void
}

LLVM IR (-O2):
define void @Act_TiedTo() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 (...) @ArgNum()
ret void
}
unsigned long GrMapISO8859_5_Unicode(const char *pcSrcChar,
                                     unsigned long ulCount,
                                     unsigned long *pulSkip) {
  assert(pulSkip);
  assert(pcSrcChar);
  *pulSkip = 1;
  if ((unsigned char)*pcSrcChar <= 0xA0) {
    return ((unsigned long)(unsigned char)*pcSrcChar);
  } else {
    return ((unsigned long)((unsigned char)*pcSrcChar) + 0x360);
  }
}


x86 assembly (clang, -O0):
<GrMapISO8859_5_Unicode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x20(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xa0,%eax
jg     1167 <GrMapISO8859_5_Unicode+0x57>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %rax,-0x8(%rbp)
jmp    1178 <GrMapISO8859_5_Unicode+0x68>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
add    $0x360,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrMapISO8859_5_Unicode>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rdx,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
movq   $0x1,(%rbx)
movzbl (%r14),%ecx
lea    0x360(%rcx),%rax
cmp    $0xa1,%rcx
cmovb  %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @GrMapISO8859_5_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64* %2, i64** %7
%8 = load i64*, i64** %7
%9 = call i32 (i64*, ...) bitcast (i32 (...)* @assert to i32 (i64*, ...)*)(i64* %8)
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %10)
%12 = load i64*, i64** %7
store i64 1, i64* %12
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = icmp sle i32 %15, 160
br i1 %16, label %17, label %21
17: ; preds = %3
%18 = load i8*, i8** %5
%19 = load i8, i8* %18
%20 = zext i8 %19 to i64
store i64 %20, i64* %4
br label %26
21: ; preds = %3
%22 = load i8*, i8** %5
%23 = load i8, i8* %22
%24 = zext i8 %23 to i64
%25 = add i64 %24, 864
store i64 %25, i64* %4
br label %26
26: ; preds = %21, %17
%27 = load i64, i64* %4
ret i64 %27
}

LLVM IR (-O2):
define i64 @GrMapISO8859_5_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = tail call i32 (i64*, ...) bitcast (i32 (...)* @assert to i32 (i64*, ...)*)(i64* %2)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
store i64 1, i64* %2
%6 = load i8, i8* %0
%7 = icmp ult i8 %6, -95
%8 = zext i8 %6 to i64
%9 = add nuw nsw i64 %8, 864
%10 = select i1 %7, i64 %8, i64 %9
ret i64 %10
}
char *strfind(const char *s, char c) {
  for (; *s; s++)
    if (*s == c)
      break;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strfind>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <strfind+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1133 <strfind+0x33>
jmp    1149 <strfind+0x49>
jmp    1138 <strfind+0x38>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110e <strfind+0xe>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strfind>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <strfind+0x21>
cmp    %sil,%cl
jne    1110 <strfind+0x10>
ret

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

LLVM IR (-O2):
define i8* @strfind(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = or i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret i8* %4
}
unsigned insert_rba(insn, value, errmsg)
unsigned insn;
int value __attribute__((unused));
const char **errmsg __attribute__((unused));
{ return insn | (((insn >> 21) & 0x1f) << 16); }


x86 assembly (clang, -O0):
<insert_rba>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x15,%ecx
and    $0x1f,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_rba>:
mov    %edi,%eax
shr    $0x5,%eax
and    $0x1f0000,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @insert_rba(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = lshr i32 %8, 21
%10 = and i32 %9, 31
%11 = shl i32 %10, 16
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @insert_rba(i32 %0, i32 %1, i8** nocapture readnone %2) {
%4 = lshr i32 %0, 5
%5 = and i32 %4, 2031616
%6 = or i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int return_1() {
  printf("This function returns 1.\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [25 x i8] c"This function returns 1.\00"
define i32 @return_1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void asic_mask_all() {
  ((*((volatile unsigned long *)((0xA05F6000 + 0x910 + (0 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x910 + (1 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x910 + (2 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x920 + (0 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x920 + (1 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x920 + (2 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x930 + (0 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x930 + (1 << 2))))) = (0));
  ((*((volatile unsigned long *)((0xA05F6000 + 0x930 + (2 << 2))))) = (0));
}


x86 assembly (clang, -O0):
<asic_mask_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa05f6910,%eax
movq   $0x0,(%rax)
mov    $0xa05f6914,%eax
movq   $0x0,(%rax)
mov    $0xa05f6918,%eax
movq   $0x0,(%rax)
mov    $0xa05f6920,%eax
movq   $0x0,(%rax)
mov    $0xa05f6924,%eax
movq   $0x0,(%rax)
mov    $0xa05f6928,%eax
movq   $0x0,(%rax)
mov    $0xa05f6930,%eax
movq   $0x0,(%rax)
mov    $0xa05f6934,%eax
movq   $0x0,(%rax)
mov    $0xa05f6938,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<asic_mask_all>:
mov    $0xa05f6910,%eax
movq   $0x0,(%rax)
movq   $0x0,0x4(%rax)
movq   $0x0,0x8(%rax)
movq   $0x0,0x10(%rax)
movq   $0x0,0x14(%rax)
movq   $0x0,0x18(%rax)
movq   $0x0,0x20(%rax)
movq   $0x0,0x24(%rax)
movq   $0x0,0x28(%rax)
ret

LLVM IR (-O0):
define void @asic_mask_all() {
store volatile i64 0, i64* inttoptr (i64 2690607376 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607380 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607384 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607392 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607396 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607400 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607408 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607412 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607416 to i64*)
ret void
}

LLVM IR (-O2):
define void @asic_mask_all() {
store volatile i64 0, i64* inttoptr (i64 2690607376 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607380 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607384 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607392 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607396 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607400 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607408 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607412 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690607416 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trim2(char *, int);
int main(int argc, char const *argv[]) {
  char *s;
  trim2(s, 4);
  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    -0x18(%rbp),%rdi
mov    $0x4,%esi
call   1030 <trim2@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%esi
call   1030 <trim2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @trim2(i8* undef, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ halt();
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
void __attribute__((cdecl)) irq__pf(unsigned cs, unsigned ip) {
  printf("irq_"
         "_pf"
         "!%x:%x",
         cs, ip);
  halt();
}


x86 assembly (clang, -O0):
<irq__pf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <halt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq__pf>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <halt@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"irq__pf!%x:%x\00"
define void @irq__pf(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 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 (...) @halt()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"irq__pf!%x:%x\00"
define void @irq__pf(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 (...) @halt()
ret void
}
int test_21(int a, int b) {
  return ((a & 0x80000000) ^ (b & 0x80000000)) >> 31 ? -30 : -10;
}


x86 assembly (clang, -O0):
<test_21>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
and    $0x80000000,%edx
mov    -0x8(%rbp),%eax
and    $0x80000000,%eax
xor    %eax,%edx
shr    $0x1f,%edx
mov    $0xfffffff6,%eax
mov    $0xffffffe2,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_21>:
xor    %esi,%edi
mov    $0xfffffff6,%ecx
mov    $0xffffffe2,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_21(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 = and i32 %5, -2147483648
%7 = load i32, i32* %4
%8 = and i32 %7, -2147483648
%9 = xor i32 %6, %8
%10 = lshr i32 %9, 31
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 -30, i32 -10
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_21(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp sgt i32 %3, -1
%5 = select i1 %4, i32 -10, i32 -30
ret i32 %5
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ umount2(char *, int /*<<< orphan*/);
int main(void) {
  if (0 > umount2("see.emily.play", 0)) {
    return EXIT_FAILURE;
  } else
    return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
xor    %esi,%esi
call   1030 <umount2@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    114c <main+0x3c>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <main+0x48>
mov    0x2e85(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <umount2@plt>
test   %rax,%rax
jns    112d <main+0x1d>
mov    0x2eb5(%rip),%rax
jmp    1134 <main+0x24>
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"see.emily.play\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = icmp sgt i64 0, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_SUCCESS
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [15 x i8] c"see.emily.play\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = icmp slt i64 %1, 0
%3 = load i32, i32* @EXIT_FAILURE
%4 = load i32, i32* @EXIT_SUCCESS
%5 = select i1 %2, i32 %3, i32 %4
ret i32 %5
}
char *next_quoted_token(char **p) {
  char *start = *p;
  while (**p) {
    if (**p == '\"') {
      **p = 0;
      *p += 1;
      break;
    }
    *p += 1;
  }
  return start;
}


x86 assembly (clang, -O0):
<next_quoted_token>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmpb   $0x0,(%rax)
je     1166 <next_quoted_token+0x66>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1153 <next_quoted_token+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1166 <next_quoted_token+0x66>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1113 <next_quoted_token+0x13>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_quoted_token>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
nopw   0x0(%rax,%rax,1)
movzbl -0x1(%rcx),%edx
test   %dl,%dl
je     112e <next_quoted_token+0x2e>
cmp    $0x22,%dl
je     1126 <next_quoted_token+0x26>
mov    %rcx,(%rdi)
add    $0x1,%rcx
jmp    1110 <next_quoted_token+0x10>
movb   $0x0,-0x1(%rcx)
addq   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define i8* @next_quoted_token(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %9, %1
%4 = phi i8* [ %10, %9 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %11
i8 34, label %6
]
6: ; preds = %3
store i8 0, i8* %4
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
br label %11
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %10, i8** %0
br label %3
11: ; preds = %3, %6
ret i8* %2
}
void gtk_cell_editable_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_editable_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __mp_fini();
void finilibrary(void) { __mp_fini(); }


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

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

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

LLVM IR (-O2):
define void @finilibrary() {
%1 = tail call i32 (...) @__mp_fini()
ret void
}
void __attribute__((constructor)) trace_begin(void) {}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @trace_begin, i8* null }]
define void @trace_begin() {
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
define void @trace_begin() {
ret void
}
int vde_chain_nm9_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 4;
  if (sz_res)
    *sz_res = 3;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 103;
  return 0;
}


x86 assembly (clang, -O0):
<vde_chain_nm9_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <vde_chain_nm9_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <vde_chain_nm9_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <vde_chain_nm9_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <vde_chain_nm9_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x67,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm9_work>:
test   %rdi,%rdi
je     110b <vde_chain_nm9_work+0xb>
movl   $0x4,(%rdi)
test   %rsi,%rsi
je     1116 <vde_chain_nm9_work+0x16>
movl   $0x3,(%rsi)
test   %rdx,%rdx
je     1121 <vde_chain_nm9_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <vde_chain_nm9_work+0x2c>
movl   $0x67,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @vde_chain_nm9_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 4, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 3, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 103, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
int main(void) {
  char x;
  int y;
  x = y;
  y = x;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
store i32 %6, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
void *malloc(unsigned int);
void *m_malloc(unsigned int nbytes) {
  if (nbytes <= 0 || nbytes > 1000) {
    return NULL;
  }
  return malloc(nbytes);
}


x86 assembly (clang, -O0):
<m_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1132 <m_malloc+0x22>
cmpl   $0x3e8,-0xc(%rbp)
jbe    113f <m_malloc+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    114b <m_malloc+0x3b>
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_malloc>:
lea    -0x3e9(%rdi),%eax
cmp    $0xfffffc18,%eax
jae    1120 <m_malloc+0x10>
xor    %eax,%eax
ret
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @m_malloc(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ule i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp ugt i32 %7, 1000
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i8* null, i8** %2
br label %13
10: ; preds = %6
%11 = load i32, i32* %3
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %2
br label %13
13: ; preds = %10, %9
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @m_malloc(i32 %0) {
%2 = add i32 %0, -1001
%3 = icmp ult i32 %2, -1000
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @malloc(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
char *strstr(char *, char *);
char *find_http_body(char *message) { return strstr(message, "\r\n\r\n") + 4; }


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

x86 assembly (clang, -O2):
<find_http_body>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
add    $0x4,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0D\0A\0D\0A\00"
define i8* @find_http_body(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds i8, i8* %2, i64 4
ret i8* %3
}
/* Variables and functions */
double GeogLonR(double const, double const);
double GeogLonDiff(const double l1, const double l0) {
  return GeogLonR(l1, l0) - l0;
}


x86 assembly (clang, -O0):
<GeogLonDiff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <GeogLonR@plt>
subsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GeogLonDiff>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <GeogLonR@plt>
subsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @GeogLonDiff(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 = load double, double* %4
%7 = call double @GeogLonR(double %5, double %6)
%8 = load double, double* %4
%9 = fsub double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @GeogLonDiff(double %0, double %1) {
%3 = tail call double @GeogLonR(double %0, double %1)
%4 = fsub double %3, %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ have_a_very_merry_interrupt();
int /*<<< orphan*/ puts(char *);
main() {
  puts("Starting up");
  foo();
  have_a_very_merry_interrupt();
  puts("Shutting down");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <foo@plt>
mov    $0x0,%al
call   1050 <have_a_very_merry_interrupt@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Starting up\00"
@.str.1 = [14 x i8] c"Shutting down\00"
define i32 @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @foo()
%3 = call i32 (...) @have_a_very_merry_interrupt()
%4 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Starting up\00"
@.str.1 = [14 x i8] c"Shutting down\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @have_a_very_merry_interrupt()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ledctl(int);
int /*<<< orphan*/ sleep(int);
void display_ready() {
  int i = 0;
  for (i = 0; i < 300; i++) {
    ledctl(0);
    sleep(100);
    ledctl(7);
    sleep(100);
  }
}


x86 assembly (clang, -O0):
<display_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x12c,-0x4(%rbp)
jge    1176 <display_ready+0x56>
xor    %edi,%edi
call   1030 <ledctl@plt>
mov    $0x64,%edi
call   1040 <sleep@plt>
mov    $0x7,%edi
call   1030 <ledctl@plt>
mov    $0x64,%edi
call   1040 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <display_ready+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_ready>:
push   %rbx
mov    $0x12c,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <ledctl@plt>
mov    $0x64,%edi
call   1040 <sleep@plt>
mov    $0x7,%edi
call   1030 <ledctl@plt>
mov    $0x64,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%ebx
jne    1130 <display_ready+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @display_ready() {
%1 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 300
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = call i32 @ledctl(i32 0)
%7 = call i32 @sleep(i32 100)
%8 = call i32 @ledctl(i32 7)
%9 = call i32 @sleep(i32 100)
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @display_ready() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i32 @ledctl(i32 0)
%4 = tail call i32 @sleep(i32 100)
%5 = tail call i32 @ledctl(i32 7)
%6 = tail call i32 @sleep(i32 100)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 300
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
int test_2(int x, int n) {
  x |= (0x01 << n);
  return x;
}


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

x86 assembly (clang, -O2):
<test_2>:
mov    %edi,%eax
bts    %esi,%eax
ret

LLVM IR (-O0):
define i32 @test_2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = load i32, i32* %3
%8 = or i32 %7, %6
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_2(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
void osd_clone_update_pan(int buffer_number) {}


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

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

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

LLVM IR (-O2):
define void @osd_clone_update_pan(i32 %0) {
ret void
}
void keysetup(int npins) {}


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

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

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

LLVM IR (-O2):
define void @keysetup(i32 %0) {
ret void
}
int euclid(int a, int b) {
  while (a != b) {
    if (a > b)
      a -= b;
    else
      b -= a;
  }
  return a;
}


x86 assembly (clang, -O0):
<euclid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1142 <euclid+0x42>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1132 <euclid+0x32>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <euclid+0x3d>
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <euclid+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<euclid>:
mov    %edi,%eax
cmp    %esi,%edi
je     1127 <euclid+0x27>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %eax,%esi
mov    $0x0,%edx
cmovl  %esi,%edx
mov    %eax,%edi
cmovl  %ecx,%edi
sub    %edx,%eax
sub    %edi,%esi
cmp    %esi,%eax
jne    1110 <euclid+0x10>
ret

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

LLVM IR (-O2):
define i32 @euclid(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = icmp slt i32 %5, %6
%8 = select i1 %7, i32 %5, i32 0
%9 = sub nsw i32 %6, %8
%10 = select i1 %7, i32 0, i32 %6
%11 = sub nsw i32 %5, %10
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i32 [ %0, %2 ], [ %9, %4 ]
ret i32 %14
}
/* Variables and functions */
int close(int);
int spidev_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<spidev_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @spidev_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
int isnotcr(int c) { return c != '\n'; }


x86 assembly (clang, -O0):
<isnotcr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnotcr>:
xor    %eax,%eax
cmp    $0xa,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @isnotcr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isnotcr(i32 %0) {
%2 = icmp ne i32 %0, 10
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ U_swap4(char *, int);
void U_WMRCORE_SIZE16_swap(char *record, int torev) {
  torev = torev;
  U_swap4(record, 1);
}


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

x86 assembly (clang, -O2):
<U_WMRCORE_SIZE16_swap>:
mov    $0x1,%esi
jmp    1030 <U_swap4@plt>

LLVM IR (-O0):
define void @U_WMRCORE_SIZE16_swap(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
store i32 %5, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @U_swap4(i8* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @U_WMRCORE_SIZE16_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_swap4(i8* %0, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int PTHREAD_PROCESS_PRIVATE;
int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared) {
  (void)attr;
  *pshared = PTHREAD_PROCESS_PRIVATE;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_condattr_getpshared>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_condattr_getpshared>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
@PTHREAD_PROCESS_PRIVATE = global i32 0
define i32 @pthread_condattr_getpshared(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 = load i32, i32* @PTHREAD_PROCESS_PRIVATE
%7 = load i32*, i32** %4
store i32 %6, i32* %7
ret i32 0
}

LLVM IR (-O2):
@PTHREAD_PROCESS_PRIVATE = global i32 0
define i32 @pthread_condattr_getpshared(i32* nocapture readnone %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* @PTHREAD_PROCESS_PRIVATE
store i32 %3, i32* %1
ret i32 0
}
void av_tree_destroy() {}


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

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

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

LLVM IR (-O2):
define void @av_tree_destroy() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t bin_to_hex4(uint8_t num) {
  num = 0x0F & num;
  num = (uint8_t)(num + '0');
  if (num > '9')
    return (uint8_t)(num + ('A' - '9' + 1));
  else
    return num;
}


x86 assembly (clang, -O0):
<bin_to_hex4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x39,-0x8(%rbp)
jle    1131 <bin_to_hex4+0x31>
mov    -0x8(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x4(%rbp)
jmp    1137 <bin_to_hex4+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin_to_hex4>:
and    $0xf,%edi
lea    0x30(%rdi),%ecx
lea    0x39(%rdi),%eax
cmp    $0x3a,%ecx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bin_to_hex4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 15, %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 48
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 57
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 9
store i32 %12, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* %3
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @bin_to_hex4(i32 %0) {
%2 = and i32 %0, 15
%3 = or i32 %2, 48
%4 = icmp ugt i32 %3, 57
%5 = add nuw nsw i32 %2, 57
%6 = select i1 %4, i32 %5, i32 %3
ret i32 %6
}
/* Variables and functions */
scalar_t__ have_xcode_colors();
const char *proper_escape_sequence(void) {
  if (have_xcode_colors()) {
    return "\033["
           ";";
  }
  return "\x1b[0m";
}


x86 assembly (clang, -O0):
<proper_escape_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <have_xcode_colors@plt>
cmp    $0x0,%rax
je     1139 <proper_escape_sequence+0x29>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1144 <proper_escape_sequence+0x34>
lea    0xec4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proper_escape_sequence>:
push   %rax
xor    %eax,%eax
call   1030 <have_xcode_colors@plt>
test   %rax,%rax
lea    0xee2(%rip),%rcx
lea    0xed7(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[;\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define i8* @proper_escape_sequence() {
%1 = alloca i8*
%2 = call i64 (...) @have_xcode_colors()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
br label %6
5: ; preds = %0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %6
6: ; preds = %5, %4
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[;\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define i8* @proper_escape_sequence() {
%1 = tail call i64 (...) @have_xcode_colors()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void handler(int s) { waitpid(-1, NULL, WNOHANG); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
jmp    1030 <waitpid@plt>

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @WNOHANG
%4 = call i32 @waitpid(i32 -1, i32* null, i32 %3)
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @handler(i32 %0) {
%2 = load i32, i32* @WNOHANG
%3 = tail call i32 @waitpid(i32 -1, i32* null, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ done_testing();
int /*<<< orphan*/ test_pktgen_rnd_bits_apply();
int /*<<< orphan*/ test_pktgen_rnd_bits_init();
int /*<<< orphan*/ test_pktgen_set_random_bitfield();
int main(void) {
  test_pktgen_rnd_bits_init();
  test_pktgen_set_random_bitfield();
  test_pktgen_rnd_bits_apply();
  done_testing();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_pktgen_rnd_bits_init@plt>
mov    $0x0,%al
call   1060 <test_pktgen_set_random_bitfield@plt>
mov    $0x0,%al
call   1030 <test_pktgen_rnd_bits_apply@plt>
mov    $0x0,%al
call   1050 <done_testing@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_pktgen_rnd_bits_init@plt>
xor    %eax,%eax
call   1060 <test_pktgen_set_random_bitfield@plt>
xor    %eax,%eax
call   1030 <test_pktgen_rnd_bits_apply@plt>
xor    %eax,%eax
call   1050 <done_testing@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_pktgen_rnd_bits_init()
%3 = call i32 (...) @test_pktgen_set_random_bitfield()
%4 = call i32 (...) @test_pktgen_rnd_bits_apply()
%5 = call i32 (...) @done_testing()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_pktgen_rnd_bits_init()
%2 = tail call i32 (...) @test_pktgen_set_random_bitfield()
%3 = tail call i32 (...) @test_pktgen_rnd_bits_apply()
%4 = tail call i32 (...) @done_testing()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ free(void *);
void close_default_reader(void *fd) {
  if (fd != NULL) {
    close(*(int *)fd);
    free(fd);
  }
}


x86 assembly (clang, -O0):
<close_default_reader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <close_default_reader+0x2b>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_default_reader>:
test   %rdi,%rdi
je     1139 <close_default_reader+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <close@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @close_default_reader(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = tail call i32 @close(i32 %5)
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %3, %1
ret void
}