xunge/DecIR huggingface dataset:
/* Variables and functions */
int dfs(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int x;
  scanf("%i", &x);
  printf("%i", dfs(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1050 <dfs@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
call   1050 <dfs@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @dfs(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strnlen(char const *, int);
void strnlen_constant5() {
  const char *a = "123456";
  clang_analyzer_eval(strnlen(a, 3) == 3);
}


x86 assembly (clang, -O0):
<strnlen_constant5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen_constant5>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"123456\00"
define void @strnlen_constant5() {
%1 = alloca i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @strnlen(i8* %2, i32 3)
%4 = icmp eq i32 %3, 3
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"123456\00"
define void @strnlen_constant5() {
%1 = tail call i32 @strnlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  while (1) {
    printf("this is a test\n");
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [16 x i8] c"this is a test\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
br label %6
6: ; preds = %2, %6
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @sleep(i32 1)
br label %6
}

LLVM IR (-O2):
@str = [15 x i8] c"this is a test\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
br label %3
}
void test_toascii_macro(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, toascii(i++));
}


x86 assembly (clang, -O0):
<test_toascii_macro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1179 <test_toascii_macro+0x59>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <toascii@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xe9a(%rip),%rdi
lea    0xea1(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <test_toascii_macro+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_toascii_macro>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <toascii@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_toascii_macro+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_toascii_macro = [19 x i8] c"test_toascii_macro\00"
define void @test_toascii_macro() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @toascii to i32 (i32, ...)*)(i32 %2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_toascii_macro, i64 0, i64 0), i32 %2, i32 %4)
%6 = icmp eq i32 %3, 256
br i1 %6, label %7, label %1
7: ; preds = %1
ret void
}
float calculateSD(unsigned long long int *data, unsigned int n) {
  float standardDeviation = 0.0;
  if (!data)
    return (float)(0.0 * n);
  return standardDeviation;
}


x86 assembly (clang, -O0):
<calculateSD>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113b <calculateSD+0x3b>
mov    -0x14(%rbp),%eax
cvtsi2sd %rax,%xmm1
xorps  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1145 <calculateSD+0x45>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateSD>:
test   %rdi,%rdi
je     1109 <calculateSD+0x9>
xorps  %xmm0,%xmm0
ret
mov    %esi,%eax
cvtsi2sd %rax,%xmm0
xorpd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @calculateSD(i64* %0, i32 %1) {
%3 = alloca float
%4 = alloca i64*
%5 = alloca i32
%6 = alloca float
store i64* %0, i64** %4
store i32 %1, i32* %5
store float 0.000000e+00, float* %6
%7 = load i64*, i64** %4
%8 = icmp ne i64* %7, null
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %5
%11 = uitofp i32 %10 to double
%12 = fmul double 0.000000e+00, %11
%13 = fptrunc double %12 to float
store float %13, float* %3
br label %16
14: ; preds = %2
%15 = load float, float* %6
store float %15, float* %3
br label %16
16: ; preds = %14, %9
%17 = load float, float* %3
ret float %17
}

LLVM IR (-O2):
define float @calculateSD(i64* readnone %0, i32 %1) {
%3 = icmp eq i64* %0, null
%4 = uitofp i32 %1 to double
%5 = fmul double %4, 0.000000e+00
%6 = fptrunc double %5 to float
%7 = select i1 %3, float %6, float 0.000000e+00
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, int, float);
int main() {
  float a = 7;
  int b = 5;
  int sum;
  printf("%.0f / %d = %.2f\n", a, b, a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%esi
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm2
divss  %xmm2,%xmm1
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movss  0xee0(%rip),%xmm0
movss  0xedc(%rip),%xmm1
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"%.0f / %d = %.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float 7.000000e+00, i32 5, float 0x3FF6666660000000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ strerror(int);
int /*<<< orphan*/ tq_set_error(char *, int /*<<< orphan*/);
int tq_mutex_free(pthread_mutex_t *mutex) {
  int err;
  err = pthread_mutex_destroy(mutex);
  if (err) {
    tq_set_error("cannot destroy mutex: %s", strerror(err));
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<tq_mutex_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_mutex_destroy@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1174 <tq_mutex_free+0x44>
mov    -0x14(%rbp),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1040 <tq_set_error@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <tq_mutex_free+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tq_mutex_free>:
push   %rax
call   1030 <pthread_mutex_destroy@plt>
test   %eax,%eax
je     1156 <tq_mutex_free+0x26>
mov    %eax,%edi
call   1050 <strerror@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1040 <tq_set_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"cannot destroy mutex: %s\00"
define i32 @tq_mutex_free(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @pthread_mutex_destroy(i32* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %4
%11 = call i32 @strerror(i32 %10)
%12 = call i32 @tq_set_error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11)
store i32 -1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [25 x i8] c"cannot destroy mutex: %s\00"
define i32 @tq_mutex_free(i32* %0) {
%2 = tail call i32 @pthread_mutex_destroy(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strerror(i32 %2)
%6 = tail call i32 @tq_set_error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %8
}
int mld_id_() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mld_id_() {
ret i32 0
}
int nondet() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nondet() {
ret i32 0
}
/* Type definitions */
struct linkedList {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int isEmptyList(struct linkedList *lst) {
  assert(lst != 0);
  if (lst == 0) {
    return (1);
  } else
    return 0;
}


x86 assembly (clang, -O0):
<isEmptyList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1145 <isEmptyList+0x35>
movl   $0x1,-0x4(%rbp)
jmp    114c <isEmptyList+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEmptyList>:
push   %rbx
xor    %eax,%eax
xor    %ebx,%ebx
test   %rdi,%rdi
setne  %al
sete   %bl
mov    %eax,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.linkedList = type { i32 }
define i32 @isEmptyList(%struct.linkedList* %0) {
%2 = alloca i32
%3 = alloca %struct.linkedList*
store %struct.linkedList* %0, %struct.linkedList** %3
%4 = load %struct.linkedList*, %struct.linkedList** %3
%5 = icmp ne %struct.linkedList* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load %struct.linkedList*, %struct.linkedList** %3
%9 = icmp eq %struct.linkedList* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.linkedList = type { i32 }
define i32 @isEmptyList(%struct.linkedList* readnone %0) {
%2 = icmp ne %struct.linkedList* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq %struct.linkedList* %0, null
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __int64_t;

/* Variables and functions */
int /*<<< orphan*/ display_i64(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
void display_si64(__int64_t it) {
  if (it < 0) {
    putchar('-');
    it = -it;
  }
  display_i64(it);
}


x86 assembly (clang, -O0):
<display_si64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1147 <display_si64+0x27>
mov    $0x2d,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <display_i64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_si64>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1133 <display_si64+0x13>
mov    $0x2d,%edi
call   1030 <putchar@plt>
neg    %ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <display_i64@plt>

LLVM IR (-O0):
define void @display_si64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @putchar(i8 signext 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = call i32 @display_i64(i32 %10)
ret void
}

LLVM IR (-O2):
define void @display_si64(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @putchar(i8 signext 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @display_i64(i32 %7)
ret void
}
int g(int y) {
  if (y == 42) {
    return 42;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
jne    111d <g+0x1d>
movl   $0x2a,-0x4(%rbp)
jmp    1124 <g+0x24>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
cmp    $0x2a,%edi
mov    $0xffffffff,%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = icmp eq i32 %0, 42
%3 = select i1 %2, i32 42, i32 -1
ret i32 %3
}
int test_imm_4Buint8_mem(unsigned char *val) {
  return ((*val) & (0x4B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Buint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 75
%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_4Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 75
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void capitalize(sp) char *sp;
{
  if ('a' <= *sp && *sp <= 'z')
    *sp += 'A' - 'a';
}


x86 assembly (clang, -O0):
<capitalize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1138 <capitalize+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     1138 <capitalize+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0xffffffe0,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<capitalize>:
mov    (%rdi),%al
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     110e <capitalize+0xe>
add    $0xe0,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @capitalize(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 = icmp sle i32 97, %5
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 122
br i1 %11, label %12, label %18
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %15, -32
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
br label %18
18: ; preds = %12, %7, %1
ret void
}

LLVM IR (-O2):
define void @capitalize(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -97
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i8 %2, -32
store i8 %6, i8* %0
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
void AMCDnsFreeAddrinfo(struct addrinfo *info) {
  if (info) {
    freeaddrinfo(info);
  }
  return;
}


x86 assembly (clang, -O0):
<AMCDnsFreeAddrinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <AMCDnsFreeAddrinfo+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <freeaddrinfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMCDnsFreeAddrinfo>:
test   %rdi,%rdi
je     111a <AMCDnsFreeAddrinfo+0xa>
jmp    1030 <freeaddrinfo@plt>
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @AMCDnsFreeAddrinfo(%struct.addrinfo* %0) {
%2 = alloca %struct.addrinfo*
store %struct.addrinfo* %0, %struct.addrinfo** %2
%3 = load %struct.addrinfo*, %struct.addrinfo** %2
%4 = icmp ne %struct.addrinfo* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.addrinfo*, %struct.addrinfo** %2
%7 = call i32 @freeaddrinfo(%struct.addrinfo* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @AMCDnsFreeAddrinfo(%struct.addrinfo* %0) {
%2 = icmp eq %struct.addrinfo* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @freeaddrinfo(%struct.addrinfo* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abs(double const);
int /*<<< orphan*/ floor(int /*<<< orphan*/);
size_t __GetIntegralModule(const double number) {
  return (size_t)floor(abs(number));
}


x86 assembly (clang, -O0):
<__GetIntegralModule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <floor@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__GetIntegralModule>:
push   %rax
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <floor@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @__GetIntegralModule(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @abs(double %3)
%5 = call i32 @floor(i32 %4)
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @__GetIntegralModule(double %0) {
%2 = tail call i32 @abs(double %0)
%3 = tail call i32 @floor(i32 %2)
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef unsigned long long uint64_t;
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
unsigned long long gettime_ms(int /*<<< orphan*/);
uint64_t gettime_s(clockid_t clk_id) { return gettime_ms(clk_id) / 1000ULL; }


x86 assembly (clang, -O0):
<gettime_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gettime_ms@plt>
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime_s>:
push   %rax
call   1030 <gettime_ms@plt>
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
mov    %rdx,%rax
shr    $0x4,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @gettime_s(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @gettime_ms(i32 %3)
%5 = udiv i64 %4, 1000
ret i64 %5
}

LLVM IR (-O2):
define i64 @gettime_s(i32 %0) {
%2 = tail call i64 @gettime_ms(i32 %0)
%3 = udiv i64 %2, 1000
ret i64 %3
}
unsigned char Endianess() {
  unsigned int T;
  unsigned char T_o[8];
  T = 0xAABBCCDD;
  *(unsigned int *)T_o = T;
  if (T_o[0] == 0xAA) {
    return 0;
  }
  if (T_o[0] == 0xDD) {
    return 1;
  } else {
    return 2;
  }
}


x86 assembly (clang, -O0):
<Endianess>:
push   %rbp
mov    %rsp,%rbp
movl   $0xaabbccdd,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movzbl -0x10(%rbp),%eax
cmp    $0xaa,%eax
jne    1129 <Endianess+0x29>
movb   $0x0,-0x1(%rbp)
jmp    1145 <Endianess+0x45>
movzbl -0x10(%rbp),%eax
cmp    $0xdd,%eax
jne    1141 <Endianess+0x41>
movb   $0x1,-0x1(%rbp)
jmp    1145 <Endianess+0x45>
movb   $0x2,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @Endianess() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca [8 x i8]
store i32 -1430532899, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%6 = bitcast i8* %5 to i32*
store i32 %4, i32* %6
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 170
br i1 %10, label %11, label %12
11: ; preds = %0
store i8 0, i8* %1
br label %19
12: ; preds = %0
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = icmp eq i32 %15, 221
br i1 %16, label %17, label %18
17: ; preds = %12
store i8 1, i8* %1
br label %19
18: ; preds = %12
store i8 2, i8* %1
br label %19
19: ; preds = %18, %17, %11
%20 = load i8, i8* %1
ret i8 %20
}

LLVM IR (-O2):
define zeroext i8 @Endianess() {
ret i8 1
}
int calc_tam(int num) {
  int count = 0;
  while (1) {
    num /= 2;
    count++;
    if (!num) {
      return count;
    }
  }
}


x86 assembly (clang, -O0):
<calc_tam>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1134 <calc_tam+0x34>
mov    -0x8(%rbp),%eax
pop    %rbp
ret
jmp    110e <calc_tam+0xe>

x86 assembly (clang, -O2):
<calc_tam>:
xor    %eax,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
add    $0x1,%eax
add    $0x1,%edi
cmp    $0x2,%edi
mov    %ecx,%edi
ja     1110 <calc_tam+0x10>
ret

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

LLVM IR (-O2):
define i32 @calc_tam(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 0, %1 ], [ %6, %2 ]
%5 = sdiv i32 %3, 2
%6 = add nuw nsw i32 %4, 1
%7 = add i32 %3, 1
%8 = icmp ult i32 %7, 3
br i1 %8, label %9, label %2
9: ; preds = %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test(int camille) {
  if (camille == 1) {
    printf("Camille a forke !");
  } else {
    printf("En attente de fork...");
  }
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1136 <test+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <test+0x32>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
cmp    $0x1,%edi
lea    0xee5(%rip),%rax
lea    0xef0(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Camille a forke !\00"
@.str.1 = [22 x i8] c"En attente de fork...\00"
define i32 @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Camille a forke !\00"
@.str.1 = [22 x i8] c"En attente de fork...\00"
define i32 @test(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
char *strchr(char const *, int);
char *c_strchr(const char *arg0, int arg1) { return strchr(arg0, arg1); }


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

x86 assembly (clang, -O2):
<c_strchr>:
jmp    1030 <strchr@plt>

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

LLVM IR (-O2):
define i8* @c_strchr(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello Windows!\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"Hello Windows!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ err_sys(char *);
void *Calloc(size_t n, size_t size) {
  void *ptr;
  if ((ptr = calloc(n, size)) == NULL)
    err_sys("calloc error");
  return (ptr);
}


x86 assembly (clang, -O0):
<Calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1157 <Calloc+0x37>
lea    0xeae(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calloc>:
push   %rbx
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <Calloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <err_sys@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"calloc error\00"
define noalias i8* @Calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
char *gettext(char *);
void finish(FILE *out) { fprintf(out, gettext("goodbye!\n")); }


x86 assembly (clang, -O0):
<finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <gettext@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finish>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <gettext@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"goodbye!\0A\00"
define void @finish(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i8* @gettext(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @fprintf(i32* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"goodbye!\0A\00"
define void @finish(i32* nocapture %0) {
%2 = tail call i8* @gettext(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %0, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char const *);
int rl_delete_signal(const char *signal_name) {
  unlink(signal_name);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @rl_delete_signal(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 0
}
char *isaac_skip_blanks(const char *str) {
  while (*str && *str < 33)
    str++;
  return (char *)str;
}


x86 assembly (clang, -O0):
<isaac_skip_blanks>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <isaac_skip_blanks+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <isaac_skip_blanks+0x3d>
jmp    114e <isaac_skip_blanks+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <isaac_skip_blanks+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isaac_skip_blanks>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <isaac_skip_blanks+0x21>
cmp    $0x21,%cl
jl     1110 <isaac_skip_blanks+0x10>
ret

LLVM IR (-O0):
define i8* @isaac_skip_blanks(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %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 %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp slt i32 %11, 33
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @isaac_skip_blanks(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = icmp slt i8 %4, 33
%7 = and i1 %5, %6
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %7, label %2, label %9
9: ; preds = %2
ret i8* %3
}
void ifStmt() {
  int x, y;
  if (x > 0)
    x = 1;
  else
    x = -1;
  y = x;
}


x86 assembly (clang, -O0):
<ifStmt>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0x4(%rbp)
jle    111a <ifStmt+0x1a>
movl   $0x1,-0x4(%rbp)
jmp    1121 <ifStmt+0x21>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ifStmt() {
ret void
}
void ipa3_debugfs_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ipa3_debugfs_init() {
ret void
}
/* Variables and functions */
size_t strlen(char *);
char *trim_trailing_newline(char *str) {
  const size_t length = strlen(str);
  if (length > 0 && str[length - 1] == '\n') {
    str[length - 1] = '\0';
  }
  return str;
}


x86 assembly (clang, -O0):
<trim_trailing_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    115d <trim_trailing_newline+0x4d>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    115d <trim_trailing_newline+0x4d>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_trailing_newline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
je     112a <trim_trailing_newline+0x1a>
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    112a <trim_trailing_newline+0x1a>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @trim_trailing_newline(i8* returned %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %4
store i8 0, i8* %6
br label %10
10: ; preds = %9, %4, %1
ret i8* %0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 1;
  if (a == 1) {
    a = 2;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111c <main+0x1c>
movl   $0x2,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 2, i32* %1
br label %5
5: ; preds = %4, %0
ret void
}

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

/* Variables and functions */
uint8_t *packer_uint32_pack(uint8_t *buffer, uint32_t value) {
  *buffer++ = (value >> 24) & 0xFF;
  *buffer++ = (value >> 16) & 0xFF;
  *buffer++ = (value >> 8) & 0xFF;
  *buffer++ = value & 0xFF;
  return buffer;
}


x86 assembly (clang, -O0):
<packer_uint32_pack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<packer_uint32_pack>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rdi)
mov    %edx,0x8(%rdi)
mov    %esi,0xc(%rdi)
lea    0x10(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @packer_uint32_pack(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %3
store i32 %7, i32* %8
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %3
store i32 %12, i32* %13
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i32 1
store i32* %19, i32** %3
store i32 %17, i32* %18
%20 = load i32, i32* %4
%21 = and i32 %20, 255
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i32 1
store i32* %23, i32** %3
store i32 %21, i32* %22
%24 = load i32*, i32** %3
ret i32* %24
}

LLVM IR (-O2):
define i32* @packer_uint32_pack(i32* writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %0
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %6, i32* %4
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %9, i32* %7
%11 = and i32 %1, 255
%12 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %11, i32* %10
ret i32* %12
}
/* Variables and functions */
int /*<<< orphan*/ drawLine(int, int, int, int);
void drawRectangle(int x1, int y1, int x2, int y2) {
  drawLine(x1, y1, x1, y2);
  drawLine(x1, y1, x2, y1);
  drawLine(x2, y1, x2, y2);
  drawLine(x1, y2, x2, y2);
  return;
}


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

x86 assembly (clang, -O2):
<drawRectangle>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%edx
call   1030 <drawLine@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1030 <drawLine@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <drawLine@plt>
mov    %ebp,%edi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <drawLine@plt>

LLVM IR (-O0):
define void @drawRectangle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %8
%13 = call i32 @drawLine(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = load i32, i32* %6
%18 = call i32 @drawLine(i32 %14, i32 %15, i32 %16, i32 %17)
%19 = load i32, i32* %7
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = call i32 @drawLine(i32 %19, i32 %20, i32 %21, i32 %22)
%24 = load i32, i32* %5
%25 = load i32, i32* %8
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = call i32 @drawLine(i32 %24, i32 %25, i32 %26, i32 %27)
ret void
}

LLVM IR (-O2):
define void @drawRectangle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @drawLine(i32 %0, i32 %1, i32 %0, i32 %3)
%6 = tail call i32 @drawLine(i32 %0, i32 %1, i32 %2, i32 %1)
%7 = tail call i32 @drawLine(i32 %2, i32 %1, i32 %2, i32 %3)
%8 = tail call i32 @drawLine(i32 %0, i32 %3, i32 %2, i32 %3)
ret void
}
int test_imm_CAint64_lowword_mem(long long *val) {
  return ((*val) & (0xCA << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_CAint64_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, 202
%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_CAint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 202
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double pow(double, double);
double range2d(double x1, double y1, double x2, double y2) {
  ;
  ;
  return pow((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1), 0.5);
}


x86 assembly (clang, -O0):
<range2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
call   1030 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range2d>:
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm2
addsd  %xmm3,%xmm2
movsd  0xed4(%rip),%xmm1
movapd %xmm2,%xmm0
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @range2d(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = load double, double* %5
%11 = fsub double %9, %10
%12 = load double, double* %7
%13 = load double, double* %5
%14 = fsub double %12, %13
%15 = load double, double* %8
%16 = load double, double* %6
%17 = fsub double %15, %16
%18 = load double, double* %8
%19 = load double, double* %6
%20 = fsub double %18, %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = call double @pow(double %22, double 5.000000e-01)
ret double %23
}

LLVM IR (-O2):
define double @range2d(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %0
%6 = fsub double %3, %1
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @pow(double %8, double 5.000000e-01)
ret double %9
}
void irq_remap_modify_chip_defaults(struct irq_chip *chip) {}


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

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

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

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