xunge/DecIR huggingface dataset:
/* Type definitions */
struct list_node {
  int dummy;
};
struct list_head {
  int dummy;
};

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


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

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

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

LLVM IR (-O2):
%struct.list_node = type { i32 }
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_node* %0, %struct.list_head* %1) {
%3 = tail call i32 @__list_del_entry(%struct.list_node* %0)
%4 = tail call i32 @list_add_tail(%struct.list_node* %0, %struct.list_head* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x7e() {
  Assert_real((isodigit(126) == 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_isodigit.c",
              635, ("isodigit should be 0 for ~"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x7e>:
push   %rax
mov    $0x7e,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x27b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for ~\00"
define void @t_isodigit_0x7e() {
%1 = tail call i64 @isodigit(i32 126)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int axp_set_chargeendrate(int end) {
  int ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<axp_set_chargeendrate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @axp_set_chargeendrate(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int wscanw(int /*<<< orphan*/ *, char *, int *, int *);
int ii_wscanw(WINDOW *win, char *fmt, int *i, int *j) {
  return (wscanw(win, fmt, i, j));
}


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

x86 assembly (clang, -O2):
<ii_wscanw>:
jmp    1030 <wscanw@plt>

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

LLVM IR (-O2):
define i32 @ii_wscanw(i32* %0, i8* %1, i32* %2, i32* %3) {
%5 = tail call i32 @wscanw(i32* %0, i8* %1, i32* %2, i32* %3)
ret i32 %5
}
/* Variables and functions */
char *malloc(int);
void doit(void) {
  char *buf;
  buf = malloc(1000);
}


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

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

LLVM IR (-O0):
define void @doit() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 1000)
store i8* %2, i8** %1
ret void
}

LLVM IR (-O2):
define void @doit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread_safe(float *, int, int, int /*<<< orphan*/ *);
float load_float(FILE *fp) {
  float value;
  fread_safe(&value, sizeof(float), 1, fp);
  return value;
}


x86 assembly (clang, -O0):
<load_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread_safe@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_float>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread_safe@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @load_float(i32* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @fread_safe(float* %2, i32 4, i32 1, i32* %0)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ set(int, int, int /*<<< orphan*/, int /*<<< orphan*/, int,
                       int);
void vstart_vs_alpha(int x, int invert) {
  set(x, 60, 0, 0, (invert ? 0x7F : 0), 0x0002 | 0x0010);
  set(x, -60, 0, 0, (invert ? 0 : 0x7F), 0x0002 | 0x0010);
}


x86 assembly (clang, -O0):
<vstart_vs_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
xor    %r8d,%r8d
mov    $0x7f,%eax
cmp    $0x0,%ecx
cmovne %eax,%r8d
mov    $0x3c,%esi
xor    %ecx,%ecx
mov    $0x12,%r9d
mov    %ecx,%edx
call   1030 <set@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
mov    $0x7f,%r8d
xor    %eax,%eax
cmp    $0x0,%ecx
cmovne %eax,%r8d
mov    $0xffffffc4,%esi
xor    %ecx,%ecx
mov    $0x12,%r9d
mov    %ecx,%edx
call   1030 <set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vstart_vs_alpha>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%r8d
mov    %edi,%ebx
xor    %eax,%eax
test   %esi,%esi
mov    $0x7f,%ebp
cmovne %ebp,%r8d
cmovne %eax,%ebp
mov    $0x3c,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x12,%r9d
call   1030 <set@plt>
mov    %ebx,%edi
mov    $0xffffffc4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
mov    $0x12,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <set@plt>

LLVM IR (-O0):
define void @vstart_vs_alpha(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 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 127, i32 0
%10 = call i32 @set(i32 %5, i32 60, i32 0, i32 0, i32 %9, i32 18)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 127
%16 = call i32 @set(i32 %11, i32 -60, i32 0, i32 0, i32 %15, i32 18)
ret void
}

LLVM IR (-O2):
define void @vstart_vs_alpha(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 0, i32 127
%5 = tail call i32 @set(i32 %0, i32 60, i32 0, i32 0, i32 %4, i32 18)
%6 = select i1 %3, i32 127, i32 0
%7 = tail call i32 @set(i32 %0, i32 -60, i32 0, i32 0, i32 %6, i32 18)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ get_byte_and_offset(size_t, int /*<<< orphan*/, size_t *,
                                       unsigned char *);
unsigned get_bit(unsigned char *bytes, size_t bytes_len, uint64_t index) {
  size_t byte;
  unsigned char offset;
  get_byte_and_offset(bytes_len, index, &byte, &offset);
  return ((bytes[byte] >> offset) & 1) ? 1U : 0U;
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1030 <get_byte_and_offset@plt>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movzbl -0x21(%rbp),%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rax
lea    0x7(%rsp),%rcx
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
call   1030 <get_byte_and_offset@plt>
mov    0x8(%rsp),%rax
movzbl (%rbx,%rax,1),%eax
mov    0x7(%rsp),%cl
shr    %cl,%eax
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_bit(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i32 @get_byte_and_offset(i64 %9, i32 %10, i64* %7, i8* %8)
%12 = load i8*, i8** %4
%13 = load i64, i64* %7
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %8
%18 = zext i8 %17 to i32
%19 = ashr i32 %16, %18
%20 = and i32 %19, 1
%21 = icmp ne i32 %20, 0
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 0
ret i32 %23
}

LLVM IR (-O2):
define i32 @get_bit(i8* nocapture %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8
%6 = bitcast i64* %4 to i8*
%7 = call i32 @get_byte_and_offset(i64 %1, i32 %2, i64* %4, i8* %5)
%8 = load i64, i64* %4
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = lshr i32 %11, %13
%15 = and i32 %14, 1
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
unsigned long strlen(char *);
void xt_core_truncate_string(char *string, unsigned short max_length) {
  assert(string);
  unsigned long string_length;
  string_length = strlen(string);
  if (max_length < string_length) {
    *(string + max_length) = '\0';
  }
}


x86 assembly (clang, -O0):
<xt_core_truncate_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
movzwl -0xa(%rbp),%eax
cmp    -0x18(%rbp),%rax
jae    1166 <xt_core_truncate_string+0x46>
mov    -0x8(%rbp),%rax
movzwl -0xa(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xt_core_truncate_string>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %ebp,%ecx
cmp    %rcx,%rax
jbe    1140 <xt_core_truncate_string+0x20>
movb   $0x0,(%rbx,%rcx,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @xt_core_truncate_string(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i64
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = load i8*, i8** %3
%7 = call i32 @assert(i8* %6)
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %5
%10 = load i16, i16* %4
%11 = zext i16 %10 to i64
%12 = load i64, i64* %5
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = load i16, i16* %4
%17 = zext i16 %16 to i32
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8 0, i8* %19
br label %20
20: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
define void @xt_core_truncate_string(i8* %0, i16 zeroext %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = zext i16 %1 to i64
%6 = icmp ugt i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %8
br label %9
9: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insertion_sort(int *, int);
int /*<<< orphan*/ print_arr(int *, int);
int /*<<< orphan*/ printf(char *);
int main() {
  int arr[] = {9, 8, 6, 7, 3, 5, 4, 1, 2};
  print_arr(arr, 9);
  printf("\n");
  insertion_sort(arr, 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x24,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
call   1030 <print_arr@plt>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
call   1060 <insertion_sort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xee5(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeae(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1040 <print_arr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1050 <insertion_sort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [9 x i32] [i32 9, i32 8, i32 6, i32 7, i32 3, i32 5, i32 4, i32 1, i32 2]
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i32]
store i32 0, i32* %1
%3 = bitcast [9 x i32]* %2 to i8*
%4 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%5 = call i32 @print_arr(i32* %4, i32 9)
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%8 = call i32 @insertion_sort(i32* %7, i32 9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [9 x i32] [i32 9, i32 8, i32 6, i32 7, i32 3, i32 5, i32 4, i32 1, i32 2]
define i32 @main() {
%1 = alloca [9 x i32]
%2 = bitcast [9 x i32]* %1 to i8*
%3 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_arr(i32* %3, i32 9)
%5 = call i32 @putchar(i32 10)
%6 = call i32 @insertion_sort(i32* %3, i32 9)
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare_str(const void *key1, const void *key2) {
  int retval;
  if ((retval = strcmp((const char *)key1, (const char *)key2)) > 0)
    return 1;
  else if (retval < 0)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jle    1145 <compare_str+0x35>
movl   $0x1,-0x4(%rbp)
jmp    1162 <compare_str+0x52>
cmpl   $0x0,-0x1c(%rbp)
jge    115b <compare_str+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <compare_str+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_str>:
push   %rax
call   1030 <strcmp@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
test   %eax,%eax
mov    $0x1,%eax
cmovle %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @compare_str(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = ashr i32 %3, 31
%5 = icmp slt i32 %3, 1
%6 = select i1 %5, i32 %4, i32 1
ret i32 %6
}
/* Variables and functions */
char tolower(char);
void strlower(char *str) {
  while (*str) {
    *str = tolower(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<strlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <strlower+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strlower+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlower>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <strlower+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strlower+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @strlower(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @tolower(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @strlower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void *dlclose(void *handle) { return 0; }


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

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

LLVM IR (-O0):
define i8* @dlclose(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @dlclose(i8* nocapture readnone %0) {
ret i8* null
}
int dpu_quit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dpu_quit() {
ret i32 0
}
int addDigits(int num) {
  while (1) {
    int sum = 0;
    while (num != 0) {
      sum += num % 10;
      num /= 10;
    }
    if (sum / 10 == 0)
      return sum;
    else
      num = sum;
  }
}


x86 assembly (clang, -O0):
<addDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113c <addDigits+0x3c>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <addDigits+0xe>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1155 <addDigits+0x55>
mov    -0x8(%rbp),%eax
pop    %rbp
ret
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <addDigits+0x7>

x86 assembly (clang, -O2):
<addDigits>:
xor    %eax,%eax
test   %edi,%edi
je     1145 <addDigits+0x45>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
add    %esi,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <addDigits+0x10>
lea    0x9(%rax),%ecx
mov    %eax,%edi
cmp    $0x12,%ecx
ja     1100 <addDigits>
ret

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

LLVM IR (-O2):
define i32 @addDigits(i32 %0) {
br label %2
2: ; preds = %13, %1
%3 = phi i32 [ %0, %1 ], [ %9, %13 ]
%4 = icmp eq i32 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = srem i32 %7, 10
%9 = add nsw i32 %6, %8
%10 = sdiv i32 %7, 10
%11 = add i32 %7, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = add i32 %9, 9
%15 = icmp ult i32 %14, 19
br i1 %15, label %16, label %2
16: ; preds = %2, %13
%17 = phi i32 [ %9, %13 ], [ 0, %2 ]
ret i32 %17
}
/* Type definitions */
struct list_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ insertion_sort_core(struct list_node **);
struct list_node *insertion_sort(struct list_node *l) {
  insertion_sort_core(&l);
  return l;
}


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

x86 assembly (clang, -O2):
<insertion_sort>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <insertion_sort_core@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.list_node = type { i32 }
define %struct.list_node* @insertion_sort(%struct.list_node* %0) {
%2 = alloca %struct.list_node*
store %struct.list_node* %0, %struct.list_node** %2
%3 = call i32 @insertion_sort_core(%struct.list_node** %2)
%4 = load %struct.list_node*, %struct.list_node** %2
ret %struct.list_node* %4
}

LLVM IR (-O2):
%struct.list_node = type { i32 }
define %struct.list_node* @insertion_sort(%struct.list_node* %0) {
%2 = alloca %struct.list_node*
store %struct.list_node* %0, %struct.list_node** %2
%3 = call i32 @insertion_sort_core(%struct.list_node** %2)
%4 = load %struct.list_node*, %struct.list_node** %2
ret %struct.list_node* %4
}
/* Variables and functions */
int /*<<< orphan*/ org_trifort_barrier();
void org_trifort_syncthreads() { org_trifort_barrier(); }


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

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

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

LLVM IR (-O2):
define void @org_trifort_syncthreads() {
%1 = tail call i32 (...) @org_trifort_barrier()
ret void
}
int get_channels() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_channels() {
ret i32 0
}
void __VERIFIER_assert(int phi, char *txt) {
  {
    if (!phi) {
    ERROR:
      goto ERROR;
    } else {
    }
    return;
  }
}


x86 assembly (clang, -O0):
<__VERIFIER_assert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111f <__VERIFIER_assert+0x1f>
jmp    111a <__VERIFIER_assert+0x1a>
jmp    111a <__VERIFIER_assert+0x1a>
jmp    1124 <__VERIFIER_assert+0x24>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_assert>:
test   %edi,%edi
je     1110 <__VERIFIER_assert+0x10>
ret
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <__VERIFIER_assert+0x10>

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

LLVM IR (-O2):
define void @__VERIFIER_assert(i32 %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %5
4: ; preds = %2, %4
br label %4
5: ; preds = %2
ret void
}
/* Variables and functions */
unsigned char owTouchByte(unsigned char);
unsigned char owWriteByte(unsigned char sendbyte) {
  return (owTouchByte(sendbyte) == sendbyte) ? 1 : 0;
}


x86 assembly (clang, -O0):
<owWriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <owTouchByte@plt>
movzbl %al,%edx
movzbl -0x1(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<owWriteByte>:
push   %rbx
mov    %edi,%ebx
call   1030 <owTouchByte@plt>
cmp    %bl,%al
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @owWriteByte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call zeroext i8 @owTouchByte(i8 zeroext %3)
%5 = zext i8 %4 to i32
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %5, %7
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @owWriteByte(i8 zeroext %0) {
%2 = tail call zeroext i8 @owTouchByte(i8 zeroext %0)
%3 = icmp eq i8 %2, %0
%4 = zext i1 %3 to i8
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
float divr(uint32_t *env) {
  float *context = (float *)*(float **)(env + 1);
  float a = (float)*(float *)(context);
  float b = (float)*(float *)(context + 1);
  return a / b;
}


x86 assembly (clang, -O0):
<divr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<divr>:
mov    0x4(%rdi),%rax
movss  (%rax),%xmm0
divss  0x4(%rax),%xmm0
ret

LLVM IR (-O0):
define float @divr(i32* %0) {
%2 = alloca i32*
%3 = alloca float*
%4 = alloca float
%5 = alloca float
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = bitcast i32* %7 to float**
%9 = load float*, float** %8
store float* %9, float** %3
%10 = load float*, float** %3
%11 = load float, float* %10
store float %11, float* %4
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
store float %14, float* %5
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fdiv float %15, %16
ret float %17
}

LLVM IR (-O2):
define float @divr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = bitcast i32* %2 to float**
%4 = load float*, float** %3
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %4, i64 1
%7 = load float, float* %6
%8 = fdiv float %5, %7
ret float %8
}
/* Variables and functions */
char const *getenv(char *);
const char *cgi_remote_host(void) {
  const char *host;
  host = getenv("REMOTE_HOST");
  if (!host)
    return (getenv("REMOTE_ADDR"));
  return (host);
}


x86 assembly (clang, -O0):
<cgi_remote_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <cgi_remote_host+0x38>
lea    0xed2(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
jmp    1150 <cgi_remote_host+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgi_remote_host>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1124 <cgi_remote_host+0x14>
pop    %rcx
ret
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"REMOTE_HOST\00"
@.str.1 = [12 x i8] c"REMOTE_ADDR\00"
define i8* @cgi_remote_host() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ %1, %0 ]
ret i8* %6
}
int xmlIsIdeographic(unsigned int ch) {
  return ((((ch) < 0x100)
               ? 0
               : (((0x4e00 <= (ch)) && ((ch) <= 0x9fa5)) || ((ch) == 0x3007) ||
                  ((0x3021 <= (ch)) && ((ch) <= 0x3029)))));
}


x86 assembly (clang, -O0):
<xmlIsIdeographic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jae    111e <xmlIsIdeographic+0x1e>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1181 <xmlIsIdeographic+0x81>
mov    $0x4e00,%eax
cmp    -0x4(%rbp),%eax
ja     113e <xmlIsIdeographic+0x3e>
mov    $0x1,%al
cmpl   $0x9fa5,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jbe    1176 <xmlIsIdeographic+0x76>
mov    $0x1,%al
cmpl   $0x3007,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1176 <xmlIsIdeographic+0x76>
xor    %eax,%eax
mov    $0x3021,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0xa(%rbp)
ja     1170 <xmlIsIdeographic+0x70>
cmpl   $0x3029,-0x4(%rbp)
setbe  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlIsIdeographic>:
xor    %eax,%eax
cmp    $0x100,%edi
jb     1134 <xmlIsIdeographic+0x34>
lea    -0x4e00(%rdi),%eax
cmp    $0x51a6,%eax
setb   %al
cmp    $0x3007,%edi
sete   %cl
or     %al,%cl
add    $0xffffcfdf,%edi
cmp    $0x9,%edi
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @xmlIsIdeographic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 256
br i1 %4, label %5, label %6
5: ; preds = %1
br label %26
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ule i32 19968, %7
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp ule i32 %10, 40869
br i1 %11, label %23, label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 12295
br i1 %14, label %23, label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp ule i32 12321, %16
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %2
%20 = icmp ule i32 %19, 12329
br label %21
21: ; preds = %18, %15
%22 = phi i1 [ false, %15 ], [ %20, %18 ]
br label %23
23: ; preds = %21, %12, %9
%24 = phi i1 [ true, %12 ], [ true, %9 ], [ %22, %21 ]
%25 = zext i1 %24 to i32
br label %26
26: ; preds = %23, %5
%27 = phi i32 [ 0, %5 ], [ %25, %23 ]
ret i32 %27
}

LLVM IR (-O2):
define i32 @xmlIsIdeographic(i32 %0) {
%2 = icmp ult i32 %0, 256
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = add i32 %0, -19968
%5 = icmp ult i32 %4, 20902
%6 = icmp eq i32 %0, 12295
%7 = or i1 %6, %5
%8 = add i32 %0, -12321
%9 = icmp ult i32 %8, 9
%10 = or i1 %9, %7
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %3
%13 = phi i32 [ %11, %3 ], [ 0, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ serial_eol();
int /*<<< orphan*/ serial_write(int);
int putchar(int c) {
  if (c == '\n') {
    serial_eol();
  } else {
    serial_write(c);
  }
  return c;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    1141 <putchar+0x21>
mov    $0x0,%al
call   1030 <serial_eol@plt>
jmp    1149 <putchar+0x29>
mov    -0x4(%rbp),%edi
call   1040 <serial_write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%edi
jne    1131 <putchar+0x11>
xor    %eax,%eax
call   1030 <serial_eol@plt>
jmp    1138 <putchar+0x18>
mov    %ebx,%edi
call   1040 <serial_write@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @putchar(i32 returned %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @serial_eol()
br label %7
5: ; preds = %1
%6 = tail call i32 @serial_write(i32 %0)
br label %7
7: ; preds = %5, %3
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void ScientificVersion() {
  printf("Scientific Library was writen by Giuseppe Marco Randazzo "
         "<gmrandazzo@gmail.com>\nVersion: %d.%d.%d\n",
         1, 2, 4);
}


x86 assembly (clang, -O0):
<ScientificVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScientificVersion>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [99 x i8] c"Scientific Library was writen by Giuseppe Marco Randazzo <gmrandazzo@gmail.com>\0AVersion: %d.%d.%d\0A\00"
define void @ScientificVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4)
ret void
}

LLVM IR (-O2):
@.str = [99 x i8] c"Scientific Library was writen by Giuseppe Marco Randazzo <gmrandazzo@gmail.com>\0AVersion: %d.%d.%d\0A\00"
define void @ScientificVersion() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4)
ret void
}
/* Variables and functions */
bool fspath_expandVars(const char path[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @fspath_expandVars(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_acl(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_acl>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_acl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_acl(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
char *memchr(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void nullPointer_memchr(char *p) {
  char *s = 0;
  p = memchr(s, 0, strlen(s));
}


x86 assembly (clang, -O0):
<nullPointer_memchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memchr@plt>
mov    %rax,-0x8(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullPointer_memchr>:
push   %rax
xor    %edi,%edi
call   1030 <strlen@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %eax,%edx
pop    %rax
jmp    1040 <memchr@plt>

LLVM IR (-O0):
define void @nullPointer_memchr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = call i8* @memchr(i8* %4, i32 0, i32 %6)
store i8* %7, i8** %2
ret void
}

LLVM IR (-O2):
define void @nullPointer_memchr(i8* nocapture readnone %0) {
%2 = tail call i32 @strlen(i8* null)
%3 = tail call i8* @memchr(i8* null, i32 0, i32 %2)
ret void
}
void I422ToARGB4444Row_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToARGB4444Row_Any_AVX2() {
ret void
}
double rint(double x) {
  double retval = 0.0;
  __asm__ __volatile__("frndint;" : "=t"(retval) : "0"(x));
  return retval;
}


x86 assembly (clang, -O0):
<rint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
frndint
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rint>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
frndint
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @rint(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = call double asm sideeffect "frndint;", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %4)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @rint(double %0) {
%2 = tail call double asm sideeffect "frndint;", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
ret double %2
}
/* Variables and functions */
void *realloc(void *, size_t);
void *ftg_realloc(void *ptr, size_t size, size_t num) {
  void *alloc_ptr = NULL;
  ((void)0);
  if (size > 0 && num > 0 && (18446744073709551615UL) / size >= num) {
    size_t alloc_size = size * num;
    alloc_ptr = realloc(ptr, alloc_size);
    ((void)0);
  } else {
    ((void)0);
  }
  return alloc_ptr;
}


x86 assembly (clang, -O0):
<ftg_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    117e <ftg_realloc+0x6e>
cmpq   $0x0,-0x18(%rbp)
jbe    117e <ftg_realloc+0x6e>
mov    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
cmp    -0x18(%rbp),%rax
jb     117e <ftg_realloc+0x6e>
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x20(%rbp)
jmp    1183 <ftg_realloc+0x73>
jmp    1183 <ftg_realloc+0x73>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftg_realloc>:
test   %rsi,%rsi
je     1125 <ftg_realloc+0x15>
mov    %rdx,%rcx
test   %rdx,%rdx
je     1125 <ftg_realloc+0x15>
mov    %rsi,%rax
mul    %rcx
jno    1128 <ftg_realloc+0x18>
xor    %eax,%eax
ret
imul   %rsi,%rcx
mov    %rcx,%rsi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @ftg_realloc(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i8* null, i8** %7
%9 = load i64, i64* %5
%10 = icmp ugt i64 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %3
%12 = load i64, i64* %6
%13 = icmp ugt i64 %12, 0
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load i64, i64* %5
%16 = udiv i64 -1, %15
%17 = load i64, i64* %6
%18 = icmp uge i64 %16, %17
br i1 %18, label %19, label %26
19: ; preds = %14
%20 = load i64, i64* %5
%21 = load i64, i64* %6
%22 = mul i64 %20, %21
store i64 %22, i64* %8
%23 = load i8*, i8** %4
%24 = load i64, i64* %8
%25 = call i8* @realloc(i8* %23, i64 %24)
store i8* %25, i8** %7
br label %27
26: ; preds = %14, %11, %3
br label %27
27: ; preds = %26, %19
%28 = load i8*, i8** %7
ret i8* %28
}

LLVM IR (-O2):
define noalias i8* @ftg_realloc(i8* nocapture %0, i64 %1, i64 %2) {
%4 = icmp ne i64 %1, 0
%5 = icmp ne i64 %2, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %1, i64 %2)
%9 = extractvalue { i64, i1 } %8, 1
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = mul i64 %2, %1
%12 = tail call i8* @realloc(i8* %0, i64 %11)
br label %13
13: ; preds = %3, %7, %10
%14 = phi i8* [ %12, %10 ], [ null, %7 ], [ null, %3 ]
ret i8* %14
}
unsigned ZSTD_versionNumber(void) { return (1 * 100 * 100 + 4 * 100 + 9); }


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

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

LLVM IR (-O0):
define i32 @ZSTD_versionNumber() {
ret i32 10409
}

LLVM IR (-O2):
define i32 @ZSTD_versionNumber() {
ret i32 10409
}
int cairo_code_draw_lushAxisLabel_get_height() { return 92; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_lushAxisLabel_get_height() {
ret i32 92
}

LLVM IR (-O2):
define i32 @cairo_code_draw_lushAxisLabel_get_height() {
ret i32 92
}
void *ft_alloc2d(size, xstar, ystar, xsize, ysize)
int size;
int xstar;
int ystar;
int xsize;
int ysize;
{
  void *ptr;
  ((ptr) = (void *)calloc(xsize * ysize * size, 1));
  return ft_make2d(ptr, size, xstar, ystar, xsize, ysize);
}


x86 assembly (clang, -O0):
<ft_alloc2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
imul   -0x4(%rbp),%eax
movslq %eax,%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    $0x0,%al
call   1040 <ft_make2d@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_alloc2d>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r12d
mov    %ecx,%ebp
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
mov    %ecx,%eax
imul   %edi,%eax
imul   %r8d,%eax
movslq %eax,%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    %ebp,%r8d
mov    %r12d,%r9d
xor    %eax,%eax
call   1040 <ft_make2d@plt>
cltq
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ft_alloc2d(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %9
%13 = load i32, i32* %10
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
%17 = sext i32 %16 to i64
%18 = call i8* @calloc(i64 %17, i64 1)
store i8* %18, i8** %11
%19 = load i8*, i8** %11
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = call i32 (i8*, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @ft_make2d to i32 (i8*, i32, i32, i32, i32, i32, ...)*)(i8* %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24)
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i8*
ret i8* %27
}

LLVM IR (-O2):
define i8* @ft_alloc2d(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul i32 %3, %0
%7 = mul i32 %6, %4
%8 = sext i32 %7 to i64
%9 = tail call i8* @calloc(i64 %8, i64 1)
%10 = tail call i32 (i8*, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @ft_make2d to i32 (i8*, i32, i32, i32, i32, i32, ...)*)(i8* %9, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  setuid(0);
  system("shutdown -r now");
  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)
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xebc(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"shutdown -r now\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 @setuid(i32 0)
%7 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"shutdown -r now\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setuid(i32 0)
%4 = tail call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}