xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ f0();
int /*<<< orphan*/ f1();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) {
  printf("resultado de f0 eh %.1lf\n", f0());
  printf("resultado de f1 eh %.1lf\n", f1());
  return 1;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f0@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <f1@plt>
lea    0xec6(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"resultado de f0 eh %.1lf\0A\00"
@.str.1 = [26 x i8] c"resultado de f1 eh %.1lf\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @f0()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @f1()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ couleur_test2();
int main_couleur(int argc, char *argv[]) {
  couleur_test2();
  return 0;
}


x86 assembly (clang, -O0):
<main_couleur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <couleur_test2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main_couleur(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @couleur_test2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main_couleur(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @couleur_test2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_puts(char *);
int main(int argc, char **argv) {
  my_puts("Hello, world!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @my_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @my_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void set_excalibur_frequency(void) {}


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

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

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

LLVM IR (-O2):
define void @set_excalibur_frequency() {
ret void
}
long mach_port_deallocate(void *priv, unsigned long args) {}


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

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

LLVM IR (-O0):
define i64 @mach_port_deallocate(i8* %0, i64 %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @mach_port_deallocate(i8* nocapture readnone %0, i64 %1) {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *esock_malloc(size_t size) {
  void *p;
  p = malloc(size);
  if (!p) {
    fprintf(stderr, "esock_malloc: cannot alloc %d bytes\n", size);
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<esock_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <esock_malloc+0x4b>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esock_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <esock_malloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"esock_malloc: cannot alloc %d bytes\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @esock_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"esock_malloc: cannot alloc %d bytes\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @esock_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ print_directory_contents(char const *);
int main(int argc, const char *argv[]) {
  if (1 == argc) {
    print_directory_contents(".");
  } else {
    print_directory_contents(argv[1]);
  }
  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    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    1145 <main+0x35>
lea    0xec5(%rip),%rdi
call   1030 <print_directory_contents@plt>
jmp    1152 <main+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <print_directory_contents@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jne    111f <main+0xf>
lea    0xee3(%rip),%rdi
jmp    1123 <main+0x13>
mov    0x8(%rsi),%rdi
call   1030 <print_directory_contents@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %2 ]
%9 = tail call i32 @print_directory_contents(i8* %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/ const);
void set_port4(struct sockaddr *sap, const uint16_t port) {
  struct sockaddr_in *sin = (struct sockaddr_in *)sap;
  sin->sin_port = htons(port);
}


x86 assembly (clang, -O0):
<set_port4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_port4>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htons@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.sockaddr_in = type { i32 }
define void @set_port4(%struct.sockaddr* %0, i32 %1) {
%3 = alloca %struct.sockaddr*
%4 = alloca i32
%5 = alloca %struct.sockaddr_in*
store %struct.sockaddr* %0, %struct.sockaddr** %3
store i32 %1, i32* %4
%6 = load %struct.sockaddr*, %struct.sockaddr** %3
%7 = bitcast %struct.sockaddr* %6 to %struct.sockaddr_in*
store %struct.sockaddr_in* %7, %struct.sockaddr_in** %5
%8 = load i32, i32* %4
%9 = call i32 @htons(i32 %8)
%10 = load %struct.sockaddr_in*, %struct.sockaddr_in** %5
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define void @set_port4(%struct.sockaddr* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @htons(i32 %1)
%4 = getelementptr %struct.sockaddr, %struct.sockaddr* %0, i64 0, i32 0
store i32 %3, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mempool_get_stat() {
  printf("NOT IMPLEMENTED:"
         "pa_mempool_get_stat"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"NOT IMPLEMENTED:pa_mempool_get_stat\0A\00"
define i32 @pa_mempool_get_stat() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_mempool_get_stat\00"
define i32 @pa_mempool_get_stat() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
const char *get_type_name_player(struct castable *castable) { return "player"; }


x86 assembly (clang, -O0):
<get_type_name_player>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.castable = type opaque
@.str = [7 x i8] c"player\00"
define i8* @get_type_name_player(%struct.castable* %0) {
%2 = alloca %struct.castable*
store %struct.castable* %0, %struct.castable** %2
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.castable = type opaque
@.str = [7 x i8] c"player\00"
define i8* @get_type_name_player(%struct.castable* nocapture readnone %0) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
int fun467() { return 467; }


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

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

LLVM IR (-O0):
define i32 @fun467() {
ret i32 467
}

LLVM IR (-O2):
define i32 @fun467() {
ret i32 467
}
int test_imm_77int64_highword_reg(long long val) {
  return ((val >> 32) & (0x77 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_77int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x77,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_77int64_highword_reg>:
movabs $0x7700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_77int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 119
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_77int64_highword_reg(i64 %0) {
%2 = and i64 %0, 511101108224
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_char(char i, char k, char s) {
  ft_putchar(i);
  ft_putchar(k);
  ft_putchar(s);
}


x86 assembly (clang, -O0):
<ft_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x2(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x3(%rbp),%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_char>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <ft_putchar@plt>
mov    %ebp,%edi
call   1030 <ft_putchar@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putchar@plt>

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

LLVM IR (-O2):
define void @ft_char(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @ft_putchar(i8 signext %0)
%5 = tail call i32 @ft_putchar(i8 signext %1)
%6 = tail call i32 @ft_putchar(i8 signext %2)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit_failure(char const *);
void *critcalloc(size_t nmemb, size_t size, const char *err) {
  void *ptr;
  ptr = calloc(nmemb, size);
  if (!ptr)
    exit_failure(err);
  return ptr;
}


x86 assembly (clang, -O0):
<critcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1159 <critcalloc+0x39>
mov    -0x18(%rbp),%rdi
call   1040 <exit_failure@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<critcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <critcalloc+0x1c>
mov    %r14,%rdi
call   1040 <exit_failure@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @critcalloc(i64 %0, i64 %1, i8* %2) {
%4 = tail call i8* @calloc(i64 %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit_failure(i8* %2)
br label %8
8: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
scalar_t__ EINTR;
int _syscall_close(int);
scalar_t__ errno;
int zrobust_syscall_close(int fd) {
  int ret;
  do {
    ret = _syscall_close(fd);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
}


x86 assembly (clang, -O0):
<zrobust_syscall_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_syscall_close@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    114f <zrobust_syscall_close+0x3f>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <zrobust_syscall_close+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zrobust_syscall_close>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%r14
mov    0x2eb3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <_syscall_close@plt>
test   %eax,%eax
jns    1143 <zrobust_syscall_close+0x33>
mov    (%r15),%rcx
cmp    %rcx,(%r14)
je     1130 <zrobust_syscall_close+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zrobust_syscall_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %2
%6 = call i32 @_syscall_close(i32 %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i64, i64* @errno
%12 = load i64, i64* @EINTR
%13 = icmp eq i64 %11, %12
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br i1 %15, label %4, label %16
16: ; preds = %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zrobust_syscall_close(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @_syscall_close(i32 %0)
%4 = icmp slt i32 %3, 0
%5 = load i64, i64* @errno
%6 = load i64, i64* @EINTR
%7 = icmp eq i64 %5, %6
%8 = select i1 %4, i1 %7, i1 false
br i1 %8, label %2, label %9
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void suma(void *op1, void *op2) {
  int a = *((int *)op1);
  int b = *((int *)op2);
  printf("%i + %i = %i\n", a, b, a + b);
}


x86 assembly (clang, -O0):
<suma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
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),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suma>:
mov    (%rdi),%eax
mov    (%rsi),%edx
lea    (%rdx,%rax,1),%ecx
lea    0xee2(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%i + %i = %i\0A\00"
define void @suma(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = add nsw i32 %15, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%i + %i = %i\0A\00"
define void @suma(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %4
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func() { printf("b\n"); }


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"b\00"
define void @func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
void fa71(int n) {
  {
    int b[n];
    {
      int c[n];
      0;
    }
  a : {
    int d[n];
    goto a;
    0;
  };
    int e[n];
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa71>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
jmp    1131 <fa71+0x31>

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

LLVM IR (-O0):
define void @fa71(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 %20
store i64 %20, i64* %4
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
%25 = call i8* @llvm.stacksave()
store i8* %25, i8** %5
%26 = alloca i32, i64 %24
store i64 %24, i64* %6
%27 = load i8*, i8** %5
br label %28
28: ; preds = %28, %1
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %7
%32 = alloca i32, i64 %30
store i64 %30, i64* %8
%33 = load i8*, i8** %7
br label %28
34: ; No predecessors!
%35 = load i32, i32* %2
%36 = zext i32 %35 to i64
%37 = alloca i32, i64 %36
store i64 %36, i64* %9
%38 = load i8*, i8** %3
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %10
%42 = alloca i32, i64 %40
store i64 %40, i64* %11
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
%45 = call i8* @llvm.stacksave()
store i8* %45, i8** %12
%46 = alloca i32, i64 %44
store i64 %44, i64* %13
%47 = load i8*, i8** %12
%48 = load i32, i32* %2
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
store i8* %50, i8** %14
%51 = alloca i32, i64 %49
store i64 %49, i64* %15
%52 = load i8*, i8** %14
%53 = load i32, i32* %2
%54 = zext i32 %53 to i64
%55 = alloca i32, i64 %54
store i64 %54, i64* %16
%56 = load i8*, i8** %10
%57 = load i32, i32* %2
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %17
%60 = alloca i32, i64 %58
store i64 %58, i64* %18
%61 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa71(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ setChecksum(int);
void generateChecksum() { setChecksum(123); }


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

x86 assembly (clang, -O2):
<generateChecksum>:
mov    $0x7b,%edi
jmp    1030 <setChecksum@plt>

LLVM IR (-O0):
define void @generateChecksum() {
%1 = call i32 @setChecksum(i32 123)
ret void
}

LLVM IR (-O2):
define void @generateChecksum() {
%1 = tail call i32 @setChecksum(i32 123)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef size_t uint16_t;

/* Variables and functions */
int buffers_match(uint8_t *b1, uint8_t *b2, uint16_t len) {
  while (len--)
    if (b1[len] != b2[len])
      return 0;
  return -1;
}


x86 assembly (clang, -O0):
<buffers_match>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1158 <buffers_match+0x58>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
je     1153 <buffers_match+0x53>
movl   $0x0,-0x4(%rbp)
jmp    115f <buffers_match+0x5f>
jmp    1110 <buffers_match+0x10>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffers_match>:
sub    $0x1,%rdx
jb     1113 <buffers_match+0x13>
mov    (%rdi,%rdx,8),%rax
cmp    (%rsi,%rdx,8),%rax
je     1100 <buffers_match>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @buffers_match(i64* nocapture %0, i64* nocapture %1, i64 %2) {
br label %4
4: ; preds = %8, %3
%5 = phi i64 [ %2, %3 ], [ %6, %8 ]
%6 = add i64 %5, -1
%7 = icmp eq i64 %5, 0
br i1 %7, label %14, label %8
8: ; preds = %4
%9 = getelementptr inbounds i64, i64* %0, i64 %6
%10 = load i64, i64* %9
%11 = getelementptr inbounds i64, i64* %1, i64 %6
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
br i1 %13, label %4, label %14
14: ; preds = %4, %8
%15 = phi i32 [ 0, %8 ], [ -1, %4 ]
ret i32 %15
}
/* Type definitions */
struct xlowpan_addr64 {
  int dummy;
};

/* Variables and functions */
size_t xlowpan_recv5(struct xlowpan_addr64 *, int /*<<< orphan*/ *,
                     int /*<<< orphan*/ *, void *, size_t);
size_t xlowpan_recv(struct xlowpan_addr64 *srcaddr, void *data, size_t buflen) {
  return xlowpan_recv5(srcaddr, NULL, NULL, data, buflen);
}


x86 assembly (clang, -O0):
<xlowpan_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <xlowpan_recv5@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlowpan_recv>:
mov    %rdx,%r8
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <xlowpan_recv5@plt>

LLVM IR (-O0):
%struct.xlowpan_addr64 = type { i32 }
define i64 @xlowpan_recv(%struct.xlowpan_addr64* %0, i8* %1, i64 %2) {
%4 = alloca %struct.xlowpan_addr64*
%5 = alloca i8*
%6 = alloca i64
store %struct.xlowpan_addr64* %0, %struct.xlowpan_addr64** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.xlowpan_addr64*, %struct.xlowpan_addr64** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @xlowpan_recv5(%struct.xlowpan_addr64* %7, i32* null, i32* null, i8* %8, i64 %9)
ret i64 %10
}

LLVM IR (-O2):
%struct.xlowpan_addr64 = type { i32 }
define i64 @xlowpan_recv(%struct.xlowpan_addr64* %0, i8* %1, i64 %2) {
%4 = tail call i64 @xlowpan_recv5(%struct.xlowpan_addr64* %0, i32* null, i32* null, i8* %1, i64 %2)
ret i64 %4
}
int pick2(n, i, j)
int n, *i, *j;
{
  double ran1();
  *i = n * ran1();
  while ((*j = n * ran1()) == *i)
    ;
  return (0);
}


x86 assembly (clang, -O0):
<pick2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1030 <ran1@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1030 <ran1@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    -0x18(%rbp),%rcx
mov    %eax,(%rcx)
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    1182 <pick2+0x72>
jmp    114a <pick2+0x3a>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pick2>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
cvtsi2sd %edi,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <ran1@plt>
mulsd  (%rsp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,(%rbx)
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <ran1@plt>
mulsd  (%rsp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,(%r14)
cmp    %eax,(%rbx)
je     1140 <pick2+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @pick2(i32 %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = sitofp i32 %0 to double
%5 = tail call double (...) @ran1()
%6 = fmul double %5, %4
%7 = fptosi double %6 to i32
store i32 %7, i32* %1
br label %8
8: ; preds = %8, %3
%9 = tail call double (...) @ran1()
%10 = fmul double %9, %4
%11 = fptosi double %10 to i32
store i32 %11, i32* %2
%12 = load i32, i32* %1
%13 = icmp eq i32 %12, %11
br i1 %13, label %8, label %14
14: ; preds = %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tor_assert_nonfatal_unreached();
int dirvote_add_signatures(const char *detached_signatures_body,
                           const char *source, const char **msg_out) {
  (void)detached_signatures_body;
  (void)source;
  (void)msg_out;
  tor_assert_nonfatal_unreached();
  return 0;
}


x86 assembly (clang, -O0):
<dirvote_add_signatures>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <tor_assert_nonfatal_unreached@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dirvote_add_signatures(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8**, i8*** %6
%10 = call i32 (...) @tor_assert_nonfatal_unreached()
ret i32 0
}

LLVM IR (-O2):
define i32 @dirvote_add_signatures(i8* nocapture readnone %0, i8* nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @tor_assert_nonfatal_unreached()
ret i32 0
}
int fun938() { return 938; }


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

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

LLVM IR (-O0):
define i32 @fun938() {
ret i32 938
}

LLVM IR (-O2):
define i32 @fun938() {
ret i32 938
}
/* Variables and functions */
unsigned strlen(const char *s) {
  int i;
  i = 0;
  while (s[i] != 0)
    ++i;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isxdigit(int);
void t_isxdigit_0x46() {
  Assert_real((isxdigit(70)),
              "/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_isxdigit.c",
              355, ("isxdigit should be 1 for F"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x46>:
push   %rbp
mov    %rsp,%rbp
mov    $0x46,%edi
call   1030 <isxdigit@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x163,%edx
lea    0xf66(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x46>:
push   %rax
mov    $0x46,%edi
call   1030 <isxdigit@plt>
lea    0xece(%rip),%rsi
lea    0xf70(%rip),%rcx
mov    %eax,%edi
mov    $0x163,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 1 for F\00"
define void @t_isxdigit_0x46() {
%1 = call i32 @isxdigit(i32 70)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 355, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 1 for F\00"
define void @t_isxdigit_0x46() {
%1 = tail call i32 @isxdigit(i32 70)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 355, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t hz_map_get_bucket_index(size_t hash, size_t bucket_count) {
  return hash % bucket_count;
}


x86 assembly (clang, -O0):
<hz_map_get_bucket_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hz_map_get_bucket_index>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1118 <hz_map_get_bucket_index+0x18>
xor    %edx,%edx
div    %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @hz_map_get_bucket_index(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = urem i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @hz_map_get_bucket_index(i64 %0, i64 %1) {
%3 = urem i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_OV6680(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


x86 assembly (clang, -O0):
<SensorGetReg_OV6680>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorGetReg_OV6680>:
jmp    1030 <VIM_SIF_I2cReadByte@plt>

LLVM IR (-O0):
define void @SensorGetReg_OV6680(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_OV6680(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_add_tail(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_del(struct list_head *);
void list_move_tail(struct list_head *entry, struct list_head *head) {
  list_del(entry);
  list_add_tail(entry, head);
}


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

x86 assembly (clang, -O2):
<list_move_tail>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <list_del@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add_tail@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_del(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add_tail(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_del(%struct.list_head* %0)
%4 = tail call i32 @list_add_tail(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
/* Type definitions */
typedef enum auth_stat { ____Placeholder_auth_stat } auth_stat;

/* Variables and functions */
int AUTH_OK;
enum auth_stat _svcauth_null() { return (AUTH_OK); }


x86 assembly (clang, -O0):
<_svcauth_null>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eed(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_svcauth_null>:
mov    0x2ef1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@AUTH_OK = global i32 0
define i32 @_svcauth_null() {
%1 = load i32, i32* @AUTH_OK
ret i32 %1
}

LLVM IR (-O2):
@AUTH_OK = global i32 0
define i32 @_svcauth_null() {
%1 = load i32, i32* @AUTH_OK
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void menu(void) {
  printf("0 - Quit\n1 - Add\n2 - Edit\n3 - Remove\n4 - Display All\nEnter "
         "Option: ");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [68 x i8] c"0 - Quit\0A1 - Add\0A2 - Edit\0A3 - Remove\0A4 - Display All\0AEnter Option: \00"
@stdout = global i32 0
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [68 x i8] c"0 - Quit\0A1 - Add\0A2 - Edit\0A3 - Remove\0A4 - Display All\0AEnter Option: \00"
@stdout = global i32 0
define void @menu() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int);
void parcels_seed(int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<parcels_seed>:
jmp    1030 <srand@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_andnot_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_andnot_ps(__m128 A, __m128 B) { return _mm_andnot_ps(A, B); }


x86 assembly (clang, -O0):
<test_mm_andnot_ps>:
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 <_mm_andnot_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_andnot_ps>:
jmp    1030 <_mm_andnot_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_andnot_ps(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 @_mm_andnot_ps(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_andnot_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_andnot_ps(i32 %0, i32 %1)
ret i32 %3
}
int ft_recursive_factorial(int nb) {
  if (nb == 0 || nb == 1) {
    return (1);
  }
  if (nb > 1 && nb <= 12) {
    nb = nb * ft_recursive_factorial(nb - 1);
    return (nb);
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_recursive_factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <ft_recursive_factorial+0x1f>
cmpl   $0x1,-0x8(%rbp)
jne    113b <ft_recursive_factorial+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    117d <ft_recursive_factorial+0x6d>
cmpl   $0x1,-0x8(%rbp)
jle    1176 <ft_recursive_factorial+0x66>
cmpl   $0xc,-0x8(%rbp)
jg     1176 <ft_recursive_factorial+0x66>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <ft_recursive_factorial@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117d <ft_recursive_factorial+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_recursive_factorial>:
mov    $0x1,%eax
cmp    $0x2,%edi
jb     113e <ft_recursive_factorial+0x3e>
lea    -0x2(%rdi),%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0xa,%ecx
ja     1139 <ft_recursive_factorial+0x39>
imul   %edi,%eax
lea    -0x1(%rdi),%edx
mov    %edx,%edi
cmp    $0x1,%edx
ja     1120 <ft_recursive_factorial+0x20>
mov    $0x1,%ecx
jmp    113b <ft_recursive_factorial+0x3b>
xor    %ecx,%ecx
imul   %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_recursive_factorial(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 1, i32* %2
br label %24
10: ; preds = %6
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 12
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32, i32* %3
%18 = load i32, i32* %3
%19 = sub nsw i32 %18, 1
%20 = call i32 @ft_recursive_factorial(i32 %19)
%21 = mul nsw i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
store i32 %22, i32* %2
br label %24
23: ; preds = %13, %10
store i32 0, i32* %2
br label %24
24: ; preds = %23, %16, %9
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @ft_recursive_factorial(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = add i32 %0, -2
%5 = icmp ult i32 %4, 11
br label %6
6: ; preds = %3, %9
%7 = phi i32 [ %10, %9 ], [ %0, %3 ]
%8 = phi i32 [ %11, %9 ], [ 1, %3 ]
br i1 %5, label %9, label %13
9: ; preds = %6
%10 = add nsw i32 %7, -1
%11 = mul nsw i32 %7, %8
%12 = icmp ult i32 %10, 2
br i1 %12, label %13, label %6
13: ; preds = %6, %9
%14 = phi i32 [ %11, %9 ], [ %8, %6 ]
%15 = phi i32 [ 1, %9 ], [ 0, %6 ]
%16 = mul nuw nsw i32 %15, %14
br label %17
17: ; preds = %13, %1
%18 = phi i32 [ %16, %13 ], [ 1, %1 ]
ret i32 %18
}
int mpeg3_minor() { return 7; }


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

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

LLVM IR (-O0):
define i32 @mpeg3_minor() {
ret i32 7
}

LLVM IR (-O2):
define i32 @mpeg3_minor() {
ret i32 7
}