xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
int ueStrNBytes(char const *, size_t);
int ueStrNCpy(char dest[], const char *src, size_t n, int end) {
  int len = 0;
  len = ueStrNBytes(src, n);
  memcpy(dest, src, len);
  if (end == 1)
    dest[len] = '\0';
  return len;
}


x86 assembly (clang, -O0):
<ueStrNCpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ueStrNBytes@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1030 <memcpy@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    1174 <ueStrNCpy+0x54>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ueStrNCpy>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <ueStrNBytes@plt>
mov    %eax,%ebp
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <memcpy@plt>
cmp    $0x1,%r14d
jne    1158 <ueStrNCpy+0x38>
movslq %ebp,%rax
movb   $0x0,(%r15,%rax,1)
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ueStrNCpy(i8* %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @ueStrNBytes(i8* %1, i64 %2)
%6 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %5)
%7 = icmp eq i32 %3, 1
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = sext i32 %5 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %8, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pagefault_enable();
int /*<<< orphan*/ preempt_enable();
void __kunmap_atomic(void *addr) {
  pagefault_enable();
  preempt_enable();
}


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

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

LLVM IR (-O0):
define void @__kunmap_atomic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pagefault_enable()
%4 = call i32 (...) @preempt_enable()
ret void
}

LLVM IR (-O2):
define void @__kunmap_atomic(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pagefault_enable()
%3 = tail call i32 (...) @preempt_enable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void xor_reg32_reg32(unsigned int reg1, unsigned int reg2) {
  put8(0x31);
  put8(0xC0 | (reg2 << 3) | reg1);
}


x86 assembly (clang, -O0):
<xor_reg32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x31,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x4(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_reg32_reg32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x31,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @xor_reg32_reg32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 49)
%6 = load i32, i32* %4
%7 = shl i32 %6, 3
%8 = or i32 192, %7
%9 = load i32, i32* %3
%10 = or i32 %8, %9
%11 = call i32 @put8(i32 %10)
ret void
}

LLVM IR (-O2):
define void @xor_reg32_reg32(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 49)
%4 = shl i32 %1, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @put8(i32 %6)
ret void
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
char *lookupw(char *);
char **lookupw_1_svc(char **argp, struct svc_req *rqstp) {
  static char *result;
  result = lookupw(*argp);
  return &result;
}


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

