xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void f_fpr_tracking(double a, double b, double c, double d, double e, double f,
                    double g, double h, uint8_t i) {}


x86 assembly (clang, -O0):
<f_fpr_tracking>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
mov    %edi,-0x44(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f_fpr_tracking(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i32 %8) {
ret void
}
void im_a_mlaign_func(void) {}


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

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

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

LLVM IR (-O2):
define void @im_a_mlaign_func() {
ret void
}
int test_imm_E9int64_lowword_mem(long long *val) {
  return ((*val) & (0xE9 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E9int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 233
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void YM2151Shutdown(void *_chip) {}


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

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

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

LLVM IR (-O2):
define void @YM2151Shutdown(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("prog name is %s\n", argv[0]);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"prog name is %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
bool is_space(char ch) { return ch == ' ' || (ch >= '\t' && ch <= '\r'); }


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1141 <is_space+0x41>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x3(%rbp)
jl     113b <is_space+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
sete   %al
add    $0xf7,%dil
cmp    $0x5,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_space(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %16, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 9
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 13
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ false, %6 ], [ %13, %10 ]
br label %16
16: ; preds = %14, %1
%17 = phi i1 [ true, %1 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = add i8 %0, -9
%4 = icmp ult i8 %3, 5
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void Tracking_execute_initialization() {}


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

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

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

LLVM IR (-O2):
define void @Tracking_execute_initialization() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int is_relocated(uint32_t addr, uint32_t *relocations, int reloc_count) {
  int i;
  for (i = 0; i < reloc_count; i++) {
    if (addr == relocations[i])
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_relocated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1157 <is_relocated+0x57>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jne    1144 <is_relocated+0x44>
movl   $0x1,-0x4(%rbp)
jmp    115e <is_relocated+0x5e>
jmp    1149 <is_relocated+0x49>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <is_relocated+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_relocated>:
test   %edx,%edx
jle    111f <is_relocated+0x1f>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %rdi,(%rsi,%rcx,8)
je     1122 <is_relocated+0x22>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <is_relocated+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_relocated(i64 %0, i64* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i64, i64* %1, i64 %10
%12 = load i64, i64* %11
%13 = icmp eq i64 %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ sendto(int, char const *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int _csismp_send(int send_socket, const char *buffer) {
  sendto(send_socket, buffer, strlen(buffer), 0);
}


x86 assembly (clang, -O0):
<_csismp_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <sendto@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_csismp_send>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sendto@plt>

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

LLVM IR (-O2):
define i32 @_csismp_send(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @sendto(i32 %0, i8* %1, i32 %3, i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void AnsiTerm_reset(void) {
  printf("\x1B[2J");
  printf("\x1B[0m");
  printf("\x1B[1;1H");
}


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

x86 assembly (clang, -O2):
<AnsiTerm_reset>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [7 x i8] c"\1B[1;1H\00"
define void @AnsiTerm_reset() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [7 x i8] c"\1B[1;1H\00"
define void @AnsiTerm_reset() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ CharacterIsAlphabetic(char);
scalar_t__ CharacterIsDigit(char);
int CharacterIsAlphanumeric(char ch) {
  return CharacterIsDigit(ch) || CharacterIsAlphabetic(ch);
}


x86 assembly (clang, -O0):
<CharacterIsAlphanumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <CharacterIsDigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <CharacterIsAlphanumeric+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <CharacterIsAlphabetic@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharacterIsAlphanumeric>:
push   %rbx
mov    %edi,%ebx
call   1040 <CharacterIsDigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <CharacterIsAlphanumeric+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <CharacterIsAlphabetic@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CharacterIsAlphanumeric(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @CharacterIsDigit(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @CharacterIsAlphabetic(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @CharacterIsAlphanumeric(i8 signext %0) {
%2 = tail call i64 @CharacterIsDigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @CharacterIsAlphabetic(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
float findlow(float x, float y, float z) {
  if (y < x)
    x = y;
  if (z < x)
    x = z;
  return x;
}


x86 assembly (clang, -O0):
<findlow>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <findlow+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    114d <findlow+0x4d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<findlow>:
minss  %xmm0,%xmm1
minss  %xmm1,%xmm2
movaps %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @findlow(float %0, float %1, float %2) {
%4 = fcmp olt float %1, %0
%5 = select i1 %4, float %1, float %0
%6 = fcmp ogt float %5, %2
%7 = select i1 %6, float %2, float %5
ret float %7
}
void foo22() {}


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

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

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

LLVM IR (-O2):
define void @foo22() {
ret void
}
int hostapd_select_hw_mode(struct hostapd_iface *iface) { return -100; }


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

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

LLVM IR (-O0):
%struct.hostapd_iface = type opaque
define i32 @hostapd_select_hw_mode(%struct.hostapd_iface* %0) {
%2 = alloca %struct.hostapd_iface*
store %struct.hostapd_iface* %0, %struct.hostapd_iface** %2
ret i32 -100
}

LLVM IR (-O2):
%struct.hostapd_iface = type opaque
define i32 @hostapd_select_hw_mode(%struct.hostapd_iface* nocapture readnone %0) {
ret i32 -100
}
float ANTweenTimingFunctionQuadOut(float time, float begin, float change,
                                   float duration) {
  time /= duration;
  return -change * time * (time - 2) + begin;
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionQuadOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xeb1(%rip),%xmm1
subss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenTimingFunctionQuadOut>:
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
addss  0xef0(%rip),%xmm0
mulss  %xmm2,%xmm0
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ANTweenTimingFunctionQuadOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = fdiv float %10, %9
store float %11, float* %5
%12 = load float, float* %7
%13 = fneg float %12
%14 = load float, float* %5
%15 = fmul float %13, %14
%16 = load float, float* %5
%17 = fsub float %16, 2.000000e+00
%18 = load float, float* %6
%19 = call float @llvm.fmuladd.f32(float %15, float %17, float %18)
ret float %19
}

LLVM IR (-O2):
define float @ANTweenTimingFunctionQuadOut(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fneg float %2
%7 = fmul float %5, %6
%8 = fadd float %5, -2.000000e+00
%9 = tail call float @llvm.fmuladd.f32(float %7, float %8, float %1)
ret float %9
}
void ExttNSSetAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttNSSetAuxTable() {
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn87() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn87");
  return result;
}


x86 assembly (clang, -O0):
<fn87>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn87>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn87\00"
define i8* @fn87() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn87\00"
define i8* @fn87() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
int base64_decode_length(int srclen) { return (((srclen + 3) / 4) * 3) + 1; }


x86 assembly (clang, -O0):
<base64_decode_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
imul   $0x3,%eax,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode_length>:
lea    0x3(%rdi),%eax
add    $0x6,%edi
test   %eax,%eax
cmovns %eax,%edi
sar    $0x2,%edi
lea    (%rdi,%rdi,2),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @base64_decode_length(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 3
%5 = sdiv i32 %4, 4
%6 = mul nsw i32 %5, 3
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @base64_decode_length(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = sdiv i32 %2, 4
%4 = mul nsw i32 %3, 3
%5 = add nsw i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int A[], int length) {
  int i;
  for (i = 0; i < length; i++) {
    printf("%d ", A[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ exit(int);
void *xmalloc(size_t sz) {
  void *p;
  p = calloc(1, sz);
  if (!p)
    exit(3);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <xmalloc+0x33>
mov    $0x3,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
test   %rax,%rax
je     1135 <xmalloc+0x15>
pop    %rcx
ret
mov    $0x3,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 3)
unreachable
6: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int getint();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = getint();
  printf("%d\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getint()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int chip8_font_16x10_loc(char chr) {
  return (int)(((chr & 0x0F) * 10) + (16 * 5));
}


x86 assembly (clang, -O0):
<chip8_font_16x10_loc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
imul   $0xa,%eax,%eax
add    $0x50,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chip8_font_16x10_loc>:
and    $0xf,%dil
movzbl %dil,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
movzbl %al,%eax
add    $0x50,%eax
ret

LLVM IR (-O0):
define i32 @chip8_font_16x10_loc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 15
%6 = mul nsw i32 %5, 10
%7 = add nsw i32 %6, 80
ret i32 %7
}

LLVM IR (-O2):
define i32 @chip8_font_16x10_loc(i8 signext %0) {
%2 = and i8 %0, 15
%3 = mul nuw i8 %2, 10
%4 = zext i8 %3 to i32
%5 = add nuw nsw i32 %4, 80
ret i32 %5
}
unsigned long bigmod(unsigned long a, unsigned long t, unsigned long n) {
  return (t == 1) ? (a % n) : (bigmod(a, t - 1, n) * (a % n)) % n;
}


x86 assembly (clang, -O0):
<bigmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x1,-0x10(%rbp)
jne    1144 <bigmod+0x34>
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rdx,-0x20(%rbp)
jmp    117d <bigmod+0x6d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <bigmod@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    -0x28(%rbp),%rax
imul   %rdx,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigmod>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
cmp    $0x1,%rsi
je     1158 <bigmod+0x48>
add    $0xffffffffffffffff,%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <bigmod@plt>
mov    %rax,%rcx
mov    %rbx,%rax
or     %r14,%rax
shr    $0x20,%rax
je     114b <bigmod+0x3b>
mov    %rbx,%rax
xor    %edx,%edx
div    %r14
mov    %rdx,%rbx
jmp    1154 <bigmod+0x44>
mov    %ebx,%eax
xor    %edx,%edx
div    %r14d
mov    %edx,%ebx
imul   %rcx,%rbx
mov    %rbx,%rax
or     %r14,%rax
shr    $0x20,%rax
je     1171 <bigmod+0x61>
mov    %rbx,%rax
xor    %edx,%edx
div    %r14
mov    %rdx,%rax
jmp    117a <bigmod+0x6a>
mov    %ebx,%eax
xor    %edx,%edx
div    %r14d
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @bigmod(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = icmp eq i64 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i64, i64* %4
%11 = load i64, i64* %6
%12 = urem i64 %10, %11
br label %25
13: ; preds = %3
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = sub i64 %15, 1
%17 = load i64, i64* %6
%18 = call i64 @bigmod(i64 %14, i64 %16, i64 %17)
%19 = load i64, i64* %4
%20 = load i64, i64* %6
%21 = urem i64 %19, %20
%22 = mul i64 %18, %21
%23 = load i64, i64* %6
%24 = urem i64 %22, %23
br label %25
25: ; preds = %13, %9
%26 = phi i64 [ %12, %9 ], [ %24, %13 ]
ret i64 %26
}

LLVM IR (-O2):
define i64 @bigmod(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %1, 1
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = add i64 %1, -1
%7 = tail call i64 @bigmod(i64 %0, i64 %6, i64 %2)
%8 = urem i64 %0, %2
%9 = mul i64 %8, %7
br label %10
10: ; preds = %3, %5
%11 = phi i64 [ %9, %5 ], [ %0, %3 ]
%12 = urem i64 %11, %2
ret i64 %12
}
int test_imm_52int8_mem(signed char *val) {
  return ((*val) & (0x52 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_52int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 82
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  extern char *__progname;
  fprintf(stderr, "usage: %s portnumber dir logfile\n", __progname);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s portnumber dir logfile\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ uint64Clear(int /*<<< orphan*/ *);
void uint64Destroy(uint64_t *data) {
  uint64Clear(data);
  free(data);
}


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

x86 assembly (clang, -O2):
<uint64Destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <uint64Clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @uint64Destroy(i32* %0) {
%2 = tail call i32 @uint64Clear(i32* %0)
%3 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ buf_hide_cursor();
void start_update(void) { buf_hide_cursor(); }


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

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

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

LLVM IR (-O2):
define void @start_update() {
%1 = tail call i32 (...) @buf_hide_cursor()
ret void
}
long unset_mark(long i) {
  i &= ~0x1L;
  return i;
}


x86 assembly (clang, -O0):
<unset_mark>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unset_mark>:
mov    %rdi,%rax
and    $0xfffffffffffffffe,%rax
ret

LLVM IR (-O0):
define i64 @unset_mark(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, -2
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @unset_mark(i64 %0) {
%2 = and i64 %0, -2
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
main() {
  int x;
  int *y;
  x = 2;
  printf("%d\n", x);
  printf("%p\n", &x);
  y = &x;
  printf("%d\n", *y);
  printf("%p\n", y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x2,0xc(%rsp)
lea    0xed8(%rip),%r14
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec6(%rip),%rbx
lea    0xc(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char const *, int /*<<< orphan*/);
char helper_fileexists(const char *name) { return access(name, F_OK) == 0; }


x86 assembly (clang, -O0):
<helper_fileexists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_fileexists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
test   %rax,%rax
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define signext i8 @helper_fileexists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
@F_OK = global i32 0
define signext i8 @helper_fileexists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i8
ret i8 %5
}
I0RX1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if (22 <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1143 <I0RX1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <I0RX1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0RX1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmpb   $0x16,(%r9,%rcx,1)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @I0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = icmp sgt i8 %9, 21
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ ta_oom_b(int /*<<< orphan*/);
int /*<<< orphan*/ ta_strndup_append_buffer(char **, char const *, size_t);
char *ta_talloc_strndup_append_buffer(char *s, const char *a, size_t n) {
  ta_oom_b(ta_strndup_append_buffer(&s, a, n));
  return s;
}


x86 assembly (clang, -O0):
<ta_talloc_strndup_append_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x8(%rbp),%rdi
call   1040 <ta_strndup_append_buffer@plt>
mov    %eax,%edi
call   1030 <ta_oom_b@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ta_talloc_strndup_append_buffer>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1040 <ta_strndup_append_buffer@plt>
mov    %eax,%edi
call   1030 <ta_oom_b@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @ta_talloc_strndup_append_buffer(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
store i8* %0, i8** %4
%5 = call i32 @ta_strndup_append_buffer(i8** %4, i8* %1, i64 %2)
%6 = call i32 @ta_oom_b(i32 %5)
%7 = load i8*, i8** %4
ret i8* %7
}
void EventReset(void *Handle) {}


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

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

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

LLVM IR (-O2):
define void @EventReset(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: colrm [start [stop]]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"usage: colrm [start [stop]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: colrm [start [stop]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void raio_bs_null_exit(struct raio_bs *dev) {}


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

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

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

LLVM IR (-O2):
%struct.raio_bs = type opaque
define void @raio_bs_null_exit(%struct.raio_bs* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setenv(char *, char *, int);
void fix_display() { setenv("DISPLAY", ":0", 1); }


x86 assembly (clang, -O0):
<fix_display>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_display>:
lea    0xee9(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <setenv@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"DISPLAY\00"
@.str.1 = [3 x i8] c":0\00"
define void @fix_display() {
%1 = call i32 @setenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"DISPLAY\00"
@.str.1 = [3 x i8] c":0\00"
define void @fix_display() {
%1 = tail call i32 @setenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
unsigned long RGB2HSL93(unsigned long);
unsigned long rgb2hsl(unsigned long rgb) { return RGB2HSL93(rgb); }


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

x86 assembly (clang, -O2):
<rgb2hsl>:
jmp    1030 <RGB2HSL93@plt>

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

LLVM IR (-O2):
define i64 @rgb2hsl(i64 %0) {
%2 = tail call i64 @RGB2HSL93(i64 %0)
ret i64 %2
}
/* Variables and functions */
int strcmp_dirorder(char *, char *, int /*<<< orphan*/);
int strcmp_dirorder_nofold(char *s1, char *s2) {
  return strcmp_dirorder(s1, s2, 0);
}


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

x86 assembly (clang, -O2):
<strcmp_dirorder_nofold>:
xor    %edx,%edx
jmp    1030 <strcmp_dirorder@plt>

LLVM IR (-O0):
define i32 @strcmp_dirorder_nofold(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 @strcmp_dirorder(i8* %5, i8* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcmp_dirorder_nofold(i8* %0, i8* %1) {
%3 = tail call i32 @strcmp_dirorder(i8* %0, i8* %1, i32 0)
ret i32 %3
}
int main(int argc, char **argv) {
  __asm__ __volatile__("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pause
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}