xunge/DecIR huggingface dataset:
int bvalue(int i, int *b) {
  if (i < 0) {
    return b[-1 - i];
  } else {
    return i;
  }
}


x86 assembly (clang, -O0):
<bvalue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    112f <bvalue+0x2f>
mov    -0x10(%rbp),%rax
mov    $0xffffffff,%ecx
sub    -0x8(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <bvalue+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bvalue>:
mov    %edi,%eax
test   %edi,%edi
js     1107 <bvalue+0x7>
ret
not    %eax
mov    (%rsi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @bvalue(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 = icmp slt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32*, i32** %5
%10 = load i32, i32* %4
%11 = sub nsw i32 -1, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
store i32 %14, i32* %3
br label %17
15: ; preds = %2
%16 = load i32, i32* %4
store i32 %16, i32* %3
br label %17
17: ; preds = %15, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @bvalue(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = xor i32 %0, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ %0, %2 ]
ret i32 %10
}
int fcntl_lock(int fd, int op, long long offset, long long count, int type) {
  return type;
}


x86 assembly (clang, -O0):
<fcntl_lock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcntl_lock>:
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @fcntl_lock(i32 %0, i32 %1, i64 %2, i64 %3, i32 returned %4) {
ret i32 %4
}
void gtk_list_store_set_column_types() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_set_column_types() {
ret void
}
void NameValueParserEndElt(void *d, const char *name, int l) {}


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

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

LLVM IR (-O0):
define void @NameValueParserEndElt(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @NameValueParserEndElt(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void cosivm_print_version() { printf("cosivm %1.1f\n", 0.1); }


x86 assembly (clang, -O0):
<cosivm_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
movsd  0xedd(%rip),%xmm0
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosivm_print_version>:
lea    0xef1(%rip),%rdi
movsd  0xee1(%rip),%xmm0
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"cosivm %1.1f\0A\00"
define void @cosivm_print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.000000e-01)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"cosivm %1.1f\0A\00"
define void @cosivm_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.000000e-01)
ret void
}
/* Variables and functions */
int scnt(const char *s1) {
  int count = 0;
  if (s1 == NULL)
    return 0;
  while (*s1) {
    if (*(s1++) == '/')
      count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<scnt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1126 <scnt+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1167 <scnt+0x67>
jmp    112b <scnt+0x2b>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1161 <scnt+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    115c <scnt+0x5c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <scnt+0x2b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scnt>:
xor    %eax,%eax
test   %rdi,%rdi
je     1135 <scnt+0x35>
mov    (%rdi),%cl
test   %cl,%cl
je     1135 <scnt+0x35>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edx,%edx
cmp    $0x2f,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <scnt+0x20>
ret

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

LLVM IR (-O2):
define i32 @scnt(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 0, %3 ]
%9 = phi i8* [ %10, %6 ], [ %0, %3 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = icmp eq i8 %7, 47
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %8, %12
%14 = load i8, i8* %10
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %3, %1
%17 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %13, %6 ]
ret i32 %17
}
/* Variables and functions */
float __nv_rcbrtf(float);
float rcbrtf(float __a) { return __nv_rcbrtf(__a); }


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

x86 assembly (clang, -O2):
<rcbrtf>:
jmp    1030 <__nv_rcbrtf@plt>

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

LLVM IR (-O2):
define float @rcbrtf(float %0) {
%2 = tail call float @__nv_rcbrtf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  int b;
  b = 1080377166;
  if (b != 1080377166)
    abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x40653f4e,-0x4(%rbp)
cmpl   $0x40653f4e,-0x4(%rbp)
je     1133 <main+0x23>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 1080377166, i32* %1
%2 = load i32, i32* %1
%3 = icmp ne i32 %2, 1080377166
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int clk_set_rate(struct clk *c, unsigned long rate) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.clk = type opaque
define i32 @clk_set_rate(%struct.clk* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ entab(char *);
int /*<<< orphan*/ settab(int, char **, char *);
int main(int argc, char *argv[]) {
  char tab[1000 + 1];
  settab(argc, argv, tab);
  entab(tab);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdx
call   1030 <settab@plt>
mov    %rbx,%rdi
call   1040 <entab@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1001 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds [1001 x i8], [1001 x i8]* %6, i64 0, i64 0
%10 = call i32 @settab(i32 %7, i8** %8, i8* %9)
%11 = getelementptr inbounds [1001 x i8], [1001 x i8]* %6, i64 0, i64 0
%12 = call i32 @entab(i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [1001 x i8]
%4 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%5 = call i32 @settab(i32 %0, i8** %1, i8* %4)
%6 = call i32 @entab(i8* %4)
ret i32 0
}
int do_014() { return 14; }


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

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

LLVM IR (-O0):
define i32 @do_014() {
ret i32 14
}

LLVM IR (-O2):
define i32 @do_014() {
ret i32 14
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
void sdo_indicate_size(struct can_frame *frame) { frame->data[0] |= 1; }


x86 assembly (clang, -O0):
<sdo_indicate_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdo_indicate_size>:
mov    (%rdi),%rax
orl    $0x1,(%rax)
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define void @sdo_indicate_size(%struct.can_frame* %0) {
%2 = alloca %struct.can_frame*
store %struct.can_frame* %0, %struct.can_frame** %2
%3 = load %struct.can_frame*, %struct.can_frame** %2
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %3, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = or i32 %7, 1
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define void @sdo_indicate_size(%struct.can_frame* nocapture %0) {
%2 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = or i32 %4, 1
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
int do_multi(int, int);
int do_calc(int a, int b) { return do_multi(a, b); }


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

x86 assembly (clang, -O2):
<do_calc>:
jmp    1030 <do_multi@plt>

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

LLVM IR (-O2):
define i32 @do_calc(i32 %0, i32 %1) {
%3 = tail call i32 @do_multi(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ pawns_with_east_adj_neighbors(int);
void pawns_with_east_adj_neighbors_test(void **state) {
  assert_int_equal(0x0000000008000000ul,
                   pawns_with_east_adj_neighbors(0x0000000018000000ul));
}


x86 assembly (clang, -O0):
<pawns_with_east_adj_neighbors_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x18000000,%edi
call   1040 <pawns_with_east_adj_neighbors@plt>
mov    %eax,%esi
mov    $0x8000000,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pawns_with_east_adj_neighbors_test>:
push   %rax
mov    $0x18000000,%edi
call   1040 <pawns_with_east_adj_neighbors@plt>
mov    $0x8000000,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @pawns_with_east_adj_neighbors_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @pawns_with_east_adj_neighbors(i32 402653184)
%4 = call i32 @assert_int_equal(i32 134217728, i32 %3)
ret void
}

LLVM IR (-O2):
define void @pawns_with_east_adj_neighbors_test(i8** nocapture readnone %0) {
%2 = tail call i32 @pawns_with_east_adj_neighbors(i32 402653184)
%3 = tail call i32 @assert_int_equal(i32 134217728, i32 %2)
ret void
}
/* Variables and functions */
int strlen(char *);
void trim(char *str) {
  char *ptr;
  ptr = str + strlen(str);
  while (ptr > str && ptr[-1] == ' ')
    --ptr;
  *ptr = 0;
}


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
jbe    1161 <trim+0x51>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1171 <trim+0x61>
jmp    1182 <trim+0x72>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <trim+0x2d>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
add    %rbx,%rcx
nop
mov    %rcx,%rax
cmp    %rbx,%rcx
jbe    1132 <trim+0x22>
lea    -0x1(%rax),%rcx
cmpb   $0x20,-0x1(%rax)
je     1120 <trim+0x10>
movb   $0x0,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @trim(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %8, %1
%6 = phi i8* [ %4, %1 ], [ %9, %8 ]
%7 = icmp ugt i8* %6, %0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %6, i64 -1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
br i1 %11, label %5, label %12
12: ; preds = %5, %8
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x02() {
  Assert_real((isalpha(2) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              15, ("isalpha should be 0 for 0x02"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x02\00"
define void @t_isalpha_0x02() {
%1 = tail call i64 @isalpha(i32 2)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ grtestmod_write(int, int);
report_subtest(int dev) {
  grtestmod_write(2, dev);
  return (0);
}


x86 assembly (clang, -O0):
<report_subtest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1030 <grtestmod_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_subtest>:
push   %rax
mov    %edi,%esi
mov    $0x2,%edi
call   1030 <grtestmod_write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @report_subtest(i32 %0) {
%2 = tail call i32 @grtestmod_write(i32 2, i32 %0)
ret i32 0
}
int getIndex(char name) { return name - 'A'; }


x86 assembly (clang, -O0):
<getIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIndex>:
lea    -0x41(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @getIndex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 65
ret i32 %5
}

LLVM IR (-O2):
define i32 @getIndex(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -65
ret i32 %3
}
int security_file_receive(struct file *file) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define i32 @security_file_receive(%struct.file* nocapture readnone %0) {
ret i32 0
}
double e_vi(double bluechan, double redchan, double nirchan) {
  double tmp, result;
  tmp = nirchan + 6.0 * redchan - 7.5 * bluechan + 1.0;
  if (tmp == 0.0) {
    result = -1.0;
  } else {
    result = 2.5 * (nirchan - redchan) / tmp;
  }
  return result;
}


x86 assembly (clang, -O0):
<e_vi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xeeb(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    117d <e_vi+0x7d>
jp     117d <e_vi+0x7d>
movsd  0xead(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    119d <e_vi+0x9d>
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xe89(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_vi>:
movsd  0xef8(%rip),%xmm3
mulsd  %xmm1,%xmm3
mulsd  0xef4(%rip),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
addsd  0xeec(%rip),%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jne    1139 <e_vi+0x39>
jp     1139 <e_vi+0x39>
movsd  0xee0(%rip),%xmm0
ret
subsd  %xmm1,%xmm2
mulsd  0xedb(%rip),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @e_vi(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %6
%10 = load double, double* %5
%11 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %10, double %9)
%12 = load double, double* %4
%13 = call double @llvm.fmuladd.f64(double -7.500000e+00, double %12, double %11)
%14 = fadd double %13, 1.000000e+00
store double %14, double* %7
%15 = load double, double* %7
%16 = fcmp oeq double %15, 0.000000e+00
br i1 %16, label %17, label %18
17: ; preds = %3
store double -1.000000e+00, double* %8
br label %25
18: ; preds = %3
%19 = load double, double* %6
%20 = load double, double* %5
%21 = fsub double %19, %20
%22 = fmul double 2.500000e+00, %21
%23 = load double, double* %7
%24 = fdiv double %22, %23
store double %24, double* %8
br label %25
25: ; preds = %18, %17
%26 = load double, double* %8
ret double %26
}

LLVM IR (-O2):
define double @e_vi(double %0, double %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %1, double 6.000000e+00, double %2)
%5 = tail call double @llvm.fmuladd.f64(double %0, double -7.500000e+00, double %4)
%6 = fadd double %5, 1.000000e+00
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %12, label %8
8: ; preds = %3
%9 = fsub double %2, %1
%10 = fmul double %9, 2.500000e+00
%11 = fdiv double %10, %6
br label %12
12: ; preds = %3, %8
%13 = phi double [ %11, %8 ], [ -1.000000e+00, %3 ]
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ INT_MAX;
int sl_strncasecmp(char const *, char const *, int /*<<< orphan*/);
int sl_strcasecmp(const char *s1, const char *s2) {
  return sl_strncasecmp(s1, s2, INT_MAX);
}


x86 assembly (clang, -O0):
<sl_strcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
call   1030 <sl_strncasecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sl_strcasecmp>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <sl_strncasecmp@plt>

LLVM IR (-O0):
@INT_MAX = global i32 0
define i32 @sl_strcasecmp(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 = load i8*, i8** %4
%7 = load i32, i32* @INT_MAX
%8 = call i32 @sl_strncasecmp(i8* %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @sl_strcasecmp(i8* %0, i8* %1) {
%3 = load i32, i32* @INT_MAX
%4 = tail call i32 @sl_strncasecmp(i8* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f(int x) {
  int a = x + 10;
  printf("%d\n", a);
  return;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0xa(%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @f(i32 %0) {
%2 = add nsw i32 %0, 10
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
void ff_hevc_put_hevc_bi_qpel_h4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h4_12_sse4() {
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int stat(char *, struct stat *);
int isdirectory(char *filename) {
  struct stat fst;
  if (stat(filename, &fst) == -1)
    return 0;
  if (S_ISDIR(fst.st_mode))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isdirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    114e <isdirectory+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1173 <isdirectory+0x53>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     116c <isdirectory+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1173 <isdirectory+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdirectory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
je     1143 <isdirectory+0x23>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isdirectory(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
char *add_string(char *dest, char *end, const char *src) {
  while (dest < end) {
    char ch = *(src++);
    if (ch == '\0') {
      break;
    }
    *(dest++) = ch;
  }
  return dest;
}


x86 assembly (clang, -O0):
<add_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115d <add_string+0x5d>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jne    1144 <add_string+0x44>
jmp    115d <add_string+0x5d>
mov    -0x19(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1110 <add_string+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_string>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jae    112b <add_string+0x2b>
mov    %rsi,%r8
sub    %rax,%r8
xor    %edi,%edi
movzbl (%rdx,%rdi,1),%ecx
test   %cl,%cl
je     1128 <add_string+0x28>
mov    %cl,(%rax,%rdi,1)
add    $0x1,%rdi
cmp    %rdi,%r8
jne    1110 <add_string+0x10>
mov    %rsi,%rax
ret
add    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @add_string(i8* writeonly %0, i8* readnone %1, i8* nocapture %2) {
%4 = icmp ult i8* %0, %1
br i1 %4, label %5, label %19
5: ; preds = %3
%6 = ptrtoint i8* %1 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %0, i64 %8
br label %10
10: ; preds = %5, %15
%11 = phi i8* [ %17, %15 ], [ %0, %5 ]
%12 = phi i8* [ %16, %15 ], [ %2, %5 ]
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %10
%16 = getelementptr inbounds i8, i8* %12, i64 1
%17 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %13, i8* %11
%18 = icmp eq i8* %17, %9
br i1 %18, label %19, label %10
19: ; preds = %15, %10, %3
%20 = phi i8* [ %0, %3 ], [ %11, %10 ], [ %9, %15 ]
ret i8* %20
}
/* Type definitions */
struct math3d_vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ math3d_vec3_dot(struct math3d_vec3 const *,
                                   struct math3d_vec3 const *);
float sqrtf(int /*<<< orphan*/);
float math3d_vec3_length(const struct math3d_vec3 *v) {
  return sqrtf(math3d_vec3_dot(v, v));
}


x86 assembly (clang, -O0):
<math3d_vec3_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <math3d_vec3_dot@plt>
mov    %eax,%edi
call   1040 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math3d_vec3_length>:
push   %rax
mov    %rdi,%rsi
call   1030 <math3d_vec3_dot@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrtf@plt>

LLVM IR (-O0):
%struct.math3d_vec3 = type { i32 }
define float @math3d_vec3_length(%struct.math3d_vec3* %0) {
%2 = alloca %struct.math3d_vec3*
store %struct.math3d_vec3* %0, %struct.math3d_vec3** %2
%3 = load %struct.math3d_vec3*, %struct.math3d_vec3** %2
%4 = load %struct.math3d_vec3*, %struct.math3d_vec3** %2
%5 = call i32 @math3d_vec3_dot(%struct.math3d_vec3* %3, %struct.math3d_vec3* %4)
%6 = call float @sqrtf(i32 %5)
ret float %6
}

LLVM IR (-O2):
%struct.math3d_vec3 = type { i32 }
define float @math3d_vec3_length(%struct.math3d_vec3* %0) {
%2 = tail call i32 @math3d_vec3_dot(%struct.math3d_vec3* %0, %struct.math3d_vec3* %0)
%3 = tail call float @sqrtf(i32 %2)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ argOneNotNull(int *, int /*<<< orphan*/);
void f(int *n) {
  if (n)
    argOneNotNull(n, 0);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1132 <f+0x22>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <argOneNotNull@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %rdi,%rdi
je     111c <f+0xc>
xor    %esi,%esi
jmp    1030 <argOneNotNull@plt>
ret

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

LLVM IR (-O2):
define void @f(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @argOneNotNull(i32* %0, i32 0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
union bpf_attr {
  int map_fd;
  int /*<<< orphan*/ key;
};
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_DELETE_ELEM;
int /*<<< orphan*/ bzero(union bpf_attr *, int);
int /*<<< orphan*/ ptr_to_u64(void *);
int sys_bpf(int /*<<< orphan*/, union bpf_attr *, int);
int bpf_map_delete_elem(int fd, void *key) {
  union bpf_attr attr;
  bzero(&attr, sizeof(attr));
  attr.map_fd = fd;
  attr.key = ptr_to_u64(key);
  return sys_bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_map_delete_elem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x4,%esi
call   1050 <bzero@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ptr_to_u64@plt>
mov    %eax,-0x18(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_delete_elem>:
push   %rax
mov    %rsi,%rdi
call   1040 <ptr_to_u64@plt>
mov    %eax,(%rsp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i32 }
@BPF_MAP_DELETE_ELEM = global i32 0
define i32 @bpf_map_delete_elem(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %union.bpf_attr
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 @bzero(%union.bpf_attr* %5, i32 4)
%7 = load i32, i32* %3
%8 = bitcast %union.bpf_attr* %5 to i32*
store i32 %7, i32* %8
%9 = load i8*, i8** %4
%10 = call i32 @ptr_to_u64(i8* %9)
%11 = bitcast %union.bpf_attr* %5 to i32*
store i32 %10, i32* %11
%12 = load i32, i32* @BPF_MAP_DELETE_ELEM
%13 = call i32 @sys_bpf(i32 %12, %union.bpf_attr* %5, i32 4)
ret i32 %13
}

LLVM IR (-O2):
%union.bpf_attr = type { i32 }
@BPF_MAP_DELETE_ELEM = global i32 0
define i32 @bpf_map_delete_elem(i32 %0, i8* %1) {
%3 = alloca %union.bpf_attr
%4 = bitcast %union.bpf_attr* %3 to i8*
%5 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %3, i64 0, i32 0
%6 = tail call i32 @ptr_to_u64(i8* %1)
store i32 %6, i32* %5
%7 = load i32, i32* @BPF_MAP_DELETE_ELEM
%8 = call i32 @sys_bpf(i32 %7, %union.bpf_attr* %3, i32 4)
ret i32 %8
}
void RTVfsIoStrmRetain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsIoStrmRetain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ESMUMPSF(int const *const, int const *const, int *const,
                            int const *const, int *const, int *const,
                            int *const, int *const, int *const, int *const);
void esmumpsf(const int *const n, const int *const iwlen, int *const petab,
              const int *const pfree, int *const lentab, int *const iwtab,
              int *const nvtab, int *const elentab, int *const lasttab,
              int *const ncmpa) {
  ESMUMPSF(n, iwlen, petab, pfree, lentab, iwtab, nvtab, elentab, lasttab,
           ncmpa);
}


x86 assembly (clang, -O0):
<esmumpsf>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%rbx
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10
mov    0x28(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ESMUMPSF@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<esmumpsf>:
jmp    1030 <ESMUMPSF@plt>

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

LLVM IR (-O2):
define void @esmumpsf(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9) {
%11 = tail call i32 @ESMUMPSF(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void mem_zero(void *x, size_t s) { memset(x, 0, s); }


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

x86 assembly (clang, -O2):
<mem_zero>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @mem_zero(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
scalar_t__ flushentry();
void *Calloc(size_t cnt, size_t size) {
  void *retval;
  while ((retval = calloc(cnt, size)) == NULL)
    if (flushentry() == 0)
      break;
  return (retval);
}


x86 assembly (clang, -O0):
<Calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1166 <Calloc+0x46>
mov    $0x0,%al
call   1040 <flushentry@plt>
cmp    $0x0,%rax
jne    1161 <Calloc+0x41>
jmp    1166 <Calloc+0x46>
jmp    1130 <Calloc+0x10>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114f <Calloc+0x2f>
xor    %eax,%eax
call   1040 <flushentry@plt>
test   %rax,%rax
jne    1130 <Calloc+0x10>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @Calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %6
6: ; preds = %15, %2
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = call i8* @calloc(i64 %7, i64 %8)
store i8* %9, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = call i64 (...) @flushentry()
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %11
br label %16
15: ; preds = %11
br label %6
16: ; preds = %14, %6
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @Calloc(i64 %0, i64 %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i8* @calloc(i64 %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i64 (...) @flushentry()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %6, %3
ret i8* %4
}
unsigned short get_tr(void) {
  unsigned short seg;
  __asm__ volatile("str %0" : "=rm"(seg));
  return (seg);
}


x86 assembly (clang, -O0):
<get_tr>:
push   %rbp
mov    %rsp,%rbp
str    -0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tr>:
str    -0x2(%rsp)
movzwl -0x2(%rsp),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @get_tr() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
%3 = load i16, i16* %1
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ wrapper_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void print(const char *str) { write(2, str, wrapper_strlen(str)); }


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <wrapper_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    %rdi,%rbx
call   1040 <wrapper_strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @wrapper_strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @print(i8* %0) {
%2 = tail call i32 @wrapper_strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}
unsigned char int_ycr_to_r(unsigned char y, unsigned char cr) {
  int _y = y;
  int _cr = cr - 128;
  int r;
  r = (_y << 5) + 45 * _cr;
  if (r <= 0)
    r = 0;
  else if (r >= 32 * 255)
    r = 255;
  else
    r = r >> 5;
  return (unsigned char)r;
}


x86 assembly (clang, -O0):
<int_ycr_to_r>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
sub    $0x80,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x5,%eax
imul   $0x2d,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jg     1148 <int_ycr_to_r+0x48>
movl   $0x0,-0x10(%rbp)
jmp    116f <int_ycr_to_r+0x6f>
cmpl   $0x1fe0,-0x10(%rbp)
jl     1161 <int_ycr_to_r+0x61>
movl   $0xff,-0x10(%rbp)
jmp    116a <int_ycr_to_r+0x6a>
mov    -0x10(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x10(%rbp)
jmp    116f <int_ycr_to_r+0x6f>
mov    -0x10(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_ycr_to_r>:
shl    $0x5,%edi
lea    (%rsi,%rsi,8),%eax
lea    (%rax,%rax,4),%eax
lea    (%rdi,%rax,1),%ecx
add    $0xffffe980,%ecx
test   %ecx,%ecx
jle    1126 <int_ycr_to_r+0x26>
mov    $0xff,%al
cmp    $0x1fdf,%ecx
ja     1125 <int_ycr_to_r+0x25>
shr    $0x5,%ecx
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i8 @int_ycr_to_r(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
store i32 %9, i32* %5
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = sub nsw i32 %11, 128
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = shl i32 %13, 5
%15 = load i32, i32* %6
%16 = mul nsw i32 45, %15
%17 = add nsw i32 %14, %16
store i32 %17, i32* %7
%18 = load i32, i32* %7
%19 = icmp sle i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %2
store i32 0, i32* %7
br label %29
21: ; preds = %2
%22 = load i32, i32* %7
%23 = icmp sge i32 %22, 8160
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 255, i32* %7
br label %28
25: ; preds = %21
%26 = load i32, i32* %7
%27 = ashr i32 %26, 5
store i32 %27, i32* %7
br label %28
28: ; preds = %25, %24
br label %29
29: ; preds = %28, %20
%30 = load i32, i32* %7
%31 = trunc i32 %30 to i8
ret i8 %31
}

LLVM IR (-O2):
define zeroext i8 @int_ycr_to_r(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = shl nuw nsw i32 %3, 5
%6 = mul nuw nsw i32 %4, 45
%7 = add nsw i32 %5, -5760
%8 = add nsw i32 %7, %6
%9 = icmp slt i32 %8, 1
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = icmp ugt i32 %8, 8159
br i1 %11, label %15, label %12
12: ; preds = %10
%13 = lshr i32 %8, 5
%14 = trunc i32 %13 to i8
br label %15
15: ; preds = %10, %2, %12
%16 = phi i8 [ %14, %12 ], [ 0, %2 ], [ -1, %10 ]
ret i8 %16
}
ADC_debug() {}


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

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

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

LLVM IR (-O2):
define i32 @ADC_debug() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, long);
char *strdup(char *);
char *intToStr(long l) {
  char res[256];
  sprintf(res, "%d", l);
  return strdup(res);
}


x86 assembly (clang, -O0):
<intToStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToStr>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @intToStr(i64 %0) {
%2 = alloca i64
%3 = alloca [256 x i8]
store i64 %0, i64* %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i64, i64* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i8* @strdup(i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define noalias i8* @intToStr(i64 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %0)
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}