xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
long difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void delay_capture(long int seconds) {
  time_t t1, t2;
  if (seconds <= 0)
    return;
  time(&t1);
  time(&t2);
  while (difftime(t2, t1) < seconds)
    t2 = time(NULL);
  return;
}


x86 assembly (clang, -O0):
<delay_capture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jg     113c <delay_capture+0x1c>
jmp    1179 <delay_capture+0x59>
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0x10(%rbp),%rdi
call   1040 <time@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <difftime@plt>
cmp    -0x8(%rbp),%rax
jge    1174 <delay_capture+0x54>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x10(%rbp)
jmp    114e <delay_capture+0x2e>
jmp    1179 <delay_capture+0x59>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_capture>:
push   %rbx
sub    $0x10,%rsp
test   %rdi,%rdi
jle    116d <delay_capture+0x4d>
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1040 <time@plt>
lea    0x8(%rsp),%rdi
call   1040 <time@plt>
mov    0x8(%rsp),%edi
mov    0xc(%rsp),%esi
nopl   0x0(%rax)
call   1030 <difftime@plt>
cmp    %rbx,%rax
jge    116d <delay_capture+0x4d>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x8(%rsp)
mov    0xc(%rsp),%esi
mov    %eax,%edi
jmp    1150 <delay_capture+0x30>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @delay_capture(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = icmp sle i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %20
8: ; preds = %1
%9 = call i32 @time(i32* %3)
%10 = call i32 @time(i32* %4)
br label %11
11: ; preds = %17, %8
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = call i64 @difftime(i32 %12, i32 %13)
%15 = load i64, i64* %2
%16 = icmp slt i64 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @time(i32* null)
store i32 %18, i32* %4
br label %11
19: ; preds = %11
br label %20
20: ; preds = %19, %7
ret void
}

LLVM IR (-O2):
define void @delay_capture(i64 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = icmp slt i64 %0, 1
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = call i32 @time(i32* %2)
%9 = call i32 @time(i32* %3)
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = call i64 @difftime(i32 %10, i32 %11)
%13 = icmp slt i64 %12, %0
br i1 %13, label %14, label %19
14: ; preds = %7, %14
%15 = call i32 @time(i32* null)
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = call i64 @difftime(i32 %15, i32 %16)
%18 = icmp slt i64 %17, %0
br i1 %18, label %14, label %19
19: ; preds = %14, %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int, int);
int main(void) {
  test(0xF0000000, 0x0000000F);
  test(0xFF000000, 0x000000FF);
  test(0xF00FF00F, 0xF00FF00F);
  test(0xDEADBEEF, 0xF77DB57B);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf0000000,%edi
mov    $0xf,%esi
call   1030 <test@plt>
mov    $0xff000000,%edi
mov    $0xff,%esi
call   1030 <test@plt>
mov    $0xf00ff00f,%esi
mov    %esi,%edi
call   1030 <test@plt>
mov    $0xdeadbeef,%edi
mov    $0xf77db57b,%esi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf0000000,%edi
mov    $0xf,%esi
call   1030 <test@plt>
mov    $0xff000000,%edi
mov    $0xff,%esi
call   1030 <test@plt>
mov    $0xf00ff00f,%edi
mov    $0xf00ff00f,%esi
call   1030 <test@plt>
mov    $0xdeadbeef,%edi
mov    $0xf77db57b,%esi
call   1030 <test@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(i32 -268435456, i32 15)
%3 = call i32 @test(i32 -16777216, i32 255)
%4 = call i32 @test(i32 -267390961, i32 -267390961)
%5 = call i32 @test(i32 -559038737, i32 -142756485)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 -268435456, i32 15)
%2 = tail call i32 @test(i32 -16777216, i32 255)
%3 = tail call i32 @test(i32 -267390961, i32 -267390961)
%4 = tail call i32 @test(i32 -559038737, i32 -142756485)
ret i32 0
}
/* Variables and functions */
float __ieee754_lgammaf_r(float, int *);
float __ieee754_gammaf_r(float x, int *signgamp) {
  return __ieee754_lgammaf_r(x, signgamp);
}


