xunge/DecIR huggingface dataset:
int min(int a, int b, int c) {
  int min;
  min = a;
  if (min > b)
    min = b;
  if (min > c)
    min = c;
  return (min);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1125 <min+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1137 <min+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
cmp    %edx,%eax
cmovg  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %2, i32 %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("hello, world"); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"hello, world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_B6int32_mem(int *val) {
  return ((*val) & (0xB6 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B6int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 182
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int WstrcmpN(char *p1, char *p2, int N) {
  while (N && (*p1++ == *p2++))
    N--;
  return (!N);
}


x86 assembly (clang, -O0):
<WstrcmpN>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
je     114a <WstrcmpN+0x4a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    115a <WstrcmpN+0x5a>
jmp    1168 <WstrcmpN+0x68>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <WstrcmpN+0xf>
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<WstrcmpN>:
test   %edx,%edx
je     1136 <WstrcmpN+0x36>
add    $0xffffffff,%edx
xor    %eax,%eax
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%r8d
movzbl (%rsi,%rax,1),%r9d
cmp    %r9b,%r8b
jne    112d <WstrcmpN+0x2d>
mov    %rax,%rcx
add    $0x1,%rcx
cmp    %eax,%edx
mov    %rcx,%rax
jne    1110 <WstrcmpN+0x10>
xor    %eax,%eax
cmp    %r9b,%r8b
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @WstrcmpN(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
br label %7
7: ; preds = %22, %3
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %4
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %5
%17 = load i8, i8* %15
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %14, %18
br label %20
20: ; preds = %10, %7
%21 = phi i1 [ false, %7 ], [ %19, %10 ]
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i32, i32* %6
%24 = add nsw i32 %23, -1
store i32 %24, i32* %6
br label %7
25: ; preds = %20
%26 = load i32, i32* %6
%27 = icmp ne i32 %26, 0
%28 = xor i1 %27, true
%29 = zext i1 %28 to i32
ret i32 %29
}

LLVM IR (-O2):
define i32 @WstrcmpN(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %20, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %15, %5 ], [ %2, %3 ]
%7 = phi i8* [ %13, %5 ], [ %1, %3 ]
%8 = phi i8* [ %14, %5 ], [ %0, %3 ]
%9 = load i8, i8* %8
%10 = load i8, i8* %7
%11 = icmp eq i8 %9, %10
%12 = xor i1 %11, true
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = add nsw i32 %6, -1
%16 = icmp eq i32 %15, 0
%17 = select i1 %12, i1 true, i1 %16
br i1 %17, label %18, label %5
18: ; preds = %5
%19 = zext i1 %11 to i32
br label %20
20: ; preds = %18, %3
%21 = phi i32 [ 1, %3 ], [ %19, %18 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void shr_reg32_imm8(unsigned long reg32, unsigned char imm8) {
  put8(0xC1);
  put8(0xE8 + reg32);
  put8(imm8);
}


x86 assembly (clang, -O0):
<shr_reg32_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    $0xc1,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
add    $0xe8,%rax
movzbl %al,%edi
call   1030 <put8@plt>
movzbl -0x9(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shr_reg32_imm8>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0xc1,%edi
call   1030 <put8@plt>
add    $0xe8,%bl
movzbl %bl,%edi
call   1030 <put8@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @shr_reg32_imm8(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = call i32 @put8(i8 zeroext -63)
%6 = load i64, i64* %3
%7 = add i64 232, %6
%8 = trunc i64 %7 to i8
%9 = call i32 @put8(i8 zeroext %8)
%10 = load i8, i8* %4
%11 = call i32 @put8(i8 zeroext %10)
ret void
}

LLVM IR (-O2):
define void @shr_reg32_imm8(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @put8(i8 zeroext -63)
%4 = trunc i64 %0 to i8
%5 = add i8 %4, -24
%6 = tail call i32 @put8(i8 zeroext %5)
%7 = tail call i32 @put8(i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
main() {
  void strcat(char *, char *);
  char s[] = "TEST";
  char *t = "DESU";
  strcat(s, t);
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x1(%rbp)
lea    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x5(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
lea    -0x5(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x54534554,0x8(%rsp)
54
lea    0xecc(%rip),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.s = [5 x i8] c"TEST\00"
@.str = [5 x i8] c"DESU\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void sync() { anvil_syslog(0, "%s unimplemented %s\n", __FUNCTION__); }


x86 assembly (clang, -O0):
<sync>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
lea    0xef1(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync>:
lea    0xee9(%rip),%rsi
lea    0xef7(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <anvil_syslog@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%s unimplemented %s\0A\00"
@__FUNCTION__.sync = [5 x i8] c"sync\00"
define void @sync() {
%1 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.sync, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s unimplemented %s\0A\00"
@__FUNCTION__.sync = [5 x i8] c"sync\00"
define void @sync() {
%1 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.sync, i64 0, i64 0))
ret void
}
/* Type definitions */
struct mt19937_state {
  int dummy;
};

/* Variables and functions */
double mt19937_genrand_int32(struct mt19937_state *);
double mt19937_genrand_real2(struct mt19937_state *rng) {
  return mt19937_genrand_int32(rng) * (1.0 / 4294967296.0);
}


x86 assembly (clang, -O0):
<mt19937_genrand_real2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mt19937_genrand_int32@plt>
movsd  0xed3(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt19937_genrand_real2>:
push   %rax
call   1030 <mt19937_genrand_int32@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.mt19937_state = type { i32 }
define double @mt19937_genrand_real2(%struct.mt19937_state* %0) {
%2 = alloca %struct.mt19937_state*
store %struct.mt19937_state* %0, %struct.mt19937_state** %2
%3 = load %struct.mt19937_state*, %struct.mt19937_state** %2
%4 = call double @mt19937_genrand_int32(%struct.mt19937_state* %3)
%5 = fmul double %4, 0x3DF0000000000000
ret double %5
}

LLVM IR (-O2):
%struct.mt19937_state = type { i32 }
define double @mt19937_genrand_real2(%struct.mt19937_state* %0) {
%2 = tail call double @mt19937_genrand_int32(%struct.mt19937_state* %0)
%3 = fmul double %2, 0x3DF0000000000000
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int enterChoice(void) {
  int menuChoice;
  printf("Enter your choice\n"
         "1 - store a formatted text file of accounts called\n"
         "    \"transactions.txt\" for printing\n"
         "2 - add a new transaction\n"
         "3 - end program\n? ");
  scanf("%d", &menuChoice);
  fflush(stdin);
  return menuChoice;
}


x86 assembly (clang, -O0):
<enterChoice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enterChoice>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [150 x i8] c"Enter your choice\0A1 - store a formatted text file of accounts called\0A \22transactions.txt\22 for printing\0A2 - add a new transaction\0A3 - end program\0A? \00"
@.str.1 = [3 x i8] c"%d\00"
@stdin = global i32 0
define i32 @enterChoice() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* @stdin
%5 = call i32 @fflush(i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [150 x i8] c"Enter your choice\0A1 - store a formatted text file of accounts called\0A \22transactions.txt\22 for printing\0A2 - add a new transaction\0A3 - end program\0A? \00"
@.str.1 = [3 x i8] c"%d\00"
@stdin = global i32 0
define i32 @enterChoice() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* @stdin
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ display_user_list();
int read_user() {
  display_user_list();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @read_user() {
%1 = call i32 (...) @display_user_list()
ret i32 0
}

LLVM IR (-O2):
define i32 @read_user() {
%1 = tail call i32 (...) @display_user_list()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void callback(char *k, char *v) { printf("%s = \"%s\"\n", k, v); }


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

x86 assembly (clang, -O2):
<callback>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s = \22%s\22\0A\00"
define void @callback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s = \22%s\22\0A\00"
define void @callback(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
void RTTimeProgramNanoTS(void) {}


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

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

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

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

/* Variables and functions */
int setreuid(int, int /*<<< orphan*/);
int seteuid(uid_t uid) { return setreuid(-1, uid); }


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

x86 assembly (clang, -O2):
<seteuid>:
mov    %edi,%esi
mov    $0xffffffff,%edi
jmp    1030 <setreuid@plt>

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

LLVM IR (-O2):
define i32 @seteuid(i32 %0) {
%2 = tail call i32 @setreuid(i32 -1, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char simvol;
  scanf("%c", &simvol);
  printf("%c\n", ('z' - (simvol - 'a')));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
lea    0xeaf(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 97
%7 = sub nsw i32 122, %6
%8 = trunc i32 %7 to i8
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
double quickselect_weight_double(double, int, double *, double *, double,
                                 double);
double quickselect_weight(double W0, int n, double *arr, double *weight,
                          double wl, double wr) {
  return quickselect_weight_double(W0, n, arr, weight, wl, wr);
}


x86 assembly (clang, -O0):
<quickselect_weight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
call   1030 <quickselect_weight_double@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickselect_weight>:
jmp    1030 <quickselect_weight_double@plt>

LLVM IR (-O0):
define double @quickselect_weight(double %0, i32 %1, double* %2, double* %3, double %4, double %5) {
%7 = alloca double
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store i32 %1, i32* %8
store double* %2, double** %9
store double* %3, double** %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load i32, i32* %8
%15 = load double*, double** %9
%16 = load double*, double** %10
%17 = load double, double* %11
%18 = load double, double* %12
%19 = call double @quickselect_weight_double(double %13, i32 %14, double* %15, double* %16, double %17, double %18)
ret double %19
}

LLVM IR (-O2):
define double @quickselect_weight(double %0, i32 %1, double* %2, double* %3, double %4, double %5) {
%7 = tail call double @quickselect_weight_double(double %0, i32 %1, double* %2, double* %3, double %4, double %5)
ret double %7
}
unsigned long t2(unsigned long w) {
  if ((w & 0xffff0000) == 0) {
    if (w == 0)
      w = 2;
  }
  return w;
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xffff0000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
jne    1138 <t2+0x38>
cmpq   $0x0,-0x8(%rbp)
jne    1133 <t2+0x33>
movq   $0x2,-0x8(%rbp)
jmp    1138 <t2+0x38>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
test   %rdi,%rdi
mov    $0x2,%eax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
define i64 @t2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 4294901760
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
store i64 2, i64* %2
br label %10
10: ; preds = %9, %6
br label %11
11: ; preds = %10, %1
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
define i64 @t2(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 2, i64 %0
ret i64 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t setBit_fun_uint8_t(uint8_t x, uint32_t i) { return x | 1 << i; }


x86 assembly (clang, -O0):
<setBit_fun_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @setBit_fun_uint8_t(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void version_help(void) {
  fputs("usage: unrez version\n"
        "Print the UnRez version.\n",
        stdout);
}


x86 assembly (clang, -O0):
<version_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"usage: unrez version\0APrint the UnRez version.\0A\00"
@stdout = global i32 0
define void @version_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"usage: unrez version\0APrint the UnRez version.\0A\00"
@stdout = global i32 0
define void @version_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Y3w6(int /*<<< orphan*/);
int /*<<< orphan*/ Zstr(char *);
void ZthrowCstringInit(char *text) { Y3w6(Zstr(text)); }


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

x86 assembly (clang, -O2):
<ZthrowCstringInit>:
push   %rax
call   1030 <Zstr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <Y3w6@plt>

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

LLVM IR (-O2):
define void @ZthrowCstringInit(i8* %0) {
%2 = tail call i32 @Zstr(i8* %0)
%3 = tail call i32 @Y3w6(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ OSReadSwapInt32(int /*<<< orphan*/ *, int /*<<< orphan*/);
uint32_t _OSSwapInt32(uint32_t data) { return OSReadSwapInt32(&data, 0); }


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

x86 assembly (clang, -O2):
<_OSSwapInt32>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
call   1030 <OSReadSwapInt32@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_OSSwapInt32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @OSReadSwapInt32(i32* %2, i32 0)
ret i32 %3
}
void exp46(int x, int y, int z) {
  if ((x == y) & z) {
  }
}


x86 assembly (clang, -O0):
<exp46>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     112c <exp46+0x2c>
jmp    112c <exp46+0x2c>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @exp46(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* %4
%8 = load i32, i32* %5
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
br label %15
15: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
define void @exp46(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ usage(char *);
void userErrorInt(char *format, int var) {
  char userErrorMsg[1000];
  sprintf(userErrorMsg, format, var);
  usage(userErrorMsg);
}


x86 assembly (clang, -O0):
<userErrorInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x400(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x400(%rbp),%rdi
call   1030 <usage@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<userErrorInt>:
push   %rbx
sub    $0x3f0,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <usage@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @userErrorInt(i8* nocapture %0, i32 %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) %0, i32 %1)
%6 = call i32 @usage(i8* %4)
ret void
}
/* Variables and functions */
scalar_t__ memcmp(unsigned char *, char *, int);
bool valid_header(unsigned char *patchf) {
  return (memcmp(patchf, "BSDIFF40", 8) == 0);
}


x86 assembly (clang, -O0):
<valid_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x8,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_header>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x8,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"BSDIFF40\00"
define i32 @valid_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @memcmp(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [9 x i8] c"BSDIFF40\00"
define i32 @valid_header(i8* %0) {
%2 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned xrop3_153_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned stk1;
  stk1 = D ^ S;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_153_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_153_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
xor    $0xffffff00,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_153_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = xor i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = xor i32 %17, -1
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = load i32, i32* %6
%21 = xor i32 %20, -1
%22 = and i32 %19, %21
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = and i32 %23, %24
%26 = or i32 %22, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @xrop3_153_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i32 %4, -256
ret i32 %5
}
/* Variables and functions */
int binary_search_recursive_internal(int const *, int, int /*<<< orphan*/, int);
int binary_search_recursive(const int array[], int length, int element) {
  return binary_search_recursive_internal(array, element, 0, length - 1);
}


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

x86 assembly (clang, -O2):
<binary_search_recursive>:
lea    -0x1(%rsi),%ecx
mov    %edx,%esi
xor    %edx,%edx
jmp    1030 <binary_search_recursive_internal@plt>

LLVM IR (-O0):
define i32 @binary_search_recursive(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** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 1
%11 = call i32 @binary_search_recursive_internal(i32* %7, i32 %8, i32 0, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @binary_search_recursive(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @binary_search_recursive_internal(i32* %0, i32 %2, i32 0, i32 %4)
ret i32 %5
}
int ispref(char c) {
  if (c == '^') {
    return 3;
  } else if (c == '*' || c == '/') {
    return 2;
  } else if (c == '+' || c == '-') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<ispref>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x5e,%eax
jne    1123 <ispref+0x23>
movl   $0x3,-0x4(%rbp)
jmp    1176 <ispref+0x76>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     113d <ispref+0x3d>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    1149 <ispref+0x49>
movl   $0x2,-0x4(%rbp)
jmp    1176 <ispref+0x76>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     1163 <ispref+0x63>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    116f <ispref+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    1176 <ispref+0x76>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispref>:
lea    -0x2a(%rdi),%eax
cmp    $0x5,%al
ja     1127 <ispref+0x27>
movzbl %al,%eax
lea    0xeef(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%eax
ret
mov    $0x1,%eax
jmp    1132 <ispref+0x32>
mov    $0x3,%eax
cmp    $0x5e,%dil
jne    1133 <ispref+0x33>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ispref(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 94
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 3, i32* %2
br label %27
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 42
br i1 %11, label %16, label %12
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 47
br i1 %15, label %16, label %17
16: ; preds = %12, %8
store i32 2, i32* %2
br label %27
17: ; preds = %12
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 43
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 45
br i1 %24, label %25, label %26
25: ; preds = %21, %17
store i32 1, i32* %2
br label %27
26: ; preds = %21
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25, %16, %7
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @ispref(i8 signext %0) {
switch i8 %0, label %2 [
i8 94, label %5
i8 47, label %3
i8 42, label %3
i8 45, label %4
i8 43, label %4
]
2: ; preds = %1
br label %5
3: ; preds = %1, %1
br label %5
4: ; preds = %1, %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i32 [ 0, %2 ], [ 3, %1 ], [ 2, %3 ], [ 1, %4 ]
ret i32 %6
}
float fmaxf(float x, float y) { return (x > y) ? x : y; }


x86 assembly (clang, -O0):
<fmaxf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <fmaxf+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <fmaxf+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxf>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fmaxf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @fmaxf(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_mul_uint(struct Var *avar, const char *areg, const char *lreg,
                     const char *rreg) {
  pA("%s = %s * %s;", areg, lreg, rreg);
}


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

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s * %s;\00"
define void @__func_mul_uint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s * %s;\00"
define void @__func_mul_uint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
void pr21668_1(__attribute__((nonnull)) const char *p, const char *s) {
  if (p)
    ;
  if (s)
    ;
}


x86 assembly (clang, -O0):
<pr21668_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111c <pr21668_1+0x1c>
jmp    111c <pr21668_1+0x1c>
cmpq   $0x0,-0x10(%rbp)
je     112c <pr21668_1+0x2c>
jmp    112c <pr21668_1+0x2c>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pr21668_1(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void menu_prompt(int timeout) {
  if (timeout)
    printf("Please choose (default will boot in %u seconds):", timeout);
  else
    printf("Please choose:");
}


x86 assembly (clang, -O0):
<menu_prompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113b <menu_prompt+0x2b>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1149 <menu_prompt+0x39>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_prompt>:
test   %edi,%edi
je     1124 <menu_prompt+0x14>
mov    %edi,%esi
lea    0xee3(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf06(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"Please choose (default will boot in %u seconds):\00"
@.str.1 = [15 x i8] c"Please choose:\00"
define void @menu_prompt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"Please choose (default will boot in %u seconds):\00"
@.str.1 = [15 x i8] c"Please choose:\00"
define void @menu_prompt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
int tReturn(int a, int b) { return (a > b ? 1 : 0); }


x86 assembly (clang, -O0):
<tReturn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tReturn>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @tReturn(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 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @tReturn(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int kbase_platform_early_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kbase_platform_early_init() {
ret i32 0
}
void OPENSSL_cleanse(char *dest, int len) {
  int i;
  for (i = 0; i < len; i++) {
    dest[i] = 0;
  }
}


x86 assembly (clang, -O0):
<OPENSSL_cleanse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <OPENSSL_cleanse+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <OPENSSL_cleanse+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPENSSL_cleanse>:
test   %esi,%esi
jle    1122 <OPENSSL_cleanse+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @OPENSSL_cleanse(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long above;
};
struct TYPE_4__ {
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigure_above(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xconfigure.above = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xconfigure_above(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigure_above(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
unsigned int fibonacci1(int n) {
  if (n <= 1)
    return n;
  return fibonacci1(n - 1) + fibonacci1(n - 2);
}


x86 assembly (clang, -O0):
<fibonacci1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1130 <fibonacci1+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibonacci1+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci1@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci1@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fibonacci1+0x10>
mov    %ebx,%ecx
jmp    1144 <fibonacci1+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibonacci1@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fibonacci1+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci1(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacci1(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add i32 %13, %12
ret i32 %14
}
void asd_dump_scb_sites(struct asd_ha_struct *asd_ha) {}


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

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

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

LLVM IR (-O2):
%struct.asd_ha_struct = type opaque
define void @asd_dump_scb_sites(%struct.asd_ha_struct* nocapture %0) {
ret void
}
void VMR3Resume(void) {}


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

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

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

LLVM IR (-O2):
define void @VMR3Resume() {
ret void
}
int get_line_length(void) {
  int ret = 80;
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @get_line_length() {
ret i32 80
}