xunge/DecIR huggingface dataset:
int sleep(int ms) {
  volatile unsigned int *TIMER_CLO_P = (unsigned int *)0x20003004;
  unsigned long current_time = 0;
  unsigned long us = 0;
  if (ms < 0) {
    return -1;
  }
  us = ms * 1000;
  current_time = *TIMER_CLO_P;
  while ((*TIMER_CLO_P - current_time) < us)
    ;
  {}
  return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x20003004,%eax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1136 <sleep+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <sleep+0x71>
imul   $0x3e8,-0x8(%rbp),%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,%eax
sub    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    116a <sleep+0x6a>
jmp    114f <sleep+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
test   %edi,%edi
js     1132 <sleep+0x32>
imul   $0x3e8,%edi,%eax
cltq
mov    0x20003004,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x20003004,%edx
sub    %rcx,%rdx
cmp    %rax,%rdx
jb     1120 <sleep+0x20>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32 %0, i32* %3
store i32* inttoptr (i64 536883204 to i32*), i32** %4
store i64 0, i64* %5
store i64 0, i64* %6
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %27
10: ; preds = %1
%11 = load i32, i32* %3
%12 = mul nsw i32 %11, 1000
%13 = sext i32 %12 to i64
store i64 %13, i64* %6
%14 = load i32*, i32** %4
%15 = load volatile i32, i32* %14
%16 = zext i32 %15 to i64
store i64 %16, i64* %5
br label %17
17: ; preds = %25, %10
%18 = load i32*, i32** %4
%19 = load volatile i32, i32* %18
%20 = zext i32 %19 to i64
%21 = load i64, i64* %5
%22 = sub i64 %20, %21
%23 = load i64, i64* %6
%24 = icmp ult i64 %22, %23
br i1 %24, label %25, label %26
25: ; preds = %17
br label %17
26: ; preds = %17
store i32 0, i32* %2
br label %27
27: ; preds = %26, %9
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = mul nsw i32 %0, 1000
%5 = sext i32 %4 to i64
%6 = load volatile i32, i32* inttoptr (i64 536883204 to i32*)
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %8, %3
%9 = load volatile i32, i32* inttoptr (i64 536883204 to i32*)
%10 = zext i32 %9 to i64
%11 = sub nsw i64 %10, %7
%12 = icmp ult i64 %11, %5
br i1 %12, label %8, label %13
13: ; preds = %8, %1
%14 = phi i32 [ -1, %1 ], [ 0, %8 ]
ret i32 %14
}
/* Variables and functions */
int tcpconnect_start_client(char const *, char const *);
int tcpconnect_start_client_via_interface(const char *hostname,
                                          const char *port,
                                          const char *description) {
  return tcpconnect_start_client(hostname, port);
}


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

x86 assembly (clang, -O2):
<tcpconnect_start_client_via_interface>:
jmp    1030 <tcpconnect_start_client@plt>

