xunge/DecIR huggingface dataset:
void bintime_addx(void) {
  int u;
  if (u > 1)
    ;
}


x86 assembly (clang, -O0):
<bintime_addx>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x1,-0x4(%rbp)
jle    1113 <bintime_addx+0x13>
jmp    1113 <bintime_addx+0x13>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @bintime_addx() {
ret void
}
void add_sources_ac_sim_2_or_3_cuda_(long *Mesh_pointer, int *iphasef, int *it,
                                     int *nadj_rec_local, int *NSTEP) {}


x86 assembly (clang, -O0):
<add_sources_ac_sim_2_or_3_cuda_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @add_sources_ac_sim_2_or_3_cuda_(i64* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i64*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i64* %0, i64** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
ret void
}

LLVM IR (-O2):
define void @add_sources_ac_sim_2_or_3_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4) {
ret void
}
/* Variables and functions */
float abs(float);
float sign(float);
float nonzero(float f, float eps) {
  float r;
  if (abs(f) < eps)
    r = sign(f) * eps;
  else
    r = f;
  return r;
}


x86 assembly (clang, -O0):
<nonzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1166 <nonzero+0x46>
movss  -0x4(%rbp),%xmm0
call   1040 <sign@plt>
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1170 <nonzero+0x50>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonzero>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
call   1030 <abs@plt>
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    114e <nonzero+0x2e>
movss  (%rsp),%xmm0
call   1040 <sign@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret
movss  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @nonzero(float %0, float %1) {
%3 = tail call float @abs(float %0)
%4 = fcmp olt float %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call float @sign(float %0)
%7 = fmul float %6, %1
br label %8
8: ; preds = %2, %5
%9 = phi float [ %7, %5 ], [ %0, %2 ]
ret float %9
}
int test_imm_45uint8_mem(unsigned char *val) {
  return ((*val) & (-0x45 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_45uint8_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, -69
%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_45uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -69
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void *test_anti_range_103(int n) {
  extern void *alloc_anti_range_103(int) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 2)
    n = 0 - 1;
  return alloc_anti_range_103(n);
}


x86 assembly (clang, -O0):
<test_anti_range_103>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jg     1137 <test_anti_range_103+0x27>
cmpl   $0x2,-0x4(%rbp)
jg     1137 <test_anti_range_103+0x27>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <alloc_anti_range_103@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_103>:
cmp    $0x3,%edi
mov    $0xffffffff,%eax
cmovb  %eax,%edi
jmp    1030 <alloc_anti_range_103@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_103(i32 %0) {
%2 = icmp ult i32 %0, 3
%3 = select i1 %2, i32 -1, i32 %0
%4 = tail call i8* @alloc_anti_range_103(i32 %3)
ret i8* %4
}
float vec2_squaredDistance(float *a, float *b) {
  float x = b[0] - a[0], y = b[1] - a[1];
  return x * x + y * y;
}


x86 assembly (clang, -O0):
<vec2_squaredDistance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
subss  0x4(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_squaredDistance>:
movss  (%rsi),%xmm0
movss  0x4(%rsi),%xmm1
subss  (%rdi),%xmm0
subss  0x4(%rdi),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vec2_squaredDistance(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
%6 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%7 = load float*, float** %4
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %3
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
store float %13, float* %5
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %3
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
%20 = fsub float %16, %19
store float %20, float* %6
%21 = load float, float* %5
%22 = load float, float* %5
%23 = load float, float* %6
%24 = load float, float* %6
%25 = fmul float %23, %24
%26 = call float @llvm.fmuladd.f32(float %21, float %22, float %25)
ret float %26
}

LLVM IR (-O2):
define float @vec2_squaredDistance(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = load float, float* %0
%5 = fsub float %3, %4
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = fsub float %7, %9
%11 = fmul float %10, %10
%12 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %11)
ret float %12
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_setr_epi8(int, int, int, int, int, int, int, int,
                                 int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/, int,
                                 int, int, int);
int /*<<< orphan*/ _mm_shuffle_epi8(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i continuationLengths(__m128i high_nibbles) {
  return _mm_shuffle_epi8(
      _mm_setr_epi8(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 3, 4),
      high_nibbles);
}


x86 assembly (clang, -O0):
<continuationLengths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%r9d
xor    %eax,%eax
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x2,0x30(%rsp)
movl   $0x2,0x38(%rsp)
movl   $0x3,0x40(%rsp)
movl   $0x4,0x48(%rsp)
call   1040 <_mm_setr_epi8@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1030 <_mm_shuffle_epi8@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<continuationLengths>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   $0x4
push   $0x3
push   $0x2
push   $0x2
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   $0x1
push   $0x1
call   1040 <_mm_setr_epi8@plt>
add    $0x50,%rsp
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <_mm_shuffle_epi8@plt>

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

LLVM IR (-O2):
define i32 @continuationLengths(i32 %0) {
%2 = tail call i32 @_mm_setr_epi8(i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2, i32 2, i32 3, i32 4)
%3 = tail call i32 @_mm_shuffle_epi8(i32 %2, i32 %0)
ret i32 %3
}
__attribute__((always_)) unsigned max_unsigned(unsigned a, unsigned b) {
  return a > b ? a : b;
}


x86 assembly (clang, -O0):
<max_unsigned>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1121 <max_unsigned+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max_unsigned+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_unsigned>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max_unsigned(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
char getchar();
int i_clean_stdin() {
  while ('\n' == getchar()) {
    continue;
  }
  return (0);
}


x86 assembly (clang, -O0):
<i_clean_stdin>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <i_clean_stdin+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
jne    1135 <i_clean_stdin+0x25>
jmp    1119 <i_clean_stdin+0x9>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_clean_stdin>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     1120 <i_clean_stdin+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @i_clean_stdin() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp eq i32 10, %3
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @i_clean_stdin() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %1, label %4
4: ; preds = %1
ret i32 0
}
f() { return 5LL; }


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

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

LLVM IR (-O0):
define i32 @f() {
ret i32 5
}

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

/* Variables and functions */
uint32_t htol_u32(uint32_t hostval) { return hostval; }


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

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

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

LLVM IR (-O2):
define i32 @htol_u32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void time_end(int value) {
  printf("PASS: test22\n");
  exit(0);
}


x86 assembly (clang, -O0):
<time_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<time_end>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"PASS: test22\0A\00"
define void @time_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [13 x i8] c"PASS: test22\00"
define void @time_end(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_andnot_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_cmpgt_epi8(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i
_MM_MIN_EPI8(__m128i a, __m128i b) {
  __m128i cmp, resa, resb;
  cmp = _mm_cmpgt_epi8(b, a);
  resa = _mm_and_si128(cmp, a);
  resb = _mm_andnot_si128(cmp, b);
  return _mm_or_si128(resa, resb);
}


x86 assembly (clang, -O0):
<_MM_MIN_EPI8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_mm_cmpgt_epi8@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <_mm_and_si128@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <_mm_andnot_si128@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <_mm_or_si128@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MM_MIN_EPI8>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %esi,%edi
mov    %ebp,%esi
call   1030 <_mm_cmpgt_epi8@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    %ebp,%esi
call   1060 <_mm_and_si128@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r14d,%esi
call   1050 <_mm_andnot_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <_mm_or_si128@plt>

LLVM IR (-O0):
define i32 @_MM_MIN_EPI8(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @_mm_cmpgt_epi8(i32 %8, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = call i32 @_mm_and_si128(i32 %11, i32 %12)
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @_mm_andnot_si128(i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 @_mm_or_si128(i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @_MM_MIN_EPI8(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_epi8(i32 %1, i32 %0)
%4 = tail call i32 @_mm_and_si128(i32 %3, i32 %0)
%5 = tail call i32 @_mm_andnot_si128(i32 %3, i32 %1)
%6 = tail call i32 @_mm_or_si128(i32 %4, i32 %5)
ret i32 %6
}
int snd_info_done(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @snd_info_done() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("%s DID NOT ACTUALLY VERIFY THE SIGNATURE OF ANY CODE "
         "THIS IS JUST A STUB\n",
         argv[0]);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [74 x i8] c"%s DID NOT ACTUALLY VERIFY THE SIGNATURE OF ANY CODE THIS IS JUST A STUB\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [74 x i8] c"%s DID NOT ACTUALLY VERIFY THE SIGNATURE OF ANY CODE THIS IS JUST A STUB\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void foo331(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo331(i32 %0) {
ret void
}
unsigned char svs_size_code(int w) {
  if (w <= 40) {
    return '1';
  }
  if (w <= 128) {
    return '2';
  }
  if (w <= 160) {
    return '3';
  }
  if (w <= 320) {
    return '4';
  }
  if (w <= 640) {
    return '7';
  }
  return '9';
}


x86 assembly (clang, -O0):
<svs_size_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x28,-0x8(%rbp)
jg     111a <svs_size_code+0x1a>
movb   $0x31,-0x1(%rbp)
jmp    1176 <svs_size_code+0x76>
cmpl   $0x80,-0x8(%rbp)
jg     1130 <svs_size_code+0x30>
movb   $0x32,-0x1(%rbp)
jmp    1176 <svs_size_code+0x76>
cmpl   $0xa0,-0x8(%rbp)
jg     1146 <svs_size_code+0x46>
movb   $0x33,-0x1(%rbp)
jmp    1176 <svs_size_code+0x76>
cmpl   $0x140,-0x8(%rbp)
jg     115c <svs_size_code+0x5c>
movb   $0x34,-0x1(%rbp)
jmp    1176 <svs_size_code+0x76>
cmpl   $0x280,-0x8(%rbp)
jg     1172 <svs_size_code+0x72>
movb   $0x37,-0x1(%rbp)
jmp    1176 <svs_size_code+0x76>
movb   $0x39,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<svs_size_code>:
mov    $0x31,%al
cmp    $0x29,%edi
jl     1132 <svs_size_code+0x32>
mov    $0x32,%al
cmp    $0x81,%edi
jb     1132 <svs_size_code+0x32>
mov    $0x33,%al
cmp    $0xa1,%edi
jb     1132 <svs_size_code+0x32>
mov    $0x34,%al
cmp    $0x141,%edi
jb     1132 <svs_size_code+0x32>
cmp    $0x281,%edi
setae  %al
add    %al,%al
add    $0x37,%al
ret

LLVM IR (-O0):
define zeroext i8 @svs_size_code(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 40
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 49, i8* %2
br label %24
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 128
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 50, i8* %2
br label %24
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp sle i32 %12, 160
br i1 %13, label %14, label %15
14: ; preds = %11
store i8 51, i8* %2
br label %24
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 320
br i1 %17, label %18, label %19
18: ; preds = %15
store i8 52, i8* %2
br label %24
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp sle i32 %20, 640
br i1 %21, label %22, label %23
22: ; preds = %19
store i8 55, i8* %2
br label %24
23: ; preds = %19
store i8 57, i8* %2
br label %24
24: ; preds = %23, %22, %18, %14, %10, %6
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @svs_size_code(i32 %0) {
%2 = icmp slt i32 %0, 41
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 129
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 161
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 321
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp ult i32 %0, 641
%11 = select i1 %10, i8 55, i8 57
br label %12
12: ; preds = %9, %7, %5, %3, %1
%13 = phi i8 [ 49, %1 ], [ 50, %3 ], [ 51, %5 ], [ 52, %7 ], [ %11, %9 ]
ret i8 %13
}
int compoundLiteralTest2() {
  int index = 0;
  for (index = 0; index < 3; index++) {
    int thing = (int[][3]){{0, 0, 0}, {1, 1, 1}, {2, 2, 2}}[index][index];
    printf("thing: %i\n", thing);
  }
  return 0;
}


x86 assembly (clang, -O0):
<compoundLiteralTest2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    118d <compoundLiteralTest2+0x6d>
lea    -0x2c(%rbp),%rdi
lea    0x2ee5(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movslq -0x4(%rbp),%rcx
lea    -0x2c(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <compoundLiteralTest2+0x16>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compoundLiteralTest2>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"thing: %i\0A\00"
define i32 @compoundLiteralTest2() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int anetSetTcpNoDelay(char *, int, int /*<<< orphan*/);
int anetDisableTcpNoDelay(char *err, int fd) {
  return anetSetTcpNoDelay(err, fd, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @anetDisableTcpNoDelay(i8* %0, i32 %1) {
%3 = tail call i32 @anetSetTcpNoDelay(i8* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xb1() {
  Assert_real((islower(177) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              890, ("islower should be 0 for 0xb1"));
}


x86 assembly (clang, -O0):
<t_islower_0xb1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb1,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x37a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0xb1>:
push   %rax
mov    $0xb1,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xb1\00"
define void @t_islower_0xb1() {
%1 = call i64 @islower(i32 177)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xb1\00"
define void @t_islower_0xb1() {
%1 = tail call i64 @islower(i32 177)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float bar(double, double, int);
int /*<<< orphan*/ printf(char *, float, float, float);
int main() {
  float a = bar(2, 3, -7);
  float b = bar(1e12, 1, 0);
  float c = bar(.034, 57.2, 5);
  printf("%f %f %f\n", a, b, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xef0(%rip),%xmm0
movsd  0xef0(%rip),%xmm1
mov    $0xfffffff9,%edi
call   1030 <bar@plt>
movss  %xmm0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  0xec1(%rip),%xmm1
xor    %edi,%edi
call   1030 <bar@plt>
movss  %xmm0,-0x8(%rbp)
movsd  0xe95(%rip),%xmm0
movsd  0xe95(%rip),%xmm1
mov    $0x5,%edi
call   1030 <bar@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
mov    $0xfffffff9,%edi
call   1030 <bar@plt>
movss  %xmm0,0x4(%rsp)
movsd  0xec7(%rip),%xmm0
movsd  0xec7(%rip),%xmm1
xor    %edi,%edi
call   1030 <bar@plt>
movss  %xmm0,(%rsp)
movsd  0xebb(%rip),%xmm0
movsd  0xebb(%rip),%xmm1
mov    $0x5,%edi
call   1030 <bar@plt>
movaps %xmm0,%xmm2
lea    0xeaf(%rip),%rdi
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call float @bar(double 2.000000e+00, double 3.000000e+00, i32 -7)
store float %4, float* %1
%5 = call float @bar(double 1.000000e+12, double 1.000000e+00, i32 0)
store float %5, float* %2
%6 = call float @bar(double 3.400000e-02, double 5.720000e+01, i32 5)
store float %6, float* %3
%7 = load float, float* %1
%8 = load float, float* %2
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %7, float %8, float %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = tail call float @bar(double 2.000000e+00, double 3.000000e+00, i32 -7)
%2 = tail call float @bar(double 1.000000e+12, double 1.000000e+00, i32 0)
%3 = tail call float @bar(double 3.400000e-02, double 5.720000e+01, i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %1, float %2, float %3)
ret i32 0
}
void foo303(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo303(i32 %0) {
ret void
}
/* Variables and functions */
int EINVAL;
int check_align(size_t align) {
  for (size_t i = sizeof(void *); i != 0; i *= 2)
    if (align == i)
      return 0;
  return EINVAL;
}


x86 assembly (clang, -O0):
<check_align>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x8,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114b <check_align+0x4b>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1135 <check_align+0x35>
movl   $0x0,-0x4(%rbp)
jmp    1157 <check_align+0x57>
jmp    113a <check_align+0x3a>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <check_align+0x10>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_align>:
mov    $0x8,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rcx
test   %rax,%rax
je     1121 <check_align+0x21>
lea    (%rcx,%rcx,1),%rax
cmp    %rdi,%rcx
jne    1110 <check_align+0x10>
xor    %eax,%eax
test   %rcx,%rcx
jne    1131 <check_align+0x31>
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @check_align(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 8, %1 ], [ %7, %2 ]
%4 = icmp eq i64 %3, 0
%5 = icmp eq i64 %3, %0
%6 = or i1 %4, %5
%7 = shl i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i32, i32* @EINVAL
%10 = select i1 %4, i32 %9, i32 0
ret i32 %10
}
/* Variables and functions */
char *memchr(void *, int, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *strchr(const char *src, int cmp) {
  return memchr((void *)src, cmp, strlen(src));
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    %eax,%edx
call   1040 <memchr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <memchr@plt>

LLVM IR (-O0):
define i8* @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 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @memchr(i8* %5, i32 %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i8* @memchr(i8* %0, i32 %1, i32 %3)
ret i8* %4
}
/* Type definitions */
struct lb {
  int dummy;
};

/* Variables and functions */
int lb_add(struct lb *, int, int, char const *, int /*<<< orphan*/,
           int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/ *,
           void const *);
int lb_word(struct lb *p, int width, const char *word, const void *info) {
  return lb_add(p, 1, width, word, 0, NULL, 0, NULL, info);
}


x86 assembly (clang, -O0):
<lb_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    $0x1,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <lb_add@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lb_word>:
push   %rax
mov    %rcx,%rax
mov    %rdx,%rcx
mov    %esi,%edx
sub    $0x8,%rsp
mov    $0x1,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rax
push   $0x0
push   $0x0
call   1030 <lb_add@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.lb = type { i32 }
define i32 @lb_word(%struct.lb* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.lb*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.lb* %0, %struct.lb** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.lb*, %struct.lb** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @lb_add(%struct.lb* %9, i32 1, i32 %10, i8* %11, i32 0, i32* null, i32 0, i32* null, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.lb = type { i32 }
define i32 @lb_word(%struct.lb* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @lb_add(%struct.lb* %0, i32 1, i32 %1, i8* %2, i32 0, i32* null, i32 0, i32* null, i8* %3)
ret i32 %5
}
int fun_1(short *arr1, int index, short *arr2) {
  arr1[index + 1] = 10;
  arr1[index + 2] = 10;
  return (index + 1) * 2;
}


x86 assembly (clang, -O0):
<fun_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movw   $0xa,(%rax,%rcx,2)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movw   $0xa,(%rax,%rcx,2)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_1>:
movslq %esi,%rax
movl   $0xa000a,0x2(%rdi,%rax,2)
add    %eax,%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @fun_1(i16* %0, i32 %1, i16* %2) {
%4 = alloca i16*
%5 = alloca i32
%6 = alloca i16*
store i16* %0, i16** %4
store i32 %1, i32* %5
store i16* %2, i16** %6
%7 = load i16*, i16** %4
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i16, i16* %7, i64 %10
store i16 10, i16* %11
%12 = load i16*, i16** %4
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i16, i16* %12, i64 %15
store i16 10, i16* %16
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
%19 = mul nsw i32 %18, 2
ret i32 %19
}

LLVM IR (-O2):
define i32 @fun_1(i16* nocapture writeonly %0, i32 %1, i16* nocapture readnone %2) {
%4 = add nsw i32 %1, 1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i16, i16* %0, i64 %5
store i16 10, i16* %6
%7 = add nsw i32 %1, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i16, i16* %0, i64 %8
store i16 10, i16* %9
%10 = shl nsw i32 %4, 1
ret i32 %10
}
main() {
  int i = 0;
  do {
  } while (i < 5);
  printf(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    112b <main+0x1b>
cmpl   $0x5,-0x8(%rbp)
jl     1126 <main+0x16>
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %4, %0
br label %4
4: ; preds = %3
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5
br i1 %6, label %3, label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
%11 = call i32 (i8*, ...) @printf(i8* %10)
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ call7k(char, int, short, long, float, unsigned char, double,
                          unsigned short, unsigned long, unsigned int);
void call7j(unsigned int ui, char c, int i, short s, long l, float f,
            unsigned char uc, double d, unsigned short us, unsigned long ul) {
  call7k(c, i, s, l, f, uc, d, us, ul, ui);
}


x86 assembly (clang, -O0):
<call7j>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %r9b,%al
mov    0x18(%rbp),%r9
mov    0x10(%rbp),%r9w
mov    %edi,-0x4(%rbp)
mov    %sil,-0x5(%rbp)
mov    %edx,-0xc(%rbp)
mov    %cx,-0xe(%rbp)
mov    %r8,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    %al,-0x1d(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    -0x5(%rbp),%dil
mov    -0xc(%rbp),%esi
mov    -0xe(%rbp),%dx
mov    -0x18(%rbp),%rcx
movss  -0x1c(%rbp),%xmm0
mov    -0x1d(%rbp),%r8b
movsd  -0x28(%rbp),%xmm1
mov    0x10(%rbp),%r9w
mov    0x18(%rbp),%r10
mov    -0x4(%rbp),%eax
movsbl %dil,%edi
movswl %dx,%edx
movzbl %r8b,%r8d
movzwl %r9w,%r9d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <call7k@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call7j>:
push   %rax
mov    %r9d,%r10d
mov    %edi,%eax
movzwl 0x10(%rsp),%r9d
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8,%rcx
mov    %r10d,%r8d
push   %rax
push   0x20(%rsp)
call   1030 <call7k@plt>
add    $0x10,%rsp
pop    %rax
ret

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

LLVM IR (-O2):
define void @call7j(i32 %0, i8 signext %1, i32 %2, i16 signext %3, i64 %4, float %5, i8 zeroext %6, double %7, i16 zeroext %8, i64 %9) {
%11 = tail call i32 @call7k(i8 signext %1, i32 %2, i16 signext %3, i64 %4, float %5, i8 zeroext %6, double %7, i16 zeroext %8, i64 %9, i32 %0)
ret void
}
void usetup() { return; }


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

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

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

LLVM IR (-O2):
define void @usetup() {
ret void
}
/* Variables and functions */
int isValid(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", isValid("[{[{[(())]}]}]"));
  printf("%d", isValid("[{[{[(())]]}]"));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedb(%rip),%rdi
call   1040 <isValid@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
call   1040 <isValid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [15 x i8] c"[{[{[(())]}]}]\00"
@.str.2 = [14 x i8] c"[{[{[(())]]}]\00"
define i32 @main() {
%1 = tail call i32 @isValid(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @isValid(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int main() {
  for (int i = 0; i < 10; i++) {
  }
ERROR:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    112f <main+0x2f>
jmp    1121 <main+0x21>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
jmp    1134 <main+0x34>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void UART0_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @UART0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int mbr_is_valid_magic(const unsigned char *mbr) {
  return mbr[510] == 0x55 && mbr[511] == 0xaa ? 1 : 0;
}


x86 assembly (clang, -O0):
<mbr_is_valid_magic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1fe(%rax),%ecx
xor    %eax,%eax
cmp    $0x55,%ecx
mov    %al,-0x9(%rbp)
jne    1137 <mbr_is_valid_magic+0x37>
mov    -0x8(%rbp),%rax
movzbl 0x1ff(%rax),%eax
cmp    $0xaa,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbr_is_valid_magic>:
xor    %eax,%eax
cmpb   $0x55,0x1fe(%rdi)
jne    1117 <mbr_is_valid_magic+0x17>
xor    %eax,%eax
cmpb   $0xaa,0x1ff(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @mbr_is_valid_magic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 510
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 85
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 511
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 170
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ false, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 1, i32 0
ret i32 %17
}

LLVM IR (-O2):
define i32 @mbr_is_valid_magic(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 510
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 85
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 511
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, -86
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Type definitions */
struct t_creature {
  int dummy;
};

/* Variables and functions */
struct t_creature *getChaseDriver(struct t_creature *e) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.t_creature = type { i32 }
define %struct.t_creature* @getChaseDriver(%struct.t_creature* %0) {
%2 = alloca %struct.t_creature*
store %struct.t_creature* %0, %struct.t_creature** %2
ret %struct.t_creature* null
}

LLVM IR (-O2):
%struct.t_creature = type { i32 }
define noalias %struct.t_creature* @getChaseDriver(%struct.t_creature* nocapture readnone %0) {
ret %struct.t_creature* null
}