xunge/DecIR huggingface dataset:
int Q_isprintext(int c) {
  if (c >= 0x20 && c <= 0x7E)
    return (1);
  if (c >= 0x80 && c <= 0xFE)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<Q_isprintext>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jl     1127 <Q_isprintext+0x27>
cmpl   $0x7e,-0x8(%rbp)
jg     1127 <Q_isprintext+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1154 <Q_isprintext+0x54>
cmpl   $0x80,-0x8(%rbp)
jl     114d <Q_isprintext+0x4d>
cmpl   $0xfe,-0x8(%rbp)
jg     114d <Q_isprintext+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1154 <Q_isprintext+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_isprintext>:
lea    -0x20(%rdi),%eax
cmp    $0x5f,%eax
setb   %al
add    $0xffffff80,%edi
cmp    $0x7f,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @Q_isprintext(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = add i32 %0, -128
%5 = icmp ult i32 %4, 127
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_avg_pu16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_avg_pu16(__m64 a, __m64 b) { return _mm_avg_pu16(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_avg_pu16>:
jmp    1030 <_mm_avg_pu16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_avg_pu16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_avg_pu16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
char *long2str(char *, int);
int s_pos(char *, char *);
char *macpos(char *arg) {
  int i;
  char arg2[10240];
  get_string(arg2);
  get_string(arg);
  i = s_pos(arg, arg2);
  return (long2str(arg, i));
}


x86 assembly (clang, -O0):
<macpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2810,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x2810(%rbp),%rdi
call   1030 <get_string@plt>
mov    -0x8(%rbp),%rdi
call   1030 <get_string@plt>
mov    -0x8(%rbp),%rdi
lea    -0x2810(%rbp),%rsi
call   1050 <s_pos@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <long2str@plt>
add    $0x2810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macpos>:
push   %r14
push   %rbx
sub    $0x2808,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <get_string@plt>
mov    %rbx,%rdi
call   1030 <get_string@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <s_pos@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <long2str@plt>
add    $0x2808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @macpos(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [10240 x i8]
store i8* %0, i8** %2
%5 = getelementptr inbounds [10240 x i8], [10240 x i8]* %4, i64 0, i64 0
%6 = call i32 @get_string(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @get_string(i8* %7)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [10240 x i8], [10240 x i8]* %4, i64 0, i64 0
%11 = call i32 @s_pos(i8* %9, i8* %10)
store i32 %11, i32* %3
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = call i8* @long2str(i8* %12, i32 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @macpos(i8* %0) {
%2 = alloca [10240 x i8]
%3 = getelementptr inbounds [10240 x i8], [10240 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_string(i8* %3)
%5 = call i32 @get_string(i8* %0)
%6 = call i32 @s_pos(i8* %0, i8* %3)
%7 = call i8* @long2str(i8* %0, i32 %6)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int putint(int _) { printf("%d", _); }


x86 assembly (clang, -O0):
<putint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putint>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @putint(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
double clamp(double x, double min, double max) {
  if (x > max)
    return max;
  else if (x < min)
    return min;
  else
    return x;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1132 <clamp+0x32>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <clamp+0x5f>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1155 <clamp+0x55>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <clamp+0x5f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
maxsd  %xmm0,%xmm1
movapd %xmm2,%xmm3
cmpltsd %xmm0,%xmm3
movapd %xmm3,%xmm0
andnpd %xmm1,%xmm0
andpd  %xmm2,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,%xmm0
ret

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

LLVM IR (-O2):
define double @clamp(double %0, double %1, double %2) {
%4 = fcmp ogt double %0, %2
%5 = fcmp olt double %0, %1
%6 = select i1 %5, double %1, double %0
%7 = select i1 %4, double %2, double %6
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int android_atomic_cas(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/ volatile *);
int /*<<< orphan*/ android_memory_barrier();
extern int android_atomic_acquire_cas(int32_t old_value, int32_t new_value,
                                      volatile int32_t *ptr) {
  int status = android_atomic_cas(old_value, new_value, ptr);
  android_memory_barrier();
  return status;
}


x86 assembly (clang, -O0):
<android_atomic_acquire_cas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <android_atomic_cas@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <android_memory_barrier@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_atomic_acquire_cas>:
push   %rbx
call   1040 <android_atomic_cas@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <android_memory_barrier@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @android_atomic_acquire_cas(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
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = call i32 @android_atomic_cas(i32 %8, i32 %9, i32* %10)
store i32 %11, i32* %7
%12 = call i32 (...) @android_memory_barrier()
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @android_atomic_acquire_cas(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @android_atomic_cas(i32 %0, i32 %1, i32* %2)
%5 = tail call i32 (...) @android_memory_barrier()
ret i32 %4
}
void LABELED() {}


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

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

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

LLVM IR (-O2):
define void @LABELED() {
ret void
}
/* Variables and functions */
scalar_t__ floorf(float);
int cbuiltin_entierf(float x) { return (int)floorf(x); }


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

x86 assembly (clang, -O2):
<cbuiltin_entierf>:
jmp    1030 <floorf@plt>

LLVM IR (-O0):
define i32 @cbuiltin_entierf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @floorf(float %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @cbuiltin_entierf(float %0) {
%2 = tail call i64 @floorf(float %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void task_idle(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<task_idle>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <task_idle+0x9>
jmp    1109 <task_idle+0x9>

x86 assembly (clang, -O2):
<task_idle>:
jmp    1100 <task_idle>

LLVM IR (-O0):
define void @task_idle() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @task_idle() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int *p;
  p = (int *)malloc(sizeof(int) * 20);
  *(p + 2) = 10;
  *(p + 3) = 20;
  printf("%d\n%d\n", *(p + 3), *(p + 2));
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x50,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xa,0x8(%rax)
mov    -0x10(%rbp),%rax
movl   $0x14,0xc(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%edx
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x50,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movabs $0x140000000a,%rax
mov    %rax,0x8(%rbx)
lea    0xead(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 80)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 2
store i32 10, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 3
store i32 20, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
%11 = load i32, i32* %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %14)
%16 = load i32*, i32** %2
%17 = call i32 @free(i32* %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 80)
%2 = inttoptr i64 %1 to i32*
%3 = getelementptr inbounds i32, i32* %2, i64 2
store i32 10, i32* %3
%4 = getelementptr inbounds i32, i32* %2, i64 3
store i32 20, i32* %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 20, i32 10)
%6 = tail call i32 @free(i32* %2)
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void r_set_na_real_(double *val) {
  int64_t x = 0x7FF00000000007A2LL;
  memcpy((void *)val, (void *)&x, 8);
}


x86 assembly (clang, -O0):
<r_set_na_real_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x7a2,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_set_na_real_>:
push   %rax
movl   $0x7a2,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @r_set_na_real_(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 1954, i32* %3
%4 = load double*, double** %2
%5 = bitcast double* %4 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 8)
ret void
}

LLVM IR (-O2):
define void @r_set_na_real_(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1954, i32* %2
%4 = bitcast double* %0 to i8*
%5 = call i32 @memcpy(i8* %4, i8* %3, i32 8)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int is_help_option(const char *arg) {
  return (arg[1] == 'h' && arg[2] == '\0') || (strcmp(arg, "--help") == 0);
}


x86 assembly (clang, -O0):
<is_help_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x68,%eax
jne    1143 <is_help_option+0x33>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     115d <is_help_option+0x4d>
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_help_option>:
push   %rax
cmpb   $0x68,0x1(%rdi)
jne    111d <is_help_option+0xd>
cmpb   $0x0,0x2(%rdi)
je     1136 <is_help_option+0x26>
lea    0xedc(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"--help\00"
define i32 @is_help_option(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 104
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %8, %1
%15 = load i8*, i8** %2
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br label %18
18: ; preds = %14, %8
%19 = phi i1 [ true, %8 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
@.str = [7 x i8] c"--help\00"
define i32 @is_help_option(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 104
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5, %1
%10 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %9, %5
%14 = phi i32 [ 1, %5 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
int func();
int main() { return func(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ eFree(char *);
char *popString();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ remove(char *);
void basKill() {
  char *name = popString();
  remove(name);
  eFree(name);
  pushNumber(0);
}


x86 assembly (clang, -O0):
<basKill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
mov    -0x8(%rbp),%rdi
call   1040 <eFree@plt>
xor    %edi,%edi
call   1060 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basKill>:
push   %rbx
xor    %eax,%eax
call   1050 <popString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <remove@plt>
mov    %rbx,%rdi
call   1040 <eFree@plt>
xor    %edi,%edi
pop    %rbx
jmp    1060 <pushNumber@plt>

LLVM IR (-O0):
define void @basKill() {
%1 = alloca i8*
%2 = call i8* (...) @popString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @remove(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @eFree(i8* %5)
%7 = call i32 @pushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @basKill() {
%1 = tail call i8* (...) @popString()
%2 = tail call i32 @remove(i8* %1)
%3 = tail call i32 @eFree(i8* %1)
%4 = tail call i32 @pushNumber(i32 0)
ret void
}
/* Type definitions */
struct ListHead {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct ListHead *);
int /*<<< orphan*/ ListDel(struct ListHead *);
void ListDelInit(struct ListHead *entry) {
  ListDel(entry);
  INIT_LIST_HEAD(entry);
}


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

x86 assembly (clang, -O2):
<ListDelInit>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ListDel@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.ListHead = type { i32 }
define void @ListDelInit(%struct.ListHead* %0) {
%2 = alloca %struct.ListHead*
store %struct.ListHead* %0, %struct.ListHead** %2
%3 = load %struct.ListHead*, %struct.ListHead** %2
%4 = call i32 @ListDel(%struct.ListHead* %3)
%5 = load %struct.ListHead*, %struct.ListHead** %2
%6 = call i32 @INIT_LIST_HEAD(%struct.ListHead* %5)
ret void
}

LLVM IR (-O2):
%struct.ListHead = type { i32 }
define void @ListDelInit(%struct.ListHead* %0) {
%2 = tail call i32 @ListDel(%struct.ListHead* %0)
%3 = tail call i32 @INIT_LIST_HEAD(%struct.ListHead* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void function() {
  int var = 5;
  static int static_var = 5;
  printf("\t[in function] var = %d\n", var);
  printf("\t[in function] static_var = %d\n", static_var);
  var++;
  static_var++;
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ef4(%rip),%esi
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    0x2ed9(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ed0(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    0x2f00(%rip),%esi
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
addl   $0x1,0x2eed(%rip)
pop    %rax
ret

LLVM IR (-O0):
@function.static_var = internal global i32 5
@.str = [25 x i8] c"\09[in function] var = %d\0A\00"
@.str.1 = [32 x i8] c"\09[in function] static_var = %d\0A\00"
define void @function() {
%1 = alloca i32
store i32 5, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @function.static_var
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = load i32, i32* @function.static_var
%9 = add nsw i32 %8, 1
store i32 %9, i32* @function.static_var
ret void
}

LLVM IR (-O2):
@function.static_var = internal unnamed_addr global i32 5
@.str = [25 x i8] c"\09[in function] var = %d\0A\00"
@.str.1 = [32 x i8] c"\09[in function] static_var = %d\0A\00"
define void @function() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = load i32, i32* @function.static_var
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @function.static_var
%5 = add nsw i32 %4, 1
store i32 %5, i32* @function.static_var
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inv_sleep(unsigned long);
void udelay(unsigned long usecs) { inv_sleep((usecs + 999) / 1000); }


x86 assembly (clang, -O0):
<udelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3e7,%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
call   1030 <inv_sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udelay>:
lea    0x3e7(%rdi),%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
mov    %rdx,%rdi
shr    $0x4,%rdi
jmp    1030 <inv_sleep@plt>

LLVM IR (-O0):
define void @udelay(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 999
%5 = udiv i64 %4, 1000
%6 = call i32 @inv_sleep(i64 %5)
ret void
}

LLVM IR (-O2):
define void @udelay(i64 %0) {
%2 = add i64 %0, 999
%3 = udiv i64 %2, 1000
%4 = tail call i32 @inv_sleep(i64 %3)
ret void
}
void foo399(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo399(i32 %0) {
ret void
}
int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len) {}


x86 assembly (clang, -O0):
<skb_copy_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sk_buff = type opaque
define i32 @skb_copy_bits(%struct.sk_buff* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.sk_buff*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store %struct.sk_buff* %0, %struct.sk_buff** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
%struct.sk_buff = type opaque
define i32 @skb_copy_bits(%struct.sk_buff* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printNChars(char *, int);
int stringlength(char *);
void printf(char *s) {
  int length = stringlength(s);
  printNChars(s, length);
}


x86 assembly (clang, -O0):
<printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <stringlength@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <printNChars@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf>:
push   %rbx
mov    %rdi,%rbx
call   1040 <stringlength@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <printNChars@plt>

LLVM IR (-O0):
define void @printf(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stringlength(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = call i32 @printNChars(i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @printf(i8* %0) {
%2 = tail call i32 @stringlength(i8* %0)
%3 = tail call i32 @printNChars(i8* %0, i32 %2)
ret void
}
extern long MulDiv(long a, long b, long c) {
  return ((unsigned long long)a * (unsigned long long)b) / c;
}


x86 assembly (clang, -O0):
<MulDiv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MulDiv>:
mov    %rdx,%rcx
mov    %rdi,%rax
imul   %rsi,%rax
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111c <MulDiv+0x1c>
xor    %edx,%edx
div    %rcx
ret
xor    %edx,%edx
div    %ecx
ret

LLVM IR (-O0):
define i64 @MulDiv(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* %4
%8 = load i64, i64* %5
%9 = mul i64 %7, %8
%10 = load i64, i64* %6
%11 = udiv i64 %9, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @MulDiv(i64 %0, i64 %1, i64 %2) {
%4 = mul i64 %1, %0
%5 = udiv i64 %4, %2
ret i64 %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int next_dobldobl_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(507, &k, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<next_dobldobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1fb,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_dobldobl_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1fb,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @next_dobldobl_solution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 507, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @next_dobldobl_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 507, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
long evalband();
scalar_t__ test(char *);
long evalbxor() {
  long val;
  for (val = evalband(); test("^");)
    val = val ^ evalband();
  return (val);
}


x86 assembly (clang, -O0):
<evalbxor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <evalband@plt>
mov    %rax,-0x8(%rbp)
lea    0xec6(%rip),%rdi
call   1040 <test@plt>
cmp    $0x0,%rax
je     116b <evalbxor+0x4b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <evalband@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <evalbxor+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalbxor>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <evalband@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdi
call   1040 <test@plt>
test   %rax,%rax
je     1167 <evalbxor+0x47>
lea    0xeba(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <evalband@plt>
xor    %rax,%rbx
mov    %r14,%rdi
call   1040 <test@plt>
test   %rax,%rax
jne    1150 <evalbxor+0x30>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"^\00"
define i64 @evalbxor() {
%1 = alloca i64
%2 = call i64 (...) @evalband()
store i64 %2, i64* %1
br label %3
3: ; preds = %6, %0
%4 = call i64 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* %1
%8 = call i64 (...) @evalband()
%9 = xor i64 %7, %8
store i64 %9, i64* %1
br label %3
10: ; preds = %3
%11 = load i64, i64* %1
ret i64 %11
}

LLVM IR (-O2):
@.str = [2 x i8] c"^\00"
define i64 @evalbxor() {
%1 = tail call i64 (...) @evalband()
%2 = tail call i64 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i64 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i64 (...) @evalband()
%7 = xor i64 %6, %5
%8 = tail call i64 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %0
%11 = phi i64 [ %1, %0 ], [ %7, %4 ]
ret i64 %11
}
int led_putnum(byte)
unsigned short byte;
{ return (pdc_call(2, 0, byte)); }


x86 assembly (clang, -O0):
<led_putnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <pdc_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_putnum>:
movzwl %di,%edx
mov    $0x2,%edi
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <pdc_call@plt>

LLVM IR (-O0):
define i32 @led_putnum(i32 %0) {
%2 = alloca i16
%3 = trunc i32 %0 to i16
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @pdc_call to i32 (i32, i32, i32, ...)*)(i32 2, i32 0, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @led_putnum(i32 %0) {
%2 = and i32 %0, 65535
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @pdc_call to i32 (i32, i32, i32, ...)*)(i32 2, i32 0, i32 %2)
ret i32 %3
}
void YUY2ToUVRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToUVRow_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __init_stack();
int /*<<< orphan*/ __init_tree();
void initialize() {
  __init_tree();
  __init_stack();
}


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

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

LLVM IR (-O0):
define void @initialize() {
%1 = call i32 (...) @__init_tree()
%2 = call i32 (...) @__init_stack()
ret void
}

LLVM IR (-O2):
define void @initialize() {
%1 = tail call i32 (...) @__init_tree()
%2 = tail call i32 (...) @__init_stack()
ret void
}
/* Variables and functions */
char *getFromBuffer(char *, char const *, int, int *, char *);
char *getFromHeader(char *pHeaderPtr, const char *pField, int *pReturnSize) {
  return getFromBuffer(pHeaderPtr, pField, 2, pReturnSize, "\r\n");
}


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

x86 assembly (clang, -O2):
<getFromHeader>:
mov    %rdx,%rcx
lea    0xee6(%rip),%r8
mov    $0x2,%edx
jmp    1030 <getFromBuffer@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define i8* @getFromHeader(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
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32*, i32** %6
%10 = call i8* @getFromBuffer(i8* %7, i8* %8, i32 2, i32* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define i8* @getFromHeader(i8* %0, i8* %1, i32* %2) {
%4 = tail call i8* @getFromBuffer(i8* %0, i8* %1, i32 2, i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}
/* Variables and functions */
int cairo_code_draw_rgbLED_get_height();
int cairo_code_draw_rgb5x7_get_height() {
  return cairo_code_draw_rgbLED_get_height() * 7 * 1.3;
}


x86 assembly (clang, -O0):
<cairo_code_draw_rgb5x7_get_height>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cairo_code_draw_rgbLED_get_height@plt>
imul   $0x7,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cairo_code_draw_rgb5x7_get_height>:
push   %rax
xor    %eax,%eax
call   1030 <cairo_code_draw_rgbLED_get_height@plt>
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
cvtsi2sd %ecx,%xmm0
mulsd  0xed3(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cairo_code_draw_rgb5x7_get_height() {
%1 = call i32 (...) @cairo_code_draw_rgbLED_get_height()
%2 = mul nsw i32 %1, 7
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 1.300000e+00
%5 = fptosi double %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @cairo_code_draw_rgb5x7_get_height() {
%1 = tail call i32 (...) @cairo_code_draw_rgbLED_get_height()
%2 = mul nsw i32 %1, 7
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 1.300000e+00
%5 = fptosi double %4 to i32
ret i32 %5
}
unsigned long map_hash_function(const char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<map_hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <map_hash_function+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <map_hash_function+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <map_hash_function+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <map_hash_function+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @map_hash_function(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
scalar_t__ isalnum(char);
int is_alnum(char c) { return isalnum(c) || c == '_'; }


x86 assembly (clang, -O0):
<is_alnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <is_alnum+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %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):
<is_alnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_alnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(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 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
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 @is_alnum(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
void foo401(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo401(i32 %0) {
ret void
}
double d3(a1, a2)
double a1, a2;
{ return fabs(a1 - a2); }


x86 assembly (clang, -O0):
<d3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xee1(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d3>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @d3(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call double @llvm.fabs.f64(double %7)
ret double %8
}

LLVM IR (-O2):
define double @d3(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
ret double %4
}
/* Variables and functions */
char *appaserver_library_get_server_address();
char *appaserver_library_server_address(void) {
  return appaserver_library_get_server_address();
}


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

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

LLVM IR (-O0):
define i8* @appaserver_library_server_address() {
%1 = call i8* (...) @appaserver_library_get_server_address()
ret i8* %1
}

LLVM IR (-O2):
define i8* @appaserver_library_server_address() {
%1 = tail call i8* (...) @appaserver_library_get_server_address()
ret i8* %1
}
/* Variables and functions */
int FE_TONEAREST;
int fegetround(void) { return FE_TONEAREST; }


x86 assembly (clang, -O0):
<fegetround>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fegetround>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@FE_TONEAREST = global i32 0
define i32 @fegetround() {
%1 = load i32, i32* @FE_TONEAREST
ret i32 %1
}

LLVM IR (-O2):
@FE_TONEAREST = global i32 0
define i32 @fegetround() {
%1 = load i32, i32* @FE_TONEAREST
ret i32 %1
}
int test_imm_A8uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xA8 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A8uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 168
%7 = icmp ne i64 %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_A8uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 721554505728
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo488() {}


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

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

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

LLVM IR (-O2):
define void @foo488() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_dump_exploded_nodes(int /*<<< orphan*/);
int /*<<< orphan*/ __analyzer_eval(int);
void __attribute__((no)) test_2_callee(void *p, void *q) {
  __analyzer_dump_exploded_nodes(0);
  __analyzer_eval(p == 0);
  __analyzer_eval(p != 0);
  __analyzer_eval(q == 0);
  __analyzer_eval(q != 0);
}


x86 assembly (clang, -O0):
<test_2_callee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2_callee>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
xor    %edi,%edi
xor    %ebp,%ebp
test   %rbx,%rbx
sete   %dil
setne  %bpl
call   1030 <__analyzer_eval@plt>
mov    %ebp,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
xor    %ebx,%ebx
test   %r14,%r14
sete   %dil
setne  %bl
call   1030 <__analyzer_eval@plt>
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_2_callee(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @__analyzer_dump_exploded_nodes(i32 0)
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @__analyzer_eval(i32 %8)
%10 = load i8*, i8** %3
%11 = icmp ne i8* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @__analyzer_eval(i32 %12)
%14 = load i8*, i8** %4
%15 = icmp eq i8* %14, null
%16 = zext i1 %15 to i32
%17 = call i32 @__analyzer_eval(i32 %16)
%18 = load i8*, i8** %4
%19 = icmp ne i8* %18, null
%20 = zext i1 %19 to i32
%21 = call i32 @__analyzer_eval(i32 %20)
ret void
}

LLVM IR (-O2):
define void @test_2_callee(i8* readnone %0, i8* readnone %1) {
%3 = tail call i32 @__analyzer_dump_exploded_nodes(i32 0)
%4 = icmp eq i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @__analyzer_eval(i32 %5)
%7 = icmp ne i8* %0, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @__analyzer_eval(i32 %8)
%10 = icmp eq i8* %1, null
%11 = zext i1 %10 to i32
%12 = tail call i32 @__analyzer_eval(i32 %11)
%13 = icmp ne i8* %1, null
%14 = zext i1 %13 to i32
%15 = tail call i32 @__analyzer_eval(i32 %14)
ret void
}
long labs(long number) { return (number < 0) ? -number : number; }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<labs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
char *CmdParse_SkipChars(char *ptr) {
  while (*ptr && !isspace(*ptr))
    ++ptr;
  return ptr;
}


x86 assembly (clang, -O0):
<CmdParse_SkipChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <CmdParse_SkipChars+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <CmdParse_SkipChars+0x48>
jmp    1169 <CmdParse_SkipChars+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <CmdParse_SkipChars+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdParse_SkipChars>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <CmdParse_SkipChars+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <CmdParse_SkipChars+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <CmdParse_SkipChars+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @CmdParse_SkipChars(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @isspace(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @CmdParse_SkipChars(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}