LLVM IR (-O0):
define i32 @tcpconnect_start_client_via_interface(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 = call i32 @tcpconnect_start_client(i8* %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @tcpconnect_start_client_via_interface(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @tcpconnect_start_client(i8* %0, i8* %1)
ret i32 %4
}
void foo650() {}


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

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

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

LLVM IR (-O2):
define void @foo650() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stop_mems(int, int);
int /*<<< orphan*/ stop_qs(int *, int *);
void stop_ipc(void) {
  int this_Clerk_pid = 0;
  int other_Clerk_pid = 0;
  stop_qs(&this_Clerk_pid, &other_Clerk_pid);
  stop_mems(this_Clerk_pid, other_Clerk_pid);
}


x86 assembly (clang, -O0):
<stop_ipc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <stop_qs@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <stop_mems@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_ipc>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <stop_qs@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <stop_mems@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @stop_ipc() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @stop_qs(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @stop_mems(i32 %6, i32 %7)
ret void
}
int sgx_thread_set_multiple_untrusted_events_ocall(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @sgx_thread_set_multiple_untrusted_events_ocall() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sgx_thread_set_multiple_untrusted_events_ocall() {
ret i32 1
}
void RealMainP$Boot$booted(void) { EchoP$Boot$booted(); }


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

x86 assembly (clang, -O2):
<RealMainP$Boot$booted>:
xor    %eax,%eax
jmp    1030 <EchoP$Boot$booted@plt>

LLVM IR (-O0):
define void @"RealMainP$Boot$booted"() {
%1 = call i32 (...) @"EchoP$Boot$booted"()
ret void
}

LLVM IR (-O2):
define void @"RealMainP$Boot$booted"() {
%1 = tail call i32 (...) @"EchoP$Boot$booted"()
ret void
}
/* Type definitions */
struct buffer_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __brelse(struct buffer_head *);
void brelse(struct buffer_head *buf) {
  if (buf)
    __brelse(buf);
}


x86 assembly (clang, -O0):
<brelse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <brelse+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <__brelse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brelse>:
test   %rdi,%rdi
je     111a <brelse+0xa>
jmp    1030 <__brelse@plt>
ret

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

LLVM IR (-O2):
%struct.buffer_head = type { i32 }
define void @brelse(%struct.buffer_head* %0) {
%2 = icmp eq %struct.buffer_head* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @__brelse(%struct.buffer_head* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) size_t
trio_length_max(const char *string, size_t max) {
  size_t i;
  for (i = 0; i < max; ++i) {
    if (string[i] == 0)
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<trio_length_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1152 <trio_length_max+0x52>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113c <trio_length_max+0x3c>
jmp    1152 <trio_length_max+0x52>
jmp    1141 <trio_length_max+0x41>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <trio_length_max+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_length_max>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <trio_length_max+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1122 <trio_length_max+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <trio_length_max+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @trio_length_max(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i64 [ %10, %9 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %2
%13 = phi i64 [ 0, %2 ], [ %5, %4 ], [ %1, %9 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ bit_shift(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Let's calculate (1U << input) >> 1 \n");
  bit_shift(1);
  bit_shift(2);
  bit_shift(3);
  bit_shift(4);
  bit_shift(5);
  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    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <bit_shift@plt>
mov    $0x2,%edi
call   1040 <bit_shift@plt>
mov    $0x3,%edi
call   1040 <bit_shift@plt>
mov    $0x4,%edi
call   1040 <bit_shift@plt>
mov    $0x5,%edi
call   1040 <bit_shift@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <bit_shift@plt>
mov    $0x2,%edi
call   1040 <bit_shift@plt>
mov    $0x3,%edi
call   1040 <bit_shift@plt>
mov    $0x4,%edi
call   1040 <bit_shift@plt>
mov    $0x5,%edi
call   1040 <bit_shift@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Let's calculate (1U << input) >> 1 \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 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @bit_shift(i32 1)
%8 = call i32 @bit_shift(i32 2)
%9 = call i32 @bit_shift(i32 3)
%10 = call i32 @bit_shift(i32 4)
%11 = call i32 @bit_shift(i32 5)
ret i32 0
}

LLVM IR (-O2):
@str = [36 x i8] c"Let's calculate (1U << input) >> 1 \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @bit_shift(i32 1)
%5 = tail call i32 @bit_shift(i32 2)
%6 = tail call i32 @bit_shift(i32 3)
%7 = tail call i32 @bit_shift(i32 4)
%8 = tail call i32 @bit_shift(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void xsleep(int ms) { sleep(ms / 1000); }


x86 assembly (clang, -O0):
<xsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsleep>:
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @xsleep(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = tail call i32 @sleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ptr_free(char *);
void os_free(void *ptr) {
  if (ptr != NULL) {
    ptr_free(((char *)ptr));
  }
  return;
}


x86 assembly (clang, -O0):
<os_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <os_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <ptr_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_free>:
test   %rdi,%rdi
je     111a <os_free+0xa>
jmp    1030 <ptr_free@plt>
ret

LLVM IR (-O0):
define void @os_free(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 %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @ptr_free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @os_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @ptr_free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
long ReadLong();
float ReadFloat() {
  union {
    float f;
    long l;
  } v;
  v.l = ReadLong();
  return v.f;
}


x86 assembly (clang, -O0):
<ReadFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ReadLong@plt>
mov    %rax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadFloat>:
push   %rax
xor    %eax,%eax
call   1030 <ReadLong@plt>
movd   %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%union.anon = type { i64 }
define float @ReadFloat() {
%1 = alloca %union.anon
%2 = call i64 (...) @ReadLong()
%3 = bitcast %union.anon* %1 to i64*
store i64 %2, i64* %3
%4 = bitcast %union.anon* %1 to float*
%5 = load float, float* %4
ret float %5
}

LLVM IR (-O2):
define float @ReadFloat() {
%1 = tail call i64 (...) @ReadLong()
%2 = trunc i64 %1 to i32
%3 = bitcast i32 %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void do_insn_timing(void) {
  printf("Instruction timing not implemented on this platform.\n");
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"Instruction timing not implemented on this platform.\0A\00"
define void @do_insn_timing() {
%1 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"Instruction timing not implemented on this platform.\00"
define void @do_insn_timing() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
main() {
  struct ist {
    int x;
    int y;
  };
  struct list {
    int x;
    struct ist next;
  } head;
  head.x = 100;
  head.next.x = 10;
  printf("%d %d", head.x, head.next.x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x10(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x64,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.list = type { i32, %struct.ist }
%struct.ist = type { i32, i32 }
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca %struct.list
%2 = getelementptr inbounds %struct.list, %struct.list* %1, i32 0, i32 0
store i32 100, i32* %2
%3 = getelementptr inbounds %struct.list, %struct.list* %1, i32 0, i32 1
%4 = getelementptr inbounds %struct.ist, %struct.ist* %3, i32 0, i32 0
store i32 10, i32* %4
%5 = getelementptr inbounds %struct.list, %struct.list* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.list, %struct.list* %1, i32 0, i32 1
%8 = getelementptr inbounds %struct.ist, %struct.ist* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 100, i32 10)
ret i32 0
}
/* Variables and functions */
float Q_fabs(float f) {
  int tmp = *(int *)&f;
  tmp &= 0x7FFFFFFF;
  return *(float *)&tmp;
}


x86 assembly (clang, -O0):
<Q_fabs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_fabs>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Q_fabs(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast float* %2 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 2147483647
store i32 %7, i32* %3
%8 = bitcast i32* %3 to float*
%9 = load float, float* %8
ret float %9
}

LLVM IR (-O2):
define float @Q_fabs(float %0) {
%2 = bitcast float %0 to i32
%3 = and i32 %2, 2147483647
%4 = bitcast i32 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
main() { wait(NULL); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <wait@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @wait(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @wait(i32* null)
ret i32 0
}
void arch_shutdown(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<arch_shutdown>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <arch_shutdown+0x9>
jmp    1109 <arch_shutdown+0x9>

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

LLVM IR (-O0):
define void @arch_shutdown() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @arch_shutdown() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ log_print(char *, int, char *, int);
void la_fin_du_monde(int signal) {
  log_print(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/mpatron/myProCSample/refs/heads/master/main.c",
      24, "Fin du programme non prévu : %d", signal);
}


x86 assembly (clang, -O0):
<la_fin_du_monde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xedb(%rip),%rdi
mov    $0x18,%esi
lea    0xf57(%rip),%rdx
call   1030 <log_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<la_fin_du_monde>:
mov    %edi,%ecx
lea    0xee7(%rip),%rdi
lea    0xf68(%rip),%rdx
mov    $0x18,%esi
jmp    1030 <log_print@plt>

LLVM IR (-O0):
@.str = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mpatron/myProCSample/refs/heads/master/main.c\00"
@.str.1 = [33 x i8] c"Fin du programme non pr\C3\A9vu : %d\00"
define void @la_fin_du_monde(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log_print(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mpatron/myProCSample/refs/heads/master/main.c\00"
@.str.1 = [33 x i8] c"Fin du programme non pr\C3\A9vu : %d\00"
define void @la_fin_du_monde(i32 %0) {
%2 = tail call i32 @log_print(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
int link(char *old, char *new) {}


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xcf() {
  Assert_real((islower(207) == 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_islower.c",
              1040, ("islower should be 0 for 0xcf"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xcf>:
push   %rax
mov    $0xcf,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x410,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xcf\00"
define void @t_islower_0xcf() {
%1 = call i64 @islower(i32 207)
%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 1040, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xcf\00"
define void @t_islower_0xcf() {
%1 = tail call i64 @islower(i32 207)
%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 1040, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int cobin(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n = 0, k = 0;
  scanf("%d %d", &n, &k);
  printf("Coef. Bin (%d,%d): %d\n", n, k, cobin(n, k));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <cobin@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xeb7(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    (%rsp),%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <cobin@plt>
lea    0xe99(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [23 x i8] c"Coef. Bin (%d,%d): %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @cobin(i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [23 x i8] c"Coef. Bin (%d,%d): %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @cobin(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf5(int f, int n) { return (cbuf(f, n, 5)); }


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

x86 assembly (clang, -O2):
<cbuf5>:
mov    $0x5,%edx
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf5(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 5)
ret i32 %3
}
/* Variables and functions */
int f(int /*<<< orphan*/);
int /*<<< orphan*/ g(int);
int *call_f(void *mem) { *(int *)mem = f(g(*(int *)mem)); }


x86 assembly (clang, -O0):
<call_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <g@plt>
mov    %eax,%edi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_f>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <g@plt>
mov    %eax,%edi
call   1030 <f@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32* @call_f(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = call i32 @g(i32 %6)
%8 = call i32 @f(i32 %7)
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
%11 = load i32*, i32** %2
ret i32* %11
}

LLVM IR (-O2):
define noalias i32* @call_f(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @g(i32 %3)
%5 = tail call i32 @f(i32 %4)
store i32 %5, i32* %2
ret i32* undef
}
/* Variables and functions */
int /*<<< orphan*/ op_teq();
void vm_op_teq(void) {
  op_teq();
  return;
}


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

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

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

LLVM IR (-O2):
define void @vm_op_teq() {
%1 = tail call i32 (...) @op_teq()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xce() {
  Assert_real((isgraph(206) == 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_isgraph.c",
              1035, ("isgraph should be 0 for 0xce"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xce>:
push   %rax
mov    $0xce,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x40b,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xce\00"
define void @t_isgraph_0xce() {
%1 = call i64 @isgraph(i32 206)
%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 1035, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xce\00"
define void @t_isgraph_0xce() {
%1 = tail call i64 @isgraph(i32 206)
%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 1035, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
_Complex long double fld(_Complex long double arg0) { return 0; }


x86 assembly (clang, -O0):
<fld>:
push   %rbp
mov    %rsp,%rbp
fldz
fld    %st(0)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fld>:
fldz
fld    %st(0)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @fld({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
store x86_fp80 0xK00000000000000000000, x86_fp80* %4
%5 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %5
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @fld({ x86_fp80, x86_fp80 }* nocapture readnone byval({ x86_fp80, x86_fp80 }) align 16 %0) {
ret { x86_fp80, x86_fp80 } zeroinitializer
}
int test_imm_6Duint16_mem(unsigned short *val) {
  return ((*val) & (-0x6D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Duint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff93,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Duint16_mem>:
movzwl (%rdi),%eax
test   $0xff93,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Duint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -109
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcheck(const char *a, const char *b) {
  if (a == NULL && b == NULL) {
    return 0;
  } else if (a == NULL) {
    return -1;
  } else if (b == NULL) {
    return 1;
  } else {
    return strcmp(a, b);
  }
}


x86 assembly (clang, -O0):
<strcheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <strcheck+0x32>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <strcheck+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1180 <strcheck+0x70>
cmpq   $0x0,-0x10(%rbp)
jne    1159 <strcheck+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <strcheck+0x70>
cmpq   $0x0,-0x18(%rbp)
jne    1170 <strcheck+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1180 <strcheck+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcheck>:
xor    %ecx,%ecx
mov    %rdi,%rax
or     %rsi,%rax
setne  %cl
neg    %ecx
mov    $0x1,%eax
test   %rdi,%rdi
cmove  %ecx,%eax
je     1134 <strcheck+0x24>
test   %rsi,%rsi
je     1134 <strcheck+0x24>
jmp    1030 <strcmp@plt>
ret

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

LLVM IR (-O2):
define i32 @strcheck(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = and i1 %3, %4
%6 = xor i1 %5, true
%7 = sext i1 %6 to i32
%8 = or i1 %3, %4
%9 = select i1 %3, i32 %7, i32 1
br i1 %8, label %12, label %10
10: ; preds = %2
%11 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %12
12: ; preds = %2, %10
%13 = phi i32 [ %11, %10 ], [ %9, %2 ]
ret i32 %13
}
void suma2(int a, int b, int *c) {
  a = a / 2;
  b = b - 1;
  *c = a + b;
}


x86 assembly (clang, -O0):
<suma2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<suma2>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
add    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @suma2(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 = sdiv i32 %7, 2
store i32 %8, i32* %4
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add nsw i32 %11, %12
%14 = load i32*, i32** %6
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @suma2(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = sdiv i32 %0, 2
%5 = add nsw i32 %1, -1
%6 = add nsw i32 %5, %4
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
scalar_t__ ft_isalpha(int);
scalar_t__ ft_isdigit(int);
int ft_isalnum(int c) {
  if (ft_isalpha(c) || ft_isdigit(c))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <ft_isalpha@plt>
cmp    $0x0,%rax
jne    114f <ft_isalnum+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <ft_isdigit@plt>
cmp    $0x0,%rax
je     115b <ft_isalnum+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <ft_isalnum+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
push   %rbx
mov    %edi,%ebx
call   1040 <ft_isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <ft_isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <ft_isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = tail call i64 @ft_isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ft_isdigit(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
void _primes(size_t, unsigned int *, int);
void primes_verbose(size_t num, unsigned int prime_nums[]) {
  return _primes(num, prime_nums, true);
}


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

x86 assembly (clang, -O2):
<primes_verbose>:
mov    $0x1,%edx
jmp    1030 <_primes@plt>

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

LLVM IR (-O2):
define void @primes_verbose(i64 %0, i32* %1) {
tail call void @_primes(i64 %0, i32* %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void write(char *data, int len) { fwrite(data, 1, len, stdout); }


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @stdout
%8 = call i32 @fwrite(i8* %5, i32 1, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @write(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fwrite(i8* %0, i32 1, i32 %1, i32 %3)
ret void
}
/* Type definitions */
struct listview {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ listview_setindex_internal(struct listview *, size_t,
                                              int /*<<< orphan*/, int);
void listview_setindex(struct listview *view, size_t index) {
  listview_setindex_internal(view, index, 0, false);
}


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

x86 assembly (clang, -O2):
<listview_setindex>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <listview_setindex_internal@plt>

LLVM IR (-O0):
%struct.listview = type { i32 }
define void @listview_setindex(%struct.listview* %0, i64 %1) {
%3 = alloca %struct.listview*
%4 = alloca i64
store %struct.listview* %0, %struct.listview** %3
store i64 %1, i64* %4
%5 = load %struct.listview*, %struct.listview** %3
%6 = load i64, i64* %4
%7 = call i32 @listview_setindex_internal(%struct.listview* %5, i64 %6, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.listview = type { i32 }
define void @listview_setindex(%struct.listview* %0, i64 %1) {
%3 = tail call i32 @listview_setindex_internal(%struct.listview* %0, i64 %1, i32 0, i32 0)
ret void
}
double distSqEuclidean(double a, double b) {
  double diff;
  diff = a - b;
  return (diff * diff);
}


x86 assembly (clang, -O0):
<distSqEuclidean>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<distSqEuclidean>:
subsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @distSqEuclidean(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double %6, %7
store double %8, double* %5
%9 = load double, double* %5
%10 = load double, double* %5
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @distSqEuclidean(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fmul double %3, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ roff_aux(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ roff_name(int, int);
void monster_description_out(int r_idx, int ego) {
  roff_name(r_idx, ego);
  roff_aux(r_idx, ego, 0);
}


x86 assembly (clang, -O0):
<monster_description_out>:
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 <roff_name@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1040 <roff_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @monster_description_out(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 @roff_name(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @roff_aux(i32 %8, i32 %9, i32 0)
ret void
}

LLVM IR (-O2):
define void @monster_description_out(i32 %0, i32 %1) {
%3 = tail call i32 @roff_name(i32 %0, i32 %1)
%4 = tail call i32 @roff_aux(i32 %0, i32 %1, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n\n"
          "Options:\n"
          "-d | --device name   Video device name [/dev/video]\n"
          "-h | --help          Print this message\n"
          "-i | --file name      file name\n"
          "-w | --width          width\n"
          "-l | --height         height\n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    (%rdx),%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [212 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-h | --help Print this message\0A-i | --file name file name\0A-w | --width width\0A-l | --height height\0A\00"
define void @usage(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8**
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [212 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-h | --help Print this message\0A-i | --file name file name\0A-w | --width width\0A-l | --height height\0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
void double_2D_array_free(double **array) {
  free(array[0]);
  free(array);
}


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

x86 assembly (clang, -O2):
<double_2D_array_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @double_2D_array_free(double** %0) {
%2 = alloca double**
store double** %0, double*** %2
%3 = load double**, double*** %2
%4 = getelementptr inbounds double*, double** %3, i64 0
%5 = load double*, double** %4
%6 = bitcast double* %5 to i8*
%7 = load double**, double*** %2
%8 = bitcast double** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @double_2D_array_free(double** nocapture %0) {
%2 = bitcast double** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast double** %0 to i8*
tail call void @free(i8* %4)
ret void
}
int pl_close_() { return -1; }


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

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

LLVM IR (-O0):
define i32 @pl_close_() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @pl_close_() {
ret i32 -1
}