xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ prokekt(int);
void main() { prokekt(4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <prokekt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x4,%edi
jmp    1030 <prokekt@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @prokekt(i32 4)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @prokekt(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_journal_entry(char *);
int main(int argc, char *argv[]) {
  write_journal_entry("Hello fsync!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello fsync!\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 = call i32 @write_journal_entry(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello fsync!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @write_journal_entry(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ flash_write(int, int);
void lock_block_to_prevent_writes(int offset) {
  flash_write(offset, 0x60);
  flash_write(offset, 0x01);
}


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

x86 assembly (clang, -O2):
<lock_block_to_prevent_writes>:
push   %rbx
mov    %edi,%ebx
mov    $0x60,%esi
call   1030 <flash_write@plt>
mov    %ebx,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1030 <flash_write@plt>

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

LLVM IR (-O2):
define void @lock_block_to_prevent_writes(i32 %0) {
%2 = tail call i32 @flash_write(i32 %0, i32 96)
%3 = tail call i32 @flash_write(i32 %0, i32 1)
ret void
}
/* Type definitions */
struct item {
  int dummy;
};

/* Variables and functions */
struct item *alloc_item();
struct item *init_item_by_param(struct item *, void *, int);
struct item *new_item_by_param(void *content, int len) {
  struct item *item;
  item = alloc_item();
  if (NULL != item)
    item = init_item_by_param(item, content, len);
  return item;
}


x86 assembly (clang, -O0):
<new_item_by_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <alloc_item@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     115a <new_item_by_param+0x3a>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <init_item_by_param@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_item_by_param>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <alloc_item@plt>
test   %rax,%rax
je     1147 <new_item_by_param+0x27>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <init_item_by_param@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.item = type { i32 }
define %struct.item* @new_item_by_param(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.item*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call %struct.item* (...) @alloc_item()
store %struct.item* %6, %struct.item** %5
%7 = load %struct.item*, %struct.item** %5
%8 = icmp ne %struct.item* null, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.item*, %struct.item** %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call %struct.item* @init_item_by_param(%struct.item* %10, i8* %11, i32 %12)
store %struct.item* %13, %struct.item** %5
br label %14
14: ; preds = %9, %2
%15 = load %struct.item*, %struct.item** %5
ret %struct.item* %15
}

LLVM IR (-O2):
%struct.item = type { i32 }
define %struct.item* @new_item_by_param(i8* %0, i32 %1) {
%3 = tail call %struct.item* (...) @alloc_item()
%4 = icmp eq %struct.item* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call %struct.item* @init_item_by_param(%struct.item* %3, i8* %0, i32 %1)
br label %7
7: ; preds = %5, %2
%8 = phi %struct.item* [ %6, %5 ], [ null, %2 ]
ret %struct.item* %8
}
/* Variables and functions */
int /*<<< orphan*/ _L3L4_clock_domain_open();
scalar_t__ _L3L4_clock_domain_status_get();
int /*<<< orphan*/ _L3L4_clock_domain_status_set(int);
int L3L4_clock_domain_open(void) {
  if (_L3L4_clock_domain_status_get() != 0) {
    return 1;
  }
  _L3L4_clock_domain_open();
  _L3L4_clock_domain_status_set(1);
  return 0;
}


x86 assembly (clang, -O0):
<L3L4_clock_domain_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <_L3L4_clock_domain_status_get@plt>
cmp    $0x0,%rax
je     1155 <L3L4_clock_domain_open+0x25>
movl   $0x1,-0x4(%rbp)
jmp    116d <L3L4_clock_domain_open+0x3d>
mov    $0x0,%al
call   1050 <_L3L4_clock_domain_open@plt>
mov    $0x1,%edi
call   1040 <_L3L4_clock_domain_status_set@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<L3L4_clock_domain_open>:
push   %rax
xor    %eax,%eax
call   1030 <_L3L4_clock_domain_status_get@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1147 <L3L4_clock_domain_open+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1050 <_L3L4_clock_domain_open@plt>
mov    $0x1,%edi
call   1040 <_L3L4_clock_domain_status_set@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @L3L4_clock_domain_open() {
%1 = alloca i32
%2 = call i64 (...) @_L3L4_clock_domain_status_get()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %8
5: ; preds = %0
%6 = call i32 (...) @_L3L4_clock_domain_open()
%7 = call i32 @_L3L4_clock_domain_status_set(i32 1)
store i32 0, i32* %1
br label %8
8: ; preds = %5, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @L3L4_clock_domain_open() {
%1 = tail call i64 (...) @_L3L4_clock_domain_status_get()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @_L3L4_clock_domain_open()
%5 = tail call i32 @_L3L4_clock_domain_status_set(i32 1)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("Hello from Docker!\n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"Hello from Docker!\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
float cubic_ease_in_out(float p) {
  float f = 0.0f;
  if (p < 0.5f) {
    f = 4.0f * p * p * p;
  } else {
    f = ((2.0f * p) - 2.0f);
    f = 0.5f * f * f * f + 1.0f;
  }
  return f;
}


x86 assembly (clang, -O0):
<cubic_ease_in_out>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xee7(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1144 <cubic_ease_in_out+0x44>
movss  0xee1(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    118a <cubic_ease_in_out+0x8a>
movss  -0x4(%rbp),%xmm0
addss  %xmm0,%xmm0
movss  0xeb3(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe9a(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe83(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubic_ease_in_out>:
movss  0xef8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1125 <cubic_ease_in_out+0x25>
movss  0xef7(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret
addss  %xmm0,%xmm0
addss  0xed3(%rip),%xmm0
movss  0xec7(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
addss  0xebb(%rip),%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @cubic_ease_in_out(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
store float 0.000000e+00, float* %3
%4 = load float, float* %2
%5 = fcmp olt float %4, 5.000000e-01
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load float, float* %2
%8 = fmul float 4.000000e+00, %7
%9 = load float, float* %2
%10 = fmul float %8, %9
%11 = load float, float* %2
%12 = fmul float %10, %11
store float %12, float* %3
br label %22
13: ; preds = %1
%14 = load float, float* %2
%15 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %14, float -2.000000e+00)
store float %15, float* %3
%16 = load float, float* %3
%17 = fmul float 5.000000e-01, %16
%18 = load float, float* %3
%19 = fmul float %17, %18
%20 = load float, float* %3
%21 = call float @llvm.fmuladd.f32(float %19, float %20, float 1.000000e+00)
store float %21, float* %3
br label %22
22: ; preds = %13, %6
%23 = load float, float* %3
ret float %23
}

LLVM IR (-O2):
define float @cubic_ease_in_out(float %0) {
%2 = fcmp olt float %0, 5.000000e-01
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fmul float %0, 4.000000e+00
%5 = fmul float %4, %0
%6 = fmul float %5, %0
br label %12
7: ; preds = %1
%8 = tail call float @llvm.fmuladd.f32(float %0, float 2.000000e+00, float -2.000000e+00)
%9 = fmul float %8, 5.000000e-01
%10 = fmul float %8, %9
%11 = tail call float @llvm.fmuladd.f32(float %10, float %8, float 1.000000e+00)
br label %12
12: ; preds = %7, %3
%13 = phi float [ %6, %3 ], [ %11, %7 ]
ret float %13
}
vdiqes(escape_code, support) int *escape_code, *support;
{
  switch (*escape_code) {
  case 3500:
    *support = 1;
    break;
  case 3501:
    *support = 1;
    break;
  default:
    *support = 0;
    break;
  }
}


x86 assembly (clang, -O0):
<vdiqes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0xdac,%eax
je     1138 <vdiqes+0x38>
jmp    1125 <vdiqes+0x25>
mov    -0x1c(%rbp),%eax
sub    $0xdad,%eax
je     1147 <vdiqes+0x47>
jmp    1156 <vdiqes+0x56>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    1160 <vdiqes+0x60>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    1160 <vdiqes+0x60>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdiqes>:
mov    (%rdi),%eax
and    $0xfffffffe,%eax
xor    %ecx,%ecx
cmp    $0xdac,%eax
sete   %cl
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define i32 @vdiqes(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
switch i32 %7, label %12 [
i32 3500, label %8
i32 3501, label %10
]
8: ; preds = %2
%9 = load i32*, i32** %5
store i32 1, i32* %9
br label %14
10: ; preds = %2
%11 = load i32*, i32** %5
store i32 1, i32* %11
br label %14
12: ; preds = %2
%13 = load i32*, i32** %5
store i32 0, i32* %13
br label %14
14: ; preds = %12, %10, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @vdiqes(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, -2
%5 = icmp eq i32 %4, 3500
%6 = zext i1 %5 to i32
store i32 %6, i32* %1
ret i32 undef
}
int do_360() { return 360; }


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

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

LLVM IR (-O0):
define i32 @do_360() {
ret i32 360
}

LLVM IR (-O2):
define i32 @do_360() {
ret i32 360
}
/* Variables and functions */
scalar_t__ gsm_hex2int(char *, int);
char *pdu_get_tpoa_type(char *body, char *oa_type) {
  char *pBegin, *pEnd;
  pBegin = body;
  pEnd = pBegin + 2;
  *oa_type = (char)gsm_hex2int(pBegin, 2);
  return pEnd;
}


x86 assembly (clang, -O0):
<pdu_get_tpoa_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1030 <gsm_hex2int@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdu_get_tpoa_type>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0x2(%rdi),%rbx
mov    $0x2,%esi
call   1030 <gsm_hex2int@plt>
mov    %al,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @pdu_get_tpoa_type(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8* %9, i8** %6
%10 = load i8*, i8** %5
%11 = call i64 @gsm_hex2int(i8* %10, i32 2)
%12 = trunc i64 %11 to i8
%13 = load i8*, i8** %4
store i8 %12, i8* %13
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
define i8* @pdu_get_tpoa_type(i8* %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = tail call i64 @gsm_hex2int(i8* %0, i32 2)
%5 = trunc i64 %4 to i8
store i8 %5, i8* %1
ret i8* %3
}
int do_630() { return 630; }


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

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

LLVM IR (-O0):
define i32 @do_630() {
ret i32 630
}

LLVM IR (-O2):
define i32 @do_630() {
ret i32 630
}
/* Variables and functions */
double erf(double);
int /*<<< orphan*/ printf(char *, double);
double sqrt(int);
int main(void) {
  printf(
      "The integral of Normal(0,1) distribution between -1.96 and1.96 is: %g\n",
      erf(1.96 * sqrt(1 / 2.)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xeaf(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <erf@plt>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <sqrt@plt>
mulsd  0xec0(%rip),%xmm0
call   1050 <erf@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [71 x i8] c"The integral of Normal(0,1) distribution between -1.96 and1.96 is: %g\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @sqrt(i32 0)
%3 = fmul double 1.960000e+00, %2
%4 = call double @erf(double %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [71 x i8] c"The integral of Normal(0,1) distribution between -1.96 and1.96 is: %g\0A\00"
define i32 @main() {
%1 = tail call double @sqrt(i32 0)
%2 = fmul double %1, 1.960000e+00
%3 = tail call double @erf(double %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
const char *get_arch(void) {
  return "x64/AMD64";
  return "unknown";
}


x86 assembly (clang, -O0):
<get_arch>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_arch>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"x64/AMD64\00"
define i8* @get_arch() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"x64/AMD64\00"
define i8* @get_arch() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ *EVP_MD_CTX_create();
EVP_MD_CTX *tnt_EVP_MD_CTX_new(void) { return EVP_MD_CTX_create(); }


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

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

LLVM IR (-O0):
define i32* @tnt_EVP_MD_CTX_new() {
%1 = call i32* (...) @EVP_MD_CTX_create()
ret i32* %1
}

LLVM IR (-O2):
define i32* @tnt_EVP_MD_CTX_new() {
%1 = tail call i32* (...) @EVP_MD_CTX_create()
ret i32* %1
}
__attribute__((no, noclone)) unsigned __int128 t162_5add(signed __int128 x) {
  unsigned __int128 r;
  if (__builtin_add_overflow(x, (signed __int128)(1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t162_5add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rcx,%r9
sar    $0x3f,%r9
add    $0x1,%rdx
adc    $0x0,%rcx
mov    %r9,%r8
adc    $0x0,%r8
adc    $0x0,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1187 <t162_5add+0x77>
jmp    118e <t162_5add+0x7e>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t162_5add>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
add    $0x1,%r14
mov    %rsi,%rbx
adc    $0x0,%rbx
mov    $0xfffffffffffffffe,%rax
cmp    %rdi,%rax
mov    $0xffffffffffffffff,%rax
sbb    %rsi,%rax
jl     113f <t162_5add+0x2f>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t162_5add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 %12, i129 1)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t162_5add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = add nuw i129 %7, 1
%9 = icmp slt i128 %6, -1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
void gnttab_map_grant_ref() {}


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

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

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

LLVM IR (-O2):
define void @gnttab_map_grant_ref() {
ret void
}
f() { return 5; }


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
}
void CallDebugFromASM() { ; }


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

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

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

LLVM IR (-O2):
define void @CallDebugFromASM() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t lfsr(uint64_t x) {
  uint64_t bit = (x ^ (x >> 1)) & 1;
  return (x >> 1) | (bit << 62);
}


x86 assembly (clang, -O0):
<lfsr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
xor    %ecx,%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x8(%rbp),%edx
mov    $0x3e,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @lfsr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = xor i32 %4, %6
%8 = and i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = ashr i32 %9, 1
%11 = load i32, i32* %3
%12 = shl i32 %11, 62
%13 = or i32 %10, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @lfsr(i32 %0) {
ret i32 poison
}
int is_valid_content_length(int ctl) {
  if (ctl >= 0 && ctl <= 4096) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_valid_content_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     112a <is_valid_content_length+0x2a>
cmpl   $0x1000,-0x8(%rbp)
jg     112a <is_valid_content_length+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <is_valid_content_length+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_content_length>:
xor    %eax,%eax
cmp    $0x1001,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_valid_content_length(i32 %0) {
%2 = icmp ult i32 %0, 4097
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ MV_SetFastReverb(int);
void FX_SetFastReverb(int reverb) { MV_SetFastReverb(reverb); }


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

x86 assembly (clang, -O2):
<FX_SetFastReverb>:
jmp    1030 <MV_SetFastReverb@plt>

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

LLVM IR (-O2):
define void @FX_SetFastReverb(i32 %0) {
%2 = tail call i32 @MV_SetFastReverb(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ __NR_close;
int /*<<< orphan*/ syscall_2(int /*<<< orphan*/, long, int /*<<< orphan*/);
int fclose(FILE *fp) {
  syscall_2(__NR_close, (long int)fp, 0);
  return 0;
}


x86 assembly (clang, -O0):
<fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <syscall_2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fclose>:
push   %rax
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
call   1030 <syscall_2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__NR_close = global i32 0
define i32 @fclose(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @__NR_close
%4 = load i32*, i32** %2
%5 = ptrtoint i32* %4 to i64
%6 = call i32 @syscall_2(i32 %3, i64 %5, i32 0)
ret i32 0
}

LLVM IR (-O2):
@__NR_close = global i32 0
define i32 @fclose(i32* %0) {
%2 = load i32, i32* @__NR_close
%3 = ptrtoint i32* %0 to i64
%4 = tail call i32 @syscall_2(i32 %2, i64 %3, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/
__softboundcets_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
int /*<<< orphan*/ __softboundcets_store_null_return_metadata();
char *strstr(char const *, char const *);
__attribute__((__weak__, __always___)) char *
softboundcets_strstr(const char *haystack, const char *needle) {
  char *ret_ptr = strstr(haystack, needle);
  if (ret_ptr != NULL) {
    __softboundcets_propagate_metadata_shadow_stack_from(1, 0);
  } else {
    __softboundcets_store_null_return_metadata();
  }
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_strstr>:
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   1050 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116d <softboundcets_strstr+0x3d>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
jmp    1174 <softboundcets_strstr+0x44>
mov    $0x0,%al
call   1040 <__softboundcets_store_null_return_metadata@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_strstr>:
push   %rbx
call   1050 <strstr@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114c <softboundcets_strstr+0x1c>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
jmp    1153 <softboundcets_strstr+0x23>
xor    %eax,%eax
call   1040 <__softboundcets_store_null_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundcets_strstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @strstr(i8* %6, i8* %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 = call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
br label %15
13: ; preds = %2
%14 = call i32 (...) @__softboundcets_store_null_return_metadata()
br label %15
15: ; preds = %13, %11
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define weak i8* @softboundcets_strstr(i8* %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @__softboundcets_store_null_return_metadata()
br label %9
9: ; preds = %7, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int m[], unsigned n) {
  unsigned i;
  for (i = 0; i < n; i++)
    printf("%8d", m[i]);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1156 <print+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1145 <print+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%8d\00"
define void @print(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
badbyte(c) int c;
{
  char buff[32];
  (void)sprintf(buff, "unexpected byte: 0x%02x", c);
  mferror(buff);
}


x86 assembly (clang, -O0):
<badbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1040 <mferror@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<badbyte>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <mferror@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"unexpected byte: 0x%02x\00"
define i32 @badbyte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [32 x i8]
store i32 %0, i32* %3
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @mferror to i32 (i8*, ...)*)(i8* %8)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [24 x i8] c"unexpected byte: 0x%02x\00"
define i32 @badbyte(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @mferror to i32 (i8*, ...)*)(i8* %3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int shm_unlink(char *);
int main() {
  if (shm_unlink("/myshm") == -1)
    perror("shm_unlink");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <shm_unlink@plt>
cmp    $0xffffffff,%eax
jne    1160 <main+0x30>
lea    0xeac(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <shm_unlink@plt>
cmp    $0xffffffff,%eax
jne    114e <main+0x1e>
lea    0xebe(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"/myshm\00"
@.str.1 = [11 x i8] c"shm_unlink\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @shm_unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"/myshm\00"
@.str.1 = [11 x i8] c"shm_unlink\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @shm_unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
leaderx() {
  putchar('0');
  putchar('x');
}


x86 assembly (clang, -O0):
<leaderx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leaderx>:
push   %rax
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @leaderx() {
%1 = alloca i32
%2 = call i32 @putchar(i8 signext 48)
%3 = call i32 @putchar(i8 signext 120)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @leaderx() {
%1 = tail call i32 @putchar(i8 signext 48)
%2 = tail call i32 @putchar(i8 signext 120)
ret i32 undef
}
/* Type definitions */
struct CMD {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
void yes(struct CMD *c) {
  char line[300];
  scanf("%s", line);
  while (1) {
    printf("yes %s", line);
  }
}


x86 assembly (clang, -O0):
<yes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x140(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x140(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <yes+0x22>

x86 assembly (clang, -O2):
<yes>:
push   %r14
push   %rbx
sub    $0x138,%rsp
lea    0xed3(%rip),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0xebd(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
jmp    1150 <yes+0x30>

LLVM IR (-O0):
%struct.CMD = type { i32 }
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"yes %s\00"
define void @yes(%struct.CMD* %0) {
%2 = alloca %struct.CMD*
%3 = alloca [300 x i8]
store %struct.CMD* %0, %struct.CMD** %2
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %1, %6
%7 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %6
}

LLVM IR (-O2):
%struct.CMD = type { i32 }
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"yes %s\00"
define void @yes(%struct.CMD* nocapture readnone %0) {
%2 = alloca [300 x i8]
%3 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %5
5: ; preds = %5, %1
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
br label %5
}
/* Variables and functions */
long const UINT_MAX;
unsigned int limit_long_to_uint(const long l) {
  if (l < 0)
    return 0;
  else if (l > UINT_MAX)
    return UINT_MAX;
  else
    return l;
}


x86 assembly (clang, -O0):
<limit_long_to_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    111f <limit_long_to_uint+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    114c <limit_long_to_uint+0x4c>
mov    -0x10(%rbp),%rax
mov    0x2ebe(%rip),%rcx
cmp    (%rcx),%rax
jle    1145 <limit_long_to_uint+0x45>
mov    0x2eae(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    114c <limit_long_to_uint+0x4c>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@UINT_MAX = constant i64 0
define i32 @limit_long_to_uint(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %17
7: ; preds = %1
%8 = load i64, i64* %3
%9 = load i64, i64* @UINT_MAX
%10 = icmp sgt i64 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i64, i64* @UINT_MAX
%13 = trunc i64 %12 to i32
store i32 %13, i32* %2
br label %17
14: ; preds = %7
%15 = load i64, i64* %3
%16 = trunc i64 %15 to i32
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %11, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@UINT_MAX = constant i64 0
define i32 @limit_long_to_uint(i64 %0) {
ret i32 0
}
int deflate(struct z_stream_s *strm, int flush) { return -2; }


x86 assembly (clang, -O0):
<deflate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xfffffffe,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.z_stream_s = type opaque
define i32 @deflate(%struct.z_stream_s* %0, i32 %1) {
%3 = alloca %struct.z_stream_s*
%4 = alloca i32
store %struct.z_stream_s* %0, %struct.z_stream_s** %3
store i32 %1, i32* %4
ret i32 -2
}

LLVM IR (-O2):
%struct.z_stream_s = type opaque
define i32 @deflate(%struct.z_stream_s* nocapture readnone %0, i32 %1) {
ret i32 -2
}
int execute_signal() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_signal() {
ret i32 0
}
imm0adr1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if (22 <= (*((int *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0adr1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x16,%eax
mov    $0xa98ac7,%ecx
cmp    (%rcx),%eax
jg     1136 <imm0adr1+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <imm0adr1+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0adr1>:
xor    %eax,%eax
cmpl   $0x16,0xa98ac7
16
setge  %al
ret

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

LLVM IR (-O2):
define i32 @imm0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 11111111 to i32*)
%8 = icmp sgt i32 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
int Bematech_FI_FechaComprovanteNaoFiscalVinculado(Retorno) {
  char Var[3];
  return Formata("\x1b|21|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_FechaComprovanteNaoFiscalVinculado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x7(%rbp),%rsi
mov    -0x4(%rbp),%edx
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_FechaComprovanteNaoFiscalVinculado>:
push   %rax
mov    %edi,%edx
lea    0xee6(%rip),%rdi
lea    0x5(%rsp),%rsi
xor    %eax,%eax
call   1030 <Formata@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\1B|21|\1B\00"
define i32 @Bematech_FI_FechaComprovanteNaoFiscalVinculado(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B|21|\1B\00"
define i32 @Bematech_FI_FechaComprovanteNaoFiscalVinculado(i32 %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void set_cfg_str(char *str) {
  char set_str[128] = {0};
  sprintf(set_str, "cfg set \'%s\'", str);
  system(set_str);
}


x86 assembly (clang, -O0):
<set_cfg_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <system@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cfg_str>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rdx
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xea4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"cfg set '%s'\00"
define void @set_cfg_str(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = bitcast [128 x i8]* %3 to i8*
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%9 = call i32 @system(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"cfg set '%s'\00"
define void @set_cfg_str(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ PTRACE_TRACEME;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void c(void) {
  if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1) {
    fprintf(stderr, "no trace pls!\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1040 <ptrace@plt>
cmp    $0xffffffff,%eax
jne    1177 <c+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <ptrace@plt>
cmp    $0xffffffff,%eax
je     114c <c+0x1c>
pop    %rax
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@PTRACE_TRACEME = global i32 0
@stderr = global i32 0
@.str = [15 x i8] c"no trace pls!\0A\00"
@EXIT_FAILURE = global i32 0
define void @c() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = call i32 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@PTRACE_TRACEME = global i32 0
@stderr = global i32 0
@.str = [15 x i8] c"no trace pls!\0A\00"
@EXIT_FAILURE = global i32 0
define void @c() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = tail call i32 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}
/* Variables and functions */
bool is_valid_slug(char value[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @is_valid_slug(i8* nocapture readnone %0) {
ret i32 0
}
int do_693() { return 693; }


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

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

LLVM IR (-O0):
define i32 @do_693() {
ret i32 693
}

LLVM IR (-O2):
define i32 @do_693() {
ret i32 693
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void printUsage(char *pname) {
  fprintf(stderr, "usage: %s [-r] [<intel-hexfile>]\n", pname);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s [-r] [<intel-hexfile>]\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s [-r] [<intel-hexfile>]\0A\00"
define void @printUsage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}