xunge/DecIR huggingface dataset:
int test_imm_CEuint8_mem(unsigned char *val) {
  return ((*val) & (-0xCE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CEuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff32,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CEuint8_mem>:
testb  $0x32,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CEuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 50
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_FCint8_mem(signed char *val) {
  return ((*val) & (0xFC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FCint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xfc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FCint8_mem>:
cmpb   $0x4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FCint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ult i8 %2, 4
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Bad is infinite recursion\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Bad is infinite recursion\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"Bad is infinite recursion\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int do_776() { return 776; }


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

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

LLVM IR (-O0):
define i32 @do_776() {
ret i32 776
}

LLVM IR (-O2):
define i32 @do_776() {
ret i32 776
}
/* Type definitions */
struct tempfile {
  int dummy;
};

/* Variables and functions */
int mks_tempfile_sm(struct tempfile *, char const *, int /*<<< orphan*/, int);
int mks_tempfile(struct tempfile *tempfile, const char *template) {
  return mks_tempfile_sm(tempfile, template, 0, 0600);
}


x86 assembly (clang, -O0):
<mks_tempfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0x180,%ecx
call   1030 <mks_tempfile_sm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mks_tempfile>:
xor    %edx,%edx
mov    $0x180,%ecx
jmp    1030 <mks_tempfile_sm@plt>

LLVM IR (-O0):
%struct.tempfile = type { i32 }
define i32 @mks_tempfile(%struct.tempfile* %0, i8* %1) {
%3 = alloca %struct.tempfile*
%4 = alloca i8*
store %struct.tempfile* %0, %struct.tempfile** %3
store i8* %1, i8** %4
%5 = load %struct.tempfile*, %struct.tempfile** %3
%6 = load i8*, i8** %4
%7 = call i32 @mks_tempfile_sm(%struct.tempfile* %5, i8* %6, i32 0, i32 384)
ret i32 %7
}

LLVM IR (-O2):
%struct.tempfile = type { i32 }
define i32 @mks_tempfile(%struct.tempfile* %0, i8* %1) {
%3 = tail call i32 @mks_tempfile_sm(%struct.tempfile* %0, i8* %1, i32 0, i32 384)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ wake_up_sync_engine();
void dosync() { wake_up_sync_engine(); }


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

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

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

LLVM IR (-O2):
define void @dosync() {
%1 = tail call i32 (...) @wake_up_sync_engine()
ret void
}
void prnum(n) long n;
{ putline(getnum(n)); }


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

x86 assembly (clang, -O2):
<prnum>:
push   %rax
xor    %eax,%eax
call   1030 <getnum@plt>
mov    %eax,%edi
xor    %eax,%eax
pop    %rcx
jmp    1040 <putline@plt>

LLVM IR (-O0):
define void @prnum(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 (i64, ...) bitcast (i32 (...)* @getnum to i32 (i64, ...)*)(i64 %3)
%5 = call i32 (i32, ...) bitcast (i32 (...)* @putline to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @prnum(i64 %0) {
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @getnum to i32 (i64, ...)*)(i64 %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @putline to i32 (i32, ...)*)(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              void *, int);
void set_sock_priority(int sock) {
  int val;
  val = 1;
  setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *)&val, sizeof(val));
}


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

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

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

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @set_sock_priority(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = load i32, i32* @TCP_NODELAY
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i8* %3, i32 4)
ret void
}
int sfun_rtwmakecfg_module_01(int i) { return i + 1; }


x86 assembly (clang, -O0):
<sfun_rtwmakecfg_module_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfun_rtwmakecfg_module_01>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @sfun_rtwmakecfg_module_01(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
float powf(float, float);
float fpow32(float x, float y) { return powf(x, y); }


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

x86 assembly (clang, -O2):
<fpow32>:
jmp    1030 <powf@plt>

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

LLVM IR (-O2):
define float @fpow32(float %0, float %1) {
%3 = tail call float @powf(float %0, float %1)
ret float %3
}
void audio_setmusvolume(int volume) {}


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

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

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

LLVM IR (-O2):
define void @audio_setmusvolume(i32 %0) {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t LCDIntStatus(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile unsigned long *)(ui32Base + 0x0000005C))));
  } else {
    return ((*((volatile unsigned long *)(ui32Base + 0x00000058))));
  }
}


x86 assembly (clang, -O0):
<LCDIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1126 <LCDIntStatus+0x26>
mov    -0x10(%rbp),%rax
mov    0x5c(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <LCDIntStatus+0x32>
mov    -0x10(%rbp),%rax
mov    0x58(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDIntStatus>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    -0x8(%rsp),%rcx
mov    0x58(%rcx,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @LCDIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load volatile i64, i64* %4
%10 = add i64 %9, 92
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %3
br label %18
13: ; preds = %2
%14 = load volatile i64, i64* %4
%15 = add i64 %14, 88
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
store i64 %17, i64* %3
br label %18
18: ; preds = %13, %8
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @LCDIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = load volatile i64, i64* %3
%6 = select i1 %4, i64 88, i64 92
%7 = add i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void die_unex_eof(void) { die("unexpected end of file"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"unexpected end of file\00"
define void @die_unex_eof() {
%1 = call i32 @die(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"unexpected end of file\00"
define void @die_unex_eof() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ vwarn(char const *, int /*<<< orphan*/);
extern void verr(int status, const char *format, va_list args) {
  vwarn(format, args);
  exit(status);
}


x86 assembly (clang, -O0):
<verr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <vwarn@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<verr>:
push   %rbx
mov    %edi,%ebx
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <vwarn@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @verr(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @vwarn(i8* %7, i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
define void @verr(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @vwarn(i8* %1, i32 %2)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ check();
int /*<<< orphan*/ func();
int main(void) {
  check();
  func();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <check@plt>
xor    %eax,%eax
call   1030 <func@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check()
%2 = tail call i32 (...) @func()
ret i32 0
}
/* Variables and functions */
double convert_to_celsius(double);
char *convert_to_celsius_should_return_34_when_input_is_93_2() {
  double degrees = convert_to_celsius(93.2);
  do {
    if (!(degrees == 32))
      return "error, celsius conversion != 34";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<convert_to_celsius_should_return_34_when_input_is_93_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee0(%rip),%xmm0
call   1030 <convert_to_celsius@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    114c <convert_to_celsius_should_return_34_when_input_is_93_2+0x3c>
jp     114c <convert_to_celsius_should_return_34_when_input_is_93_2+0x3c>
jmp    115c <convert_to_celsius_should_return_34_when_input_is_93_2+0x4c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <convert_to_celsius_should_return_34_when_input_is_93_2+0x59>
jmp    1161 <convert_to_celsius_should_return_34_when_input_is_93_2+0x51>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_to_celsius_should_return_34_when_input_is_93_2>:
push   %rax
movsd  0xee7(%rip),%xmm0
call   1030 <convert_to_celsius@plt>
xor    %eax,%eax
ucomisd 0xee0(%rip),%xmm0
lea    0xee1(%rip),%rcx
cmovne %rcx,%rax
cmovp  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"error, celsius conversion != 34\00"
define i8* @convert_to_celsius_should_return_34_when_input_is_93_2() {
%1 = alloca i8*
%2 = alloca double
%3 = call double @convert_to_celsius(double 9.320000e+01)
store double %3, double* %2
br label %4
4: ; preds = %0
%5 = load double, double* %2
%6 = fcmp oeq double %5, 3.200000e+01
br i1 %6, label %8, label %7
7: ; preds = %4
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %1
br label %10
8: ; preds = %4
br label %9
9: ; preds = %8
store i8* null, i8** %1
br label %10
10: ; preds = %9, %7
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [32 x i8] c"error, celsius conversion != 34\00"
define i8* @convert_to_celsius_should_return_34_when_input_is_93_2() {
%1 = tail call double @convert_to_celsius(double 9.320000e+01)
%2 = fcmp oeq double %1, 3.200000e+01
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
void edit_scripts_help(void) {}


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

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

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

LLVM IR (-O2):
define void @edit_scripts_help() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
void double_init_bad(pthread_mutex_t *m) {
  pthread_mutex_init(m, 0);
  pthread_mutex_init(m, 0);
}


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

x86 assembly (clang, -O2):
<double_init_bad>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <pthread_mutex_init@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <pthread_mutex_init@plt>

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

LLVM IR (-O2):
define void @double_init_bad(i32* %0) {
%2 = tail call i32 @pthread_mutex_init(i32* %0, i32 0)
%3 = tail call i32 @pthread_mutex_init(i32* %0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ char_to_escape(char *, unsigned int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void conf_char_to_escape(unsigned int c, FILE *out) {
  char buff[16];
  char_to_escape(buff, c);
  fputs(buff, out);
}


x86 assembly (clang, -O0):
<conf_char_to_escape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <char_to_escape@plt>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_char_to_escape>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%esi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <char_to_escape@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @conf_char_to_escape(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [16 x i8]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = call i32 @char_to_escape(i8* %6, i32 %7)
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%10 = load i32*, i32** %4
%11 = call i32 @fputs(i8* %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @conf_char_to_escape(i32 %0, i32* nocapture %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @char_to_escape(i8* %4, i32 %0)
%6 = call i32 @fputs(i8* %4, i32* %1)
ret void
}
void script_finish_for_luajit(void) {}


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

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

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

LLVM IR (-O2):
define void @script_finish_for_luajit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_help_message(void) {
  puts("Usage: "
       "nyancat-console"
       " [OPTION...]\n");
  puts("  -h      give this help list");
  puts("  -v      print programm version and licence\n");
  puts("Report bugs at https://github.com/fanglingsu/nyancat-console.");
}


x86 assembly (clang, -O0):
<print_help_message>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help_message>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Usage: nyancat-console [OPTION...]\0A\00"
@.str.1 = [30 x i8] c" -h give this help list\00"
@.str.2 = [46 x i8] c" -v print programm version and licence\0A\00"
@.str.3 = [62 x i8] c"Report bugs at https://github.com/fanglingsu/nyancat-console.\00"
define void @print_help_message() {
%1 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Usage: nyancat-console [OPTION...]\0A\00"
@.str.1 = [30 x i8] c" -h give this help list\00"
@.str.2 = [46 x i8] c" -v print programm version and licence\0A\00"
@.str.3 = [62 x i8] c"Report bugs at https://github.com/fanglingsu/nyancat-console.\00"
define void @print_help_message() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int changeCount(int val, int count) {
  if ((val > 2) && (val < 7)) {
    count++;
  } else if (val == 10) {
    count--;
  }
  return count;
}


x86 assembly (clang, -O0):
<changeCount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
jle    112c <changeCount+0x2c>
cmpl   $0x7,-0x4(%rbp)
jge    112c <changeCount+0x2c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <changeCount+0x44>
cmpl   $0xa,-0x4(%rbp)
jne    113f <changeCount+0x3f>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <changeCount+0x44>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeCount>:
lea    -0x3(%rdi),%eax
xor    %ecx,%ecx
cmp    $0xa,%edi
sete   %cl
neg    %ecx
cmp    $0x4,%eax
mov    $0x1,%eax
cmovae %ecx,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @changeCount(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 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 7
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
store i32 %12, i32* %4
br label %20
13: ; preds = %7, %2
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 10
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %4
%18 = add nsw i32 %17, -1
store i32 %18, i32* %4
br label %19
19: ; preds = %16, %13
br label %20
20: ; preds = %19, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @changeCount(i32 %0, i32 %1) {
%3 = add i32 %0, -3
%4 = icmp ult i32 %3, 4
%5 = icmp eq i32 %0, 10
%6 = sext i1 %5 to i32
%7 = select i1 %4, i32 1, i32 %6
%8 = add nsw i32 %7, %1
ret i32 %8
}
void test40_Test0_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test40_Test0_targetInit__I() {
ret void
}
void userfaultfd_exit(struct mm_struct *mm) {}


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
define void @userfaultfd_exit(%struct.mm_struct* %0) {
%2 = alloca %struct.mm_struct*
store %struct.mm_struct* %0, %struct.mm_struct** %2
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @userfaultfd_exit(%struct.mm_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ printf(char *, ...);
int usage(const char *argv0) {
  printf("Usage: %s [-d] [-D] <cg-path> <egress|ingress>\n", argv0);
  printf("	-d	Drop Traffic\n");
  printf("	-D	Detach filter, and exit\n");
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: %s [-d] [-D] <cg-path> <egress|ingress>\0A\00"
@.str.1 = [18 x i8] c"\09-d\09Drop Traffic\0A\00"
@.str.2 = [29 x i8] c"\09-D\09Detach filter, and exit\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
ret i32 %7
}

LLVM IR (-O2):
@.str = [48 x i8] c"Usage: %s [-d] [-D] <cg-path> <egress|ingress>\0A\00"
@EXIT_FAILURE = global i32 0
@str = [17 x i8] c"\09-d\09Drop Traffic\00"
@str.3 = [28 x i8] c"\09-D\09Detach filter, and exit\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.3, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
ret i32 %5
}
char *m_strcat(char *dst, const char *src) {
  while (*dst)
    dst++;
  while ((*dst++ = *src++))
    ;
  return --dst;
}


x86 assembly (clang, -O0):
<m_strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <m_strcat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <m_strcat+0xc>
jmp    112f <m_strcat+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     115e <m_strcat+0x5e>
jmp    112f <m_strcat+0x2f>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_strcat>:
mov    %rdi,%rax
add    $0xfffffffffffffffe,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x2(%rax)
lea    0x1(%rax),%rax
jne    1110 <m_strcat+0x10>
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1120 <m_strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @m_strcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %13, %8 ], [ %4, %3 ]
%10 = phi i8* [ %11, %8 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int main(int argc, char const *argv[]) {
  test1();
  test2();
  test3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test1@plt>
mov    $0x0,%al
call   1050 <test2@plt>
mov    $0x0,%al
call   1030 <test3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test1@plt>
xor    %eax,%eax
call   1050 <test2@plt>
xor    %eax,%eax
call   1030 <test3@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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test1()
%7 = call i32 (...) @test2()
%8 = call i32 (...) @test3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 (...) @test2()
%5 = tail call i32 (...) @test3()
ret i32 0
}
unsigned int dpi_dvt_ioctl(unsigned int arg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dpi_dvt_ioctl(i32 %0) {
ret i32 0
}
void handle_connect(int epollfd, int listenfd) {}


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

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

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

LLVM IR (-O2):
define void @handle_connect(i32 %0, i32 %1) {
ret void
}
void kasan_disable_current(void) {}


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

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

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

LLVM IR (-O2):
define void @kasan_disable_current() {
ret void
}
int Bematech_FI_TipoImpressora(Var, Retorno) {
  return Formata("\x1b|35|253|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_TipoImpressora>:
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    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_TipoImpressora>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B|35|253|\1B\00"
define i32 @Bematech_FI_TipoImpressora(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 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B|35|253|\1B\00"
define i32 @Bematech_FI_TipoImpressora(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct vm_area_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) { BUG(); }


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

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

LLVM IR (-O0):
%struct.vm_area_struct = type { i32 }
define void @flush_tlb_page(%struct.vm_area_struct* %0, i64 %1) {
%3 = alloca %struct.vm_area_struct*
%4 = alloca i64
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %3
store i64 %1, i64* %4
%5 = call i32 (...) @BUG()
ret void
}

LLVM IR (-O2):
%struct.vm_area_struct = type { i32 }
define void @flush_tlb_page(%struct.vm_area_struct* nocapture readnone %0, i64 %1) {
%3 = tail call i32 (...) @BUG()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void gsasl_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @gsasl_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void creaCrucigrama() { printf("Crea un crucigrama\n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"Crea un crucigrama\00"
define void @creaCrucigrama() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned char const *_unpackValueCString(unsigned char const *data) {
  while (*(data++) != 0) {
  }
  return data;
}


x86 assembly (clang, -O0):
<_unpackValueCString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1128 <_unpackValueCString+0x28>
jmp    1108 <_unpackValueCString+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_unpackValueCString>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1110 <_unpackValueCString+0x10>
ret

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

LLVM IR (-O2):
define i8* @_unpackValueCString(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret i8* %4
}
/* Variables and functions */
void *malloc(unsigned int);
int /*<<< orphan*/ memcpy(void *, void *, unsigned int);
void generic_swap(void *a, void *b, unsigned size) {
  void *c = malloc(size);
  memcpy(c, a, size);
  memcpy(a, b, size);
  memcpy(b, c, size);
}


x86 assembly (clang, -O0):
<generic_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_swap>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%edi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @generic_swap(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i32 %16)
%18 = load i8*, i8** %5
%19 = load i8*, i8** %7
%20 = load i32, i32* %6
%21 = call i32 @memcpy(i8* %18, i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
define void @generic_swap(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @malloc(i32 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %2)
%6 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%7 = tail call i32 @memcpy(i8* %1, i8* %4, i32 %2)
ret void
}
int is_palindrome(unsigned int *val) {
  int tmp, r = 0;
  tmp = *val;
  while (tmp != 0) {
    r = r * 10;
    r = r + tmp % 10;
    tmp = tmp / 10;
  }
  if (*val == r)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<is_palindrome>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1155 <is_palindrome+0x55>
imul   $0xa,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
jmp    1118 <is_palindrome+0x18>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x18(%rbp),%eax
jne    1170 <is_palindrome+0x70>
movl   $0x0,-0x4(%rbp)
jmp    1177 <is_palindrome+0x77>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_palindrome>:
mov    (%rdi),%r8d
xor    %edx,%edx
test   %r8d,%r8d
je     113f <is_palindrome+0x3f>
mov    %r8d,%eax
nopl   (%rax)
lea    (%rdx,%rdx,4),%edx
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rax
add    %edi,%eax
lea    (%rax,%rax,1),%edi
lea    (%rdi,%rdi,4),%edi
mov    %ecx,%esi
sub    %edi,%esi
lea    (%rsi,%rdx,2),%edx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <is_palindrome+0x10>
xor    %eax,%eax
cmp    %edx,%r8d
setne  %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @is_palindrome(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %9, %4 ], [ 0, %1 ]
%6 = phi i32 [ %10, %4 ], [ %2, %1 ]
%7 = mul nsw i32 %5, 10
%8 = srem i32 %6, 10
%9 = add nsw i32 %7, %8
%10 = sdiv i32 %6, 10
%11 = add i32 %6, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %9, %4 ]
%15 = icmp ne i32 %2, %14
%16 = sext i1 %15 to i32
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ sapin(int /*<<< orphan*/);
int main(int ac, char **av) {
  sapin(atoi(av[1]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <sapin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <sapin@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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = call i32 @sapin(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @sapin(i32 %5)
ret i32 0
}
indreg0adrx1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*p0) <= (((double *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0adrx1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movslq -0x20(%rbp),%rcx
mov    $0xa98ac7,%eax
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     1148 <indreg0adrx1+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <indreg0adrx1+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0adrx1>:
movslq %esi,%rax
movsd  0xa98ac7(,%rax,8),%xmm0
xor    %eax,%eax
ucomisd (%rdx),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @indreg0adrx1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = load double, double* %14
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* inttoptr (i64 11111111 to double*), i64 %17
%19 = load double, double* %18
%20 = fcmp ole double %15, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @indreg0adrx1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = load double, double* %4
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds double, double* inttoptr (i64 11111111 to double*), i64 %8
%10 = load double, double* %9
%11 = fcmp ole double %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
int fun360() { return 360; }


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

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

LLVM IR (-O0):
define i32 @fun360() {
ret i32 360
}

LLVM IR (-O2):
define i32 @fun360() {
ret i32 360
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: jgmenu-icon-find [<options>] <icon-name>\n"
         "    --theme=<theme>       specify icon-theme\n"
         "    --icon-size=<size>    specify icon-size\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [138 x i8] c"Usage: jgmenu-icon-find [<options>] <icon-name>\0A --theme=<theme> specify icon-theme\0A --icon-size=<size> specify icon-size\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [137 x i8] c"Usage: jgmenu-icon-find [<options>] <icon-name>\0A --theme=<theme> specify icon-theme\0A --icon-size=<size> specify icon-size\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([137 x i8], [137 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
void X509_check_issued(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_check_issued() {
ret void
}
void mem_unlock(void *ptr, unsigned char is_dirty) { return; }


x86 assembly (clang, -O0):
<mem_unlock>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mem_unlock(i8* nocapture %0, i8 zeroext %1) {
ret void
}