xunge/DecIR huggingface dataset:
char *foo(char *fmt, __builtin_va_list ap) {
  return __builtin_va_arg((ap), char *);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x28,%eax
ja     113e <foo+0x3e>
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%edx
movslq %edx,%rax
add    0x10(%rcx),%rax
add    $0x8,%edx
mov    %edx,(%rcx)
mov    %rax,-0x28(%rbp)
jmp    1155 <foo+0x55>
mov    -0x20(%rbp),%rcx
mov    0x8(%rcx),%rdx
mov    %rdx,%rax
add    $0x8,%rdx
mov    %rdx,0x8(%rcx)
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    (%rsi),%ecx
cmp    $0x28,%rcx
ja     1118 <foo+0x18>
mov    %rcx,%rax
add    0x10(%rsi),%rax
add    $0x8,%ecx
mov    %ecx,(%rsi)
mov    (%rax),%rax
ret
mov    0x8(%rsi),%rax
lea    0x8(%rax),%rcx
mov    %rcx,0x8(%rsi)
mov    (%rax),%rax
ret

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i8* @foo(i8* %0, %struct.__va_list_tag* %1) {
%3 = alloca i8*
%4 = alloca %struct.__va_list_tag*
store i8* %0, i8** %3
store %struct.__va_list_tag* %1, %struct.__va_list_tag** %4
%5 = load %struct.__va_list_tag*, %struct.__va_list_tag** %4
%6 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = icmp ule i32 %7, 40
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %5, i32 0, i32 3
%11 = load i8*, i8** %10
%12 = getelementptr i8, i8* %11, i32 %7
%13 = bitcast i8* %12 to i8**
%14 = add i32 %7, 8
store i32 %14, i32* %6
br label %20
15: ; preds = %2
%16 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %5, i32 0, i32 2
%17 = load i8*, i8** %16
%18 = bitcast i8* %17 to i8**
%19 = getelementptr i8, i8* %17, i32 8
store i8* %19, i8** %16
br label %20
20: ; preds = %15, %9
%21 = phi i8** [ %13, %9 ], [ %18, %15 ]
%22 = load i8*, i8** %21
ret i8* %22
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i8* @foo(i8* nocapture readnone %0, %struct.__va_list_tag* nocapture %1) {
%3 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 41
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %1, i64 0, i32 3
%8 = load i8*, i8** %7
%9 = zext i32 %4 to i64
%10 = getelementptr i8, i8* %8, i64 %9
%11 = add nuw nsw i32 %4, 8
store i32 %11, i32* %3
br label %16
12: ; preds = %2
%13 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %1, i64 0, i32 2
%14 = load i8*, i8** %13
%15 = getelementptr i8, i8* %14, i64 8
store i8* %15, i8** %13
br label %16
16: ; preds = %12, %6
%17 = phi i8* [ %10, %6 ], [ %14, %12 ]
%18 = bitcast i8* %17 to i8**
%19 = load i8*, i8** %18
ret i8* %19
}
int convert(int n, int b, char str[], int i) {
  if (n / b > 0)
    i = convert(n / b, b, str, i);
  str[i++] = "0123456789ABCDEF"[n % b];
  return i;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%eax
jle    1150 <convert+0x40>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <convert@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
movslq %edx,%rcx
lea    0xe9f(%rip),%rax
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%ebp
test   %eax,%eax
jle    112d <convert+0x1d>
mov    %eax,%edi
mov    %rbx,%rdx
call   1030 <convert@plt>
mov    %eax,%ecx
movslq %ebp,%rax
lea    0xec9(%rip),%rdx
mov    (%rax,%rdx,1),%al
movslq %ecx,%rdx
add    $0x1,%ecx
mov    %al,(%rbx,%rdx,1)
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define i32 @convert(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = sdiv i32 %9, %10
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = sdiv i32 %14, %15
%17 = load i32, i32* %6
%18 = load i8*, i8** %7
%19 = load i32, i32* %8
%20 = call i32 @convert(i32 %16, i32 %17, i8* %18, i32 %19)
store i32 %20, i32* %8
br label %21
21: ; preds = %13, %4
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = srem i32 %22, %23
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = load i8*, i8** %7
%29 = load i32, i32* %8
%30 = add nsw i32 %29, 1
store i32 %30, i32* %8
%31 = sext i32 %29 to i64
%32 = getelementptr inbounds i8, i8* %28, i64 %31
store i8 %27, i8* %32
%33 = load i32, i32* %8
ret i32 %33
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define i32 @convert(i32 %0, i32 %1, i8* nocapture writeonly %2, i32 %3) {
%5 = sdiv i32 %0, %1
%6 = srem i32 %0, %1
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @convert(i32 %5, i32 %1, i8* %2, i32 %3)
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ %9, %8 ], [ %3, %4 ]
%12 = sext i32 %6 to i64
%13 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = add nsw i32 %11, 1
%16 = sext i32 %11 to i64
%17 = getelementptr inbounds i8, i8* %2, i64 %16
store i8 %14, i8* %17
ret i32 %15
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_36(void) {
  if (*(uint32_t *)0x10000130ul == 0xEul) {
    if (*(uint32_t *)0x10000134ul == 0x0ul) {
      return true;
    }
  }
  return true;
}


x86 assembly (clang, -O0):
<errata_36>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000130,%eax
movslq (%rax),%rax
cmp    $0xe,%rax
jne    1139 <errata_36+0x39>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x0,%rax
jne    1134 <errata_36+0x34>
movl   $0x1,-0x4(%rbp)
jmp    1140 <errata_36+0x40>
jmp    1139 <errata_36+0x39>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @errata_36() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 268435760 to i32*)
%3 = sext i32 %2 to i64
%4 = icmp eq i64 %3, 14
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 268435764 to i32*)
%7 = sext i32 %6 to i64
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 1, i32* %1
br label %12
10: ; preds = %5
br label %11
11: ; preds = %10, %0
store i32 1, i32* %1
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @errata_36() {
ret i32 1
}
void swap_int(int *a, int *b) {
  int c = *a;
  *a = *b;
  *b = c;
}


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

x86 assembly (clang, -O2):
<swap_int>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *get_path_filename(char *full_path) {
  char *slash = strrchr(full_path, '/');
  return slash ? slash + 1 : full_path;
}


x86 assembly (clang, -O0):
<get_path_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <get_path_filename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <get_path_filename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_path_filename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_path_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @get_path_filename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ check_alignment();
int /*<<< orphan*/ check_allocation_near_chunk_size();
int /*<<< orphan*/ check_free();
int /*<<< orphan*/ check_free2();
int /*<<< orphan*/ check_leak_detection();
int /*<<< orphan*/ check_object_growth();
int main(int argc, char **argv) {
  check_free();
  check_free2();
  check_alignment();
  check_allocation_near_chunk_size();
  check_leak_detection();
  check_object_growth();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <check_free@plt>
mov    $0x0,%al
call   1060 <check_free2@plt>
mov    $0x0,%al
call   1050 <check_alignment@plt>
mov    $0x0,%al
call   1080 <check_allocation_near_chunk_size@plt>
mov    $0x0,%al
call   1030 <check_leak_detection@plt>
mov    $0x0,%al
call   1040 <check_object_growth@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <check_free@plt>
xor    %eax,%eax
call   1060 <check_free2@plt>
xor    %eax,%eax
call   1050 <check_alignment@plt>
xor    %eax,%eax
call   1080 <check_allocation_near_chunk_size@plt>
xor    %eax,%eax
call   1030 <check_leak_detection@plt>
xor    %eax,%eax
call   1040 <check_object_growth@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 (...) @check_free()
%7 = call i32 (...) @check_free2()
%8 = call i32 (...) @check_alignment()
%9 = call i32 (...) @check_allocation_near_chunk_size()
%10 = call i32 (...) @check_leak_detection()
%11 = call i32 (...) @check_object_growth()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @check_free()
%4 = tail call i32 (...) @check_free2()
%5 = tail call i32 (...) @check_alignment()
%6 = tail call i32 (...) @check_allocation_near_chunk_size()
%7 = tail call i32 (...) @check_leak_detection()
%8 = tail call i32 (...) @check_object_growth()
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read_unixtstamp(char *, int *);
void test_invalid() {
  char *str = "asd";
  uint64_t dest;
  read_unixtstamp(str, &dest);
  assert((dest / 1000000000) == 0 && (dest % 1000000000) == 0);
}


x86 assembly (clang, -O0):
<test_invalid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <read_unixtstamp@plt>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
jne    116f <test_invalid+0x4f>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_invalid>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <read_unixtstamp@plt>
mov    0x4(%rsp),%eax
lea    0x3b9ac9ff(%rax),%ecx
xor    %edi,%edi
cmp    $0x773593fe,%ecx
ja     115d <test_invalid+0x3d>
imul   $0x3a2e9c6d,%eax,%eax
add    $0x400,%eax
ror    $0x9,%eax
xor    %edi,%edi
cmp    $0x5,%eax
setb   %dil
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"asd\00"
define void @test_invalid() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @read_unixtstamp(i8* %3, i32* %2)
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000000000
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 1000000000
%11 = icmp eq i32 %10, 0
br label %12
12: ; preds = %8, %0
%13 = phi i1 [ false, %0 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"asd\00"
define void @test_invalid() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @read_unixtstamp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add i32 %4, 999999999
%6 = icmp ult i32 %5, 1999999999
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = srem i32 %4, 1000000000
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %0
%12 = phi i32 [ 0, %0 ], [ %10, %7 ]
%13 = call i32 @assert(i32 %12)
ret void
}
void gtk_im_context_delete_surrounding() {}


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

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

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

LLVM IR (-O2):
define void @gtk_im_context_delete_surrounding() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ menu_delete();
void menu_quit(void) {
  ;
  menu_delete();
  exit(0);
}


x86 assembly (clang, -O0):
<menu_quit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <menu_delete@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @menu_quit() {
%1 = call i32 (...) @menu_delete()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @menu_quit() {
%1 = tail call i32 (...) @menu_delete()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int x;
  int y;
  assume(x < 100 && y < 100);
  while (x < 100 && y < 100) {
    x = x + 1;
    y = y + 1;
  }
  assert(x == 100 || y == 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x64,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jge    1148 <main+0x28>
cmpl   $0x64,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
xor    %eax,%eax
cmpl   $0x64,-0x8(%rbp)
mov    %al,-0xe(%rbp)
jge    116e <main+0x4e>
cmpl   $0x64,-0xc(%rbp)
setl   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
test   $0x1,%al
jne    117e <main+0x5e>
jmp    1195 <main+0x75>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <main+0x35>
mov    $0x1,%al
cmpl   $0x64,-0x8(%rbp)
mov    %al,-0xf(%rbp)
je     11ae <main+0x8e>
cmpl   $0x64,-0xc(%rbp)
sete   %al
mov    %al,-0xf(%rbp)
mov    -0xf(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 100
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assume(i32 %11)
br label %13
13: ; preds = %21, %9
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 100
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 100
br label %19
19: ; preds = %16, %13
%20 = phi i1 [ false, %13 ], [ %18, %16 ]
br i1 %20, label %21, label %26
21: ; preds = %19
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %13
26: ; preds = %19
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 100
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %3
%31 = icmp eq i32 %30, 100
br label %32
32: ; preds = %29, %26
%33 = phi i1 [ true, %26 ], [ %31, %29 ]
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
int octdigit(c)
int c;
{ return (c >= '0' && c <= '7'); }


x86 assembly (clang, -O0):
<octdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <octdigit+0x20>
cmpl   $0x37,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<octdigit>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @octdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 55
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @octdigit(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int ui__getInteger(char *);
int ui__getCmd() {
  int cmd = ui__getInteger("Give command: ");
  return cmd;
}


x86 assembly (clang, -O0):
<ui__getCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <ui__getInteger@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Give command: \00"
define i32 @ui__getCmd() {
%1 = alloca i32
%2 = call i32 @ui__getInteger(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [15 x i8] c"Give command: \00"
define i32 @ui__getCmd() {
%1 = tail call i32 @ui__getInteger(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void foo598() {}


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

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

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

LLVM IR (-O2):
define void @foo598() {
ret void
}
int btoi(char *bnbr) {
  unsigned int n = 0;
  while ((*bnbr == '1') || (*bnbr == '.') || (*bnbr == '0')) {
    n <<= 1;
    n += *bnbr == '1';
    bnbr++;
  }
  return n;
}


x86 assembly (clang, -O0):
<btoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x31,%ecx
mov    %al,-0xd(%rbp)
je     1149 <btoi+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0xd(%rbp)
je     1149 <btoi+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1159 <btoi+0x59>
jmp    118b <btoi+0x8b>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <btoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btoi>:
xor    %eax,%eax
movabs $0x3400000000000,%rcx
nopl   0x0(%rax)
movzbl (%rdi),%edx
cmp    $0x31,%rdx
ja     1131 <btoi+0x31>
bt     %rdx,%rcx
jae    1131 <btoi+0x31>
xor    %esi,%esi
cmp    $0x31,%dl
sete   %sil
lea    (%rsi,%rax,2),%eax
add    $0x1,%rdi
jmp    1110 <btoi+0x10>
ret

LLVM IR (-O0):
define i32 @btoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %21, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 49
br i1 %8, label %19, label %9
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 46
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 48
br label %19
19: ; preds = %14, %9, %4
%20 = phi i1 [ true, %9 ], [ true, %4 ], [ %18, %14 ]
br i1 %20, label %21, label %33
21: ; preds = %19
%22 = load i32, i32* %3
%23 = shl i32 %22, 1
store i32 %23, i32* %3
%24 = load i8*, i8** %2
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 49
%28 = zext i1 %27 to i32
%29 = load i32, i32* %3
%30 = add i32 %29, %28
store i32 %30, i32* %3
%31 = load i8*, i8** %2
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %2
br label %4
33: ; preds = %19
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @btoi(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %11, %6 ]
%4 = phi i32 [ 0, %1 ], [ %10, %6 ]
%5 = load i8, i8* %3
switch i8 %5, label %12 [
i8 49, label %6
i8 46, label %6
i8 48, label %6
]
6: ; preds = %2, %2, %2
%7 = shl i32 %4, 1
%8 = icmp eq i8 %5, 49
%9 = zext i1 %8 to i32
%10 = or i32 %7, %9
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %2
ret i32 %4
}
double paraboloide(int a, int b, float t) {
  float resultado;
  resultado = (t * t / a * a) - (t * t / b * b);
  return resultado;
}


x86 assembly (clang, -O0):
<paraboloide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtsi2ssl -0x4(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm3
divss  %xmm3,%xmm1
cvtsi2ssl -0x8(%rbp),%xmm3
mulss  %xmm3,%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<paraboloide>:
mulss  %xmm0,%xmm0
cvtsi2ss %edi,%xmm1
movaps %xmm0,%xmm2
divss  %xmm1,%xmm2
cvtsi2ss %esi,%xmm3
divss  %xmm3,%xmm0
mulss  %xmm3,%xmm0
mulss  %xmm1,%xmm2
subss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @paraboloide(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%8 = load float, float* %6
%9 = load float, float* %6
%10 = fmul float %8, %9
%11 = load i32, i32* %4
%12 = sitofp i32 %11 to float
%13 = fdiv float %10, %12
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to float
%16 = load float, float* %6
%17 = load float, float* %6
%18 = fmul float %16, %17
%19 = load i32, i32* %5
%20 = sitofp i32 %19 to float
%21 = fdiv float %18, %20
%22 = load i32, i32* %5
%23 = sitofp i32 %22 to float
%24 = fmul float %21, %23
%25 = fneg float %24
%26 = call float @llvm.fmuladd.f32(float %13, float %15, float %25)
store float %26, float* %7
%27 = load float, float* %7
%28 = fpext float %27 to double
ret double %28
}

LLVM IR (-O2):
define double @paraboloide(i32 %0, i32 %1, float %2) {
%4 = fmul float %2, %2
%5 = sitofp i32 %0 to float
%6 = fdiv float %4, %5
%7 = sitofp i32 %1 to float
%8 = fneg float %4
%9 = fdiv float %8, %7
%10 = fmul float %9, %7
%11 = tail call float @llvm.fmuladd.f32(float %6, float %5, float %10)
%12 = fpext float %11 to double
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ mcfioC_CloseSequentialFile(int);
void mcfio_closesequentialfile_(int *stream) {
  mcfioC_CloseSequentialFile(*stream);
}


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

x86 assembly (clang, -O2):
<mcfio_closesequentialfile_>:
mov    (%rdi),%edi
jmp    1030 <mcfioC_CloseSequentialFile@plt>

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

LLVM IR (-O2):
define void @mcfio_closesequentialfile_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @mcfioC_CloseSequentialFile(i32 %2)
ret void
}
void g_DUMMY_menu_destroy_buttonbar(int win_id) { win_id = win_id; }


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

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

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

LLVM IR (-O2):
define void @g_DUMMY_menu_destroy_buttonbar(i32 %0) {
ret void
}
/* Variables and functions */
int digit_value(char);
int is_digit(char c) { return digit_value(c) <= 9; }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <digit_value@plt>
cmp    $0x9,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
push   %rax
call   1030 <digit_value@plt>
xor    %ecx,%ecx
cmp    $0xa,%eax
setl   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @digit_value(i8 signext %3)
%5 = icmp sle i32 %4, 9
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_digit(i8 signext %0) {
%2 = tail call i32 @digit_value(i8 signext %0)
%3 = icmp slt i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rdReg(int, int /*<<< orphan*/ *);
uint32_t ons_get_hw_tables() {
  uint32_t val;
  rdReg(0x4b00000c, &val);
  return val;
}


x86 assembly (clang, -O0):
<ons_get_hw_tables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4b00000c,%edi
lea    -0x4(%rbp),%rsi
call   1030 <rdReg@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ons_get_hw_tables>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4b00000c,%edi
call   1030 <rdReg@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ons_get_hw_tables() {
%1 = alloca i32
%2 = call i32 @rdReg(i32 1258291212, i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @ons_get_hw_tables() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @rdReg(i32 1258291212, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
int event_add(struct event *ev, const struct timeval *timeout) {
  (void)ev;
  (void)timeout;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.event = type opaque
%struct.timeval = type opaque
define i32 @event_add(%struct.event* %0, %struct.timeval* %1) {
%3 = alloca %struct.event*
%4 = alloca %struct.timeval*
store %struct.event* %0, %struct.event** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.event*, %struct.event** %3
%6 = load %struct.timeval*, %struct.timeval** %4
ret i32 0
}

LLVM IR (-O2):
%struct.event = type opaque
%struct.timeval = type opaque
define i32 @event_add(%struct.event* nocapture readnone %0, %struct.timeval* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct icmp6_hdr {
  int dummy;
};

/* Variables and functions */
size_t icmpv6_get_header_size(const uint8_t *icmpv6_segment) {
  return sizeof(struct icmp6_hdr);
}


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

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

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

LLVM IR (-O2):
define i64 @icmpv6_get_header_size(i32* nocapture readnone %0) {
ret i64 4
}
int ft_count_if(char **tab, int (*f)(char *)) {
  int res;
  int i;
  res = 0;
  i = -1;
  while (tab[(++i)])
    if ((*f)(tab[i]) == 1)
      res++;
  return (res);
}


x86 assembly (clang, -O0):
<ft_count_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1162 <ft_count_if+0x62>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x18(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdi
call   *%rax
cmp    $0x1,%eax
jne    115d <ft_count_if+0x5d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111e <ft_count_if+0x1e>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_count_if>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     113b <ft_count_if+0x3b>
mov    %rsi,%r14
add    $0x8,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
call   *%r14
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ebp
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <ft_count_if+0x20>
jmp    113d <ft_count_if+0x3d>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_count_if(i8** nocapture %0, i32 (i8*)* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %13, %5 ], [ 0, %2 ]
%7 = phi i8* [ %15, %5 ], [ %3, %2 ]
%8 = phi i32 [ %12, %5 ], [ 0, %2 ]
%9 = tail call i32 %1(i8* %7)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = add nuw i64 %6, 1
%14 = getelementptr inbounds i8*, i8** %0, i64 %13
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %5
17: ; preds = %5, %2
%18 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %18
}
/* Variables and functions */
double funcAngCor_alpha0_1minus_0plus_15097_L1(double *, double *);
double sin(double);
double fitAngDist_alpha0_1minus_0plus_15097_L1(double *x, double *par) {
  double result;
  result = funcAngCor_alpha0_1minus_0plus_15097_L1(x, &par[0]) *
           sin(x[0] * 0.0174533);
  return result;
}


x86 assembly (clang, -O0):
<fitAngDist_alpha0_1minus_0plus_15097_L1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <funcAngCor_alpha0_1minus_0plus_15097_L1@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeb2(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitAngDist_alpha0_1minus_0plus_15097_L1>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <funcAngCor_alpha0_1minus_0plus_15097_L1@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
mulsd  0xec1(%rip),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fitAngDist_alpha0_1minus_0plus_15097_L1(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = call double @funcAngCor_alpha0_1minus_0plus_15097_L1(double* %6, double* %8)
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fmul double %12, 1.745330e-02
%14 = call double @sin(double %13)
%15 = fmul double %9, %14
store double %15, double* %5
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @fitAngDist_alpha0_1minus_0plus_15097_L1(double* %0, double* %1) {
%3 = tail call double @funcAngCor_alpha0_1minus_0plus_15097_L1(double* %0, double* %1)
%4 = load double, double* %0
%5 = fmul double %4, 1.745330e-02
%6 = tail call double @sin(double %5)
%7 = fmul double %3, %6
ret double %7
}
int risdigit(int c) { return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<risdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <risdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<risdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @risdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @risdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct passwd {
  int /*<<< orphan*/ pw_uid;
};

/* Variables and functions */
int /*<<< orphan*/ a_num(char const *, char *);
struct passwd *getpwnam(char const *);
uid_t a_uid(const char *s) {
  struct passwd *pw;
  if ((pw = getpwnam(s)) != NULL)
    return pw->pw_uid;
  return a_num(s, "user");
}


x86 assembly (clang, -O0):
<a_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getpwnam@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1151 <a_uid+0x31>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <a_uid+0x44>
mov    -0x10(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1040 <a_num@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_uid>:
push   %rbx
mov    %rdi,%rbx
call   1030 <getpwnam@plt>
test   %rax,%rax
je     1132 <a_uid+0x12>
mov    (%rax),%eax
pop    %rbx
ret
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <a_num@plt>

LLVM IR (-O0):
%struct.passwd = type { i32 }
@.str = [5 x i8] c"user\00"
define i32 @a_uid(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.passwd*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call %struct.passwd* @getpwnam(i8* %5)
store %struct.passwd* %6, %struct.passwd** %4
%7 = icmp ne %struct.passwd* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load %struct.passwd*, %struct.passwd** %4
%10 = getelementptr inbounds %struct.passwd, %struct.passwd* %9, i32 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %2
br label %15
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i32 @a_num(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@.str = [5 x i8] c"user\00"
define i32 @a_uid(i8* %0) {
%2 = tail call %struct.passwd* @getpwnam(i8* %0)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i32, i32* %5
br label %9
7: ; preds = %1
%8 = tail call i32 @a_num(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ %8, %7 ]
ret i32 %10
}
/* Type definitions */
typedef scalar_t__ jmp_buf;
typedef int /*<<< orphan*/ env;

/* Variables and functions */
int /*<<< orphan*/ gc_mark(void *);
int /*<<< orphan*/ setjmp(scalar_t__);
void gc_mark_register(void) {
  jmp_buf env;
  size_t i;
  setjmp(env);
  for (i = 0; i < sizeof(env); i++) {
    gc_mark(((void **)env)[i]);
  }
}


x86 assembly (clang, -O0):
<gc_mark_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x8(%rbp),%rdi
call   1040 <setjmp@plt>
movq   $0x0,-0x10(%rbp)
cmpq   $0x8,-0x10(%rbp)
jae    1166 <gc_mark_register+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <gc_mark@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <gc_mark_register+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_mark_register>:
push   %rax
call   1040 <setjmp@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
call   1030 <gc_mark@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @gc_mark_register() {
%1 = call i32 @setjmp(i64 undef)
%2 = call i32 @gc_mark(i8* undef)
%3 = call i32 @gc_mark(i8* undef)
%4 = call i32 @gc_mark(i8* undef)
%5 = call i32 @gc_mark(i8* undef)
%6 = call i32 @gc_mark(i8* undef)
%7 = call i32 @gc_mark(i8* undef)
%8 = call i32 @gc_mark(i8* undef)
%9 = call i32 @gc_mark(i8* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x3c() {
  Assert_real((isalpha(60) == 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",
              305, ("isalpha should be 0 for <"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x3c>:
push   %rax
mov    $0x3c,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x131,%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 = [26 x i8] c"isalpha should be 0 for <\00"
define void @t_isalpha_0x3c() {
%1 = call i64 @isalpha(i32 60)
%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 305, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"isalpha should be 0 for <\00"
define void @t_isalpha_0x3c() {
%1 = tail call i64 @isalpha(i32 60)
%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 305, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *remove(void *, void const *, int (*)(void const *, void const *), void *);
void *tdelete(const void *restrict key, void **restrict rootp,
              int (*compar)(const void *, const void *)) {
  return remove((void *)rootp, key, compar, *rootp);
}


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

x86 assembly (clang, -O2):
<tdelete>:
mov    %rdi,%rax
mov    (%rsi),%rcx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <remove@plt>

LLVM IR (-O0):
define i8* @tdelete(i8* noalias %0, i8** noalias %1, i32 (i8*, i8*)* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 (i8*, i8*)* %2, i32 (i8*, i8*)** %6
%7 = load i8**, i8*** %5
%8 = bitcast i8** %7 to i8*
%9 = load i8*, i8** %4
%10 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = call i8* @remove(i8* %8, i8* %9, i32 (i8*, i8*)* %10, i8* %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @tdelete(i8* noalias %0, i8** noalias nocapture %1, i32 (i8*, i8*)* %2) {
%4 = bitcast i8** %1 to i8*
%5 = load i8*, i8** %1
%6 = tail call i8* @remove(i8* %4, i8* %0, i32 (i8*, i8*)* %2, i8* %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ close_source_file();
void quit_scanner(void) { close_source_file(); }


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

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

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

LLVM IR (-O2):
define void @quit_scanner() {
%1 = tail call i32 (...) @close_source_file()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void bounce_drop_error(void) { exit(0); }


x86 assembly (clang, -O0):
<bounce_drop_error>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @bounce_drop_error() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @bounce_drop_error() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int f223(int *);
int f224(int *p) { return f223(p); }


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

x86 assembly (clang, -O2):
<f224>:
jmp    1030 <f223@plt>

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

LLVM IR (-O2):
define i32 @f224(i32* %0) {
%2 = tail call i32 @f223(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printLines(int *lines, int numLines) {
  int i = 0;
  while (i < numLines) {
    printf("%d ", *(lines + i));
    i++;
  }
}


x86 assembly (clang, -O0):
<printLines>:
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
jge    1157 <printLines+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printLines+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLines>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printLines+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 <printLines+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @printLines(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 = %10, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext 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)
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printLines(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
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
}