x86 assembly (clang, -O0):
<__ieee754_gammaf_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1030 <__ieee754_lgammaf_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ieee754_gammaf_r>:
jmp    1030 <__ieee754_lgammaf_r@plt>

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

LLVM IR (-O2):
define float @__ieee754_gammaf_r(float %0, i32* %1) {
%3 = tail call float @__ieee754_lgammaf_r(float %0, i32* %1)
ret float %3
}
int test_imm_A3int8_reg(signed char val) {
  return ((val) & (0xA3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_A3int8_reg(i8 signext %0) {
%2 = and i8 %0, -93
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint_fast32_t;

/* Variables and functions */
__attribute__((unused)) uint_fast32_t cop_ld_ube24(const void *buf) {
  const unsigned char *b = buf;
  return ((uint_fast32_t)b[2] << 0) | ((uint_fast32_t)b[1] << 8) |
         ((uint_fast32_t)b[0] << 16);
}


x86 assembly (clang, -O0):
<cop_ld_ube24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x0,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cop_ld_ube24>:
movzwl 0x1(%rdi),%ecx
shl    $0x10,%ecx
bswap  %ecx
movzbl (%rdi),%eax
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cop_ld_ube24(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 2
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 0
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = or i32 %9, %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 16
%21 = or i32 %15, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @cop_ld_ube24(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = load i8, i8* %0
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %9, %12
ret i32 %13
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
__attribute__((always_)) uint64_t
bitw_reset_lowest_set_bit_64_blsr(uint64_t bit_sequence) {
  uint64_t result;
  __asm__ __volatile__("blsr %1, %0;" : "=r"(result) : "r"(bit_sequence));
  return (uint64_t)result;
}


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

x86 assembly (clang, -O2):
<bitw_reset_lowest_set_bit_64_blsr>:
blsr   %rdi,%rax
ret

LLVM IR (-O0):
define i8* @bitw_reset_lowest_set_bit_64_blsr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* asm sideeffect "blsr $1, $0;", "=r,r,~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @bitw_reset_lowest_set_bit_64_blsr(i8* %0) {
%2 = tail call i8* asm sideeffect "blsr $1, $0;", "=r,r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
__attribute__((__weak__, __always___)) void softboundmpx_exit(int status) {
  exit(status);
}


x86 assembly (clang, -O0):
<softboundmpx_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<softboundmpx_exit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define weak void @softboundmpx_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define weak void @softboundmpx_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
int C_Utils_compare_int(const int item1, const int item2) {
  if (item1 == item2)
    return 0;
  return item1 < item2 ? -1 : 1;
}


x86 assembly (clang, -O0):
<C_Utils_compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1122 <C_Utils_compare_int+0x22>
movl   $0x0,-0x4(%rbp)
jmp    113a <C_Utils_compare_int+0x3a>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%esi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_compare_int>:
xor    %ecx,%ecx
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @C_Utils_compare_int(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 eq i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 -1, i32 1
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @C_Utils_compare_int(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = icmp slt i32 %0, %1
%5 = select i1 %4, i32 -1, i32 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) {
  printf("Usage: %s latlon_file grib_orography grib_file grib_file ...\n",
         prog);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"Usage: %s latlon_file grib_orography grib_file grib_file ...\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [62 x i8] c"Usage: %s latlon_file grib_orography grib_file grib_file ...\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int xmlUCSIsCJKSymbolsandPunctuation(int code) {
  return (((code >= 0x3000) && (code <= 0x303F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsCJKSymbolsandPunctuation>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x3000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsCJKSymbolsandPunctuation+0x26>
cmpl   $0x303f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCJKSymbolsandPunctuation>:
and    $0xffffffc0,%edi
xor    %eax,%eax
cmp    $0x3000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCJKSymbolsandPunctuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 12288
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 12351
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsCJKSymbolsandPunctuation(i32 %0) {
%2 = and i32 %0, -64
%3 = icmp eq i32 %2, 12288
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Quick(int *, int /*<<< orphan*/, int);
void QuickSort(int *v, int n) { Quick(v, 0, n - 1); }


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

x86 assembly (clang, -O2):
<QuickSort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <Quick@plt>

LLVM IR (-O0):
define void @QuickSort(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 = sub nsw i32 %6, 1
%8 = call i32 @Quick(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @QuickSort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @Quick(i32* %0, i32 0, i32 %3)
ret void
}
void u5(unsigned n) {
  struct s {
    unsigned exp : 8;
  } x;
  x.exp = n;
  if (__builtin_constant_p(((n + 1) & 255) > 1))
    __asm__("vrp.bug.not.always.true");
}


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

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

LLVM IR (-O0):
%struct.s = type { i8, [3 x i8] }
define void @u5(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.s
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %struct.s* %3 to i8*
%6 = trunc i32 %4 to i8
store i8 %6, i8* %5
%7 = zext i8 %6 to i32
%8 = load i32, i32* %2
%9 = add i32 %8, 1
%10 = and i32 %9, 255
%11 = icmp ugt i32 %10, 1
%12 = zext i1 %11 to i32
%13 = call i1 @llvm.is.constant.i32(i32 %12)
br i1 %13, label %14, label %15
14: ; preds = %1
br label %15
15: ; preds = %14, %1
ret void
}

LLVM IR (-O2):
define void @u5(i32 %0) {
ret void
}
/* Type definitions */
struct cec_msg {
  int *msg;
};
typedef int __u32;

/* Variables and functions */
void cec_ops_device_vendor_id(const struct cec_msg *msg, __u32 *vendor_id) {
  *vendor_id = (msg->msg[2] << 16) | (msg->msg[3] << 8) | msg->msg[4];
}


x86 assembly (clang, -O0):
<cec_ops_device_vendor_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
shl    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0xc(%rax),%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0x10(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_device_vendor_id>:
mov    (%rdi),%rax
mov    0x8(%rax),%ecx
mov    0xc(%rax),%edx
shl    $0x10,%ecx
shl    $0x8,%edx
or     %ecx,%edx
or     0x10(%rax),%edx
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_device_vendor_id(%struct.cec_msg* %0, i32* %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32* %1, i32** %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = load %struct.cec_msg*, %struct.cec_msg** %3
%12 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 3
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = or i32 %10, %16
%18 = load %struct.cec_msg*, %struct.cec_msg** %3
%19 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %18, i32 0, i32 0
%20 = load i32*, i32** %19
%21 = getelementptr inbounds i32, i32* %20, i64 4
%22 = load i32, i32* %21
%23 = or i32 %17, %22
%24 = load i32*, i32** %4
store i32 %23, i32* %24
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_device_vendor_id(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
%7 = shl i32 %6, 16
%8 = getelementptr inbounds i32, i32* %4, i64 3
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %10, %7
%12 = getelementptr inbounds i32, i32* %4, i64 4
%13 = load i32, i32* %12
%14 = or i32 %11, %13
store i32 %14, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int fget2b(FILE *stream) {
  int b1;
  int b2;
  b1 = fgetc(stream);
  b2 = fgetc(stream);
  if ((b1 != EOF) && (b2 != EOF)) {
    return b2 | (b1 * 0x0100);
  }
  return EOF;
}


x86 assembly (clang, -O0):
<fget2b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eaa(%rip),%rcx
cmp    (%rcx),%eax
je     116b <fget2b+0x5b>
mov    -0x18(%rbp),%eax
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116b <fget2b+0x5b>
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <fget2b+0x67>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget2b>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    0x2ebc(%rip),%rcx
mov    (%rcx),%edx
mov    %ebp,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
cmp    %edx,%eax
cmove  %edx,%ecx
cmp    %edx,%ebp
cmove  %edx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fget2b(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %2, %4
%6 = icmp eq i32 %3, %4
%7 = or i1 %5, %6
%8 = shl nsw i32 %2, 8
%9 = or i32 %3, %8
%10 = select i1 %7, i32 %4, i32 %9
ret i32 %10
}
void add_ab(int x) {
  int abc[3];
  abc[2] = abc[0] + abc[1];
}


x86 assembly (clang, -O0):
<add_ab>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @add_ab(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
store i32 %8, i32* %9
ret void
}

LLVM IR (-O2):
define void @add_ab(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ splitpath(char *, char **, char **);
char *basename(char *path) {
  char *dir, *base;
  splitpath(path, &dir, &base);
  return base;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <splitpath@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <splitpath@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast i8** %2 to i8*
%5 = bitcast i8** %3 to i8*
%6 = call i32 @splitpath(i8* %0, i8** %2, i8** %3)
%7 = load i8*, i8** %3
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int svc_stop_service(const char *service_name) {
  printf("Stopping %s... \n", service_name);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"Stopping %s... \0A\00"
define i32 @svc_stop_service(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int is_lib_func(char *str) {
  if (!strcmp(str, "printf"))
    return 1;
  else if (!strcmp(str, "scanf"))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_lib_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <is_lib_func+0x31>
movl   $0x1,-0x4(%rbp)
jmp    116d <is_lib_func+0x5d>
mov    -0x10(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1166 <is_lib_func+0x56>
movl   $0x1,-0x4(%rbp)
jmp    116d <is_lib_func+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_lib_func>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     113e <is_lib_func+0x2e>
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"printf\00"
@.str.1 = [6 x i8] c"scanf\00"
define i32 @is_lib_func(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ do_a();
int /*<<< orphan*/ do_b();
int /*<<< orphan*/ do_c();
int /*<<< orphan*/ do_d();
int /*<<< orphan*/ do_e();
int test_condition();
void test_switch() {
  do_a();
  switch (test_condition()) {
  case 13:
  case 27:
    do_b();
    break;
  case 35:
    do_c();
    break;
  default:
    do_d();
    break;
  }
  do_e();
}


x86 assembly (clang, -O0):
<test_switch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %al,-0x5(%rbp)
call   1070 <do_a@plt>
mov    -0x5(%rbp),%al
call   1040 <test_condition@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
sub    $0xd,%eax
je     11af <test_switch+0x4f>
jmp    118d <test_switch+0x2d>
mov    -0x4(%rbp),%eax
sub    $0x1b,%eax
je     11af <test_switch+0x4f>
jmp    119e <test_switch+0x3e>
mov    -0x4(%rbp),%eax
sub    $0x23,%eax
je     11bb <test_switch+0x5b>
jmp    11c7 <test_switch+0x67>
mov    $0x0,%al
call   1050 <do_b@plt>
jmp    11ce <test_switch+0x6e>
mov    $0x0,%al
call   1080 <do_c@plt>
jmp    11ce <test_switch+0x6e>
mov    $0x0,%al
call   1060 <do_d@plt>
mov    $0x0,%al
call   1030 <do_e@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_switch>:
push   %rax
xor    %eax,%eax
call   1070 <do_a@plt>
xor    %eax,%eax
call   1040 <test_condition@plt>
cmp    $0xd,%eax
je     117e <test_switch+0x1e>
cmp    $0x23,%eax
je     1187 <test_switch+0x27>
cmp    $0x1b,%eax
jne    1190 <test_switch+0x30>
xor    %eax,%eax
call   1050 <do_b@plt>
jmp    1197 <test_switch+0x37>
xor    %eax,%eax
call   1080 <do_c@plt>
jmp    1197 <test_switch+0x37>
xor    %eax,%eax
call   1060 <do_d@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_e@plt>

LLVM IR (-O0):
define void @test_switch() {
%1 = call i32 (...) @do_a()
%2 = call i32 (...) @test_condition()
switch i32 %2, label %7 [
i32 13, label %3
i32 27, label %3
i32 35, label %5
]
3: ; preds = %0, %0
%4 = call i32 (...) @do_b()
br label %9
5: ; preds = %0
%6 = call i32 (...) @do_c()
br label %9
7: ; preds = %0
%8 = call i32 (...) @do_d()
br label %9
9: ; preds = %7, %5, %3
%10 = call i32 (...) @do_e()
ret void
}

LLVM IR (-O2):
define void @test_switch() {
%1 = tail call i32 (...) @do_a()
%2 = tail call i32 (...) @test_condition()
switch i32 %2, label %7 [
i32 13, label %3
i32 27, label %3
i32 35, label %5
]
3: ; preds = %0, %0
%4 = tail call i32 (...) @do_b()
br label %9
5: ; preds = %0
%6 = tail call i32 (...) @do_c()
br label %9
7: ; preds = %0
%8 = tail call i32 (...) @do_d()
br label %9
9: ; preds = %7, %5, %3
%10 = tail call i32 (...) @do_e()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fseek(int, int, int);
main() {
  fseek(1, 2, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <fseek@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fseek(i32 1, i32 2, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fseek(i32 1, i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int ioctl(int d, int request, ...) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<ioctl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioctl>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @ioctl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @ioctl(i32 %0, i32 %1, ...) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ C(int *);
void A2(int *p) { C(p); }


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

x86 assembly (clang, -O2):
<A2>:
jmp    1030 <C@plt>

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

LLVM IR (-O2):
define void @A2(i32* %0) {
%2 = tail call i32 @C(i32* %0)
ret void
}
void GPIODebounceFuncControl(unsigned int baseAdd, unsigned int pinNumber,
                             unsigned int controlFlag) {
  (*((volatile unsigned int *)(baseAdd + (0x150)))) &= ~(1 << pinNumber);
  (*((volatile unsigned int *)(baseAdd + (0x150)))) |=
      (controlFlag << pinNumber);
}


x86 assembly (clang, -O0):
<GPIODebounceFuncControl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x150,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    -0x4(%rbp),%eax
add    $0x150,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIODebounceFuncControl>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
add    $0x150,%edi
and    %eax,(%rdi)
shl    %cl,%edx
or     %edx,(%rdi)
ret

LLVM IR (-O0):
define void @GPIODebounceFuncControl(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = load i32, i32* %4
%11 = add i32 %10, 336
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = and i32 %14, %9
store volatile i32 %15, i32* %13
%16 = load i32, i32* %6
%17 = load i32, i32* %5
%18 = shl i32 %16, %17
%19 = load i32, i32* %4
%20 = add i32 %19, 336
%21 = zext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
%23 = load volatile i32, i32* %22
%24 = or i32 %23, %18
store volatile i32 %24, i32* %22
ret void
}

LLVM IR (-O2):
define void @GPIODebounceFuncControl(i32 %0, i32 %1, i32 %2) {
%4 = shl nuw i32 1, %1
%5 = xor i32 %4, -1
%6 = add i32 %0, 336
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, %5
store volatile i32 %10, i32* %8
%11 = shl i32 %2, %1
%12 = load volatile i32, i32* %8
%13 = or i32 %12, %11
store volatile i32 %13, i32* %8
ret void
}
int ptype_default_p(unsigned code) { return code == 0x8300; }


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

x86 assembly (clang, -O2):
<ptype_default_p>:
xor    %eax,%eax
cmp    $0x8300,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ptype_default_p(i32 %0) {
%2 = icmp eq i32 %0, 33536
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void error(char *msg) {
  perror(msg);
  exit(errno);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @errno
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @errno
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void cleanupMaxLength(int m, int **maxLength) {
  int x;
  for (x = 0; x < m; x++) {
    free(maxLength[x]);
  }
  free(maxLength);
}


x86 assembly (clang, -O0):
<cleanupMaxLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <cleanupMaxLength+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <cleanupMaxLength+0x16>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanupMaxLength>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
jle    1142 <cleanupMaxLength+0x32>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <cleanupMaxLength+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cleanupMaxLength(i32 %0, i32** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %1, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %1 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void janus_help(const char *pname) {
  printf(
      "Usage: Janus [OPTION]... :\n"
      " --conf\t\t\t<file>\tset the configuration file to use\n"
      " --listen-ip\t\t<ip>\tset the listen ip address\n"
      " --listen-port-in\t<port>\tset the listen port for incoming traffic\n"
      " --listen-port-out\t<port>\tset the listen port for outgoing traffic\n"
      " --pqueue-len\t\t<len>\tset tha internal packet queue length\n"
      " --foreground\t\t\trun Janus in foreground\n"
      " --version\t\t\tshow Janus version\n"
      " --help\t\t\t\tshow this help\n\n"
      "http://www.github.com/evilaliv3/janus\n");
}


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

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

LLVM IR (-O0):
@.str = [452 x i8] c"Usage: Janus [OPTION]... :\0A --conf\09\09\09<file>\09set the configuration file to use\0A --listen-ip\09\09<ip>\09set the listen ip address\0A --listen-port-in\09<port>\09set the listen port for incoming traffic\0A --listen-port-out\09<port>\09set the listen port for outgoing traffic\0A --pqueue-len\09\09<len>\09set tha internal packet queue length\0A --foreground\09\09\09run Janus in foreground\0A --version\09\09\09show Janus version\0A --help\09\09\09\09show this help\0A\0Ahttp://www.github.com/evilaliv3/janus\0A\00"
define void @janus_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([452 x i8], [452 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [451 x i8] c"Usage: Janus [OPTION]... :\0A --conf\09\09\09<file>\09set the configuration file to use\0A --listen-ip\09\09<ip>\09set the listen ip address\0A --listen-port-in\09<port>\09set the listen port for incoming traffic\0A --listen-port-out\09<port>\09set the listen port for outgoing traffic\0A --pqueue-len\09\09<len>\09set tha internal packet queue length\0A --foreground\09\09\09run Janus in foreground\0A --version\09\09\09show Janus version\0A --help\09\09\09\09show this help\0A\0Ahttp://www.github.com/evilaliv3/janus\00"
define void @janus_help(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([451 x i8], [451 x i8]* @str, i64 0, i64 0))
ret void
}
XSetAccessControl() {}


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

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

LLVM IR (-O0):
define i32 @XSetAccessControl() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XSetAccessControl() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void libx2_f2(void) { printf("CALL libx2_f2\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"CALL libx2_f2\00"
define void @libx2_f2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void gds_swap2bytes(unsigned char *two) {
  static unsigned char temp;
  temp = two[0];
  two[0] = two[1];
  two[1] = temp;
}


x86 assembly (clang, -O0):
<gds_swap2bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2f0d(%rip)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    0x2efa(%rip),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gds_swap2bytes>:
rolw   $0x8,(%rdi)
ret

LLVM IR (-O0):
@gds_swap2bytes.temp = internal global i8 0
define void @gds_swap2bytes(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
store i8 %5, i8* @gds_swap2bytes.temp
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8, i8* @gds_swap2bytes.temp
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
ret void
}

LLVM IR (-O2):
define void @gds_swap2bytes(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
ret void
}
void pcp_print_paging_stats(struct activity *a, int curr) {}


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

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

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

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_print_paging_stats(%struct.activity* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stringReverse(char *);
int main() {
  char input[500];
  scanf("%[^\n]s", input);
  stringReverse(input);
  printf("%s\n", input);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x200(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x200(%rbp),%rdi
call   1040 <stringReverse@plt>
lea    -0x200(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x200,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <stringReverse@plt>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [500 x i8]
%2 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @stringReverse(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream) {
  ;
  return -1;
}


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

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

LLVM IR (-O0):
define i32 @getdelim(i8** %0, i64* %1, i32 %2, i32* %3) {
%5 = alloca i8**
%6 = alloca i64*
%7 = alloca i32
%8 = alloca i32*
store i8** %0, i8*** %5
store i64* %1, i64** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @getdelim(i8** nocapture readnone %0, i64* nocapture readnone %1, i32 %2, i32* nocapture readnone %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ serror(char *);
ill_imm() { serror("immediate operand not allowed"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"immediate operand not allowed\00"
define i32 @ill_imm() {
%1 = alloca i32
%2 = call i32 @serror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [30 x i8] c"immediate operand not allowed\00"
define i32 @ill_imm() {
%1 = tail call i32 @serror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void EVP_MD_size(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_size() {
ret void
}
int str_token_count_helper(const char *tok, void *arg1, void *arg2) {
  *((int *)arg1) += 1;
  return 0;
}


x86 assembly (clang, -O0):
<str_token_count_helper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_token_count_helper>:
addl   $0x1,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @str_token_count_helper(i8* %0, i8* %1, i8* %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** %5
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @str_token_count_helper(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
ret i32 0
}
reg0reg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ r0 = r1; }


x86 assembly (clang, -O0):
<reg0reg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%ax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %9
store i16 %16, i16* %8
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @reg0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
ret i32 undef
}