x86 assembly (clang, -O2):
<lookupw_1_svc>:
push   %rax
mov    (%rdi),%rdi
call   1030 <lookupw@plt>
mov    %rax,0x2f10(%rip)
lea    0x2f09(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
@lookupw_1_svc.result = internal global i8* null
define i8** @lookupw_1_svc(i8** %0, %struct.svc_req* %1) {
%3 = alloca i8**
%4 = alloca %struct.svc_req*
store i8** %0, i8*** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = call i8* @lookupw(i8* %6)
store i8* %7, i8** @lookupw_1_svc.result
ret i8** @lookupw_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@lookupw_1_svc.result = internal global i8* null
define i8** @lookupw_1_svc(i8** nocapture %0, %struct.svc_req* nocapture readnone %1) {
%3 = load i8*, i8** %0
%4 = tail call i8* @lookupw(i8* %3)
store i8* %4, i8** @lookupw_1_svc.result
ret i8** @lookupw_1_svc.result
}
const char *ls_cost_nm6_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ls_cost_nm6_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <ls_cost_nm6_name_in+0x2b>
jmp    111a <ls_cost_nm6_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <ls_cost_nm6_name_in+0x3b>
jmp    114b <ls_cost_nm6_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm6_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <ls_cost_nm6_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm6_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @ls_cost_nm6_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @ls_cost_nm6_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
int testf(int k) { return k; }


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

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

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

LLVM IR (-O2):
define i32 @testf(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int w5100_readSn_byte(unsigned int, int);
unsigned w5100_readSnTOS(unsigned sock) {
  return w5100_readSn_byte(sock, 0x0015);
}


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

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

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

LLVM IR (-O2):
define i32 @w5100_readSnTOS(i32 %0) {
%2 = tail call i32 @w5100_readSn_byte(i32 %0, i32 21)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(char *ch) {
  int i;
  while (*(ch + i) != '\0') {
    printf("%c", *(ch + i));
    i++;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1159 <print+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111c <print+0xc>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = sext i8 %6 to i32
%8 = tail call i32 @putchar(i32 %7)
%9 = add i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int __m128i;

/* Variables and functions */
__m128i __attribute__((__always___, __nodebug__))
_mm_or_si128(__m128i a, __m128i b) {
  return a | b;
}


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

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

LLVM IR (-O0):
define i32 @_mm_or_si128(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 = or i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @_mm_or_si128(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int EOF;
int read(int, char *, int);
int getter_fd(void *cookie) {
  char ch;
  int fd = (int)cookie;
  if (read(fd, &ch, 1) != 1) {
    return (EOF);
  }
  return (ch);
}


x86 assembly (clang, -O0):
<getter_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     114e <getter_fd+0x3e>
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <getter_fd+0x45>
movsbl -0x11(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getter_fd>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     1130 <getter_fd+0x20>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @getter_fd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i32
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = call i32 @read(i32 %8, i8* %4, i32 1)
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i32, i32* @EOF
store i32 %12, i32* %2
br label %16
13: ; preds = %1
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %13, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @getter_fd(i8* %0) {
%2 = alloca i8
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = call i32 @read(i32 %4, i8* %2, i32 1)
%6 = icmp eq i32 %5, 1
%7 = load i32, i32* @EOF
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = select i1 %6, i32 %9, i32 %7
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_sub(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_imm3_op();
void t16_sub_imm3() { arm_arith_sub(t16_data_imm3_op()); }


x86 assembly (clang, -O0):
<t16_sub_imm3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t16_data_imm3_op@plt>
mov    %eax,%edi
call   1030 <arm_arith_sub@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_sub_imm3>:
push   %rax
xor    %eax,%eax
call   1040 <t16_data_imm3_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <arm_arith_sub@plt>

LLVM IR (-O0):
define void @t16_sub_imm3() {
%1 = call i32 (...) @t16_data_imm3_op()
%2 = call i32 @arm_arith_sub(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_sub_imm3() {
%1 = tail call i32 (...) @t16_data_imm3_op()
%2 = tail call i32 @arm_arith_sub(i32 %1)
ret void
}
/* Variables and functions */
int a(int);
int main(int argc, char **argv) { return a(argc); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <a@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @a(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ cipher_correct_test();
int /*<<< orphan*/ cipher_speed_test();
int main(void) {
  cipher_correct_test();
  cipher_speed_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @cipher_correct_test()
%2 = tail call i32 (...) @cipher_speed_test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ writen_ni(int, char *, int);
ssize_t phmeter_getPHresult(int fd) {
  fprintf(stdout, "W PH-METER FD %d - (R)\n", fd);
  return (writen_ni(fd, "r\r", 2));
}


x86 assembly (clang, -O0):
<phmeter_getPHresult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%edi
lea    0xecb(%rip),%rsi
mov    $0x2,%edx
call   1030 <writen_ni@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phmeter_getPHresult>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
lea    0xed7(%rip),%rsi
mov    %ebx,%edi
mov    $0x2,%edx
pop    %rbx
jmp    1030 <writen_ni@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [24 x i8] c"W PH-METER FD %d - (R)\0A\00"
@.str.1 = [3 x i8] c"r\0D\00"
define i32 @phmeter_getPHresult(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @writen_ni(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 %7
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [24 x i8] c"W PH-METER FD %d - (R)\0A\00"
@.str.1 = [3 x i8] c"r\0D\00"
define i32 @phmeter_getPHresult(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @writen_ni(i32 %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_system_limits();
int main(void) {
  print_system_limits();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_system_limits()
ret i32 0
}
/* Variables and functions */
int split_me(int);
int test(void) { return split_me(0) + split_me(1) + split_me(2); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <split_me@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <split_me@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1030 <split_me@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1030 <split_me@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1030 <split_me@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0x2,%edi
call   1030 <split_me@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test() {
%1 = call i32 @split_me(i32 0)
%2 = call i32 @split_me(i32 1)
%3 = add nsw i32 %1, %2
%4 = call i32 @split_me(i32 2)
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 @split_me(i32 0)
%2 = tail call i32 @split_me(i32 1)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @split_me(i32 2)
%5 = add nsw i32 %3, %4
ret i32 %5
}
float iAbs(float a) { return a < 0 ? (-a) : a; }


x86 assembly (clang, -O0):
<iAbs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1132 <iAbs+0x32>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113c <iAbs+0x3c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iAbs>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @iAbs(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fneg float %6
br label %10
8: ; preds = %1
%9 = load float, float* %2
br label %10
10: ; preds = %8, %5
%11 = phi float [ %7, %5 ], [ %9, %8 ]
ret float %11
}

LLVM IR (-O2):
define float @iAbs(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_lt(void) { write_instr(0x1B); }


x86 assembly (clang, -O0):
<eval_lt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <write_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_lt>:
mov    $0x1b,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_lt() {
%1 = call i32 @write_instr(i32 27)
ret void
}

LLVM IR (-O2):
define void @eval_lt() {
%1 = tail call i32 @write_instr(i32 27)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_from_montgomery(uintptr_t, uintptr_t);
void fiat_p224_from_montgomery(uint64_t out1[4], const uint64_t arg1[4]) {
  internal_fiat_p224_from_montgomery((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p224_from_montgomery>:
jmp    1030 <internal_fiat_p224_from_montgomery@plt>

LLVM IR (-O0):
define void @fiat_p224_from_montgomery(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p224_from_montgomery(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_from_montgomery(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p224_from_montgomery(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(void) {
  system(
      "java -Dsongscribe=ss -splash:images/sssplash.png -jar songscribe.jar");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [69 x i8] c"java -Dsongscribe=ss -splash:images/sssplash.png -jar songscribe.jar\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [69 x i8] c"java -Dsongscribe=ss -splash:images/sssplash.png -jar songscribe.jar\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int main() {
  int arg = 0xA0000000;
  int out = 0;
  __asm__("movl %1, %0;" : "=m"(out) : "r"(arg));
  return arg == out;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa0000000,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0x0,-0x4(%rsp)
mov    $0xa0000000,%eax
mov    %eax,-0x4(%rsp)
xor    %eax,%eax
cmpl   $0xa0000000,-0x4(%rsp)
a0
sete   %al
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1610612736
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void end_increment() { printf("D.EndIncrement()\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"D.EndIncrement()\00"
define void @end_increment() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *ch_ltoa(char *, long, int);
char *ltoa(long val, char *s, int radix) { return ch_ltoa(s, val, radix); }


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

x86 assembly (clang, -O2):
<ltoa>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <ch_ltoa@plt>

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

LLVM IR (-O2):
define i8* @ltoa(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @ch_ltoa(i8* %1, i64 %0, i32 %2)
ret i8* %4
}
void g_source_get_id() {}


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

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

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

LLVM IR (-O2):
define void @g_source_get_id() {
ret void
}
/* Variables and functions */
int os_program_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @os_program_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stdout;
int difference_operator(int x, int y) {
  fputs("> difference_operator got: ", stdout);
  printf("%d, %d\n", x, y);
  return x - y;
}


x86 assembly (clang, -O0):
<difference_operator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<difference_operator>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%rdi
call   1040 <fputs@plt>
lea    0xed9(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
sub    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"> difference_operator got: \00"
@stdout = global i32 0
@.str.1 = [8 x i8] c"%d, %d\0A\00"
define i32 @difference_operator(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
@.str = [28 x i8] c"> difference_operator got: \00"
@stdout = global i32 0
@.str.1 = [8 x i8] c"%d, %d\0A\00"
define i32 @difference_operator(i32 %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1)
%6 = sub nsw i32 %0, %1
ret i32 %6
}
/* Variables and functions */
scalar_t__ malloc(int);
void function_with_leak2() {
  char *x = (char *)malloc(12);
  int m = 0;
}


x86 assembly (clang, -O0):
<function_with_leak2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_with_leak2>:
mov    $0xc,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @function_with_leak2() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i64 @malloc(i32 12)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %1
store i32 0, i32* %2
ret void
}

LLVM IR (-O2):
define void @function_with_leak2() {
%1 = tail call i64 @malloc(i32 12)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XClientMessageEvent;

/* Variables and functions */
int /*<<< orphan*/ ewmh_rootclientmessage(int /*<<< orphan*/ *);
void clientmessage(XClientMessageEvent *e) { ewmh_rootclientmessage(e); }


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

x86 assembly (clang, -O2):
<clientmessage>:
jmp    1030 <ewmh_rootclientmessage@plt>

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

LLVM IR (-O2):
define void @clientmessage(i32* %0) {
%2 = tail call i32 @ewmh_rootclientmessage(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tab(int count) {
  int x;
  for (x = 0; x < count; x++)
    printf("\t");
}


x86 assembly (clang, -O0):
<tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <tab+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <tab+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tab>:
push   %rbx
test   %edi,%edi
jle    112f <tab+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <tab+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @tab(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int Athena_Private_HideWindow(void *x) {
  if (!x)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<Athena_Private_HideWindow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <Athena_Private_HideWindow+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1126 <Athena_Private_HideWindow+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Athena_Private_HideWindow>:
cmp    $0x1,%rdi
sbb    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Athena_Private_HideWindow(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_bss_start_usage(void) {
  printf("\nUsage : bss_start\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"\0AUsage : bss_start\00"
define void @print_bss_start_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float floorf(float);
float __glsl_fract(float x) { return x - floorf(x); }


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

x86 assembly (clang, -O2):
<__glsl_fract>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <floorf@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__glsl_fract(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = call float @llvm.floor.f32(float %4)
%6 = fsub float %3, %5
ret float %6
}

LLVM IR (-O2):
define float @__glsl_fract(float %0) {
%2 = tail call float @llvm.floor.f32(float %0)
%3 = fsub float %0, %2
ret float %3
}
int capture_a(const char *carg, void *pvar) {
  char *p = pvar;
  if (!p)
    return 1;
  *p = 'a';
  return 0;
}


x86 assembly (clang, -O0):
<capture_a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    112b <capture_a+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1139 <capture_a+0x39>
mov    -0x20(%rbp),%rax
movb   $0x61,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_a>:
test   %rsi,%rsi
je     110b <capture_a+0xb>
movb   $0x61,(%rsi)
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @capture_a(i8* nocapture readnone %0, i8* writeonly %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i8 97, i8* %1
br label %5
5: ; preds = %2, %4
%6 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_1_2();
int32_t main(void) {
  setbuf(stdout, NULL);
  printf("Performing CBC tests...\n");
  test_1_2();
  printf("All CBC tests succeeded!\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_1_2@plt>
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test_1_2@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [25 x i8] c"Performing CBC tests...\0A\00"
@.str.1 = [27 x i8] c"All CBC tests succeeded!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32* null)
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @test_1_2()
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [24 x i8] c"Performing CBC tests...\00"
@str.2 = [26 x i8] c"All CBC tests succeeded!\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @test_1_2()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void I210ToARGBRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I210ToARGBRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ signal(int, void (*)(int));
void tests_sigfpe_done(void) {
  {
    signal(8, (void (*)(int))0);
    return;
  }
}


x86 assembly (clang, -O0):
<tests_sigfpe_done>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tests_sigfpe_done>:
mov    $0x8,%edi
xor    %esi,%esi
jmp    1030 <signal@plt>

LLVM IR (-O0):
define void @tests_sigfpe_done() {
%1 = call i32 @signal(i32 8, void (i32)* null)
ret void
}

LLVM IR (-O2):
define void @tests_sigfpe_done() {
%1 = tail call i32 @signal(i32 8, void (i32)* null)
ret void
}
void debug_urb_queued_for_etd(struct imx21 *imx21, struct urb *urb) {}


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

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

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

LLVM IR (-O2):
%struct.imx21 = type opaque
%struct.urb = type opaque
define void @debug_urb_queued_for_etd(%struct.imx21* nocapture %0, %struct.urb* nocapture %1) {
ret void
}
void entrar_notes_manual() {}


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

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

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

LLVM IR (-O2):
define void @entrar_notes_manual() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Squeeze(char *, char const *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s1[] =
      "C provides six operators for bit manipulation;"
      "these may only be applied to integral operands,"
      "that is, char, short, int, and long, whether signed or unsigned.";
  const char *s2 = "aeiou";
  Squeeze(s1, s2);
  printf("%s\n", s1);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0x9e,%edx
call   1050 <memcpy@plt>
lea    0xf2d(%rip),%rax
mov    %rax,-0xb8(%rbp)
lea    -0xb0(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
call   1060 <Squeeze@plt>
lea    -0xb0(%rbp),%rsi
lea    0xf0b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
lea    0xeb1(%rip),%rsi
mov    %rsp,%rbx
mov    $0x9e,%edx
mov    %rbx,%rdi
call   1050 <memcpy@plt>
lea    0xf38(%rip),%rsi
mov    %rbx,%rdi
call   1060 <Squeeze@plt>
lea    0xf2f(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [158 x i8] c"C provides six operators for bit manipulation;these may only be applied to integral operands,that is, char, short, int, and long, whether signed or unsigned.\00"
@.str = [6 x i8] c"aeiou\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [158 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [158 x i8]* %2 to i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = getelementptr inbounds [158 x i8], [158 x i8]* %2, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @Squeeze(i8* %5, i8* %6)
%8 = getelementptr inbounds [158 x i8], [158 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [158 x i8] c"C provides six operators for bit manipulation;these may only be applied to integral operands,that is, char, short, int, and long, whether signed or unsigned.\00"
@.str = [6 x i8] c"aeiou\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [158 x i8]
%2 = getelementptr inbounds [158 x i8], [158 x i8]* %1, i64 0, i64 0
%3 = call i32 @Squeeze(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
#define TPACKET_V1 129
#define TPACKET_V2 128
int __v1_rx_kernel_ready(void *);
int __v2_rx_kernel_ready(void *);
int /*<<< orphan*/ assert(int);
int __v1_v2_rx_kernel_ready(void *base, int version) {
  switch (version) {
  case TPACKET_V1:
    return __v1_rx_kernel_ready(base);
  case TPACKET_V2:
    return __v2_rx_kernel_ready(base);
  default:
    assert(!(1));
    return 0;
  }
}


x86 assembly (clang, -O0):
<__v1_v2_rx_kernel_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0x80,%eax
je     1179 <__v1_v2_rx_kernel_ready+0x49>
jmp    1155 <__v1_v2_rx_kernel_ready+0x25>
mov    -0x18(%rbp),%eax
sub    $0x81,%eax
jne    118a <__v1_v2_rx_kernel_ready+0x5a>
jmp    1168 <__v1_v2_rx_kernel_ready+0x38>
mov    -0x10(%rbp),%rdi
call   1040 <__v1_rx_kernel_ready@plt>
mov    %eax,-0x4(%rbp)
jmp    1198 <__v1_v2_rx_kernel_ready+0x68>
mov    -0x10(%rbp),%rdi
call   1050 <__v2_rx_kernel_ready@plt>
mov    %eax,-0x4(%rbp)
jmp    1198 <__v1_v2_rx_kernel_ready+0x68>
xor    %edi,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__v1_v2_rx_kernel_ready>:
cmp    $0x80,%esi
je     1145 <__v1_v2_rx_kernel_ready+0x15>
cmp    $0x81,%esi
jne    114a <__v1_v2_rx_kernel_ready+0x1a>
jmp    1040 <__v1_rx_kernel_ready@plt>
jmp    1050 <__v2_rx_kernel_ready@plt>
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__v1_v2_rx_kernel_ready(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
switch i32 %6, label %13 [
i32 129, label %7
i32 128, label %10
]
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @__v1_rx_kernel_ready(i8* %8)
store i32 %9, i32* %3
br label %15
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = call i32 @__v2_rx_kernel_ready(i8* %11)
store i32 %12, i32* %3
br label %15
13: ; preds = %2
%14 = call i32 @assert(i32 0)
store i32 0, i32* %3
br label %15
15: ; preds = %13, %10, %7
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @__v1_v2_rx_kernel_ready(i8* %0, i32 %1) {
switch i32 %1, label %7 [
i32 129, label %3
i32 128, label %5
]
3: ; preds = %2
%4 = tail call i32 @__v1_rx_kernel_ready(i8* %0)
br label %9
5: ; preds = %2
%6 = tail call i32 @__v2_rx_kernel_ready(i8* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @assert(i32 0)
br label %9
9: ; preds = %7, %5, %3
%10 = phi i32 [ 0, %7 ], [ %6, %5 ], [ %4, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ puth2(unsigned char, int /*<<< orphan*/ *);
void puth(unsigned char c, FILE *f) {
  puth2((c & 0xf0) >> 4, f);
  puth2(c & 0x0f, f);
}


x86 assembly (clang, -O0):
<puth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <puth2@plt>
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <puth2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puth>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %ebp,%eax
shr    $0x4,%al
movzbl %al,%edi
call   1030 <puth2@plt>
and    $0xf,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puth2@plt>

LLVM IR (-O0):
define void @puth(i8 zeroext %0, i32* %1) {
%3 = alloca i8
%4 = alloca i32*
store i8 %0, i8* %3
store i32* %1, i32** %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = and i32 %6, 240
%8 = ashr i32 %7, 4
%9 = trunc i32 %8 to i8
%10 = load i32*, i32** %4
%11 = call i32 @puth2(i8 zeroext %9, i32* %10)
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = and i32 %13, 15
%15 = trunc i32 %14 to i8
%16 = load i32*, i32** %4
%17 = call i32 @puth2(i8 zeroext %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @puth(i8 zeroext %0, i32* %1) {
%3 = lshr i8 %0, 4
%4 = tail call i32 @puth2(i8 zeroext %3, i32* %1)
%5 = and i8 %0, 15
%6 = tail call i32 @puth2(i8 zeroext %5, i32* %1)
ret void
}