xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int /*<<< orphan*/ calls_abort(char *);
void test_3(void *ptr) {
  if (!ptr)
    calls_abort("ptr was NULL");
  __analyzer_eval(ptr != 0);
}


x86 assembly (clang, -O0):
<test_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <test_3+0x23>
lea    0xec2(%rip),%rdi
call   1030 <calls_abort@plt>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_3>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1135 <test_3+0x15>
lea    0xed0(%rip),%rdi
call   1030 <calls_abort@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
pop    %rbx
jmp    1040 <__analyzer_eval@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"ptr was NULL\00"
define void @test_3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @calls_abort(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = icmp ne i8* %8, null
%10 = zext i1 %9 to i32
%11 = call i32 @__analyzer_eval(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"ptr was NULL\00"
define void @test_3(i8* readnone %0) {
%2 = icmp ne i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @calls_abort(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = zext i1 %2 to i32
%7 = tail call i32 @__analyzer_eval(i32 %6)
ret void
}
int verify_benchmark(int r) {
  int expected = 4936;
  if (r != expected)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<verify_benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1348,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1126 <verify_benchmark+0x26>
movl   $0x0,-0x4(%rbp)
jmp    112d <verify_benchmark+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_benchmark>:
xor    %eax,%eax
cmp    $0x1348,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @verify_benchmark(i32 %0) {
%2 = icmp eq i32 %0, 4936
%3 = zext i1 %2 to i32
ret i32 %3
}
void avio_find_protocol_name() {}


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

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

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

LLVM IR (-O2):
define void @avio_find_protocol_name() {
ret void
}
void devpts_pty_kill(int number) {}


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

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

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

LLVM IR (-O2):
define void @devpts_pty_kill(i32 %0) {
ret void
}
/* Type definitions */
struct mypacket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_fake_data(struct mypacket *, unsigned int);
int /*<<< orphan*/ usleep(int);
int x10_process_request(struct mypacket *packet) {
  unsigned int dflags;
  dflags = (1 << 3) | (1 << 4) | (1 << 5);
  if (1) {
    dflags |= 1;
  }
  if (1) {
    dflags |= (1 << 1);
  }
  send_fake_data(packet, dflags);
  usleep(20000);
  send_fake_data(packet, dflags);
  usleep(20000);
  send_fake_data(packet, dflags);
  return 1;
}


x86 assembly (clang, -O0):
<x10_process_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x38,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <send_fake_data@plt>
mov    $0x4e20,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <send_fake_data@plt>
mov    $0x4e20,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <send_fake_data@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x10_process_request>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3b,%esi
call   1030 <send_fake_data@plt>
mov    $0x4e20,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
mov    $0x3b,%esi
call   1030 <send_fake_data@plt>
mov    $0x4e20,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
mov    $0x3b,%esi
call   1030 <send_fake_data@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mypacket = type { i32 }
define i32 @x10_process_request(%struct.mypacket* %0) {
%2 = alloca %struct.mypacket*
%3 = alloca i32
store %struct.mypacket* %0, %struct.mypacket** %2
store i32 56, i32* %3
%4 = load i32, i32* %3
%5 = or i32 %4, 1
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = or i32 %6, 2
store i32 %7, i32* %3
%8 = load %struct.mypacket*, %struct.mypacket** %2
%9 = load i32, i32* %3
%10 = call i32 @send_fake_data(%struct.mypacket* %8, i32 %9)
%11 = call i32 @usleep(i32 20000)
%12 = load %struct.mypacket*, %struct.mypacket** %2
%13 = load i32, i32* %3
%14 = call i32 @send_fake_data(%struct.mypacket* %12, i32 %13)
%15 = call i32 @usleep(i32 20000)
%16 = load %struct.mypacket*, %struct.mypacket** %2
%17 = load i32, i32* %3
%18 = call i32 @send_fake_data(%struct.mypacket* %16, i32 %17)
ret i32 1
}

LLVM IR (-O2):
%struct.mypacket = type { i32 }
define i32 @x10_process_request(%struct.mypacket* %0) {
%2 = tail call i32 @send_fake_data(%struct.mypacket* %0, i32 59)
%3 = tail call i32 @usleep(i32 20000)
%4 = tail call i32 @send_fake_data(%struct.mypacket* %0, i32 59)
%5 = tail call i32 @usleep(i32 20000)
%6 = tail call i32 @send_fake_data(%struct.mypacket* %0, i32 59)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() { printf("string: %s\n", "hello world!"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"string: %s\0A\00"
@.str.1 = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"string: %s\0A\00"
@.str.1 = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void EndBarber() {}


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

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

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

LLVM IR (-O2):
define void @EndBarber() {
ret void
}
/* Variables and functions */
int __socketpair(int, int, int, int *);
int socketpair(int domain, int type, int protocal, int sv[2]) {
  return __socketpair(domain, type, protocal, sv);
}


x86 assembly (clang, -O0):
<socketpair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <__socketpair@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socketpair>:
jmp    1030 <__socketpair@plt>

LLVM IR (-O0):
define i32 @socketpair(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @__socketpair(i32 %9, i32 %10, i32 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @socketpair(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 @__socketpair(i32 %0, i32 %1, i32 %2, i32* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int main() {
  int i;
  fprintf(stderr, "addr=%p, size=%ld\n", &i, sizeof i);
#pragma omp target data map(alloc : i)
#pragma omp target map(present, alloc : i)
  ;
  fprintf(stderr, "i is present\n");
#pragma omp target map(present, alloc : i)
  ;
  fprintf(stderr, "i is present\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
mov    (%r14),%edi
lea    0xedb(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    $0x4,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xed3(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"addr=%p, size=%ld\0A\00"
@.str.1 = [14 x i8] c"i is present\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %2, i64 4)
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"addr=%p, size=%ld\0A\00"
@.str.1 = [14 x i8] c"i is present\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %1, i64 4)
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void main() {
  char *p = "hello world!";
  int a = (int)p;
  short s = 'c';
  printf("%c\n", (long)(*((int *)p)));
  printf("%s\n", a);
  printf("%s\n", &s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
movw   $0x63,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rsi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0xe(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x63,0x6(%rsp)
lea    0xede(%rip),%rdi
mov    $0x6c6c6568,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebe(%rip),%rsi
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x6(%rsp),%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i16
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
%4 = load i8*, i8** %1
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %2
store i16 99, i16* %3
%6 = load i8*, i8** %1
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %9)
%11 = load i32, i32* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i16* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
store i16 99, i16* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 1819043176)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 ptrtoint ([13 x i8]* @.str to i32))
%5 = call i32 @puts(i8* %2)
ret void
}
void UART7_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @UART7_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_things(int);
int /*<<< orphan*/ perform(size_t);
int clone_child_func(size_t actions) {
  do_things(3);
  perform(actions >> 2);
  return 0;
}


x86 assembly (clang, -O0):
<clone_child_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <do_things@plt>
mov    -0x8(%rbp),%rdi
shr    $0x2,%rdi
call   1040 <perform@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clone_child_func>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%edi
call   1030 <do_things@plt>
shr    $0x2,%rbx
mov    %rbx,%rdi
call   1040 <perform@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @clone_child_func(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @do_things(i32 3)
%4 = load i64, i64* %2
%5 = lshr i64 %4, 2
%6 = call i32 @perform(i64 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @clone_child_func(i64 %0) {
%2 = tail call i32 @do_things(i32 3)
%3 = lshr i64 %0, 2
%4 = tail call i32 @perform(i64 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_NOCLOSE;
int /*<<< orphan*/ *BIO_new_file(char const *, char const *);
int /*<<< orphan*/ *BIO_new_fp(int /*<<< orphan*/ *, int /*<<< orphan*/);
BIO *BIO_open_with_default(const char *file, const char *mode,
                           FILE *default_fp) {
  return file == NULL ? BIO_new_fp(default_fp, BIO_NOCLOSE)
                      : BIO_new_file(file, mode);
}


x86 assembly (clang, -O0):
<BIO_open_with_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115a <BIO_open_with_default+0x3a>
mov    -0x18(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
call   1030 <BIO_new_fp@plt>
mov    %rax,-0x20(%rbp)
jmp    116b <BIO_open_with_default+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <BIO_new_file@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_open_with_default>:
test   %rdi,%rdi
je     112a <BIO_open_with_default+0xa>
jmp    1040 <BIO_new_file@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    %rdx,%rdi
jmp    1030 <BIO_new_fp@plt>

LLVM IR (-O0):
@BIO_NOCLOSE = global i32 0
define i32* @BIO_open_with_default(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32*, i32** %6
%11 = load i32, i32* @BIO_NOCLOSE
%12 = call i32* @BIO_new_fp(i32* %10, i32 %11)
br label %17
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32* @BIO_new_file(i8* %14, i8* %15)
br label %17
17: ; preds = %13, %9
%18 = phi i32* [ %12, %9 ], [ %16, %13 ]
ret i32* %18
}

LLVM IR (-O2):
@BIO_NOCLOSE = global i32 0
define i32* @BIO_open_with_default(i8* %0, i8* %1, i32* %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = load i32, i32* @BIO_NOCLOSE
%7 = tail call i32* @BIO_new_fp(i32* %2, i32 %6)
br label %10
8: ; preds = %3
%9 = tail call i32* @BIO_new_file(i8* %0, i8* %1)
br label %10
10: ; preds = %8, %5
%11 = phi i32* [ %7, %5 ], [ %9, %8 ]
ret i32* %11
}
/* Variables and functions */
scalar_t__ arquivoExiste(char *);
char *getCaminhoTabela(char *);
int /*<<< orphan*/ remove(char *);
int removerTabela(char *nomeTabela) {
  char *caminho = getCaminhoTabela(nomeTabela);
  if (caminho == NULL) {
    return 0;
  } else if (arquivoExiste(caminho)) {
    return !remove(caminho);
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<removerTabela>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getCaminhoTabela@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1160 <removerTabela+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1198 <removerTabela+0x68>
mov    -0x18(%rbp),%rdi
call   1050 <arquivoExiste@plt>
cmp    $0x0,%rax
je     1191 <removerTabela+0x61>
mov    -0x18(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1198 <removerTabela+0x68>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removerTabela>:
push   %rbx
call   1040 <getCaminhoTabela@plt>
test   %rax,%rax
je     115e <removerTabela+0x2e>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <arquivoExiste@plt>
test   %rax,%rax
je     1162 <removerTabela+0x32>
mov    %rbx,%rdi
call   1030 <remove@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @removerTabela(i8* %0) {
%2 = tail call i8* @getCaminhoTabela(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i64 @arquivoExiste(i8* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @remove(i8* %2)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %1, %7
%12 = phi i32 [ %10, %7 ], [ 0, %1 ], [ -1, %4 ]
ret i32 %12
}
int enqueue(prio, new_process)
int prio;
struct process *new_process;
{
  int status;
  if (status = put_end(prio, new_process))
    return (status);
  return (reschedule(prio));
}


x86 assembly (clang, -O0):
<enqueue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <put_end@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1154 <enqueue+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <enqueue+0x41>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <reschedule@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enqueue>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <put_end@plt>
test   %eax,%eax
je     1130 <enqueue+0x10>
pop    %rbx
ret
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <reschedule@plt>

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

LLVM IR (-O2):
%struct.process = type opaque
define i32 @enqueue(i32 %0, %struct.process* %1) {
%3 = tail call i32 (i32, %struct.process*, ...) bitcast (i32 (...)* @put_end to i32 (i32, %struct.process*, ...)*)(i32 %0, %struct.process* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @reschedule to i32 (i32, ...)*)(i32 %0)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ %3, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ sqlite3_version;
int strcmp(char *, int /*<<< orphan*/);
int main(void) { return strcmp("3.10.2", sqlite3_version); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"3.10.2\00"
@sqlite3_version = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @sqlite3_version
%3 = call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %3
}

LLVM IR (-O2):
@.str = [7 x i8] c"3.10.2\00"
@sqlite3_version = global i32 0
define i32 @main() {
%1 = load i32, i32* @sqlite3_version
%2 = tail call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
void *scip_null_sol() { return (void *)0; }


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

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

LLVM IR (-O0):
define i8* @scip_null_sol() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @scip_null_sol() {
ret i8* null
}
void function_empty_id() {}


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

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

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

LLVM IR (-O2):
define void @function_empty_id() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alListenerf(int, float);
void ex_sound_master_volume(float vol) { alListenerf(0x100A, vol); }


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

x86 assembly (clang, -O2):
<ex_sound_master_volume>:
mov    $0x100a,%edi
jmp    1030 <alListenerf@plt>

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

LLVM IR (-O2):
define void @ex_sound_master_volume(float %0) {
%2 = tail call i32 @alListenerf(i32 4106, float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmCos3f(float *, float *);
void glmTan3f_(float angle[3]) { glmCos3f(angle, angle); }


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

x86 assembly (clang, -O2):
<glmTan3f_>:
mov    %rdi,%rsi
jmp    1030 <glmCos3f@plt>

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

LLVM IR (-O2):
define void @glmTan3f_(float* %0) {
%2 = tail call i32 @glmCos3f(float* %0, float* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testStackGrowth();
int main() { testStackGrowth(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @testStackGrowth()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testStackGrowth()
ret i32 0
}
void RTSemEventMultiReset(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemEventMultiReset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dct64_1(double *, double *, double *, double *, double *);
void dct64(double *a, double *b, double *c) {
  double bufs[0x40];
  dct64_1(a, b, bufs, bufs + 0x20, c);
}


x86 assembly (clang, -O0):
<dct64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x220(%rbp),%rdx
lea    -0x220(%rbp),%rcx
add    $0x100,%rcx
mov    -0x18(%rbp),%r8
call   1030 <dct64_1@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dct64>:
sub    $0x208,%rsp
mov    %rdx,%r8
lea    0x100(%rsp),%rcx
mov    %rsp,%rdx
call   1030 <dct64_1@plt>
add    $0x208,%rsp
ret

LLVM IR (-O0):
define void @dct64(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [64 x double]
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %4
%9 = load double*, double** %5
%10 = getelementptr inbounds [64 x double], [64 x double]* %7, i64 0, i64 0
%11 = getelementptr inbounds [64 x double], [64 x double]* %7, i64 0, i64 0
%12 = getelementptr inbounds double, double* %11, i64 32
%13 = load double*, double** %6
%14 = call i32 @dct64_1(double* %8, double* %9, double* %10, double* %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @dct64(double* %0, double* %1, double* %2) {
%4 = alloca [64 x double]
%5 = bitcast [64 x double]* %4 to i8*
%6 = getelementptr inbounds [64 x double], [64 x double]* %4, i64 0, i64 0
%7 = getelementptr inbounds [64 x double], [64 x double]* %4, i64 0, i64 32
%8 = call i32 @dct64_1(double* %0, double* %1, double* %6, double* %7, double* %2)
ret void
}
void txt_sysex(leng, mess) char *mess;
{
  prtime();
  printf("Sysex, leng=%d\n", leng);
}


x86 assembly (clang, -O0):
<txt_sysex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x4(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_sysex>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"Sysex, leng=%d\0A\00"
define void @txt_sysex(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @prtime()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
char *inverte_string(char *str) {
  char *p;
  int i, j;
  for (i = 0; str[i]; i++)
    ;
  while (i >= 0) {
    i--;
    *(p + j) = str[i];
    j++;
  }
  return p;
}


x86 assembly (clang, -O0):
<inverte_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1134 <inverte_string+0x34>
jmp    1126 <inverte_string+0x26>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <inverte_string+0xf>
jmp    1139 <inverte_string+0x39>
cmpl   $0x0,-0x14(%rbp)
jl     1170 <inverte_string+0x70>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1139 <inverte_string+0x39>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i8* @inverte_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
br label %6
6: ; preds = %14, %1
%7 = load i8*, i8** %2
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %6
17: ; preds = %6
br label %18
18: ; preds = %21, %17
%19 = load i32, i32* %4
%20 = icmp sge i32 %19, 0
br i1 %20, label %21, label %35
21: ; preds = %18
%22 = load i32, i32* %4
%23 = add nsw i32 %22, -1
store i32 %23, i32* %4
%24 = load i8*, i8** %2
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = load i8, i8* %27
%29 = load i8*, i8** %3
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
store i8 %28, i8* %32
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %18
35: ; preds = %18
%36 = load i8*, i8** %3
ret i8* %36
}

LLVM IR (-O2):
void spin(int cycles) {
  int i;
  for (i = 0; i < cycles; i++) {
    __asm__("NOP");
  }
}


x86 assembly (clang, -O0):
<spin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1129 <spin+0x29>
nop
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <spin+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spin>:
test   %edi,%edi
jle    1116 <spin+0x16>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
nop
add    $0xffffffff,%edi
jne    1110 <spin+0x10>
ret

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

LLVM IR (-O2):
define void @spin(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ 0, %1 ]
tail call void asm sideeffect "NOP", "~{dirflag},~{fpsr},~{flags}"()
%5 = add nuw nsw i32 %4, 1
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
int parent(int *Arr, int i) { return Arr[i / 2]; }


x86 assembly (clang, -O0):
<parent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent>:
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
cltq
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @parent(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 = sdiv i32 %6, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @parent(i32* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int *shift(int *);
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int array[10];
  int *a = shift(array);
  int *p = a - 16;
  *p = 3;
  test_assert(array[4] == 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <shift@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0xffffffffffffffc0,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movl   $0x3,(%rax)
cmpl   $0x3,-0x20(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    %rsp,%rdi
call   1030 <shift@plt>
movl   $0x3,-0x40(%rax)
xor    %edi,%edi
cmpl   $0x3,0x10(%rsp)
sete   %dil
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = call i32* @shift(i32* %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 -16
store i32* %8, i32** %4
%9 = load i32*, i32** %4
store i32 3, i32* %9
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 4
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 3
%13 = zext i1 %12 to i32
%14 = call i32 @test_assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32* @shift(i32* %3)
%5 = getelementptr inbounds i32, i32* %4, i64 -16
store i32 3, i32* %5
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 3
%9 = zext i1 %8 to i32
%10 = call i32 @test_assert(i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xd3() {
  Assert_real((iscntrl(211) == 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_iscntrl.c",
              1060, ("iscntrl should be 0 for 0xd3"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xd3>:
push   %rax
mov    $0xd3,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x424,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xd3\00"
define void @t_iscntrl_0xd3() {
%1 = call i64 @iscntrl(i32 211)
%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 1060, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xd3\00"
define void @t_iscntrl_0xd3() {
%1 = tail call i64 @iscntrl(i32 211)
%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 1060, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int output_file_deinit();
int output_alsa_deinit() { return output_file_deinit(); }


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

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

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

LLVM IR (-O2):
define i32 @output_alsa_deinit() {
%1 = tail call i32 (...) @output_file_deinit()
ret i32 %1
}
int rs_pop(int *items, int cap, int *_size) {
  int size = *_size;
  int item = items[cap - size];
  *_size = size - 1;
  return item;
}


x86 assembly (clang, -O0):
<rs_pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rs_pop>:
mov    (%rdx),%ecx
sub    %ecx,%esi
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
add    $0xffffffff,%ecx
mov    %ecx,(%rdx)
ret

LLVM IR (-O0):
define i32 @rs_pop(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%9 = load i32*, i32** %6
%10 = load i32, i32* %9
store i32 %10, i32* %7
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sub nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %11, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %8
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %6
store i32 %19, i32* %20
%21 = load i32, i32* %8
ret i32 %21
}

LLVM IR (-O2):
define i32 @rs_pop(i32* nocapture %0, i32 %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = sub nsw i32 %1, %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = add nsw i32 %4, -1
store i32 %9, i32* %2
ret i32 %8
}
void sccF(char *x) {
  signed char *y;
  y = x;
}


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

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

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

LLVM IR (-O2):
define void @sccF(i8* nocapture %0) {
ret void
}
int set_intersection(unsigned long a, unsigned long b, unsigned long c,
                     unsigned long d) {
  if (b <= c || a >= d)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<set_intersection>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1130 <set_intersection+0x30>
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jb     113c <set_intersection+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1143 <set_intersection+0x43>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_intersection>:
cmp    %rdx,%rsi
seta   %al
cmp    %rcx,%rdi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @set_intersection(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp ugt i64 %1, %2
%6 = icmp ult i64 %0, %3
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ tx(int);
void reply(uint8_t n) {
  tx(0xFF);
  tx(n);
}


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

x86 assembly (clang, -O2):
<reply>:
push   %rbx
mov    %edi,%ebx
mov    $0xff,%edi
call   1030 <tx@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tx@plt>

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

LLVM IR (-O2):
define void @reply(i32 %0) {
%2 = tail call i32 @tx(i32 255)
%3 = tail call i32 @tx(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void alt_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @alt_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void wifi_rsp_flash_ps_dump(const struct wifi_msg_flash_ps_dump_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_flash_ps_dump_rsp_t = type opaque
define void @wifi_rsp_flash_ps_dump(%struct.wifi_msg_flash_ps_dump_rsp_t* nocapture %0) {
ret void
}
int fun559() { return 559; }


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

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

LLVM IR (-O0):
define i32 @fun559() {
ret i32 559
}

LLVM IR (-O2):
define i32 @fun559() {
ret i32 559
}
int init_vlan(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_vlan() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DecodeDEa_xxxxdddxssmmmrrr();
int /*<<< orphan*/ DoBinOpEor(int /*<<< orphan*/);
void DoCodeEor(void) { DoBinOpEor(DecodeDEa_xxxxdddxssmmmrrr()); }


x86 assembly (clang, -O0):
<DoCodeEor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <DecodeDEa_xxxxdddxssmmmrrr@plt>
mov    %eax,%edi
call   1030 <DoBinOpEor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCodeEor>:
push   %rax
xor    %eax,%eax
call   1040 <DecodeDEa_xxxxdddxssmmmrrr@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <DoBinOpEor@plt>

LLVM IR (-O0):
define void @DoCodeEor() {
%1 = call i32 (...) @DecodeDEa_xxxxdddxssmmmrrr()
%2 = call i32 @DoBinOpEor(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DoCodeEor() {
%1 = tail call i32 (...) @DecodeDEa_xxxxdddxssmmmrrr()
%2 = tail call i32 @DoBinOpEor(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void fb_hide_cursor(void) {
  printf("\033[10000B\033[10000C\033[?25l");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<fb_hide_cursor>:
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):
<fb_hide_cursor>:
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 = [23 x i8] c"\1B[10000B\1B[10000C\1B[?25l\00"
@stdout = global i32 0
define void @fb_hide_cursor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"\1B[10000B\1B[10000C\1B[?25l\00"
@stdout = global i32 0
define void @fb_hide_cursor() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
void X509_VAL_free(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_VAL_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dglTreeTouchI32Cancel(void *pvTouchI32, void *pvParam) {
  free(pvTouchI32);
}


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

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

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

LLVM IR (-O2):
define void @dglTreeTouchI32Cancel(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}