xunge/DecIR huggingface dataset:
long long int funct(long long int i, long long int a, long long int b,
                    long long int c, long long int m) {
  return (a * m + b * i + c) % 1000000007;
}


x86 assembly (clang, -O0):
<funct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x28(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   -0x8(%rbp),%rcx
add    %rcx,%rax
add    -0x20(%rbp),%rax
mov    $0x3b9aca07,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funct>:
imul   %r8,%rsi
imul   %rdx,%rdi
add    %rdi,%rcx
add    %rsi,%rcx
movabs $0x89705f3112a28fe5,%rdx
5f 70 89
mov    %rcx,%rax
imul   %rdx
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x1d,%rdx
add    %rax,%rdx
imul   $0x3b9aca07,%rdx,%rax
sub    %rax,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @funct(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %7
%12 = load i64, i64* %10
%13 = mul nsw i64 %11, %12
%14 = load i64, i64* %8
%15 = load i64, i64* %6
%16 = mul nsw i64 %14, %15
%17 = add nsw i64 %13, %16
%18 = load i64, i64* %9
%19 = add nsw i64 %17, %18
%20 = srem i64 %19, 1000000007
ret i64 %20
}

LLVM IR (-O2):
define i64 @funct(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = mul nsw i64 %4, %1
%7 = mul nsw i64 %2, %0
%8 = add i64 %7, %3
%9 = add i64 %8, %6
%10 = srem i64 %9, 1000000007
ret i64 %10
}
void deepCopyStrTestC() {
  char *result = deepCopyStr("test string", -1);
  assert(result == '\0');
  printf("Test successful.");
}


x86 assembly (clang, -O0):
<deepCopyStrTestC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x0,%al
call   1050 <deepCopyStr@plt>
cltq
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deepCopyStrTestC>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1050 <deepCopyStr@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
xor    %eax,%eax
call   1040 <assert@plt>
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"test string\00"
@.str.1 = [17 x i8] c"Test successful.\00"
define void @deepCopyStrTestC() {
%1 = alloca i8*
%2 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @deepCopyStr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 -1)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = icmp eq i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"test string\00"
@.str.1 = [17 x i8] c"Test successful.\00"
define void @deepCopyStrTestC() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @deepCopyStr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 -1)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void security_inode_post_rename(struct inode *old_dir,
                                struct dentry *old_dentry,
                                struct inode *new_dir,
                                struct dentry *new_dentry) {}


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

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.dentry = type opaque
define void @security_inode_post_rename(%struct.inode* %0, %struct.dentry* %1, %struct.inode* %2, %struct.dentry* %3) {
%5 = alloca %struct.inode*
%6 = alloca %struct.dentry*
%7 = alloca %struct.inode*
%8 = alloca %struct.dentry*
store %struct.inode* %0, %struct.inode** %5
store %struct.dentry* %1, %struct.dentry** %6
store %struct.inode* %2, %struct.inode** %7
store %struct.dentry* %3, %struct.dentry** %8
ret void
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.dentry = type opaque
define void @security_inode_post_rename(%struct.inode* nocapture %0, %struct.dentry* nocapture %1, %struct.inode* nocapture %2, %struct.dentry* nocapture %3) {
ret void
}
/* Variables and functions */
void free(void *);
void _aligned_free(void *memblock) { return free(memblock); }


x86 assembly (clang, -O0):
<_aligned_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):
<_aligned_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @_aligned_free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
void *malloc(long);
void *seta_alloc_args(long size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<seta_alloc_args>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @seta_alloc_args(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @seta_alloc_args(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
float square(float a) { ; }


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

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

LLVM IR (-O0):
define float @square(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %2
ret float %4
}

LLVM IR (-O2):
define float @square(float %0) {
ret float undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xc7() {
  Assert_real((isalnum(199) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1000, ("isalnum should be 0 for 0xc7"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xc7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc7,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3e8,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xc7>:
push   %rax
mov    $0xc7,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e8,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc7\00"
define void @t_isalnum_0xc7() {
%1 = call i64 @isalnum(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc7\00"
define void @t_isalnum_0xc7() {
%1 = tail call i64 @isalnum(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const unsigned int DecodedLength(unsigned char *in) {
  return *(unsigned int *)in;
}


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

x86 assembly (clang, -O2):
<DecodedLength>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @DecodedLength(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @DecodedLength(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void cleanup_R1(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ bspatch_valid_header(int /*<<< orphan*/ *, int);
int offtin(int /*<<< orphan*/ *);
ssize_t bspatch_newsize(u_char *patch, ssize_t patchsz) {
  if (!bspatch_valid_header(patch, patchsz))
    return -1;
  return offtin(patch + 24);
}


x86 assembly (clang, -O0):
<bspatch_newsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <bspatch_valid_header@plt>
cmp    $0x0,%eax
jne    1150 <bspatch_newsize+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <bspatch_newsize+0x40>
mov    -0x10(%rbp),%rdi
add    $0x60,%rdi
call   1040 <offtin@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bspatch_newsize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <bspatch_valid_header@plt>
test   %eax,%eax
je     113a <bspatch_newsize+0x1a>
add    $0x60,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <offtin@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bspatch_newsize(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %5
%8 = call i32 @bspatch_valid_header(i32* %6, i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
store i32 -1, i32* %3
br label %15
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 24
%14 = call i32 @offtin(i32* %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @bspatch_newsize(i32* %0, i32 %1) {
%3 = tail call i32 @bspatch_valid_header(i32* %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = getelementptr inbounds i32, i32* %0, i64 24
%7 = tail call i32 @offtin(i32* %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ -1, %2 ]
ret i32 %9
}
int test_imm_D8uint16_mem(unsigned short *val) {
  return ((*val) & (-0xD8 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D8uint16_mem>:
movzwl (%rdi),%eax
test   $0xff28,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D8uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -216
%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_D8uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -216
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void msm_proc_comm_reset_modem_now(void) {}


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

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

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

LLVM IR (-O2):
define void @msm_proc_comm_reset_modem_now() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_WriteData(int);
void createDisruption_Four() {
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
  LCD_WriteData(0xe);
  LCD_WriteData(0xe);
  LCD_WriteData(0xe);
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
}


x86 assembly (clang, -O0):
<createDisruption_Four>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<createDisruption_Four>:
push   %rax
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <LCD_WriteData@plt>

LLVM IR (-O0):
define void @createDisruption_Four() {
%1 = call i32 @LCD_WriteData(i32 0)
%2 = call i32 @LCD_WriteData(i32 0)
%3 = call i32 @LCD_WriteData(i32 14)
%4 = call i32 @LCD_WriteData(i32 14)
%5 = call i32 @LCD_WriteData(i32 14)
%6 = call i32 @LCD_WriteData(i32 0)
%7 = call i32 @LCD_WriteData(i32 0)
%8 = call i32 @LCD_WriteData(i32 0)
ret void
}

LLVM IR (-O2):
define void @createDisruption_Four() {
%1 = tail call i32 @LCD_WriteData(i32 0)
%2 = tail call i32 @LCD_WriteData(i32 0)
%3 = tail call i32 @LCD_WriteData(i32 14)
%4 = tail call i32 @LCD_WriteData(i32 14)
%5 = tail call i32 @LCD_WriteData(i32 14)
%6 = tail call i32 @LCD_WriteData(i32 0)
%7 = tail call i32 @LCD_WriteData(i32 0)
%8 = tail call i32 @LCD_WriteData(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void _child(void *arg) {
  while (1)
    sleep(36400);
}


x86 assembly (clang, -O0):
<_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8e30,%edi
call   1030 <sleep@plt>
jmp    111c <_child+0xc>

x86 assembly (clang, -O2):
<_child>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x8e30,%edi
call   1030 <sleep@plt>
jmp    1120 <_child+0x10>

LLVM IR (-O0):
define void @_child(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @sleep(i32 36400)
br label %3
}

LLVM IR (-O2):
define void @_child(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @sleep(i32 36400)
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reverse(int);
void main() {
  reverse(5);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <reverse@plt>
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <reverse@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <putchar@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @reverse(i32 5)
%2 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f(unsigned char *);
main() {
  unsigned char a[2];
  a[0] = 8;
  a[1] = 9;
  if (f(a) != 2)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x8,-0x6(%rbp)
movb   $0x9,-0x5(%rbp)
lea    -0x6(%rbp),%rdi
call   1040 <f@plt>
cmp    $0x2,%eax
je     1160 <main+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x908,0x6(%rsp)
lea    0x6(%rsp),%rdi
call   1040 <f@plt>
cmp    $0x2,%eax
jne    114e <main+0x1e>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 8, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 9, i8* %4
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%6 = call i32 @f(i8* %5)
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
store i8 8, i8* %2
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 1
store i8 9, i8* %3
%4 = call i32 @f(i8* %2)
%5 = icmp eq i32 %4, 2
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int grepHttpCode(char *http) {
  char aux[1000000];
  strcpy(aux, http + 9);
  aux[3] = 0;
  return atoi(aux);
}


x86 assembly (clang, -O0):
<grepHttpCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4250,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xf4250(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x9,%rsi
call   1030 <strcpy@plt>
movb   $0x0,-0xf424d(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1040 <atoi@plt>
add    $0xf4250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grepHttpCode>:
push   %rbx
sub    $0xf4240,%rsp
lea    0x9(%rdi),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
movb   $0x0,0x3(%rsp)
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0xf4240,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @grepHttpCode(i8* %0) {
%2 = alloca i8*
%3 = alloca [1000000 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 9
%7 = call i32 @strcpy(i8* %4, i8* %6)
%8 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 3
store i8 0, i8* %8
%9 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%10 = call i32 @atoi(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @grepHttpCode(i8* %0) {
%2 = alloca [1000000 x i8]
%3 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds i8, i8* %0, i64 9
%5 = call i32 @strcpy(i8* %3, i8* %4)
%6 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %2, i64 0, i64 3
store i8 0, i8* %6
%7 = call i32 @atoi(i8* %3)
ret i32 %7
}
void gtk_container_unset_focus_chain() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_unset_focus_chain() {
ret void
}
int lequal(long a, long b) { return a == b; }


x86 assembly (clang, -O0):
<lequal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lequal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @lequal(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int CustomAssertFunction(char *expr, char *descr, int line, char *file,
                         int *ignoreAlways) {
  int r = 1;
  return r;
}


x86 assembly (clang, -O0):
<CustomAssertFunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @CustomAssertFunction(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32* nocapture readnone %4) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char const *, int /*<<< orphan*/);
const char *check_file(const char *file) {
  if ((open(file, O_RDONLY)) == -1) {
    return "A";
  } else {
    return "B";
  }
}


x86 assembly (clang, -O0):
<check_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
cmp    $0xffffffff,%eax
jne    1147 <check_file+0x37>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <check_file+0x42>
lea    0xeb4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_file>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
cmp    $0xffffffff,%eax
lea    0xed7(%rip),%rcx
lea    0xed2(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
define i8* @check_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
define i8* @check_file(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp eq i32 %3, -1
%5 = select i1 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ next();
uint64_t uint64(void) { return next(); }


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

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

LLVM IR (-O0):
define i32 @uint64() {
%1 = call i32 (...) @next()
ret i32 %1
}

LLVM IR (-O2):
define i32 @uint64() {
%1 = tail call i32 (...) @next()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
unsigned char fileExists(char *name) {
  FILE *tmp = fopen(name, "rb");
  unsigned char exists = (tmp != NULL);
  if (tmp != NULL)
    fclose(tmp);
  return exists;
}


x86 assembly (clang, -O0):
<fileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x11(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1164 <fileExists+0x44>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
movzbl -0x11(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileExists>:
push   %rbx
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113d <fileExists+0x1d>
mov    %rbx,%rdi
call   1030 <fclose@plt>
test   %rbx,%rbx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define zeroext i8 @fileExists(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
%11 = load i32*, i32** %3
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load i32*, i32** %3
%15 = call i32 @fclose(i32* %14)
br label %16
16: ; preds = %13, %1
%17 = load i8, i8* %4
ret i8 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define zeroext i8 @fileExists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
%7 = zext i1 %3 to i8
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ test_io();
int /*<<< orphan*/ test_malloc();
int /*<<< orphan*/ test_sig();
int /*<<< orphan*/ test_sprintf();
int /*<<< orphan*/ test_sscanf();
int main() {
  test_io();
  test_sprintf();
  test_sscanf();
  test_malloc();
  test_sig();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_io@plt>
mov    $0x0,%al
call   1060 <test_sprintf@plt>
mov    $0x0,%al
call   1040 <test_sscanf@plt>
mov    $0x0,%al
call   1030 <test_malloc@plt>
mov    $0x0,%al
call   1050 <test_sig@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_io@plt>
xor    %eax,%eax
call   1060 <test_sprintf@plt>
xor    %eax,%eax
call   1040 <test_sscanf@plt>
xor    %eax,%eax
call   1030 <test_malloc@plt>
xor    %eax,%eax
call   1050 <test_sig@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_io()
%3 = call i32 (...) @test_sprintf()
%4 = call i32 (...) @test_sscanf()
%5 = call i32 (...) @test_malloc()
%6 = call i32 (...) @test_sig()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_io()
%2 = tail call i32 (...) @test_sprintf()
%3 = tail call i32 (...) @test_sscanf()
%4 = tail call i32 (...) @test_malloc()
%5 = tail call i32 (...) @test_sig()
ret i32 0
}
unsigned int rehash_token(unsigned int hash, unsigned char data) {
  return ((hash * 16777619) ^ data);
}


x86 assembly (clang, -O0):
<rehash_token>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
imul   $0x1000193,-0x4(%rbp),%eax
movzbl -0x5(%rbp),%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rehash_token>:
imul   $0x1000193,%edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @rehash_token(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = mul i32 %5, 16777619
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = xor i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rehash_token(i32 %0, i8 zeroext %1) {
%3 = mul i32 %0, 16777619
%4 = zext i8 %1 to i32
%5 = xor i32 %3, %4
ret i32 %5
}
int srv_notify(int socket) {}


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

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

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

LLVM IR (-O2):
define i32 @srv_notify(i32 %0) {
ret i32 undef
}
/* Variables and functions */
#define SIGALRM 129
#define SIGUSR1 128
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void handler(int s) {
  switch (s) {
  case SIGUSR1:
    printf("SIGUSR1\n");
    break;
  case SIGALRM:
    printf("ALARM !!\n");
    return;
  }
  exit(0);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x80,%eax
je     1154 <handler+0x34>
jmp    1141 <handler+0x21>
mov    -0x8(%rbp),%eax
sub    $0x81,%eax
je     1165 <handler+0x45>
jmp    1177 <handler+0x57>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <handler+0x57>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
cmp    $0x81,%edi
jne    1134 <handler+0x14>
lea    0xed1(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
cmp    $0x80,%edi
jne    1149 <handler+0x29>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"SIGUSR1\0A\00"
@.str.1 = [10 x i8] c"ALARM !!\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 128, label %4
i32 129, label %6
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
8: ; preds = %1, %4
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [9 x i8] c"ALARM !!\00"
@str.2 = [8 x i8] c"SIGUSR1\00"
define void @handler(i32 %0) {
switch i32 %0, label %6 [
i32 128, label %2
i32 129, label %4
]
2: ; preds = %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
br label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
6: ; preds = %1, %2
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ xsi_register_didat(char *, char *);
extern void work_a_3073701636_1075909370_init() {
  xsi_register_didat(
      "work_a_3073701636_1075909370",
      "isim/ALU_tb_isim_beh.exe.sim/work/a_3073701636_1075909370.didat");
}


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

x86 assembly (clang, -O2):
<work_a_3073701636_1075909370_init>:
lea    0xee9(%rip),%rdi
lea    0xeff(%rip),%rsi
jmp    1030 <xsi_register_didat@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"work_a_3073701636_1075909370\00"
@.str.1 = [64 x i8] c"isim/ALU_tb_isim_beh.exe.sim/work/a_3073701636_1075909370.didat\00"
define void @work_a_3073701636_1075909370_init() {
%1 = call i32 @xsi_register_didat(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"work_a_3073701636_1075909370\00"
@.str.1 = [64 x i8] c"isim/ALU_tb_isim_beh.exe.sim/work/a_3073701636_1075909370.didat\00"
define void @work_a_3073701636_1075909370_init() {
%1 = tail call i32 @xsi_register_didat(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_data_qos(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x0080)) == cpu_to_le16(0x0008 | 0x0080);
}


x86 assembly (clang, -O0):
<ieee80211_is_data_qos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x8c,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x88,%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_data_qos>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x8c,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x88,%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_data_qos(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 140)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 136)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_data_qos(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 140)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 136)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int /*<<< orphan*/ test5();
int /*<<< orphan*/ test6();
int /*<<< orphan*/ test7();
int main() {
  test1();
  test2();
  test3();
  test4();
  test5();
  test6();
  test7();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test1@plt>
mov    $0x0,%al
call   1090 <test2@plt>
mov    $0x0,%al
call   1050 <test3@plt>
mov    $0x0,%al
call   1080 <test4@plt>
mov    $0x0,%al
call   1040 <test5@plt>
mov    $0x0,%al
call   1070 <test6@plt>
mov    $0x0,%al
call   1030 <test7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test1@plt>
xor    %eax,%eax
call   1090 <test2@plt>
xor    %eax,%eax
call   1050 <test3@plt>
xor    %eax,%eax
call   1080 <test4@plt>
xor    %eax,%eax
call   1040 <test5@plt>
xor    %eax,%eax
call   1070 <test6@plt>
xor    %eax,%eax
call   1030 <test7@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test1()
%3 = call i32 (...) @test2()
%4 = call i32 (...) @test3()
%5 = call i32 (...) @test4()
%6 = call i32 (...) @test5()
%7 = call i32 (...) @test6()
%8 = call i32 (...) @test7()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
%3 = tail call i32 (...) @test3()
%4 = tail call i32 (...) @test4()
%5 = tail call i32 (...) @test5()
%6 = tail call i32 (...) @test6()
%7 = tail call i32 (...) @test7()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double floor(double);
double mod_1(double x) {
  double v = x - floor(x);
  assert(v >= 0.0);
  assert(v < 1.0);
  return v;
}


x86 assembly (clang, -O0):
<mod_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0xe8d(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_1>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <floor@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
xorpd  %xmm0,%xmm0
xor    %edi,%edi
ucomisd %xmm0,%xmm1
setae  %dil
call   1030 <assert@plt>
movsd  0xeac(%rip),%xmm0
xor    %edi,%edi
ucomisd (%rsp),%xmm0
seta   %dil
call   1030 <assert@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mod_1(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.floor.f64(double %5)
%7 = fsub double %4, %6
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp oge double %8, 0.000000e+00
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load double, double* %3
%13 = fcmp olt double %12, 1.000000e+00
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @mod_1(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = fsub double %0, %2
%4 = fcmp oge double %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = fcmp olt double %3, 1.000000e+00
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret double %3
}
int nxtd_bt_scan() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nxtd_bt_scan() {
ret i32 0
}
/* Variables and functions */
int bar();
int __attribute__((no)) f2(void) { return bar(); }


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

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

LLVM IR (-O0):
define i32 @f2() {
%1 = call i32 (...) @bar()
ret i32 %1
}

LLVM IR (-O2):
define i32 @f2() {
%1 = tail call i32 (...) @bar()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ getPT();
void ET2_getPT_BLK(unsigned char *bufp, unsigned ct) {
  while (ct) {
    *(bufp++) = getPT();
    --ct;
  }
}


x86 assembly (clang, -O0):
<ET2_getPT_BLK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1151 <ET2_getPT_BLK+0x41>
mov    $0x0,%al
call   1030 <getPT@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <ET2_getPT_BLK+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ET2_getPT_BLK>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1144 <ET2_getPT_BLK+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getPT@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <ET2_getPT_BLK+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ET2_getPT_BLK(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = call i32 (...) @getPT()
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
store i8 %10, i8* %11
%13 = load i32, i32* %4
%14 = add i32 %13, -1
store i32 %14, i32* %4
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ET2_getPT_BLK(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ %1, %2 ]
%6 = phi i8* [ %9, %4 ], [ %0, %2 ]
%7 = tail call i32 (...) @getPT()
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %8, i8* %6
%10 = add i32 %5, -1
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
void warn(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @warn(i8* nocapture %0, ...) {
ret void
}
void avcodec_chroma_pos_to_enum() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_chroma_pos_to_enum() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Hello world.");
  puts("I love bacon !");
  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)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@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>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world.\00"
@.str.1 = [15 x i8] c"I love bacon !\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world.\00"
@.str.1 = [15 x i8] c"I love bacon !\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void xgetbv(int op, int *eax, int *edx) {
  __asm__ __volatile__(".byte 0x0f, 0x01, 0xd0"
                       : "=a"(*eax), "=d"(*edx)
                       : "c"(op)
                       : "cc");
}


x86 assembly (clang, -O0):
<xgetbv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
xgetbv
mov    -0x28(%rbp),%rcx
mov    %eax,%esi
mov    -0x20(%rbp),%rax
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xgetbv>:
mov    %rdx,%r8
mov    %edi,%ecx
xgetbv
mov    %eax,(%rsi)
mov    %edx,(%r8)
ret

LLVM IR (-O0):
define void @xgetbv(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %5
%8 = load i32*, i32** %6
%9 = load i32, i32* %4
%10 = call { i32, i32 } asm sideeffect ".byte 0x0f, 0x01, 0xd0", "={ax},={dx},{cx},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %9)
%11 = extractvalue { i32, i32 } %10, 0
%12 = extractvalue { i32, i32 } %10, 1
store i32 %11, i32* %7
store i32 %12, i32* %8
ret void
}

LLVM IR (-O2):
define void @xgetbv(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = tail call { i32, i32 } asm sideeffect ".byte 0x0f, 0x01, 0xd0", "={ax},={dx},{cx},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %0)
%5 = extractvalue { i32, i32 } %4, 0
%6 = extractvalue { i32, i32 } %4, 1
store i32 %5, i32* %1
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *get_filename_extension(char *f) { return strrchr(f, '.') + 1; }


x86 assembly (clang, -O0):
<get_filename_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filename_extension>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @get_filename_extension(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strrchr(i8* %3, i8 signext 46)
%5 = getelementptr inbounds i8, i8* %4, i64 1
ret i8* %5
}

LLVM IR (-O2):
define i8* @get_filename_extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}
void g_slist_push_allocator() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_push_allocator() {
ret void
}
void __monstartup() {}


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

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

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

LLVM IR (-O2):
define void @__monstartup() {
ret void
}
unsigned short int f94(unsigned short int x, unsigned long int y) {
  return (x << ((-y) & (8 * sizeof(unsigned short) - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f94>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f94>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f94(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 0, %7
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = ashr i32 %13, %15
%17 = add nsw i32 %11, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f94(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 15
%7 = shl nuw nsw i32 %3, %6
%8 = lshr i32 %3, %4
%9 = add nuw nsw i32 %7, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}
/* Variables and functions */
int major(unsigned long long);
unsigned os_major(unsigned long long dev) { return major(dev); }


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

x86 assembly (clang, -O2):
<os_major>:
jmp    1030 <major@plt>

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

LLVM IR (-O2):
define i32 @os_major(i64 %0) {
%2 = tail call i32 @major(i64 %0)
ret i32 %2
}