xunge/DecIR huggingface dataset:
/* Variables and functions */
void *malloc(unsigned int);
void *getSharedPages(unsigned int count) { return malloc(count * 4096); }


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

x86 assembly (clang, -O2):
<getSharedPages>:
shl    $0xc,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @getSharedPages(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 4096
%5 = call i8* @malloc(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define noalias i8* @getSharedPages(i32 %0) {
%2 = shl i32 %0, 12
%3 = tail call i8* @malloc(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _fv_free(void *ptr) {
  if (ptr == NULL) {
    return;
  }
  free(ptr);
}


x86 assembly (clang, -O0):
<_fv_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <_fv_free+0x1c>
jmp    1135 <_fv_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_fv_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
main() {
  if (strcmp("X", "") < 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jge    1163 <main+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jns    1150 <main+0x20>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"X\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"X\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct dirent {
  char *d_name;
};

/* Variables and functions */
int myFilter(const struct dirent *dir) {
  char *s = dir->d_name;
  if (s[0] == '.')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<myFilter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    112f <myFilter+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <myFilter+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myFilter>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x2e,(%rcx)
setne  %al
ret

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

LLVM IR (-O2):
%struct.dirent = type { i8* }
define i32 @myFilter(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ PrintMonthCalendar(int, int);
void PrintYearCalendar(int year) {
  int i;
  for (i = 1; i <= 12; ++i)
    PrintMonthCalendar(year, i);
}


x86 assembly (clang, -O0):
<PrintYearCalendar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jg     1145 <PrintYearCalendar+0x35>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <PrintMonthCalendar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <PrintYearCalendar+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintYearCalendar>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x6,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0x9,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0xa,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0xb,%esi
call   1030 <PrintMonthCalendar@plt>
mov    %ebx,%edi
mov    $0xc,%esi
pop    %rbx
jmp    1030 <PrintMonthCalendar@plt>

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

LLVM IR (-O2):
define void @PrintYearCalendar(i32 %0) {
%2 = tail call i32 @PrintMonthCalendar(i32 %0, i32 1)
%3 = tail call i32 @PrintMonthCalendar(i32 %0, i32 2)
%4 = tail call i32 @PrintMonthCalendar(i32 %0, i32 3)
%5 = tail call i32 @PrintMonthCalendar(i32 %0, i32 4)
%6 = tail call i32 @PrintMonthCalendar(i32 %0, i32 5)
%7 = tail call i32 @PrintMonthCalendar(i32 %0, i32 6)
%8 = tail call i32 @PrintMonthCalendar(i32 %0, i32 7)
%9 = tail call i32 @PrintMonthCalendar(i32 %0, i32 8)
%10 = tail call i32 @PrintMonthCalendar(i32 %0, i32 9)
%11 = tail call i32 @PrintMonthCalendar(i32 %0, i32 10)
%12 = tail call i32 @PrintMonthCalendar(i32 %0, i32 11)
%13 = tail call i32 @PrintMonthCalendar(i32 %0, i32 12)
ret void
}
/* Variables and functions */
char *strstr(char *, char *);
int check_pattern_not(char *pattern) {
  char *retval1;
  char *pt1 = "\[";
  int retint = 0;
  retval1 = strstr(pattern, pt1);
  if (retval1 != NULL) {
    retint = 1;
  }
  return (retint);
}


x86 assembly (clang, -O0):
<check_pattern_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1151 <check_pattern_not+0x41>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pattern_not>:
push   %rax
mov    $0x5b,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @check_pattern_not(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 91)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ drv_CF_send(int, int, unsigned char *);
void drv_CF_start_3(void) {
  unsigned char buffer[1];
  drv_CF_send(6, 0, NULL);
  buffer[0] = 0;
  drv_CF_send(12, 1, buffer);
}


x86 assembly (clang, -O0):
<drv_CF_start_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <drv_CF_send@plt>
movb   $0x0,-0x1(%rbp)
lea    -0x1(%rbp),%rdx
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <drv_CF_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_CF_start_3>:
push   %rax
mov    $0x6,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <drv_CF_send@plt>
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <drv_CF_send@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @drv_CF_start_3() {
%1 = alloca [1 x i8]
%2 = call i32 @drv_CF_send(i32 6, i32 0, i8* null)
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 0, i8* %3
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%5 = call i32 @drv_CF_send(i32 12, i32 1, i8* %4)
ret void
}

LLVM IR (-O2):
define void @drv_CF_start_3() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @drv_CF_send(i32 6, i32 0, i8* null)
store i8 0, i8* %2
%4 = call i32 @drv_CF_send(i32 12, i32 1, i8* %2)
ret void
}
/* Variables and functions */
int inb(int);
int /*<<< orphan*/ outb(int, char);
void serial_write(char a) {
  while (!(inb(0x3F8 + 5) & 0x20))
    ;
  outb(0x3F8, a);
}


x86 assembly (clang, -O0):
<serial_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3fd,%edi
call   1040 <inb@plt>
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1150 <serial_write+0x30>
jmp    1155 <serial_write+0x35>
jmp    112e <serial_write+0xe>
mov    $0x3f8,%edi
movsbl -0x1(%rbp),%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3fd,%edi
call   1040 <inb@plt>
test   $0x20,%al
je     1130 <serial_write+0x10>
movsbl %bl,%esi
mov    $0x3f8,%edi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_write(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = call i32 @inb(i32 1021)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i8, i8* %2
%11 = call i32 @outb(i32 1016, i8 signext %10)
ret void
}

LLVM IR (-O2):
define void @serial_write(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @inb(i32 1021)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @outb(i32 1016, i8 signext %0)
ret void
}
void gdk_display_get_default_cursor_size() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_get_default_cursor_size() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_indent(unsigned depth) {
  unsigned i;
  for (i = 0; i < depth; i++)
    printf("    ");
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1148 <print_indent+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_indent+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     113d <print_indent+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <print_indent+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c" \00"
define void @print_indent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int hash_plugin_hash_length(void) { return 128; }


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

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

LLVM IR (-O0):
define i32 @hash_plugin_hash_length() {
ret i32 128
}

LLVM IR (-O2):
define i32 @hash_plugin_hash_length() {
ret i32 128
}
/* Variables and functions */
double igam(double, double);
double gammainc(double x, double params[2]) {
  return igam(params[0], x) - params[1];
}


x86 assembly (clang, -O0):
<gammainc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
call   1030 <igam@plt>
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammainc>:
push   %rbx
mov    %rdi,%rbx
movaps %xmm0,%xmm1
movsd  (%rdi),%xmm0
call   1030 <igam@plt>
subsd  0x8(%rbx),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @gammainc(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double, double* %3
%9 = call double @igam(double %7, double %8)
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = fsub double %9, %12
ret double %13
}

LLVM IR (-O2):
define double @gammainc(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = tail call double @igam(double %3, double %0)
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fsub double %4, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void intToResponse(int value, char *msg) {
  bzero(msg, 255);
  sprintf(msg, "%d", value);
}


x86 assembly (clang, -O0):
<intToResponse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xff,%esi
call   1030 <bzero@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb5(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToResponse>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
mov    $0xff,%esi
call   1030 <bzero@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @intToResponse(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @bzero(i8* %5, i32 255)
%7 = load i8*, i8** %4
%8 = load i32, i32* %3
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @intToResponse(i32 %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @bzero(i8* %1, i32 255)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
char *cache_alias_lookup(char const *);
const char *_xdg_mime_cache_unalias_mime_type(const char *mime) {
  const char *lookup;
  lookup = cache_alias_lookup(mime);
  if (lookup)
    return lookup;
  return mime;
}


x86 assembly (clang, -O0):
<_xdg_mime_cache_unalias_mime_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <cache_alias_lookup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1141 <_xdg_mime_cache_unalias_mime_type+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1149 <_xdg_mime_cache_unalias_mime_type+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xdg_mime_cache_unalias_mime_type>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cache_alias_lookup@plt>
test   %rax,%rax
cmove  %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @_xdg_mime_cache_unalias_mime_type(i8* %0) {
%2 = tail call i8* @cache_alias_lookup(i8* %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* %0, i8* %2
ret i8* %4
}
int rb_scan_args_lead_p(const char *fmt) {
  return ((unsigned char)((fmt[0]) - '0') < 10);
}


x86 assembly (clang, -O0):
<rb_scan_args_lead_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
movzbl %al,%eax
cmp    $0xa,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_scan_args_lead_p>:
mov    (%rdi),%cl
add    $0xd0,%cl
xor    %eax,%eax
cmp    $0xa,%cl
setb   %al
ret

LLVM IR (-O0):
define i32 @rb_scan_args_lead_p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
%8 = trunc i32 %7 to i8
%9 = zext i8 %8 to i32
%10 = icmp slt i32 %9, 10
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @rb_scan_args_lead_p(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
int qsort_cmp__ushort(const void *x, const void *y) {
  if (*((unsigned short *)x) > *((unsigned short *)y))
    return (-1);
  else
    return (*((unsigned short *)x) < *((unsigned short *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp__ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzwl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzwl (%rcx),%ecx
cmp    %ecx,%eax
jle    112e <qsort_cmp__ushort+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1149 <qsort_cmp__ushort+0x49>
mov    -0x10(%rbp),%rax
movzwl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzwl (%rcx),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_cmp__ushort>:
movzwl (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%ax
setb   %cl
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qsort_cmp__ushort(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 = bitcast i8* %6 to i16*
%8 = load i16, i16* %7
%9 = zext i16 %8 to i32
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i16*
%12 = load i16, i16* %11
%13 = zext i16 %12 to i32
%14 = icmp sgt i32 %9, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %27
16: ; preds = %2
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to i16*
%19 = load i16, i16* %18
%20 = zext i16 %19 to i32
%21 = load i8*, i8** %5
%22 = bitcast i8* %21 to i16*
%23 = load i16, i16* %22
%24 = zext i16 %23 to i32
%25 = icmp slt i32 %20, %24
%26 = zext i1 %25 to i32
store i32 %26, i32* %3
br label %27
27: ; preds = %16, %15
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @qsort_cmp__ushort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = load i16, i16* %3
%5 = bitcast i8* %1 to i16*
%6 = load i16, i16* %5
%7 = icmp ugt i16 %4, %6
%8 = icmp ult i16 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fun_accepting_wchar(char *);
int main() {
  fun_accepting_wchar(L"Hello, world.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i32] [i32 72, i32 101, i32 108, i32 108, i32 111, i32 44, i32 32, i32 119, i32 111, i32 114, i32 108, i32 100, i32 46, i32 10, i32 0]
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fun_accepting_wchar(i8* bitcast ([15 x i32]* @.str to i8*))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i32] [i32 72, i32 101, i32 108, i32 108, i32 111, i32 44, i32 32, i32 119, i32 111, i32 114, i32 108, i32 100, i32 46, i32 10, i32 0]
define i32 @main() {
%1 = tail call i32 @fun_accepting_wchar(i8* bitcast ([15 x i32]* @.str to i8*))
ret i32 0
}
unsigned int c_entry(void) {
  unsigned int x = 0xabba;
  unsigned int y = 0x76543210;
  unsigned int z;
  z = x + y;
  return z;
}


x86 assembly (clang, -O0):
<c_entry>:
push   %rbp
mov    %rsp,%rbp
movl   $0xabba,-0x4(%rbp)
movl   $0x76543210,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @c_entry() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 43962, i32* %1
store i32 1985229328, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = add i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @c_entry() {
ret i32 1985273290
}
/* Variables and functions */
int get_rate();
int /*<<< orphan*/ printf(char *, int);
int main() { printf("El valor en bytes es %d\n", get_rate()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_rate@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"El valor en bytes es %d\0A\00"
define i32 @main() {
%1 = call i32 (...) @get_rate()
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"El valor en bytes es %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @get_rate()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double exp(double);
double a(double t, double y) { return exp(t - y); }


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
subsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @a(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call double @exp(double %7)
ret double %8
}

LLVM IR (-O2):
define double @a(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @exp(double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ stderror(char *);
void main() { stderror("error"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"error\00"
define void @main() {
%1 = call i32 @stderror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"error\00"
define void @main() {
%1 = tail call i32 @stderror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int is_weapon() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @is_weapon() {
ret i32 1
}
void remove_proximity_sensor(struct ssp_data *data) { return; }


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

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

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

LLVM IR (-O2):
%struct.ssp_data = type opaque
define void @remove_proximity_sensor(%struct.ssp_data* nocapture %0) {
ret void
}
void ZObject_finalize(void *self) {}


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

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

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

LLVM IR (-O2):
define void @ZObject_finalize(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct evpn_options {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct evpn_options *);
void evpn_options_destroy(struct evpn_options *evopts) { free(evopts); }


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

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

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

LLVM IR (-O2):
%struct.evpn_options = type { i32 }
define void @evpn_options_destroy(%struct.evpn_options* nocapture %0) {
%2 = tail call i32 @free(%struct.evpn_options* %0)
ret void
}
/* Variables and functions */
int Getpivot(int *, int, int);
void Qsort(int *array, int I, int D) {
  int p;
  if (I < D) {
    p = Getpivot(array, I, D);
    Qsort(array, I, p - 1);
    Qsort(array, p + 1, D);
  }
}


x86 assembly (clang, -O0):
<Qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <Qsort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <Getpivot@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <Qsort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <Qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Qsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <Qsort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <Getpivot@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <Qsort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <Qsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @Qsort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @Getpivot(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @Qsort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
char test3(void) { return '\''; }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x27,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
mov    $0x27,%al
ret

LLVM IR (-O0):
define signext i8 @test3() {
ret i8 39
}

LLVM IR (-O2):
define signext i8 @test3() {
ret i8 39
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x71() {
  Assert_real((isspace(113) == 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_isspace.c",
              570, ("isspace should be 0 for q"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x71>:
push   %rax
mov    $0x71,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x23a,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for q\00"
define void @t_isspace_0x71() {
%1 = call i64 @isspace(i32 113)
%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 570, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for q\00"
define void @t_isspace_0x71() {
%1 = tail call i64 @isspace(i32 113)
%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 570, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello from c!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"hello from c!\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 ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"hello from c!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ die_errno(char *, char const *, char const *, int);
scalar_t__ setenv(char const *, char const *, int);
void redo_setenv_str(const char *k, const char *v) {
  if (setenv(k, v, 1) != 0) {
    die_errno("setenv('%s', '%s', %d) failed", k, v, 1);
  }
}


x86 assembly (clang, -O0):
<redo_setenv_str>:
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 <setenv@plt>
cmp    $0x0,%rax
je     1165 <redo_setenv_str+0x45>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xea5(%rip),%rdi
mov    $0x1,%ecx
call   1040 <die_errno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redo_setenv_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%edx
call   1030 <setenv@plt>
test   %rax,%rax
je     1157 <redo_setenv_str+0x37>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <die_errno@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"setenv('%s', '%s', %d) failed\00"
define void @redo_setenv_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @setenv(i8* %5, i8* %6, i32 1)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @die_errno(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i32 1)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"setenv('%s', '%s', %d) failed\00"
define void @redo_setenv_str(i8* %0, i8* %1) {
%3 = tail call i64 @setenv(i8* %0, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @die_errno(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 1)
br label %7
7: ; preds = %5, %2
ret void
}
void separator() {}


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

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

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

LLVM IR (-O2):
define void @separator() {
ret void
}
/* Variables and functions */
int HZ;
int /*<<< orphan*/ __delay(unsigned long);
void __udelay(unsigned long usecs, unsigned long lpj) {
  usecs *= (unsigned long)(((0x8000000000000000ULL / (500000 / HZ)) +
                            0x80000000ULL) >>
                           32);
  usecs = (unsigned long)(((unsigned long long)usecs * lpj) >> 32);
  __delay(usecs);
}


x86 assembly (clang, -O0):
<__udelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x7a120,%eax
mov    0x2eb4(%rip),%rcx
cltd
idivl  (%rcx)
movslq %eax,%rcx
movabs $0x8000000000000000,%rax
xor    %edx,%edx
div    %rcx
movabs $0x80000000,%rcx
add    %rcx,%rax
shr    $0x20,%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
shr    $0x20,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__udelay>:
mov    0x2ec9(%rip),%rcx
mov    $0x7a120,%eax
xor    %edx,%edx
idivl  (%rcx)
movslq %eax,%rcx
movabs $0x8000000000000000,%rax
xor    %edx,%edx
div    %rcx
sub    $0xffffffff80000000,%rax
shr    $0x20,%rax
imul   %rsi,%rdi
imul   %rax,%rdi
shr    $0x20,%rdi
jmp    1030 <__delay@plt>

LLVM IR (-O0):
@HZ = global i32 0
define void @__udelay(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i32, i32* @HZ
%6 = sdiv i32 500000, %5
%7 = sext i32 %6 to i64
%8 = udiv i64 -9223372036854775808, %7
%9 = add i64 %8, 2147483648
%10 = lshr i64 %9, 32
%11 = load i64, i64* %3
%12 = mul i64 %11, %10
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = mul i64 %13, %14
%16 = lshr i64 %15, 32
store i64 %16, i64* %3
%17 = load i64, i64* %3
%18 = call i32 @__delay(i64 %17)
ret void
}

LLVM IR (-O2):
@HZ = global i32 0
define void @__udelay(i64 %0, i64 %1) {
%3 = load i32, i32* @HZ
%4 = sdiv i32 500000, %3
%5 = sext i32 %4 to i64
%6 = udiv i64 -9223372036854775808, %5
%7 = add nuw i64 %6, 2147483648
%8 = lshr i64 %7, 32
%9 = mul i64 %1, %0
%10 = mul i64 %9, %8
%11 = lshr i64 %10, 32
%12 = tail call i32 @__delay(i64 %11)
ret void
}
int posInByte(int bit_num) { return (bit_num % 8); }


x86 assembly (clang, -O0):
<posInByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posInByte>:
mov    %edi,%eax
lea    0x7(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @posInByte(i32 %0) {
%2 = srem i32 %0, 8
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ spit(char);
void spits(char *s) {
  while (*s) {
    spit(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<spits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <spits+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <spit@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <spits+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @spits(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 %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @spit(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @spits(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 i32 @spit(i8 signext %5)
%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
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *sunix_usage();
void sunix_showusage() { printf("usage : sunix %s", sunix_usage()); }


x86 assembly (clang, -O0):
<sunix_showusage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <sunix_usage@plt>
mov    %rax,%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunix_showusage>:
push   %rax
xor    %eax,%eax
call   1040 <sunix_usage@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"usage : sunix %s\00"
define void @sunix_showusage() {
%1 = call i8* (...) @sunix_usage()
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"usage : sunix %s\00"
define void @sunix_showusage() {
%1 = tail call i8* (...) @sunix_usage()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int cprNL(double);
int cprN(double lat, int odd) {
  int nl = cprNL(lat) - (odd ? 1 : 0);
  if (nl < 1)
    nl = 1;
  return nl;
}


x86 assembly (clang, -O0):
<cprN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cprNL@plt>
mov    -0xc(%rbp),%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jge    1150 <cprN+0x40>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprN>:
push   %rbx
mov    %edi,%ebx
call   1030 <cprNL@plt>
cmp    $0x1,%ebx
adc    $0xffffffff,%eax
test   %eax,%eax
mov    $0x1,%ecx
cmovle %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cprN(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%6 = load double, double* %3
%7 = call i32 @cprNL(double %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
%12 = sub nsw i32 %7, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 1, i32* %5
br label %16
16: ; preds = %15, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @cprN(double %0, i32 %1) {
%3 = tail call i32 @cprNL(double %0)
%4 = icmp ne i32 %1, 0
%5 = sext i1 %4 to i32
%6 = add i32 %3, %5
%7 = icmp sgt i32 %6, 1
%8 = select i1 %7, i32 %6, i32 1
ret i32 %8
}
/* Variables and functions */
int setenv(char const *, char *);
int pyi_unsetenv(const char *variable) {
  int rc;
  rc = setenv(variable, "");
  return rc;
}


x86 assembly (clang, -O0):
<pyi_unsetenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <setenv@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pyi_unsetenv>:
lea    0xee9(%rip),%rsi
jmp    1030 <setenv@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @pyi_unsetenv(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @setenv(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @pyi_unsetenv(i8* %0) {
%2 = tail call i32 @setenv(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void quest_render() { ; }


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

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

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

LLVM IR (-O2):
define void @quest_render() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int /*<<< orphan*/ sleep(int);
int main(void) {
  unsigned long i = 0;
  while (1) {
    printf("%lu\n", i);
    i++;
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1137 <main+0x17>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %0, %3
%4 = load i64, i64* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %4)
%6 = load i64, i64* %2
%7 = add i64 %6, 1
store i64 %7, i64* %2
%8 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = add i64 %2, 1
%5 = tail call i32 @sleep(i32 1)
br label %1
}