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


x86 assembly (clang, -O0):
<test_imm_FCuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%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_FCuint8_reg>:
cmp    $0x4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FCuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 252
%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_FCuint8_reg(i8 zeroext %0) {
%2 = icmp ult i8 %0, 4
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
int bar1(void) {}


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

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

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

LLVM IR (-O2):
define i32 @bar1() {
ret i32 undef
}
int m_retrieve() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @m_retrieve() {
ret i32 0
}
int test_imm_3Eint64_highword_reg(long long val) {
  return ((val >> 32) & (0x3E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Eint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x3e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Eint64_highword_reg>:
movabs $0x3e00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Eint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 62
%6 = icmp ne i64 %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_3Eint64_highword_reg(i64 %0) {
%2 = and i64 %0, 266287972352
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
long strlen(char *);
int string_checksize(char *src, long cmp) { return strlen(src) >= cmp; }


x86 assembly (clang, -O0):
<string_checksize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    -0x10(%rbp),%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_checksize>:
push   %rbx
mov    %rsi,%rbx
call   1030 <strlen@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setge  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @string_checksize(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = load i64, i64* %4
%8 = icmp sge i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @string_checksize(i8* nocapture %0, i64 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = icmp sge i64 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char *);
char *strcat(char *dst, const char *src) {
  size_t off = strlen(dst);
  strcpy(dst + off, src);
  return dst;
}


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

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    (%rax,%rbx,1),%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @strcpy(i8* %4, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ PR_SET_PDEATHSIG;
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ prctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ setpgrp();
int /*<<< orphan*/ write_file(char *, char *);
void setup_test() {
  prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
  setpgrp();
  write_file("/proc/self/oom_score_adj", "1000");
}


x86 assembly (clang, -O0):
<setup_test>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1040 <prctl@plt>
mov    $0x0,%al
call   1050 <setpgrp@plt>
lea    0xe9e(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1030 <write_file@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_test>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <prctl@plt>
xor    %eax,%eax
call   1050 <setpgrp@plt>
lea    0xea3(%rip),%rdi
lea    0xeb5(%rip),%rsi
pop    %rax
jmp    1030 <write_file@plt>

LLVM IR (-O0):
@PR_SET_PDEATHSIG = global i32 0
@SIGKILL = global i32 0
@.str = [25 x i8] c"/proc/self/oom_score_adj\00"
@.str.1 = [5 x i8] c"1000\00"
define void @setup_test() {
%1 = load i32, i32* @PR_SET_PDEATHSIG
%2 = load i32, i32* @SIGKILL
%3 = call i32 @prctl(i32 %1, i32 %2, i32 0, i32 0, i32 0)
%4 = call i32 (...) @setpgrp()
%5 = call i32 @write_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@PR_SET_PDEATHSIG = global i32 0
@SIGKILL = global i32 0
@.str = [25 x i8] c"/proc/self/oom_score_adj\00"
@.str.1 = [5 x i8] c"1000\00"
define void @setup_test() {
%1 = load i32, i32* @PR_SET_PDEATHSIG
%2 = load i32, i32* @SIGKILL
%3 = tail call i32 @prctl(i32 %1, i32 %2, i32 0, i32 0, i32 0)
%4 = tail call i32 (...) @setpgrp()
%5 = tail call i32 @write_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void lswap(long *x, long *y) {
  long z;
  z = *x;
  *x = *y;
  *y = z;
}


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

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

LLVM IR (-O0):
define void @lswap(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
store i64 %7, i64* %5
%8 = load i64*, i64** %4
%9 = load i64, i64* %8
%10 = load i64*, i64** %3
store i64 %9, i64* %10
%11 = load i64, i64* %5
%12 = load i64*, i64** %4
store i64 %11, i64* %12
ret void
}

LLVM IR (-O2):
define void @lswap(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
store i64 %4, i64* %0
store i64 %3, i64* %1
ret void
}
int upper_gauss(int x, int y) {
  int div = x / y;
  if (div * y == x)
    return div;
  else
    return div + 1;
}


x86 assembly (clang, -O0):
<upper_gauss>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    112f <upper_gauss+0x2f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <upper_gauss+0x38>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper_gauss>:
mov    %edi,%eax
cltd
idiv   %esi
imul   %eax,%esi
xor    %ecx,%ecx
cmp    %edi,%esi
setne  %cl
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @upper_gauss(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = mul nsw i32 %3, %1
%5 = icmp ne i32 %4, %0
%6 = zext i1 %5 to i32
%7 = add nsw i32 %3, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ o;

/* Variables and functions */
unsigned int hash_block(unsigned char *, int);
unsigned int ptr_hash(const void *o) {
  return hash_block((unsigned char *)&o, sizeof(o));
}


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

x86 assembly (clang, -O2):
<ptr_hash>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <hash_block@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ptr_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to i8*
%4 = call i32 @hash_block(i8* %3, i32 8)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ptr_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to i8*
%4 = call i32 @hash_block(i8* %3, i32 8)
ret i32 %4
}
/* Type definitions */
struct ylist_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_YLIST_HEAD(struct ylist_head *);
int /*<<< orphan*/ __list_del_entry(struct ylist_head *);
void ylist_del_init(struct ylist_head *entry) {
  __list_del_entry(entry);
  INIT_YLIST_HEAD(entry);
}


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

x86 assembly (clang, -O2):
<ylist_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__list_del_entry@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_YLIST_HEAD@plt>

LLVM IR (-O0):
%struct.ylist_head = type { i32 }
define void @ylist_del_init(%struct.ylist_head* %0) {
%2 = alloca %struct.ylist_head*
store %struct.ylist_head* %0, %struct.ylist_head** %2
%3 = load %struct.ylist_head*, %struct.ylist_head** %2
%4 = call i32 @__list_del_entry(%struct.ylist_head* %3)
%5 = load %struct.ylist_head*, %struct.ylist_head** %2
%6 = call i32 @INIT_YLIST_HEAD(%struct.ylist_head* %5)
ret void
}

LLVM IR (-O2):
%struct.ylist_head = type { i32 }
define void @ylist_del_init(%struct.ylist_head* %0) {
%2 = tail call i32 @__list_del_entry(%struct.ylist_head* %0)
%3 = tail call i32 @INIT_YLIST_HEAD(%struct.ylist_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endtmesh();
void endtmesh_() { endtmesh(); }


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

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

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

LLVM IR (-O2):
define void @endtmesh_() {
%1 = tail call i32 (...) @endtmesh()
ret void
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_reverse(struct genlist *);
void section_list_reverse(struct section_list *tthis) {
  genlist_reverse((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_reverse>:
jmp    1030 <genlist_reverse@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_reverse(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i32 @genlist_reverse(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_reverse(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_reverse(%struct.genlist* %2)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compare(const void *_s, const void *_t) {
  char *s = (char *)_s;
  char *t = (char *)_t;
  return strcmp(s, t);
}


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

x86 assembly (clang, -O2):
<compare>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void __CUT_TAKEDOWN__SampleTest(void) {}


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

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

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

LLVM IR (-O2):
define void @__CUT_TAKEDOWN__SampleTest() {
ret void
}
void emit_statuslines(double run_time) { (void)run_time; }


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

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

LLVM IR (-O0):
define void @emit_statuslines(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret void
}

LLVM IR (-O2):
define void @emit_statuslines(double %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void close_file_if_open(FILE *file_to_close) {
  if (file_to_close != NULL)
    fclose(file_to_close);
}


x86 assembly (clang, -O0):
<close_file_if_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <close_file_if_open+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file_if_open>:
test   %rdi,%rdi
je     111a <close_file_if_open+0xa>
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
define void @close_file_if_open(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = call i32 @fclose(i32* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @close_file_if_open(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fclose(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct userdel_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ userdel_cmdline_parser_release(struct userdel_args_info *);
void userdel_cmdline_parser_free(struct userdel_args_info *args_info) {
  userdel_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<userdel_cmdline_parser_free>:
jmp    1030 <userdel_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.userdel_args_info = type { i32 }
define void @userdel_cmdline_parser_free(%struct.userdel_args_info* %0) {
%2 = alloca %struct.userdel_args_info*
store %struct.userdel_args_info* %0, %struct.userdel_args_info** %2
%3 = load %struct.userdel_args_info*, %struct.userdel_args_info** %2
%4 = call i32 @userdel_cmdline_parser_release(%struct.userdel_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.userdel_args_info = type { i32 }
define void @userdel_cmdline_parser_free(%struct.userdel_args_info* %0) {
%2 = tail call i32 @userdel_cmdline_parser_release(%struct.userdel_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ showmsg(char *);
int main(int argc, char **argv) {
  char szMsg[] = "Hello, world!";
  showmsg(szMsg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x1e(%rbp)
mov    0xed1(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xecb(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x1e(%rbp),%rdi
call   1030 <showmsg@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x21646c726f7720,%rax
mov    %rax,0xe(%rsp)
movabs $0x77202c6f6c6c6548,%rax
2c 20 77
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <showmsg@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.szMsg = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [14 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [14 x i8]* %6 to i8*
%8 = getelementptr inbounds [14 x i8], [14 x i8]* %6, i64 0, i64 0
%9 = call i32 @showmsg(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.szMsg = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [14 x i8]
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%5 = call i32 @showmsg(i8* %4)
ret i32 0
}
char *hash_plugin_detailed(void) {
  return ("md5unix - MD5(Unix) plugin\n"
          "------------------------\n"
          "Use this module to crack shadow passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'. shadow "
          "files are acceptable\n"
          "Known software that uses this password hashing method:\n"
          "All linux distributions, most Unix-like operating systems\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_detailed>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [334 x i8] c"md5unix - MD5(Unix) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0AAll linux distributions, most Unix-like operating systems\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([334 x i8], [334 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [334 x i8] c"md5unix - MD5(Unix) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0AAll linux distributions, most Unix-like operating systems\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([334 x i8], [334 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct passwd {
  char *pw_dir;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
const char *home(void) {
  static char *home = NULL;
  if (home == NULL) {
    struct passwd *pwd = getpwuid(getuid());
    home = pwd->pw_dir;
  }
  return (const char *)home;
}


x86 assembly (clang, -O0):
<home>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpq   $0x0,0x2f08(%rip)
jne    1156 <home+0x36>
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,0x2ee2(%rip)
mov    0x2edb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<home>:
push   %rax
mov    0x2f10(%rip),%rax
test   %rax,%rax
je     112f <home+0xf>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rax
mov    %rax,0x2ef1(%rip)
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
@home.home = internal global i8* null
define i8* @home() {
%1 = alloca %struct.passwd*
%2 = load i8*, i8** @home.home
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 (...) @getuid()
%6 = call %struct.passwd* @getpwuid(i32 %5)
store %struct.passwd* %6, %struct.passwd** %1
%7 = load %struct.passwd*, %struct.passwd** %1
%8 = getelementptr inbounds %struct.passwd, %struct.passwd* %7, i32 0, i32 0
%9 = load i8*, i8** %8
store i8* %9, i8** @home.home
br label %10
10: ; preds = %4, %0
%11 = load i8*, i8** @home.home
ret i8* %11
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
@home.home = internal unnamed_addr global i8* null
define i8* @home() {
%1 = load i8*, i8** @home.home
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 (...) @getuid()
%5 = tail call %struct.passwd* @getpwuid(i32 %4)
%6 = getelementptr inbounds %struct.passwd, %struct.passwd* %5, i64 0, i32 0
%7 = load i8*, i8** %6
store i8* %7, i8** @home.home
br label %8
8: ; preds = %3, %0
%9 = phi i8* [ %7, %3 ], [ %1, %0 ]
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ h264nal_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ h264nal_set_ref(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ h264nal_set_type(int /*<<< orphan*/ *, int);
void h264ssps_init(uint8_t *p_h264ssps) {
  h264nal_init(p_h264ssps);
  h264nal_set_ref(p_h264ssps, 1);
  h264nal_set_type(p_h264ssps, 15);
}


x86 assembly (clang, -O0):
<h264ssps_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <h264nal_init@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <h264nal_set_ref@plt>
mov    -0x8(%rbp),%rdi
mov    $0xf,%esi
call   1040 <h264nal_set_type@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264ssps_init>:
push   %rbx
mov    %rdi,%rbx
call   1050 <h264nal_init@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <h264nal_set_ref@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
pop    %rbx
jmp    1040 <h264nal_set_type@plt>

LLVM IR (-O0):
define void @h264ssps_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @h264nal_init(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @h264nal_set_ref(i32* %5, i32 1)
%7 = load i32*, i32** %2
%8 = call i32 @h264nal_set_type(i32* %7, i32 15)
ret void
}

LLVM IR (-O2):
define void @h264ssps_init(i32* %0) {
%2 = tail call i32 @h264nal_init(i32* %0)
%3 = tail call i32 @h264nal_set_ref(i32* %0, i32 1)
%4 = tail call i32 @h264nal_set_type(i32* %0, i32 15)
ret void
}
int benchmark_finiworker(void *tsd) {
  ;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @benchmark_finiworker(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_exheres_comment_entities();
void all_exheres_tests() { test_exheres_comment_entities(); }


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

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

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

LLVM IR (-O2):
define void @all_exheres_tests() {
%1 = tail call i32 (...) @test_exheres_comment_entities()
ret void
}
void empty_command() {}


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

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

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

LLVM IR (-O2):
define void @empty_command() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
char *strdup(char *);
int main(int argc, char **argv) {
  char *p = "hello world";
  char *q = strdup("hello world");
  foo(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xeb8(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %6
%8 = call i8* @strdup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %7
%9 = load i8*, i8** %6
%10 = call i32 @foo(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int parse_char_code_common(char **, int *, char, int);
int parse_char_code_zero_ok(char **s, int *comp, char terminator) {
  return parse_char_code_common(s, comp, terminator, 1);
}


x86 assembly (clang, -O0):
<parse_char_code_zero_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%ecx
movsbl -0x11(%rbp),%edx
call   1030 <parse_char_code_common@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_char_code_zero_ok>:
mov    $0x1,%ecx
jmp    1030 <parse_char_code_common@plt>

LLVM IR (-O0):
define i32 @parse_char_code_zero_ok(i8** %0, i32* %1, i8 signext %2) {
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i8
store i8** %0, i8*** %4
store i32* %1, i32** %5
store i8 %2, i8* %6
%7 = load i8**, i8*** %4
%8 = load i32*, i32** %5
%9 = load i8, i8* %6
%10 = call i32 @parse_char_code_common(i8** %7, i32* %8, i8 signext %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @parse_char_code_zero_ok(i8** %0, i32* %1, i8 signext %2) {
%4 = tail call i32 @parse_char_code_common(i8** %0, i32* %1, i8 signext %2, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegWriteWord(int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
void wiznetSetFragmentOffset(uint8_t socket, uint16_t frag) {
  wiznetRegWriteWord(socket, (0x0000 + 0x002D), frag);
}


x86 assembly (clang, -O0):
<wiznetSetFragmentOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x2d,%esi
call   1030 <wiznetRegWriteWord@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wiznetSetFragmentOffset>:
mov    %esi,%edx
mov    $0x2d,%esi
jmp    1030 <wiznetRegWriteWord@plt>

LLVM IR (-O0):
define void @wiznetSetFragmentOffset(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 @wiznetRegWriteWord(i32 %5, i32 45, i32 %6)
ret void
}

LLVM IR (-O2):
define void @wiznetSetFragmentOffset(i32 %0, i32 %1) {
%3 = tail call i32 @wiznetRegWriteWord(i32 %0, i32 45, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void Exynos_OSAL_ThreadExit(void *value_ptr) {
  pthread_exit(value_ptr);
  return;
}


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

x86 assembly (clang, -O2):
<Exynos_OSAL_ThreadExit>:
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define void @Exynos_OSAL_ThreadExit(i8* %0) {
%2 = tail call i32 @pthread_exit(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: %s [-acu] [-pprofile] [file ...]\n", "rpp");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"usage: %s [-acu] [-pprofile] [file ...]\0A\00"
@.str.1 = [4 x i8] c"rpp\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"usage: %s [-acu] [-pprofile] [file ...]\0A\00"
@.str.1 = [4 x i8] c"rpp\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_cts(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x00f0)) == cpu_to_le16(0x0004 | 0x00C0);
}


x86 assembly (clang, -O0):
<ieee80211_is_cts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xc4,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_cts>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xc4,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_cts(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 196)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_cts(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 196)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int Partition(int *, int, int);
void QuickSort(int arr[], int left, int right) {
  if (left <= right) {
    int pivot = Partition(arr, left, right);
    QuickSort(arr, left, pivot - 1);
    QuickSort(arr, pivot + 1, right);
  }
}


x86 assembly (clang, -O0):
<QuickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1174 <QuickSort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <Partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <QuickSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <QuickSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuickSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jg     1164 <QuickSort+0x44>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <Partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <QuickSort@plt>
lea    0x1(%rbx),%ebp
cmp    %r14d,%ebx
jl     1140 <QuickSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @QuickSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @Partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @QuickSort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %7, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t USBHostAddrGet(uint32_t ui32Base, uint32_t ui32Endpoint,
                        uint32_t ui32Flags) {
  ;

  ;
  if (ui32Flags & 0x00002000) {
    return (
        (*((volatile uint8_t *)(ui32Base + 0x00000080 + (ui32Endpoint >> 1)))));
  } else {
    return ((*((volatile uint8_t *)(ui32Base + 0x00000080 + 4 +
                                    (ui32Endpoint >> 1)))));
  }
}


x86 assembly (clang, -O0):
<USBHostAddrGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     113a <USBHostAddrGet+0x3a>
mov    -0x8(%rbp),%eax
add    $0x80,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <USBHostAddrGet+0x54>
mov    -0x8(%rbp),%eax
add    $0x80,%eax
add    $0x4,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostAddrGet>:
xor    %eax,%eax
test   $0x2000,%edx
sete   %al
lea    (%rdi,%rax,4),%eax
add    $0x80,%eax
sar    %esi
cltq
movslq %esi,%rcx
mov    (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @USBHostAddrGet(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = and i32 %8, 8192
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %3
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 128
%14 = load i32, i32* %6
%15 = ashr i32 %14, 1
%16 = add nsw i32 %13, %15
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
store i32 %19, i32* %4
br label %30
20: ; preds = %3
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 128
%23 = add nsw i32 %22, 4
%24 = load i32, i32* %6
%25 = ashr i32 %24, 1
%26 = add nsw i32 %23, %25
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i32*
%29 = load volatile i32, i32* %28
store i32 %29, i32* %4
br label %30
30: ; preds = %20, %11
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @USBHostAddrGet(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, 8192
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 132, i32 128
%7 = add nsw i32 %6, %0
%8 = ashr i32 %1, 1
%9 = add nsw i32 %7, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ runDriveMotors(int /*<<< orphan*/, int /*<<< orphan*/);
void stopDriveMotors() { runDriveMotors(0, 0); }


x86 assembly (clang, -O0):
<stopDriveMotors>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <runDriveMotors@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stopDriveMotors>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <runDriveMotors@plt>

LLVM IR (-O0):
define void @stopDriveMotors() {
%1 = call i32 @runDriveMotors(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @stopDriveMotors() {
%1 = tail call i32 @runDriveMotors(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printLine(char lc, size_t length, bool newLine) {
  for (size_t i = 0; i < length; ++i) {
    printf("%c", lc);
  }
  if (newLine == true) {
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115e <printLine+0x4e>
movsbl -0x1(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112d <printLine+0x1d>
cmpl   $0x1,-0x14(%rbp)
jne    1176 <printLine+0x66>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLine>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
test   %rsi,%rsi
je     113d <printLine+0x2d>
mov    %rsi,%rbx
movsbl %dil,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <printLine+0x20>
cmp    $0x1,%r14d
jne    1151 <printLine+0x41>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printLine(i8 signext %0, i64 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
store i8 %0, i8* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
store i64 0, i64* %7
br label %8
8: ; preds = %16, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %5
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %12
%17 = load i64, i64* %7
%18 = add i64 %17, 1
store i64 %18, i64* %7
br label %8
19: ; preds = %8
%20 = load i32, i32* %6
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
ret void
}

LLVM IR (-O2):
define void @printLine(i8 signext %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = sext i8 %0 to i32
br label %9
7: ; preds = %9, %3
%8 = icmp eq i32 %2, 1
br i1 %8, label %14, label %16
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %12, %9 ]
%11 = tail call i32 @putchar(i32 %6)
%12 = add nuw i64 %10, 1
%13 = icmp eq i64 %12, %1
br i1 %13, label %7, label %9
14: ; preds = %7
%15 = tail call i32 @putchar(i32 10)
br label %16
16: ; preds = %14, %7
ret void
}
void wifi_evt_sme_disconnected(
    const struct wifi_msg_sme_disconnected_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_disconnected_evt_t = type opaque
define void @wifi_evt_sme_disconnected(%struct.wifi_msg_sme_disconnected_evt_t* nocapture %0) {
ret void
}
/* Type definitions */
struct slre_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ re_rng2set(struct slre_env *, char, char);
void re_w_2set(struct slre_env *e) {
  re_rng2set(e, '0', '9');
  re_rng2set(e, 'A', 'Z');
  re_rng2set(e, '_', '_');
  re_rng2set(e, 'a', 'z');
}


x86 assembly (clang, -O0):
<re_w_2set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x41,%esi
mov    $0x5a,%edx
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5f,%edx
mov    %edx,%esi
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <re_rng2set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_w_2set>:
push   %rbx
mov    %rdi,%rbx
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x5a,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x5f,%esi
mov    $0x5f,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
mov    $0x7a,%edx
pop    %rbx
jmp    1030 <re_rng2set@plt>

LLVM IR (-O0):
%struct.slre_env = type { i32 }
define void @re_w_2set(%struct.slre_env* %0) {
%2 = alloca %struct.slre_env*
store %struct.slre_env* %0, %struct.slre_env** %2
%3 = load %struct.slre_env*, %struct.slre_env** %2
%4 = call i32 @re_rng2set(%struct.slre_env* %3, i8 signext 48, i8 signext 57)
%5 = load %struct.slre_env*, %struct.slre_env** %2
%6 = call i32 @re_rng2set(%struct.slre_env* %5, i8 signext 65, i8 signext 90)
%7 = load %struct.slre_env*, %struct.slre_env** %2
%8 = call i32 @re_rng2set(%struct.slre_env* %7, i8 signext 95, i8 signext 95)
%9 = load %struct.slre_env*, %struct.slre_env** %2
%10 = call i32 @re_rng2set(%struct.slre_env* %9, i8 signext 97, i8 signext 122)
ret void
}

LLVM IR (-O2):
%struct.slre_env = type { i32 }
define void @re_w_2set(%struct.slre_env* %0) {
%2 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 48, i8 signext 57)
%3 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 65, i8 signext 90)
%4 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 95, i8 signext 95)
%5 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 97, i8 signext 122)
ret void
}
char *aleph_Name(void) { return "ALEPH16"; }


x86 assembly (clang, -O0):
<aleph_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aleph_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"ALEPH16\00"
define i8* @aleph_Name() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"ALEPH16\00"
define i8* @aleph_Name() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
char *strerror(int);
char *msg_err(const char *msg, int errnum) {
  char *p = malloc(200);
  strcpy(p, msg);
  strcat(p, ": ");
  strcat(p, strerror(errnum));
  return p;
}


x86 assembly (clang, -O0):
<msg_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xc8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <strerror@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_err>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0xc8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xe97(%rip),%rsi
mov    %rbp,%rdi
call   1050 <strcat@plt>
mov    %r14d,%edi
call   1060 <strerror@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1050 <strcat@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c": \00"
define i8* @msg_err(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i8* @malloc(i32 200)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i8*, i8** %3
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = load i8*, i8** %5
%11 = call i32 @strcat(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %5
%13 = load i32, i32* %4
%14 = call i8* @strerror(i32 %13)
%15 = call i32 @strcat(i8* %12, i8* %14)
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@.str = [3 x i8] c": \00"
define i8* @msg_err(i8* %0, i32 %1) {
%3 = tail call dereferenceable_or_null(200) i8* @malloc(i32 200)
%4 = tail call i32 @strcpy(i8* %3, i8* %0)
%5 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = tail call i8* @strerror(i32 %1)
%7 = tail call i32 @strcat(i8* %3, i8* %6)
ret i8* %3
}