xunge/DecIR huggingface dataset:
/* Variables and functions */
int linear(int, int, int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int elem = 23;
  int tam = 10;
  int vetor[] = {45, 33, 5, 6, 87, 23, 1, 99, 98, 10};
  int result = linear(elem, tam, vetor);
  printf("O indice e': %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x17,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xea8(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1040 <linear@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x17,%edi
mov    $0xa,%esi
call   1040 <linear@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.vetor = [10 x i32] [i32 45, i32 33, i32 5, i32 6, i32 87, i32 23, i32 1, i32 99, i32 98, i32 10]
@.str = [17 x i8] c"O indice e': %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i32]
%5 = alloca i32
store i32 0, i32* %1
store i32 23, i32* %2
store i32 10, i32* %3
%6 = bitcast [10 x i32]* %4 to i8*
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%10 = call i32 @linear(i32 %7, i32 %8, i32* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vetor = [10 x i32] [i32 45, i32 33, i32 5, i32 6, i32 87, i32 23, i32 1, i32 99, i32 98, i32 10]
@.str = [17 x i8] c"O indice e': %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @linear(i32 23, i32 10, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int niggli_get_major_version(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @niggli_get_major_version() {
ret i32 0
}
int main() {
  int n, i;
  for (scanf("%d", &n), i = 0; i++ < n; putchar('*'))
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
cmp    -0x8(%rbp),%eax
jge    1172 <main+0x52>
jmp    1161 <main+0x41>
mov    $0x2a,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
jmp    1148 <main+0x28>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1165 <main+0x45>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    $0x2a,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
cmp    0xc(%rsp),%ebx
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %0, %6
%7 = phi i32 [ %8, %6 ], [ 0, %0 ]
%8 = add nuw nsw i32 %7, 1
%9 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 42)
%10 = load i32, i32* %1
%11 = icmp slt i32 %8, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void on_end(void *context) { printf("end\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"end\00"
define void @on_end(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void WatchdogResetEnable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000008))) |= 0x00000002;
}


x86 assembly (clang, -O0):
<WatchdogResetEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
or     $0x2,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogResetEnable>:
orq    $0x2,0x8(%rdi)
ret

LLVM IR (-O0):
define void @WatchdogResetEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @WatchdogResetEnable(i64 %0) {
%2 = add nsw i64 %0, 8
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 2
store volatile i64 %5, i64* %3
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void tlv_empty(uint8_t *p_tlv) {
  p_tlv[4] = 0 >> 8;
  p_tlv[4 + 1] = 0 & 0xff;
}


x86 assembly (clang, -O0):
<tlv_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x10(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlv_empty>:
movq   $0x0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @tlv_empty(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
store i32 0, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 5
store i32 0, i32* %3
ret void
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void display(uint8_t c) {
  fputc((c >= ' ' && c <= '~') || c == '\n' ? c : '?', stderr);
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jl     1138 <display+0x28>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
jle    1145 <display+0x35>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1151 <display+0x41>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    115e <display+0x4e>
mov    $0x3f,%eax
mov    %eax,-0x8(%rbp)
jmp    115e <display+0x4e>
mov    -0x8(%rbp),%eax
mov    0x2e78(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
lea    -0x20(%rdi),%eax
cmp    $0x5f,%al
mov    $0x3f,%eax
cmovb  %edi,%eax
cmp    $0xa,%dil
cmovne %eax,%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @display(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 32
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 126
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %17
14: ; preds = %10, %6
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
br label %18
17: ; preds = %10
br label %18
18: ; preds = %17, %14
%19 = phi i32 [ %16, %14 ], [ 63, %17 ]
%20 = trunc i32 %19 to i8
%21 = load i32, i32* @stderr
%22 = call i32 @fputc(i8 signext %20, i32 %21)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @display(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = icmp eq i8 %0, 10
%5 = or i1 %4, %3
%6 = select i1 %5, i8 %0, i8 63
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputc(i8 signext %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char const *);
int main(int argc, char *argv[]) {
  const char *locale = getenv("LANG");
  printf("Locale = \"%s\"\n\n", locale);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"LANG\00"
@.str.1 = [16 x i8] c"Locale = \22%s\22\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"LANG\00"
@.str.1 = [16 x i8] c"Locale = \22%s\22\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
uintptr_t fio_ct_if(int /*<<< orphan*/, uintptr_t, uintptr_t);
int /*<<< orphan*/ fio_ct_true(uintptr_t);
__attribute__((unused)) uintptr_t fio_ct_if2(uintptr_t cond, uintptr_t a,
                                             uintptr_t b) {
  return fio_ct_if(fio_ct_true(cond), a, b);
}


x86 assembly (clang, -O0):
<fio_ct_if2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fio_ct_true@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <fio_ct_if@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_ct_if2>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1040 <fio_ct_true@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fio_ct_if@plt>

LLVM IR (-O0):
define i64 @fio_ct_if2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = call i32 @fio_ct_true(i64 %7)
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i64 @fio_ct_if(i32 %8, i64 %9, i64 %10)
ret i64 %11
}

LLVM IR (-O2):
define i64 @fio_ct_if2(i64 %0, i64 %1, i64 %2) {
%4 = tail call i32 @fio_ct_true(i64 %0)
%5 = tail call i64 @fio_ct_if(i32 %4, i64 %1, i64 %2)
ret i64 %5
}
void XFindOnExtensionList() {}


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

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

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

LLVM IR (-O2):
define void @XFindOnExtensionList() {
ret void
}
/* Type definitions */
struct list_element {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_append_element(struct list *, struct list_element *);
struct list_element *list_element_new(struct list *, void *);
struct list_element *list_append_value(struct list *l, void *val) {
  struct list_element *el = list_element_new(l, val);
  list_append_element(l, el);
  return el;
}


x86 assembly (clang, -O0):
<list_append_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <list_element_new@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <list_append_element@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_append_value>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <list_element_new@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <list_append_element@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.list_element = type { i32 }
%struct.list = type { i32 }
define %struct.list_element* @list_append_value(%struct.list* %0, i8* %1) {
%3 = alloca %struct.list*
%4 = alloca i8*
%5 = alloca %struct.list_element*
store %struct.list* %0, %struct.list** %3
store i8* %1, i8** %4
%6 = load %struct.list*, %struct.list** %3
%7 = load i8*, i8** %4
%8 = call %struct.list_element* @list_element_new(%struct.list* %6, i8* %7)
store %struct.list_element* %8, %struct.list_element** %5
%9 = load %struct.list*, %struct.list** %3
%10 = load %struct.list_element*, %struct.list_element** %5
%11 = call i32 @list_append_element(%struct.list* %9, %struct.list_element* %10)
%12 = load %struct.list_element*, %struct.list_element** %5
ret %struct.list_element* %12
}

LLVM IR (-O2):
%struct.list_element = type { i32 }
%struct.list = type { i32 }
define %struct.list_element* @list_append_value(%struct.list* %0, i8* %1) {
%3 = tail call %struct.list_element* @list_element_new(%struct.list* %0, i8* %1)
%4 = tail call i32 @list_append_element(%struct.list* %0, %struct.list_element* %3)
ret %struct.list_element* %3
}
/* Variables and functions */
char *EnvGetDefmodulePPForm(void *, void *);
int /*<<< orphan*/ EnvPrintRouter(void *, char const *, char *);
int /*<<< orphan*/ PrintInChunks(void *, char const *, char const *);
void SaveDefmodules(void *theEnv, void *theModule, const char *logicalName) {
  const char *ppform;
  ppform = EnvGetDefmodulePPForm(theEnv, theModule);
  if (ppform != NULL) {
    PrintInChunks(theEnv, logicalName, ppform);
    EnvPrintRouter(theEnv, logicalName, "\n");
  }
}


x86 assembly (clang, -O0):
<SaveDefmodules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <EnvGetDefmodulePPForm@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1185 <SaveDefmodules+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <PrintInChunks@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe80(%rip),%rdx
call   1030 <EnvPrintRouter@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SaveDefmodules>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1050 <EnvGetDefmodulePPForm@plt>
test   %rax,%rax
je     116b <SaveDefmodules+0x3b>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <PrintInChunks@plt>
lea    0xea7(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <EnvPrintRouter@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @SaveDefmodules(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i8* @EnvGetDefmodulePPForm(i8* %8, i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %21
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %6
%16 = load i8*, i8** %7
%17 = call i32 @PrintInChunks(i8* %14, i8* %15, i8* %16)
%18 = load i8*, i8** %4
%19 = load i8*, i8** %6
%20 = call i32 @EnvPrintRouter(i8* %18, i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @SaveDefmodules(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @EnvGetDefmodulePPForm(i8* %0, i8* %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @PrintInChunks(i8* %0, i8* %2, i8* %4)
%8 = tail call i32 @EnvPrintRouter(i8* %0, i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %3
ret void
}
int note_ctoi(char c) {
  if (c > 64 && c < 72) {
    return c - 65;
  } else
    return -1;
}


x86 assembly (clang, -O0):
<note_ctoi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x40,%eax
jle    1133 <note_ctoi+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x48,%eax
jge    1133 <note_ctoi+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    113a <note_ctoi+0x3a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<note_ctoi>:
lea    -0x41(%rdi),%eax
lea    -0x41(%rdi),%ecx
cmp    $0x7,%al
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @note_ctoi(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 64
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp slt i32 %9, 72
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
store i32 %14, i32* %2
br label %16
15: ; preds = %7, %1
store i32 -1, i32* %2
br label %16
16: ; preds = %15, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @note_ctoi(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 7
%4 = sext i8 %0 to i32
%5 = add nsw i32 %4, -65
%6 = select i1 %3, i32 %5, i32 -1
ret i32 %6
}
int compare(const unsigned int *n1, const unsigned int *n2) {
  return *n1 - *n2;
}


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @compare(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sub i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @compare(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub i32 %3, %4
ret i32 %5
}
int mpc_soi_anchor(char prev, char next) { return (prev == '\0'); }


x86 assembly (clang, -O0):
<mpc_soi_anchor>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpc_soi_anchor>:
xor    %eax,%eax
test   %dil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @mpc_soi_anchor(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @mpc_soi_anchor(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct timeval {
  long tv_sec;
};

/* Variables and functions */
long timer_s(struct timeval *start, struct timeval *end) {
  long delta = end->tv_sec - start->tv_sec;
  return delta;
}


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

x86 assembly (clang, -O2):
<timer_s>:
mov    (%rsi),%rax
sub    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
define i64 @timer_s(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
%5 = alloca i64
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load %struct.timeval*, %struct.timeval** %3
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sub nsw i64 %8, %11
store i64 %12, i64* %5
%13 = load i64, i64* %5
ret i64 %13
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i64 @timer_s(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ md5(unsigned char *, int, unsigned char *);
int /*<<< orphan*/ memset(unsigned char *, float, int);
int /*<<< orphan*/ sha1(unsigned char *, int, unsigned char *);
void x509_hash(unsigned char *in, int len, int alg, unsigned char *out) {
  switch (alg) {
  case 4:
    md5(in, len, out);
    break;
  case 5:
    sha1(in, len, out);
    break;
  default:
    memset(out, '\xFF', len);
    break;
  }
}


x86 assembly (clang, -O0):
<x509_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x4,%eax
je     116b <x509_hash+0x3b>
jmp    115a <x509_hash+0x2a>
mov    -0x1c(%rbp),%eax
sub    $0x5,%eax
je     1180 <x509_hash+0x50>
jmp    1195 <x509_hash+0x65>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1050 <md5@plt>
jmp    11a9 <x509_hash+0x79>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <sha1@plt>
jmp    11a9 <x509_hash+0x79>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
movss  0xe5c(%rip),%xmm0
call   1040 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x509_hash>:
cmp    $0x5,%edx
je     1142 <x509_hash+0x12>
cmp    $0x4,%edx
jne    114a <x509_hash+0x1a>
mov    %rcx,%rdx
jmp    1050 <md5@plt>
mov    %rcx,%rdx
jmp    1030 <sha1@plt>
movss  0xeae(%rip),%xmm0
mov    %rcx,%rdi
jmp    1040 <memset@plt>

LLVM IR (-O0):
define void @x509_hash(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %7
switch i32 %9, label %20 [
i32 4, label %10
i32 5, label %15
]
10: ; preds = %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = load i8*, i8** %8
%14 = call i32 @md5(i8* %11, i32 %12, i8* %13)
br label %24
15: ; preds = %4
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = load i8*, i8** %8
%19 = call i32 @sha1(i8* %16, i32 %17, i8* %18)
br label %24
20: ; preds = %4
%21 = load i8*, i8** %8
%22 = load i32, i32* %6
%23 = call i32 @memset(i8* %21, float -1.000000e+00, i32 %22)
br label %24
24: ; preds = %20, %15, %10
ret void
}

LLVM IR (-O2):
define void @x509_hash(i8* %0, i32 %1, i32 %2, i8* %3) {
switch i32 %2, label %9 [
i32 4, label %5
i32 5, label %7
]
5: ; preds = %4
%6 = tail call i32 @md5(i8* %0, i32 %1, i8* %3)
br label %11
7: ; preds = %4
%8 = tail call i32 @sha1(i8* %0, i32 %1, i8* %3)
br label %11
9: ; preds = %4
%10 = tail call i32 @memset(i8* %3, float -1.000000e+00, i32 %1)
br label %11
11: ; preds = %9, %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fprintf(stderr, "Usage: ip6tomac ipv6-address\n");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Usage: ip6tomac ipv6-address\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Usage: ip6tomac ipv6-address\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void PARITYREF(char *Par) { ; }


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

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

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

LLVM IR (-O2):
define void @PARITYREF(i8* nocapture %0) {
ret void
}
void io_default_lockhandler(int lock) {}


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

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

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

LLVM IR (-O2):
define void @io_default_lockhandler(i32 %0) {
ret void
}
/* Variables and functions */
char *strrchr(char const *, int);
char *rindex(const char *str, int c) { return strrchr(str, c); }


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

x86 assembly (clang, -O2):
<rindex>:
jmp    1030 <strrchr@plt>

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

LLVM IR (-O2):
define i8* @rindex(i8* %0, i32 %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
void foo531(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo531(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xb6() {
  Assert_real((isascii(182) == 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_isascii.c",
              915, ("isascii should be 0 for 0xb6"));
}


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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xb6\00"
define void @t_isascii_0xb6() {
%1 = tail call i64 @isascii(i32 182)
%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 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *gb2hz(s, plen, inst)
char *s;
int *plen;
int inst;
{
  register int i;
  for (i = 0; i < *plen; i++)
    s[i] &= 0x7f;
  return (s);
}


x86 assembly (clang, -O0):
<gb2hz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1145 <gb2hz+0x45>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
and    $0x7f,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <gb2hz+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb2hz>:
mov    %rdi,%rax
cmpl   $0x0,(%rsi)
jle    1120 <gb2hz+0x20>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
andb   $0x7f,(%rax,%rcx,1)
add    $0x1,%rcx
movslq (%rsi),%rdx
cmp    %rdx,%rcx
jl     1110 <gb2hz+0x10>
ret

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

LLVM IR (-O2):
define i8* @gb2hz(i8* returned %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = and i8 %9, 127
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = load i32, i32* %1
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %11, %13
br i1 %14, label %6, label %15
15: ; preds = %6, %3
ret i8* %0
}
void RTFileAioCtxSubmit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileAioCtxSubmit() {
ret void
}
void RTPathSetCurrent(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathSetCurrent() {
ret void
}
void ls_cost_nm8_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_cost_nm8_incref() {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int GetSlot(int32_t Altitude) {
  int Slot;
  Slot = Altitude / 100;
  if (Slot < 0)
    Slot = 0;
  if (Slot >= (60000 / 100))
    Slot = (60000 / 100) - 1;
  return Slot;
}


x86 assembly (clang, -O0):
<GetSlot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1126 <GetSlot+0x26>
movl   $0x0,-0x8(%rbp)
cmpl   $0x258,-0x8(%rbp)
jl     113a <GetSlot+0x3a>
movl   $0x257,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSlot>:
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x25,%rcx
xor    %edx,%edx
add    %eax,%ecx
cmovs  %edx,%ecx
cmp    $0x257,%ecx
mov    $0x257,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @GetSlot(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 100
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %3
br label %9
9: ; preds = %8, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 600
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 599, i32* %3
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @GetSlot(i32 %0) {
%2 = sdiv i32 %0, 100
%3 = icmp sgt i32 %2, 0
%4 = select i1 %3, i32 %2, i32 0
%5 = icmp ult i32 %4, 599
%6 = select i1 %5, i32 %4, i32 599
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ranged_random_mult_lazynopower2(int /*<<< orphan*/);
void loop_mult_lazynopower2(size_t count, uint32_t range, uint32_t *output) {
  for (size_t i = 0; i < count; i++) {
    *output++ = ranged_random_mult_lazynopower2(range);
  }
}


x86 assembly (clang, -O0):
<loop_mult_lazynopower2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1165 <loop_mult_lazynopower2+0x55>
mov    -0xc(%rbp),%edi
call   1030 <ranged_random_mult_lazynopower2@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x18(%rbp)
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <loop_mult_lazynopower2+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_mult_lazynopower2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1145 <loop_mult_lazynopower2+0x35>
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r15d,%edi
call   1030 <ranged_random_mult_lazynopower2@plt>
mov    %eax,(%r14,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <loop_mult_lazynopower2+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @loop_mult_lazynopower2(i64 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = phi i32* [ %10, %6 ], [ %2, %3 ]
%9 = tail call i32 @ranged_random_mult_lazynopower2(i32 %1)
%10 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %9, i32* %8
%11 = add nuw i64 %7, 1
%12 = icmp eq i64 %11, %0
br i1 %12, label %5, label %6
}
/* Variables and functions */
int /*<<< orphan*/ my_putnbr_base(int, int, int);
char *my_strcat(char *, int /*<<< orphan*/);
char *my_put_ptr(int ptr) {
  char *ret = my_strcat("0x\0", my_putnbr_base(ptr, 16, 1));
  return ret;
}


x86 assembly (clang, -O0):
<my_put_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <my_putnbr_base@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1040 <my_strcat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_put_ptr>:
push   %rax
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <my_putnbr_base@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <my_strcat@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"0x\00\00"
define i8* @my_put_ptr(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @my_putnbr_base(i32 %4, i32 16, i32 1)
%6 = call i8* @my_strcat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"0x\00\00"
define i8* @my_put_ptr(i32 %0) {
%2 = tail call i32 @my_putnbr_base(i32 %0, i32 16, i32 1)
%3 = tail call i8* @my_strcat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* %3
}
int get_min_array_size64(void) { return ((19937 / 128 + 1) * 2); }


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

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

LLVM IR (-O0):
define i32 @get_min_array_size64() {
ret i32 312
}

LLVM IR (-O2):
define i32 @get_min_array_size64() {
ret i32 312
}
/* Variables and functions */
void CL_MapLoading(void) {}


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

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

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

LLVM IR (-O2):
define void @CL_MapLoading() {
ret void
}
int __glob_ignore_err(const char *path, int err) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__glob_ignore_err(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int on_off(char *msg) {
  fprintf(stderr, "Error: argument of \"%s\" must be \"on\" or \"off\"\n", msg);
  return -1;
}


x86 assembly (clang, -O0):
<on_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_off>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Error: argument of \22%s\22 must be \22on\22 or \22off\22\0A\00"
define i32 @on_off(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Error: argument of \22%s\22 must be \22on\22 or \22off\22\0A\00"
define i32 @on_off(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ h_form_int(char const *, char *, int, int);
int /*<<< orphan*/ h_td_end();
int /*<<< orphan*/ h_td_start(char const *, int);
void h_td_int_field(const char *name, int size, int val, const char *class,
                    int colspan) {
  h_td_start(class, colspan);
  h_form_int(name, "text", size, val);
  h_td_end();
}


x86 assembly (clang, -O0):
<h_td_int_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <h_td_start@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe99(%rip),%rsi
call   1050 <h_form_int@plt>
mov    $0x0,%al
call   1040 <h_td_end@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_td_int_field>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rcx,%rdi
mov    %r8d,%esi
call   1030 <h_td_start@plt>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1050 <h_form_int@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <h_td_end@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"text\00"
define void @h_td_int_field(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %9
%12 = load i32, i32* %10
%13 = call i32 @h_td_start(i8* %11, i32 %12)
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @h_form_int(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
%18 = call i32 (...) @h_td_end()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"text\00"
define void @h_td_int_field(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @h_td_start(i8* %3, i32 %4)
%7 = tail call i32 @h_form_int(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%8 = tail call i32 (...) @h_td_end()
ret void
}
void I422ToRGB24Row_C() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB24Row_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void syntax(char **argv) { fprintf(stderr, "%s [filename]...\n", argv[0]); }


x86 assembly (clang, -O0):
<syntax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syntax>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xedd(%rip),%rsi
mov    %eax,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"%s [filename]...\0A\00"
define void @syntax(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"%s [filename]...\0A\00"
define void @syntax(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nullf(char *, int);
int /*<<< orphan*/ output_byte(int);
int /*<<< orphan*/ output_w32(int);
void emit_pushimm(int imm) {
  nullf("push $%x\n", imm);
  output_byte(0x68);
  output_w32(imm);
}


x86 assembly (clang, -O0):
<emit_pushimm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1040 <nullf@plt>
mov    $0x68,%edi
call   1050 <output_byte@plt>
mov    -0x4(%rbp),%edi
call   1030 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_pushimm>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
call   1040 <nullf@plt>
mov    $0x68,%edi
call   1050 <output_byte@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <output_w32@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"push $%x\0A\00"
define void @emit_pushimm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @nullf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @output_byte(i32 104)
%6 = load i32, i32* %2
%7 = call i32 @output_w32(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"push $%x\0A\00"
define void @emit_pushimm(i32 %0) {
%2 = tail call i32 @nullf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @output_byte(i32 104)
%4 = tail call i32 @output_w32(i32 %0)
ret void
}
__attribute__((always_)) int pm_runtime_barrier(struct device *dev) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @pm_runtime_barrier(%struct.device* nocapture readnone %0) {
ret i32 0
}
void RDTSC_BARRIER(void) {
  __asm__ __volatile__("mfence \n\t"
                       "lfence \n\t" ::
                           : "memory");
}


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

x86 assembly (clang, -O2):
<RDTSC_BARRIER>:
mfence
lfence
ret

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

LLVM IR (-O2):
define void @RDTSC_BARRIER() {
tail call void asm sideeffect "mfence \0A\09lfence \0A\09", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}