xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ inccount(int);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *p = malloc(size);
  if (p) {
    inccount(7);
  }
  return (p);
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114e <xmalloc+0x2e>
mov    $0x7,%edi
call   1030 <inccount@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1138 <xmalloc+0x18>
mov    $0x7,%edi
call   1030 <inccount@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @inccount(i32 7)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int callee_1(int, int, float);
int test_1(int first, int second, float third) {
  return callee_1(first, second, third);
}


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

x86 assembly (clang, -O2):
<test_1>:
jmp    1030 <callee_1@plt>

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

LLVM IR (-O2):
define i32 @test_1(i32 %0, i32 %1, float %2) {
%4 = tail call i32 @callee_1(i32 %0, i32 %1, float %2)
ret i32 %4
}
long ASHIFTR(long i, long s) { return i >> s; }


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

x86 assembly (clang, -O2):
<ASHIFTR>:
mov    %rsi,%rcx
mov    %rdi,%rax
sar    %cl,%rax
ret

LLVM IR (-O0):
define i64 @ASHIFTR(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = ashr i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @ASHIFTR(i64 %0, i64 %1) {
%3 = ashr i64 %0, %1
ret i64 %3
}
void compute_task() {}


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

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

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

LLVM IR (-O2):
define void @compute_task() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat_s(char *, size_t, char *);
void uninitvar_strcat_s(char *Ct, size_t N, char *S) {
  char *ct_1, *ct_2;
  char *s;
  size_t n1, n2;
  (void)strcat_s(ct_1, n1, s);
  (void)strcat_s(ct_2, N, S);
  (void)strcat_s(Ct, N, s);
  (void)strcat_s(Ct, n2, S);
  (void)strcat_s(Ct, N, S);
}


x86 assembly (clang, -O0):
<uninitvar_strcat_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <strcat_s@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strcat_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <strcat_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strcat_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strcat_s@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_strcat_s>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <strcat_s@plt>
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strcat_s@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcat_s@plt>
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <strcat_s@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strcat_s@plt>

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

LLVM IR (-O2):
define void @uninitvar_strcat_s(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @strcat_s(i8* undef, i64 undef, i8* undef)
%5 = tail call i32 @strcat_s(i8* undef, i64 %1, i8* %2)
%6 = tail call i32 @strcat_s(i8* %0, i64 %1, i8* undef)
%7 = tail call i32 @strcat_s(i8* %0, i64 undef, i8* %2)
%8 = tail call i32 @strcat_s(i8* %0, i64 %1, i8* %2)
ret void
}
double double_max(double arg1, double arg2) {
  return arg1 < arg2 ? arg2 : arg1;
}


x86 assembly (clang, -O0):
<double_max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <double_max+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <double_max+0x3b>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_max>:
maxsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @double_max(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 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
br label %12
10: ; preds = %2
%11 = load double, double* %3
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @double_max(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
scalar_t__ is_globs_expr(char const *);
scalar_t__ is_re_expr(char const *);
int matcher_is_expr(const char str[]) {
  return is_re_expr(str) || is_globs_expr(str);
}


x86 assembly (clang, -O0):
<matcher_is_expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_re_expr@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <matcher_is_expr+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <is_globs_expr@plt>
cmp    $0x0,%rax
setne  %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):
<matcher_is_expr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_re_expr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <matcher_is_expr+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <is_globs_expr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @matcher_is_expr(i8* %0) {
%2 = tail call i64 @is_re_expr(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_globs_expr(i8* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int type() { return 42; }


x86 assembly (clang, -O0):
<type>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @type() {
ret i32 42
}

LLVM IR (-O2):
define i32 @type() {
ret i32 42
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ranged_random_revmult(int /*<<< orphan*/);
void loop_revmult(size_t count, uint32_t range, uint32_t *output) {
  for (size_t i = 0; i < count; i++) {
    *output++ = ranged_random_revmult(range);
  }
}


x86 assembly (clang, -O0):
<loop_revmult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1165 <loop_revmult+0x55>
mov    -0xc(%rbp),%edi
call   1030 <ranged_random_revmult@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x18(%rbp)
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <loop_revmult+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_revmult>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1145 <loop_revmult+0x35>
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r15d,%edi
call   1030 <ranged_random_revmult@plt>
mov    %eax,(%r14,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <loop_revmult+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @loop_revmult(i64 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = phi i32* [ %10, %6 ], [ %2, %3 ]
%9 = tail call i32 @ranged_random_revmult(i32 %1)
%10 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %9, i32* %8
%11 = add nuw i64 %7, 1
%12 = icmp eq i64 %11, %0
br i1 %12, label %5, label %6
}
int is_conversion_specifier(char c) {
  switch (c) {
  case 'c':
  case 'd':
  case 'i':
  case 's':
  case 'x':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_conversion_specifier>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff9d,%eax
sub    $0x2,%eax
jb     1155 <is_conversion_specifier+0x55>
jmp    1122 <is_conversion_specifier+0x22>
mov    -0xc(%rbp),%eax
sub    $0x69,%eax
je     1155 <is_conversion_specifier+0x55>
jmp    1133 <is_conversion_specifier+0x33>
mov    -0xc(%rbp),%eax
sub    $0x73,%eax
je     1155 <is_conversion_specifier+0x55>
jmp    1144 <is_conversion_specifier+0x44>
mov    -0xc(%rbp),%eax
sub    $0x78,%eax
jne    1161 <is_conversion_specifier+0x61>
jmp    1155 <is_conversion_specifier+0x55>
movl   $0x1,-0x4(%rbp)
jmp    1168 <is_conversion_specifier+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_conversion_specifier>:
add    $0xffffff9d,%edi
cmp    $0x15,%edi
ja     1118 <is_conversion_specifier+0x18>
mov    $0x1,%eax
mov    $0x210043,%ecx
bt     %edi,%ecx
jae    1118 <is_conversion_specifier+0x18>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_conversion_specifier(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 99, label %6
i32 100, label %6
i32 105, label %6
i32 115, label %6
i32 120, label %6
]
6: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_conversion_specifier(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 99, label %4
i32 100, label %4
i32 105, label %4
i32 115, label %4
i32 120, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
void angine_render() {}


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

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

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

LLVM IR (-O2):
define void @angine_render() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, M;
  x = __VERIFIER_nondet_int();
  M = __VERIFIER_nondet_int();
  if (M > 0) {
    while (x != M) {
      if (x > M) {
        x = 0;
      } else {
        x = x + 1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1179 <main+0x69>
jmp    1142 <main+0x32>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1174 <main+0x64>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1166 <main+0x56>
movl   $0x0,-0x8(%rbp)
jmp    116f <main+0x5f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <main+0x32>
jmp    1179 <main+0x69>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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

/* Variables and functions */
int8_t stdlib_ndarray_set_ptr_bool(uint8_t *idx, const bool v) {
  *(bool *)idx = v;
  return 0;
}


x86 assembly (clang, -O0):
<stdlib_ndarray_set_ptr_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_set_ptr_bool>:
mov    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @stdlib_ndarray_set_ptr_bool(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 = load i32*, i32** %3
store i32 %5, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @stdlib_ndarray_set_ptr_bool(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 0
}
double ceil(double x) {
  int ix = (int)x;
  if (((double)ix) == x)
    return x;
  return (double)ix + 1;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1136 <ceil+0x36>
jp     1136 <ceil+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114c <ceil+0x4c>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xebd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
movsd  0xef0(%rip),%xmm2
addsd  %xmm1,%xmm2
cmpeqsd %xmm0,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = load double, double* %3
%10 = fcmp oeq double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load double, double* %3
store double %12, double* %2
br label %17
13: ; preds = %1
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to double
%16 = fadd double %15, 1.000000e+00
store double %16, double* %2
br label %17
17: ; preds = %13, %11
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp oeq double %3, %0
%5 = fadd double %3, 1.000000e+00
%6 = select i1 %4, double %0, double %5
ret double %6
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
uint ipow(uint k) { return 1 << k; }


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

x86 assembly (clang, -O2):
<ipow>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @ipow(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
/* Variables and functions */
scalar_t__ sqrt(double);
float sqrtf(float x) { return ((float)sqrt((double)x)); }


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

x86 assembly (clang, -O2):
<sqrtf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @sqrt(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @sqrtf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
int ft_strlen(const char *string) {
  int size;
  size = 0;
  if (!string)
    return 0;
  while (string[size]) {
    size++;
  }
  return size;
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1126 <ft_strlen+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1151 <ft_strlen+0x51>
jmp    112b <ft_strlen+0x2b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114b <ft_strlen+0x4b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <ft_strlen+0x2b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
test   %rdi,%rdi
je     111d <ft_strlen+0x1d>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 0, %1 ], [ %10, %9 ]
ret i32 %12
}
void EVP_DecodeInit(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_DecodeInit() {
ret void
}
char *BASM_Parse_EatWhiteOnly(char *s) {
  while (*s && (*s <= ' '))
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<BASM_Parse_EatWhiteOnly>:
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 <BASM_Parse_EatWhiteOnly+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <BASM_Parse_EatWhiteOnly+0x3d>
jmp    114e <BASM_Parse_EatWhiteOnly+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <BASM_Parse_EatWhiteOnly+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @BASM_Parse_EatWhiteOnly(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 sle i32 %11, 32
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* @BASM_Parse_EatWhiteOnly(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
}
/* Variables and functions */
int all_tests();
int main() { return all_tests(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @all_tests()
ret i32 %1
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_resolve_res_query(void *resolve, void **q, const char *dname, int class,
                     int type, void *callback, void *userdata) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_resolve_res_query>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
xor    %eax,%eax
mov    0x2eb8(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_resolve_res_query>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_resolve_res_query(i8* %0, i8** %1, i8* %2, i32 %3, i32 %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8**
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
store i8* %0, i8** %8
store i8** %1, i8*** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%15 = load i32, i32* @EINVAL
%16 = sub nsw i32 0, %15
ret i32 %16
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_resolve_res_query(i8* nocapture readnone %0, i8** nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i32 %4, i8* nocapture readnone %5, i8* nocapture readnone %6) {
%8 = load i32, i32* @EINVAL
%9 = sub nsw i32 0, %8
ret i32 %9
}
/* Type definitions */
typedef int u_int64_t;

/* Variables and functions */
u_int64_t store_ntohll(u_int64_t v) {
  v = (v & 0xff) << 56 | (v & 0xff00ULL) << 40 | (v & 0xff0000ULL) << 24 |
      (v & 0xff000000ULL) << 8 | (v & 0xff00000000ULL) >> 8 |
      (v & 0xff0000000000ULL) >> 24 | (v & 0xff000000000000ULL) >> 40 |
      (v & 0xff00000000000000ULL) >> 56;
  return (v);
}


x86 assembly (clang, -O0):
<store_ntohll>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    $0x38,%ecx
shl    %cl,%eax
cltq
movslq -0x4(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff0000,%rcx
shl    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000,%rdx
and    %rdx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
shr    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
shr    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000000000,%rdx
and    %rdx,%rcx
shr    $0x38,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @store_ntohll(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 56
%6 = sext i32 %5 to i64
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = and i64 %8, 65280
%10 = shl i64 %9, 40
%11 = or i64 %6, %10
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = and i64 %13, 16711680
%15 = shl i64 %14, 24
%16 = or i64 %11, %15
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = and i64 %18, 4278190080
%20 = shl i64 %19, 8
%21 = or i64 %16, %20
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = and i64 %23, 1095216660480
%25 = lshr i64 %24, 8
%26 = or i64 %21, %25
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = and i64 %28, 280375465082880
%30 = lshr i64 %29, 24
%31 = or i64 %26, %30
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = and i64 %33, 71776119061217280
%35 = lshr i64 %34, 40
%36 = or i64 %31, %35
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = and i64 %38, -72057594037927936
%40 = lshr i64 %39, 56
%41 = or i64 %36, %40
%42 = trunc i64 %41 to i32
store i32 %42, i32* %2
%43 = load i32, i32* %2
ret i32 %43
}

LLVM IR (-O2):
define i32 @store_ntohll(i32 %0) {
ret i32 poison
}
int _is_auto_type_starting_letter(char c) {
  if (c == 'f' || c == 'a' || (c >= 'A' && c <= 'Z'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<_is_auto_type_starting_letter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
je     113e <_is_auto_type_starting_letter+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
je     113e <_is_auto_type_starting_letter+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     114a <_is_auto_type_starting_letter+0x4a>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     114a <_is_auto_type_starting_letter+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <_is_auto_type_starting_letter+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_auto_type_starting_letter>:
mov    $0x1,%eax
cmp    $0x61,%dil
je     1111 <_is_auto_type_starting_letter+0x11>
cmp    $0x66,%dil
jne    1112 <_is_auto_type_starting_letter+0x12>
ret
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @_is_auto_type_starting_letter(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 102
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 97
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 90
br i1 %18, label %19, label %20
19: ; preds = %15, %7, %1
store i32 1, i32* %2
br label %21
20: ; preds = %15, %11
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @_is_auto_type_starting_letter(i8 signext %0) {
switch i8 %0, label %2 [
i8 102, label %6
i8 97, label %6
]
2: ; preds = %1
%3 = add i8 %0, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
br label %6
6: ; preds = %2, %1, %1
%7 = phi i32 [ 1, %1 ], [ 1, %1 ], [ %5, %2 ]
ret i32 %7
}
char symbolToDraw(char condition, float averageTemperature) {
  char symbolFunction5;
  if (condition == 's')
    symbolFunction5 = '@';
  else if (condition == 'c')
    symbolFunction5 = '~';
  else if (condition == 'p' && averageTemperature <= 0)
    symbolFunction5 = '*';
  else
    symbolFunction5 = ';';
  return symbolFunction5;
}


x86 assembly (clang, -O0):
<symbolToDraw>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movss  %xmm0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x73,%eax
jne    1125 <symbolToDraw+0x25>
movb   $0x40,-0x9(%rbp)
jmp    116c <symbolToDraw+0x6c>
movsbl -0x1(%rbp),%eax
cmp    $0x63,%eax
jne    113b <symbolToDraw+0x3b>
movb   $0x7e,-0x9(%rbp)
jmp    1167 <symbolToDraw+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x70,%eax
jne    115e <symbolToDraw+0x5e>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     115e <symbolToDraw+0x5e>
movb   $0x2a,-0x9(%rbp)
jmp    1162 <symbolToDraw+0x62>
movb   $0x3b,-0x9(%rbp)
jmp    1167 <symbolToDraw+0x67>
jmp    116c <symbolToDraw+0x6c>
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbolToDraw>:
cmp    $0x73,%dil
je     110f <symbolToDraw+0xf>
cmp    $0x63,%dil
jne    1112 <symbolToDraw+0x12>
mov    $0x7e,%al
ret
mov    $0x40,%al
ret
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
mov    $0x2a,%eax
mov    $0x3b,%ecx
cmovb  %ecx,%eax
cmp    $0x70,%dil
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @symbolToDraw(i8 signext %0, float %1) {
%3 = alloca i8
%4 = alloca float
%5 = alloca i8
store i8 %0, i8* %3
store float %1, float* %4
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 115
br i1 %8, label %9, label %10
9: ; preds = %2
store i8 64, i8* %5
br label %26
10: ; preds = %2
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 99
br i1 %13, label %14, label %15
14: ; preds = %10
store i8 126, i8* %5
br label %25
15: ; preds = %10
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 112
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load float, float* %4
%21 = fcmp ole float %20, 0.000000e+00
br i1 %21, label %22, label %23
22: ; preds = %19
store i8 42, i8* %5
br label %24
23: ; preds = %19, %15
store i8 59, i8* %5
br label %24
24: ; preds = %23, %22
br label %25
25: ; preds = %24, %14
br label %26
26: ; preds = %25, %9
%27 = load i8, i8* %5
ret i8 %27
}

LLVM IR (-O2):
define signext i8 @symbolToDraw(i8 signext %0, float %1) {
switch i8 %0, label %4 [
i8 115, label %9
i8 99, label %3
]
3: ; preds = %2
br label %9
4: ; preds = %2
%5 = icmp eq i8 %0, 112
%6 = fcmp ole float %1, 0.000000e+00
%7 = and i1 %5, %6
%8 = select i1 %7, i8 42, i8 59
br label %9
9: ; preds = %4, %2, %3
%10 = phi i8 [ 126, %3 ], [ 64, %2 ], [ %8, %4 ]
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ init_status_led();
int /*<<< orphan*/ turn_on_led();
int main() {
  init_status_led();
  turn_on_led();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init_status_led()
%2 = tail call i32 (...) @turn_on_led()
ret i32 0
}
/* Variables and functions */
scalar_t__ ArgItem();
int Cnd_Is(void) { return (ArgItem() == ArgItem()); }


x86 assembly (clang, -O0):
<Cnd_Is>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ArgItem@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ArgItem@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cnd_Is>:
push   %rbx
xor    %eax,%eax
call   1030 <ArgItem@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <ArgItem@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Cnd_Is() {
%1 = call i64 (...) @ArgItem()
%2 = call i64 (...) @ArgItem()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @Cnd_Is() {
%1 = tail call i64 (...) @ArgItem()
%2 = tail call i64 (...) @ArgItem()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
int typed_oldstyle0() { ; }


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

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

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

LLVM IR (-O2):
define i32 @typed_oldstyle0() {
ret i32 undef
}
unsigned int syracuse(unsigned int n) {
  unsigned int c = 0;
  while (n != 1) {
    if (n & 1) {
      n = (3 * n + 1) / 2;
      ++c;
    } else
      n = n / 2;
    ++c;
  }
  return c;
}


x86 assembly (clang, -O0):
<syracuse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     1159 <syracuse+0x59>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1142 <syracuse+0x42>
imul   $0x3,-0x4(%rbp),%eax
add    $0x1,%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <syracuse+0x4b>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <syracuse+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<syracuse>:
xor    %eax,%eax
cmp    $0x1,%edi
je     112a <syracuse+0x2a>
xor    %eax,%eax
nopl   0x0(%rax)
mov    %edi,%ecx
and    $0x1,%ecx
lea    0x1(%rdi,%rdi,2),%edx
cmove  %edi,%edx
shr    %edx
add    %ecx,%eax
add    $0x1,%eax
mov    %edx,%edi
cmp    $0x1,%edx
jne    1110 <syracuse+0x10>
ret

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

LLVM IR (-O2):
define i32 @syracuse(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %17, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %15, %3 ], [ 0, %1 ]
%5 = phi i32 [ %13, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
%8 = mul i32 %5, 3
%9 = add i32 %8, 1
%10 = select i1 %7, i32 %5, i32 %9
%11 = xor i1 %7, true
%12 = zext i1 %11 to i32
%13 = lshr i32 %10, 1
%14 = add i32 %4, 1
%15 = add i32 %14, %12
%16 = icmp eq i32 %13, 1
br i1 %16, label %17, label %3
17: ; preds = %3, %1
%18 = phi i32 [ 0, %1 ], [ %15, %3 ]
ret i32 %18
}
/* Variables and functions */
int NewPosition4givenTau(double, double *, double *, double *);
int /*<<< orphan*/ genrand_real2();
double log(int /*<<< orphan*/);
int NewPosition(double new_xyz[3], double xyz[3], double vel[3]) {
  int photon_goes_out;
  double tau_goal;
  tau_goal = -log(genrand_real2());
  photon_goes_out = NewPosition4givenTau(tau_goal, new_xyz, xyz, vel);
  return photon_goes_out;
}


x86 assembly (clang, -O0):
<NewPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <genrand_real2@plt>
mov    %eax,%edi
call   1050 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <NewPosition4givenTau@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewPosition>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <genrand_real2@plt>
mov    %eax,%edi
call   1050 <log@plt>
xorps  0xead(%rip),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <NewPosition4givenTau@plt>

LLVM IR (-O0):
define i32 @NewPosition(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%9 = call i32 (...) @genrand_real2()
%10 = call double @log(i32 %9)
%11 = fneg double %10
store double %11, double* %8
%12 = load double, double* %8
%13 = load double*, double** %4
%14 = load double*, double** %5
%15 = load double*, double** %6
%16 = call i32 @NewPosition4givenTau(double %12, double* %13, double* %14, double* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @NewPosition(double* %0, double* %1, double* %2) {
%4 = tail call i32 (...) @genrand_real2()
%5 = tail call double @log(i32 %4)
%6 = fneg double %5
%7 = tail call i32 @NewPosition4givenTau(double %6, double* %0, double* %1, double* %2)
ret i32 %7
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int IsDirectory(const char *filename) {
  struct stat st;
  if (stat(filename, &st) == 0)
    return S_ISDIR(st.st_mode);
  return 0;
}


x86 assembly (clang, -O0):
<IsDirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1153 <IsDirectory+0x33>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
jmp    115a <IsDirectory+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsDirectory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <IsDirectory+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @IsDirectory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @S_ISDIR(i32 %10)
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @IsDirectory(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ HwColibriHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HwColibriRequestUpdate() { UAVObjRequestUpdate(HwColibriHandle()); }


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

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

LLVM IR (-O0):
define void @HwColibriRequestUpdate() {
%1 = call i32 (...) @HwColibriHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwColibriRequestUpdate() {
%1 = tail call i32 (...) @HwColibriHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dead();
void test9(int i) {
  switch (1) {
  case 5:
    dead();
  case 1:
    ++i;
  case 4:
    ++i;
    break;
  }
}


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

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

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

LLVM IR (-O2):
define void @test9(i32 %0) {
ret void
}
int Data_Splitter_Table(unsigned long int msg, unsigned char *pData) {
  int j = sizeof(msg);
  int i;
  for (i = 0; i < j; i++) {
    pData[j - i - 1] = (unsigned char)(msg >> i * 8) & 0xFF;
  }
}


x86 assembly (clang, -O0):
<Data_Splitter_Table>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x8,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1160 <Data_Splitter_Table+0x60>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x3,%ecx
mov    %ecx,%ecx
shr    %cl,%rax
movzbl %al,%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111a <Data_Splitter_Table+0x1a>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Data_Splitter_Table(i64 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 8, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %29, %2
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %32
12: ; preds = %8
%13 = load i64, i64* %4
%14 = load i32, i32* %7
%15 = mul nsw i32 %14, 8
%16 = zext i32 %15 to i64
%17 = lshr i64 %13, %16
%18 = trunc i64 %17 to i8
%19 = zext i8 %18 to i32
%20 = and i32 %19, 255
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %5
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = sub nsw i32 %23, %24
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %22, i64 %27
store i8 %21, i8* %28
br label %29
29: ; preds = %12
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %8
32: ; preds = %8
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @Data_Splitter_Table(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
%4 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %3, i8* %4
%5 = lshr i64 %0, 8
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %6, i8* %7
%8 = lshr i64 %0, 16
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %9, i8* %10
%11 = lshr i64 %0, 24
%12 = trunc i64 %11 to i8
%13 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %12, i8* %13
%14 = lshr i64 %0, 32
%15 = trunc i64 %14 to i8
%16 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %15, i8* %16
%17 = lshr i64 %0, 40
%18 = trunc i64 %17 to i8
%19 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %18, i8* %19
%20 = lshr i64 %0, 48
%21 = trunc i64 %20 to i8
%22 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %21, i8* %22
%23 = lshr i64 %0, 56
%24 = trunc i64 %23 to i8
store i8 %24, i8* %1
ret i32 undef
}
int f9(x)
int x;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f9(i32 %0) {
ret i32 0
}