xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __unit_test_24();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
__attribute__((constructor)) void __unit_test_caller_24() {
  if (0 && !__unit_test_24())
    fprintf(stderr, "[Error : UnitTest failed] in file : %s at line %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/DaemonSnake/ObjectC/refs/heads/master/"
            "test/Future/toImplement/unitFailure.c",
            24);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unit_test_caller_24, i8* null }]
define void @__unit_test_caller_24() {
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
define void @__unit_test_caller_24() {
ret void
}
/* Variables and functions */
unsigned char *hmac_blake2b(unsigned char *, unsigned char const *, size_t,
                            unsigned char const *, size_t);
unsigned char *mac_hmac_blake2b(unsigned char *out, const unsigned char *key,
                                size_t key_len, const unsigned char *msg,
                                size_t msg_len) {
  return hmac_blake2b(out, key, key_len, msg, msg_len);
}


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

x86 assembly (clang, -O2):
<mac_hmac_blake2b>:
jmp    1030 <hmac_blake2b@plt>

LLVM IR (-O0):
define i8* @mac_hmac_blake2b(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i8* @hmac_blake2b(i8* %11, i8* %12, i64 %13, i8* %14, i64 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @mac_hmac_blake2b(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_blake2b(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
int buscaSentinela(int vetor[], int chave) {
  vetor[10] = chave;
  int aux = 0;
  while (vetor[aux] != chave)
    aux++;
  if (aux == 10)
    return -1;
  else
    return aux;
}


x86 assembly (clang, -O0):
<buscaSentinela>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x28(%rax)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
je     113e <buscaSentinela+0x3e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <buscaSentinela+0x1c>
cmpl   $0xa,-0x18(%rbp)
jne    1154 <buscaSentinela+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <buscaSentinela+0x5a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buscaSentinela>:
mov    %esi,0x28(%rdi)
mov    $0xffffffff,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%ecx
lea    0x4(%rdi),%rax
cmp    %esi,(%rdi)
mov    %rax,%rdi
jne    1110 <buscaSentinela+0x10>
cmp    $0xa,%ecx
mov    $0xffffffff,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @buscaSentinela(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 10
store i32 %1, i32* %3
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, %1
%9 = add nuw i64 %5, 1
br i1 %8, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
%12 = icmp eq i32 %11, 10
%13 = select i1 %12, i32 -1, i32 %11
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ scan_group();
void main(int argc, char **argv) {
  scan_group();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <scan_group@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <scan_group@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @scan_group()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @scan_group()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void link_error(void) { abort(); }


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

x86 assembly (clang, -O2):
<link_error>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @link_error() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @link_error() {
%1 = tail call i32 (...) @abort()
unreachable
}
float iprod(float *a, float *b) {
  return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
}


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

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

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

LLVM IR (-O2):
define float @iprod(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
/* Variables and functions */
int dtree_procfs_reset();
int dtree_reset(void) { return dtree_procfs_reset(); }


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

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

LLVM IR (-O0):
define i32 @dtree_reset() {
%1 = call i32 (...) @dtree_procfs_reset()
ret i32 %1
}

LLVM IR (-O2):
define i32 @dtree_reset() {
%1 = tail call i32 (...) @dtree_procfs_reset()
ret i32 %1
}
void free_2d_ld(long double **ptr, long height) {
  int i;
  for (i = 0; i < height; i++) {
    free(ptr[i]);
  }
  free(ptr);
}


x86 assembly (clang, -O0):
<free_2d_ld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1154 <free_2d_ld+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <free_2d_ld+0x17>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_2d_ld>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %rsi,%rsi
jle    1142 <free_2d_ld+0x32>
mov    %rsi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_2d_ld+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_2d_ld(x86_fp80** nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds x86_fp80*, x86_fp80** %0, i64 %5
%7 = bitcast x86_fp80** %6 to i8**
%8 = load i8*, i8** %7
tail call void @free(i8* %8)
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = bitcast x86_fp80** %0 to i8*
tail call void @free(i8* %12)
ret void
}
indreg0imm1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((*p0) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzwl (%rax),%eax
cmp    $0x21,%eax
jg     113b <indreg0imm1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <indreg0imm1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0imm1>:
xor    %eax,%eax
cmpw   $0x22,(%r8)
setb   %al
ret

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

LLVM IR (-O2):
define i32 @indreg0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = load i16, i16* %4
%8 = icmp ult i16 %7, 34
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int __builtin_spe_mfspefscr();
void __ev_set_spefscr_frmc(int rnd) {
  int i;
  i = __builtin_spe_mfspefscr();
  i &= ~0x00000003;
  i |= rnd;
}


x86 assembly (clang, -O0):
<__ev_set_spefscr_frmc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__builtin_spe_mfspefscr@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffffffc,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @__ev_set_spefscr_frmc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @__builtin_spe_mfspefscr()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, -4
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
ret void
}

LLVM IR (-O2):
define void @__ev_set_spefscr_frmc(i32 %0) {
%2 = tail call i32 (...) @__builtin_spe_mfspefscr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_int(int, int);
void arm_svc() { arm_int(0x08, 0b10011); }


x86 assembly (clang, -O0):
<arm_svc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x13,%esi
call   1030 <arm_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_svc>:
mov    $0x8,%edi
mov    $0x13,%esi
jmp    1030 <arm_int@plt>

LLVM IR (-O0):
define void @arm_svc() {
%1 = call i32 @arm_int(i32 8, i32 19)
ret void
}

LLVM IR (-O2):
define void @arm_svc() {
%1 = tail call i32 @arm_int(i32 8, i32 19)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
__attribute__((always_)) void write16(unsigned long addr, uint16_t value) {
  *((volatile uint16_t *)(addr)) = value;
}


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

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

LLVM IR (-O0):
define void @write16(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @write16(i64 %0, i32 %1) {
%3 = inttoptr i64 %0 to i32*
store volatile i32 %1, i32* %3
ret void
}
/* Type definitions */
struct prefix_ipv4 {
  int dummy;
};
struct prefix {
  int dummy;
};

/* Variables and functions */
int str2prefix_ipv4(char const *, struct prefix_ipv4 *);
int str2prefix(const char *str, struct prefix *p) {
  int ret;
  ret = str2prefix_ipv4(str, (struct prefix_ipv4 *)p);
  if (ret)
    return ret;
  return 0;
}


x86 assembly (clang, -O0):
<str2prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <str2prefix_ipv4@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1145 <str2prefix+0x35>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <str2prefix+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2prefix>:
jmp    1030 <str2prefix_ipv4@plt>

LLVM IR (-O0):
%struct.prefix = type { i32 }
%struct.prefix_ipv4 = type { i32 }
define i32 @str2prefix(i8* %0, %struct.prefix* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.prefix*
%6 = alloca i32
store i8* %0, i8** %4
store %struct.prefix* %1, %struct.prefix** %5
%7 = load i8*, i8** %4
%8 = load %struct.prefix*, %struct.prefix** %5
%9 = bitcast %struct.prefix* %8 to %struct.prefix_ipv4*
%10 = call i32 @str2prefix_ipv4(i8* %7, %struct.prefix_ipv4* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32, i32* %6
store i32 %14, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.prefix = type { i32 }
%struct.prefix_ipv4 = type { i32 }
define i32 @str2prefix(i8* %0, %struct.prefix* %1) {
%3 = bitcast %struct.prefix* %1 to %struct.prefix_ipv4*
%4 = tail call i32 @str2prefix_ipv4(i8* %0, %struct.prefix_ipv4* %3)
ret i32 %4
}
int __float_encoded_array_size(const float *p, int elements) {
  (void)p;
  return sizeof(float) * elements;
}


x86 assembly (clang, -O0):
<__float_encoded_array_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__float_encoded_array_size>:
lea    0x0(,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @__float_encoded_array_size(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @__float_encoded_array_size(float* nocapture readnone %0, i32 %1) {
%3 = shl i32 %1, 2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pretty_print_colour_disable();
void pretty_print_color_disable(void) { pretty_print_colour_disable(); }


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

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

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

LLVM IR (-O2):
define void @pretty_print_color_disable() {
%1 = tail call i32 (...) @pretty_print_colour_disable()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcscat_s(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/ *);
void uninitvar_wcscat_s(wchar_t *Ct, size_t N, wchar_t *S) {
  wchar_t *ct;
  wchar_t *s;
  size_t n;
  (void)wcscat_s(ct, n, s);
  (void)wcscat_s(ct, N, S);
  (void)wcscat_s(Ct, N, s);
  (void)wcscat_s(Ct, n, S);
  (void)wcscat_s(Ct, N, S);
}


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

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

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

LLVM IR (-O2):
define void @uninitvar_wcscat_s(i32* %0, i64 %1, i32* %2) {
%4 = tail call i32 @wcscat_s(i32* undef, i64 undef, i32* undef)
%5 = tail call i32 @wcscat_s(i32* undef, i64 %1, i32* %2)
%6 = tail call i32 @wcscat_s(i32* %0, i64 %1, i32* undef)
%7 = tail call i32 @wcscat_s(i32* %0, i64 undef, i32* %2)
%8 = tail call i32 @wcscat_s(i32* %0, i64 %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_nothing();
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  char *buffer;
  buffer = (char *)malloc(64);
  strcpy(buffer, "abc");
  printf("%s\n", buffer);
  do_nothing();
  printf("returned from do_nothing.\n");
  free(buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x40,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rsi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <do_nothing@plt>
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x40,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
lea    0xe9b(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1060 <do_nothing@plt>
lea    0xe81(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@str = [26 x i8] c"returned from do_nothing.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 64)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) %4)
%7 = tail call i32 (...) @do_nothing()
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @free(i8* %4)
ret i32 0
}
void isr_SoilMoisture_Decagon_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @isr_SoilMoisture_Decagon_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lovrRandomGeneratorDestroy(void *ref) { free(ref); }


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

x86 assembly (clang, -O2):
<lovrRandomGeneratorDestroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @lovrRandomGeneratorDestroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int compar(const void *x, const void *y) {
  return *((int32_t *)x) < *((int32_t *)y) ? -1 : 1;
}


x86 assembly (clang, -O0):
<compar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compar>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setge  %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @compar(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp slt i64 %7, %10
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 -1, i32 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @compar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = select i1 %7, i32 -1, i32 1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ handle_DANGER(int /*<<< orphan*/);
int gen_DANGER(void) {
  handle_DANGER(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_DANGER>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_DANGER@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_DANGER() {
%1 = call i32 @handle_DANGER(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_DANGER() {
%1 = tail call i32 @handle_DANGER(i32 0)
ret i32 0
}
void RTIsoFsExtractFile(void) {}


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

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

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

LLVM IR (-O2):
define void @RTIsoFsExtractFile() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int *malloc(int);
int main() {
  int *p, *q, *r;
  int havoc;
  p = malloc(sizeof(int));
  q = malloc(sizeof(int));
  *p = 0;
  *q = 0;
  *p = 1;
  *q = 1;
  if (havoc) {
    r = q;
  } else {
    r = p;
  }
  assert(*r == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
cmpl   $0x0,-0x24(%rbp)
je     118a <main+0x6a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1192 <main+0x72>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32* @malloc(i32 4)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int is_little_endian();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", is_little_endian());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @is_little_endian()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
double Sleef_cos_u35(double x) { return __builtin_cos(x); }


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

x86 assembly (clang, -O2):
<Sleef_cos_u35>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @Sleef_cos_u35(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
void crash_fadump(struct pt_regs *regs, const char *str) {}


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

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
define void @crash_fadump(%struct.pt_regs* %0, i8* %1) {
%3 = alloca %struct.pt_regs*
%4 = alloca i8*
store %struct.pt_regs* %0, %struct.pt_regs** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @crash_fadump(%struct.pt_regs* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double a = 0.0;
  scanf("%lf", &a);
  printf("%lf", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0xecb(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
void BIO_new_socket(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_new_socket() {
ret void
}
/* Variables and functions */
int bitcount(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned num;
  int n_bit1;
  printf("Ingrese un numero sin signo: ");
  scanf("%u", &num);
  n_bit1 = bitcount(num);
  printf("Hay %d bit(s) de valor 1 en el numero ingresado.", n_bit1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <bitcount@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Ingrese un numero sin signo: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [49 x i8] c"Hay %d bit(s) de valor 1 en el numero ingresado.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @bitcount(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Ingrese un numero sin signo: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [49 x i8] c"Hay %d bit(s) de valor 1 en el numero ingresado.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @bitcount(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int block_cli_if_desc_update_post_fault_lock_component_take() { return 1; }


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

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

LLVM IR (-O0):
define i32 @block_cli_if_desc_update_post_fault_lock_component_take() {
ret i32 1
}

LLVM IR (-O2):
define i32 @block_cli_if_desc_update_post_fault_lock_component_take() {
ret i32 1
}
unsigned bitrange(unsigned len) {
  unsigned ret = 0;
  while ((len >>= 1))
    ret++;
  return ret;
}


x86 assembly (clang, -O0):
<bitrange>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <bitrange+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bitrange+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitrange>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <bitrange+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <bitrange+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitrange(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
int nohandle(char c) { return 0; }


x86 assembly (clang, -O0):
<nohandle>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nohandle(i8 signext %0) {
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void *xcalloc(size_t items, size_t size) {
  void *tmp = calloc(items, size);
  if (tmp != NULL)
    return tmp;
  else {
    fprintf(stderr, "Error: could not allocate memory");
    printf("Error: could not allocate memory");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1176 <xcalloc+0x36>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
lea    0xe7a(%rip),%rsi
call   1050 <fprintf@plt>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<xcalloc>:
push   %rbx
call   1040 <calloc@plt>
test   %rax,%rax
je     114d <xcalloc+0xd>
pop    %rbx
ret
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    0xea3(%rip),%rbx
mov    %rbx,%rsi
call   1050 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Error: could not allocate memory\00"
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i8*, i8** %5
ret i8* %12
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Error: could not allocate memory\00"
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
ret i8* %3
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ continue_dynamically();
int /*<<< orphan*/ high_freq();
int main(void) {
  int i, j, k;
  unsigned long long sum = 0;
  high_freq();
  for (i = 0; i < 10000000; i++) {
    sum += i;
  }
  continue_dynamically();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <high_freq@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x989680,-0x8(%rbp)
jge    116c <main+0x4c>
movslq -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <main+0x25>
mov    $0x0,%al
call   1030 <continue_dynamically@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %5
%6 = call i32 (...) @high_freq()
store i32 0, i32* %2
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10000000
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = load i64, i64* %5
%14 = add i64 %13, %12
store i64 %14, i64* %5
br label %15
15: ; preds = %10
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %7
18: ; preds = %7
%19 = call i32 (...) @continue_dynamically()
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, long, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *thr3(void *v) {
  FILE *f = fopen("bogus3", "r");
  printf("f  = %ld, errno  = %d (%s)\n", (long)f, errno, strerror(errno));
  return NULL;
}


x86 assembly (clang, -O0):
<thr3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    %eax,%ecx
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr3>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
mov    0x2e90(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   1050 <strerror@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"bogus3\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [28 x i8] c"f = %ld, errno = %d (%s)\0A\00"
@errno = global i32 0
define i8* @thr3(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32, i32* @errno
%8 = load i32, i32* @errno
%9 = call i32 @strerror(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 %6, i32 %7, i32 %9)
ret i8* null
}

LLVM IR (-O2):
@.str = [7 x i8] c"bogus3\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [28 x i8] c"f = %ld, errno = %d (%s)\0A\00"
@errno = global i32 0
define noalias i8* @thr3(i8* nocapture readnone %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = ptrtoint i32* %2 to i64
%4 = load i32, i32* @errno
%5 = tail call i32 @strerror(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 %3, i32 %4, i32 %5)
ret i8* null
}
/* Variables and functions */
unsigned long __builtin_divdeu(unsigned long, unsigned long);
unsigned long div_deu(unsigned long a, unsigned long b) {
  return __builtin_divdeu(a, b);
}


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

x86 assembly (clang, -O2):
<div_deu>:
jmp    1030 <__builtin_divdeu@plt>

LLVM IR (-O0):
define i64 @div_deu(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 = call i64 @__builtin_divdeu(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @div_deu(i64 %0, i64 %1) {
%3 = tail call i64 @__builtin_divdeu(i64 %0, i64 %1)
ret i64 %3
}