xunge/DecIR huggingface dataset:
int xstrcmp(p1, p2) void *p1, *p2;
{ return (strcmp((char *)p1, (char *)p2)); }


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

x86 assembly (clang, -O2):
<xstrcmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @xstrcmp(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 i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @xstrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ptr_glInitNames();
extern void glInitNames(void) { ptr_glInitNames(); }


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

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

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

LLVM IR (-O2):
define void @glInitNames() {
%1 = tail call i32 (...) @ptr_glInitNames()
ret void
}
void users_extra_fast(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ robot_compose_packet();
int /*<<< orphan*/ robot_send_packet();
uint8_t robot_compose_n_send(void) {
  robot_compose_packet();
  return robot_send_packet();
}


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

x86 assembly (clang, -O2):
<robot_compose_n_send>:
push   %rax
xor    %eax,%eax
call   1040 <robot_compose_packet@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <robot_send_packet@plt>

LLVM IR (-O0):
define i32 @robot_compose_n_send() {
%1 = call i32 (...) @robot_compose_packet()
%2 = call i32 (...) @robot_send_packet()
ret i32 %2
}

LLVM IR (-O2):
define i32 @robot_compose_n_send() {
%1 = tail call i32 (...) @robot_compose_packet()
%2 = tail call i32 (...) @robot_send_packet()
ret i32 %2
}
/* Variables and functions */
char *minibindtextdomain(char *a, char *b) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @minibindtextdomain(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printdln(double d) { printf("%g\n", d); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%g\0A\00"
define void @printdln(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void print(long x) { printf("%ld\n", x); }


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

x86 assembly (clang, -O2):
<print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define void @print(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int write(int, char *, int);
int sendConnect(int sock) {
  int bsent;
  bsent = write(sock, "CON", sizeof("CON"));
  if (bsent < sizeof("CON"))
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<sendConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x4,%rax
jae    114c <sendConnect+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <sendConnect+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendConnect>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
cmp    $0x4,%eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"CON\00"
define i32 @sendConnect(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = icmp ult i32 %2, 4
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void delay_ms(uint32_t t) { (void)t; }


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

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

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

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
ret void
}
long long int generatekey(long long int val, long unsigned int m,
                          long long int N) {
  if (val < 0) {
    val = 0 - val;
  }
  return (val % N);
}


x86 assembly (clang, -O0):
<generatekey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1125 <generatekey+0x25>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generatekey>:
mov    %rdx,%rcx
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1122 <generatekey+0x22>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @generatekey(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 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i64, i64* %4
%11 = sub nsw i64 0, %10
store i64 %11, i64* %4
br label %12
12: ; preds = %9, %3
%13 = load i64, i64* %4
%14 = load i64, i64* %6
%15 = srem i64 %13, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @generatekey(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%5 = srem i64 %4, %2
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_permutation(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter a number: ");
  scanf("%d", &n);
  print_permutation(n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <print_permutation@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <print_permutation@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @print_permutation(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @print_permutation(i32 %5)
ret i32 0
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, const char *argv[]) {
  int ch;
  while ((ch = getchar()) != EOF) {
    putchar(ch);
  }
  return 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)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     115c <main+0x3c>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int loadError();
int /*<<< orphan*/ printf(char *);
int processError(int error) {
  switch (error) {
  case 0:
    return EXIT_SUCCESS;
  case 1:
    return loadError();
  default:
    printf("General error.\n");
    return EXIT_FAILURE;
  }
}


x86 assembly (clang, -O0):
<processError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     114f <processError+0x2f>
jmp    113e <processError+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1160 <processError+0x40>
jmp    116f <processError+0x4f>
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1187 <processError+0x67>
mov    $0x0,%al
call   1030 <loadError@plt>
mov    %eax,-0x4(%rbp)
jmp    1187 <processError+0x67>
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processError>:
cmp    $0x1,%edi
je     1133 <processError+0x13>
push   %rax
test   %edi,%edi
jne    113a <processError+0x1a>
mov    0x2ea7(%rip),%rax
jmp    114d <processError+0x2d>
xor    %eax,%eax
jmp    1040 <loadError@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@.str = [16 x i8] c"General error.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @processError(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %7
]
5: ; preds = %1
%6 = load i32, i32* @EXIT_SUCCESS
store i32 %6, i32* %2
br label %12
7: ; preds = %1
%8 = call i32 (...) @loadError()
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %7, %5
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
@str = [15 x i8] c"General error.\00"
define i32 @processError(i32 %0) {
switch i32 %0, label %6 [
i32 0, label %2
i32 1, label %4
]
2: ; preds = %1
%3 = load i32, i32* @EXIT_SUCCESS
br label %9
4: ; preds = %1
%5 = tail call i32 (...) @loadError()
br label %9
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
br label %9
9: ; preds = %6, %4, %2
%10 = phi i32 [ %8, %6 ], [ %5, %4 ], [ %3, %2 ]
ret i32 %10
}
int test_initialSizeOfAllocation() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test_initialSizeOfAllocation() {
ret i32 0
}
void av_log_format_line2() {}


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

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

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

LLVM IR (-O2):
define void @av_log_format_line2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n"
         "usage: filemanager-httpd [OPTIONS]\n"
         "\n"
         "options:\n"
         "\t-h             - prints this help\n"
         "\n"
         "\t-c file|dir    - read configuration from the specified location\n"
         "\t                 instead of standard one. It may be a file or\n"
         "\t                 a directory. In case of a directory all files\n"
         "\t                 within, with \".conf\" extension are read.\n"
         "\n"
         "\t-d             - print some debug logs to standard output\n"
         "\n"
         "\t-p user:pass   - print the user and password in encoded form,\n"
         "\t                 suitable for \"credentials\" option and exit\n"
         "\n"
         "\t-i             - inetd mode (socket passed as standard input)\n"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [584 x i8] c"\0Ausage: filemanager-httpd [OPTIONS]\0A\0Aoptions:\0A\09-h - prints this help\0A\0A\09-c file|dir - read configuration from the specified location\0A\09 instead of standard one. It may be a file or\0A\09 a directory. In case of a directory all files\0A\09 within, with \22.conf\22 extension are read.\0A\0A\09-d - print some debug logs to standard output\0A\0A\09-p user:pass - print the user and password in encoded form,\0A\09 suitable for \22credentials\22 option and exit\0A\0A\09-i - inetd mode (socket passed as standard input)\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([584 x i8], [584 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [583 x i8] c"\0Ausage: filemanager-httpd [OPTIONS]\0A\0Aoptions:\0A\09-h - prints this help\0A\0A\09-c file|dir - read configuration from the specified location\0A\09 instead of standard one. It may be a file or\0A\09 a directory. In case of a directory all files\0A\09 within, with \22.conf\22 extension are read.\0A\0A\09-d - print some debug logs to standard output\0A\0A\09-p user:pass - print the user and password in encoded form,\0A\09 suitable for \22credentials\22 option and exit\0A\0A\09-i - inetd mode (socket passed as standard input)\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([583 x i8], [583 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, char *);
void draw_text(int x, int y, char *string) {
  printf("\33[%u;%uH%s", y + 1, x + 1, string);
}


x86 assembly (clang, -O0):
<draw_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0x4(%rbp),%edx
add    $0x1,%edx
mov    -0x10(%rbp),%rcx
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_text>:
mov    %rdx,%rcx
add    $0x1,%esi
lea    0x1(%rdi),%edx
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[%u;%uH%s\00"
define void @draw_text(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10, i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[%u;%uH%s\00"
define void @draw_text(i32 %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, 1
%5 = add nsw i32 %0, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i8* %2)
ret void
}
int putchar(int ch) {
  while (!((*(volatile unsigned int *)((0x3FF0000 + 0xD008))) & 0x40))
    ;
  (*(volatile unsigned int *)((0x3FF0000 + 0xD00C)) = (ch));
  return 0;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3ffd008,%eax
mov    (%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1126 <putchar+0x26>
jmp    112b <putchar+0x2b>
jmp    1107 <putchar+0x7>
mov    -0x4(%rbp),%ecx
mov    $0x3ffd00c,%eax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
testl  $0x40,0x3ffd008
je     1100 <putchar>
mov    %edi,0x3ffd00c
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i32, i32* inttoptr (i64 67096584 to i32*)
%5 = and i32 %4, 64
%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 i32, i32* %2
store volatile i32 %10, i32* inttoptr (i64 67096588 to i32*)
ret i32 0
}

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i32, i32* inttoptr (i64 67096584 to i32*)
%4 = and i32 %3, 64
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
store volatile i32 %0, i32* inttoptr (i64 67096588 to i32*)
ret i32 0
}
void setinp(volatile unsigned int *gpioptr, int portn) {
  *(gpioptr + (portn / 10)) &= ~(7 << ((portn % 10) * 3));
}


x86 assembly (clang, -O0):
<setinp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0x3,%edx,%ecx
mov    $0x7,%esi
shl    %cl,%esi
xor    $0xffffffff,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
and    %esi,%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setinp>:
movslq %esi,%rax
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
lea    (%rax,%rax,2),%ecx
mov    $0x7,%eax
shl    %cl,%eax
not    %eax
movslq %edx,%rcx
and    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @setinp(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = srem i32 %5, 10
%7 = mul nsw i32 %6, 3
%8 = shl i32 7, %7
%9 = xor i32 %8, -1
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = sdiv i32 %11, 10
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = load volatile i32, i32* %14
%16 = and i32 %15, %9
store volatile i32 %16, i32* %14
ret void
}

LLVM IR (-O2):
define void @setinp(i32* %0, i32 %1) {
%3 = srem i32 %1, 10
%4 = mul nsw i32 %3, 3
%5 = shl nuw nsw i32 7, %4
%6 = xor i32 %5, -1
%7 = sdiv i32 %1, 10
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load volatile i32, i32* %9
%11 = and i32 %10, %6
store volatile i32 %11, i32* %9
ret void
}
double f4_sum_pre_double_double_double_double_double_double_double_double_float(
    double v0, double v1, double v2, double v3, double v4, double v5, double v6,
    double v7, float v) {
  return v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_double_double_double_double_double_double_double_double_float>:
push   %rbp
mov    %rsp,%rbp
movss  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movss  0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_double_double_double_double_double_double_double_double_float>:
movss  0x8(%rsp),%xmm8
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
addsd  %xmm6,%xmm0
addsd  %xmm7,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm8,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_double_double_double_double_double_double_double_double_float(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, float %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca float
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store float %8, float* %18
%19 = load double, double* %10
%20 = load double, double* %11
%21 = fadd double %19, %20
%22 = load double, double* %12
%23 = fadd double %21, %22
%24 = load double, double* %13
%25 = fadd double %23, %24
%26 = load double, double* %14
%27 = fadd double %25, %26
%28 = load double, double* %15
%29 = fadd double %27, %28
%30 = load double, double* %16
%31 = fadd double %29, %30
%32 = load double, double* %17
%33 = fadd double %31, %32
%34 = load float, float* %18
%35 = fpext float %34 to double
%36 = fadd double %33, %35
ret double %36
}

LLVM IR (-O2):
define double @f4_sum_pre_double_double_double_double_double_double_double_double_float(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, float %8) {
%10 = fadd double %0, %1
%11 = fadd double %10, %2
%12 = fadd double %11, %3
%13 = fadd double %12, %4
%14 = fadd double %13, %5
%15 = fadd double %14, %6
%16 = fadd double %15, %7
%17 = fpext float %8 to double
%18 = fadd double %16, %17
ret double %18
}
unsigned char convertChar(unsigned char cChar) {
  if (((cChar >= 32) && (cChar <= 128)) || (cChar >= 160))
    return cChar;
  else
    return '.';
}


x86 assembly (clang, -O0):
<convertChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x20,%eax
jl     1126 <convertChar+0x26>
movzbl -0x2(%rbp),%eax
cmp    $0x80,%eax
jle    1135 <convertChar+0x35>
movzbl -0x2(%rbp),%eax
cmp    $0xa0,%eax
jl     1140 <convertChar+0x40>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1144 <convertChar+0x44>
movb   $0x2e,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertChar>:
lea    -0x20(%rdi),%eax
cmp    $0x61,%al
mov    $0x2e,%eax
cmovb  %edi,%eax
cmp    $0xa0,%dil
cmovae %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @convertChar(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 32
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 128
br i1 %10, label %15, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = icmp sge i32 %13, 160
br i1 %14, label %15, label %17
15: ; preds = %11, %7
%16 = load i8, i8* %3
store i8 %16, i8* %2
br label %18
17: ; preds = %11
store i8 46, i8* %2
br label %18
18: ; preds = %17, %15
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @convertChar(i8 zeroext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 97
%4 = icmp ugt i8 %0, -97
%5 = or i1 %4, %3
%6 = select i1 %5, i8 %0, i8 46
ret i8 %6
}
int SND_close(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SND_close() {
ret i32 0
}
void XLockDisplay() {}


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

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

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

LLVM IR (-O2):
define void @XLockDisplay() {
ret void
}
int xmlUCSIsGreek(int code) { return (((code >= 0x0370) && (code <= 0x03FF))); }


x86 assembly (clang, -O0):
<xmlUCSIsGreek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x370,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsGreek+0x26>
cmpl   $0x3ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsGreek>:
add    $0xfffffc90,%edi
xor    %eax,%eax
cmp    $0x90,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsGreek(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 880
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 1023
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsGreek(i32 %0) {
%2 = add i32 %0, -880
%3 = icmp ult i32 %2, 144
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
long double scalbn(long double, int);
long double scalbnl(long double a1, int a2) { return scalbn(a1, a2); }


x86 assembly (clang, -O0):
<scalbnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
fldt   -0x10(%rbp)
mov    -0x14(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <scalbn@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalbnl>:
jmp    1030 <scalbn@plt>

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

LLVM IR (-O2):
define x86_fp80 @scalbnl(x86_fp80 %0, i32 %1) {
%3 = tail call x86_fp80 @scalbn(x86_fp80 %0, i32 %1)
ret x86_fp80 %3
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_byteafunc1(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_byteafunc1() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_byteafunc1() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
unsigned long hash(void *vx) {
  unsigned long x = *((unsigned *)vx);
  x = ((x >> 16) ^ x) * 0x45d9f3b;
  x = ((x >> 16) ^ x) * 0x45d9f3b;
  x = ((x >> 16) ^ x);
  return x;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
xor    -0x10(%rbp),%rax
imul   $0x45d9f3b,%rax,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
xor    -0x10(%rbp),%rax
imul   $0x45d9f3b,%rax,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%eax
mov    %rax,%rcx
shr    $0x10,%rcx
xor    %rax,%rcx
imul   $0x45d9f3b,%rcx,%rax
mov    %rax,%rcx
shr    $0x10,%rcx
xor    %rax,%rcx
imul   $0x45d9f3b,%rcx,%rcx
mov    %rcx,%rax
shr    $0x10,%rax
xor    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = zext i32 %6 to i64
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = lshr i64 %8, 16
%10 = load i64, i64* %3
%11 = xor i64 %9, %10
%12 = mul i64 %11, 73244475
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = lshr i64 %13, 16
%15 = load i64, i64* %3
%16 = xor i64 %14, %15
%17 = mul i64 %16, 73244475
store i64 %17, i64* %3
%18 = load i64, i64* %3
%19 = lshr i64 %18, 16
%20 = load i64, i64* %3
%21 = xor i64 %19, %20
store i64 %21, i64* %3
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = lshr i64 %4, 16
%6 = xor i64 %5, %4
%7 = mul nuw nsw i64 %6, 73244475
%8 = lshr i64 %7, 16
%9 = xor i64 %8, %7
%10 = mul i64 %9, 73244475
%11 = lshr i64 %10, 16
%12 = xor i64 %11, %10
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ DRM_DEBUG(char *, ...);
int drm_count_cards(void) {
  int num = 0;
  DRM_DEBUG("\n");
  num = 1;
  DRM_DEBUG("numdevs = %d\n", num);
  return num;
}


x86 assembly (clang, -O0):
<drm_count_cards>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <DRM_DEBUG@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <DRM_DEBUG@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drm_count_cards>:
push   %rax
lea    0xef4(%rip),%rdi
xor    %eax,%eax
call   1030 <DRM_DEBUG@plt>
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <DRM_DEBUG@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [14 x i8] c"numdevs = %d\0A\00"
define i32 @drm_count_cards() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (i8*, ...) @DRM_DEBUG(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [14 x i8] c"numdevs = %d\0A\00"
define i32 @drm_count_cards() {
%1 = tail call i32 (i8*, ...) @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @DRM_DEBUG(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void random_seed() { srand(time(0)); }


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

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

LLVM IR (-O0):
define void @random_seed() {
%1 = call i32 @time(i32 0)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @random_seed() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
ret void
}
void ri_thread_initialize() {}


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

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

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

LLVM IR (-O2):
define void @ri_thread_initialize() {
ret void
}
const char *zdlibVersion() { return "2.1"; }


x86 assembly (clang, -O0):
<zdlibVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zdlibVersion>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"2.1\00"
define i8* @zdlibVersion() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"2.1\00"
define i8* @zdlibVersion() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xd5() {
  Assert_real((isascii(213) == 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",
              1070, ("isascii should be 0 for 0xd5"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xd5>:
push   %rax
mov    $0xd5,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x42e,%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 0xd5\00"
define void @t_isascii_0xd5() {
%1 = call i64 @isascii(i32 213)
%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 1070, 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 0xd5\00"
define void @t_isascii_0xd5() {
%1 = tail call i64 @isascii(i32 213)
%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 1070, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main(void) {
  const unsigned long long data = 380661234567;
  unsigned int digit;
  unsigned int digitNumber = 0;
  unsigned int evenNumber = 0;
  unsigned int oddNumber = 0;
  unsigned int bitNumber = 0;
  unsigned long long copy = data;
  while (copy > 0) {
    digit = copy % 10;
    oddNumber += digit % 2;
    ++digitNumber;
    copy /= 10;
  }
  evenNumber = digitNumber - oddNumber;
  copy = data;
  while (copy > 0) {
    bitNumber += copy & 1;
    copy >>= 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movabs $0x58a12d7b87,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movabs $0x58a12d7b87,%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jbe    118d <main+0x8d>
mov    -0x30(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x30(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x30(%rbp)
jmp    1143 <main+0x43>
mov    -0x18(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movabs $0x58a12d7b87,%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jbe    11d1 <main+0xd1>
mov    -0x30(%rbp),%rcx
and    $0x1,%rcx
mov    -0x24(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11a4 <main+0xa4>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 0, i32* %1
store i64 380661234567, i64* %2
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i64 380661234567, i64* %8
br label %9
9: ; preds = %12, %0
%10 = load i64, i64* %8
%11 = icmp ugt i64 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i64, i64* %8
%14 = urem i64 %13, 10
%15 = trunc i64 %14 to i32
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = urem i32 %16, 2
%18 = load i32, i32* %6
%19 = add i32 %18, %17
store i32 %19, i32* %6
%20 = load i32, i32* %4
%21 = add i32 %20, 1
store i32 %21, i32* %4
%22 = load i64, i64* %8
%23 = udiv i64 %22, 10
store i64 %23, i64* %8
br label %9
24: ; preds = %9
%25 = load i32, i32* %4
%26 = load i32, i32* %6
%27 = sub i32 %25, %26
store i32 %27, i32* %5
store i64 380661234567, i64* %8
br label %28
28: ; preds = %31, %24
%29 = load i64, i64* %8
%30 = icmp ugt i64 %29, 0
br i1 %30, label %31, label %40
31: ; preds = %28
%32 = load i64, i64* %8
%33 = and i64 %32, 1
%34 = load i32, i32* %7
%35 = zext i32 %34 to i64
%36 = add i64 %35, %33
%37 = trunc i64 %36 to i32
store i32 %37, i32* %7
%38 = load i64, i64* %8
%39 = lshr i64 %38, 1
store i64 %39, i64* %8
br label %28
40: ; preds = %28
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void SHA512_Final(void) {}


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

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

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

LLVM IR (-O2):
define void @SHA512_Final() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DenseLinearLayer(int, int, float const *, float const *,
                                    float const *, float *);
int /*<<< orphan*/ Softmax(float *, int);
float BinaryScore(int in_size, const float *in, const float *weights,
                  const float *bias) {
  float out[2];
  DenseLinearLayer(in_size, 2, in, weights, bias, out);
  Softmax(out, 2);
  return out[1];
}


x86 assembly (clang, -O0):
<BinaryScore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    -0x28(%rbp),%r9
mov    $0x2,%esi
call   1030 <DenseLinearLayer@plt>
lea    -0x28(%rbp),%rdi
mov    $0x2,%esi
call   1040 <Softmax@plt>
movss  -0x24(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BinaryScore>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0x8(%rsp),%rbx
mov    $0x2,%esi
mov    %rbx,%r9
call   1030 <DenseLinearLayer@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <Softmax@plt>
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @BinaryScore(i32 %0, float* %1, float* %2, float* %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca [2 x float]
store i32 %0, i32* %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%10 = load i32, i32* %5
%11 = load float*, float** %6
%12 = load float*, float** %7
%13 = load float*, float** %8
%14 = getelementptr inbounds [2 x float], [2 x float]* %9, i64 0, i64 0
%15 = call i32 @DenseLinearLayer(i32 %10, i32 2, float* %11, float* %12, float* %13, float* %14)
%16 = getelementptr inbounds [2 x float], [2 x float]* %9, i64 0, i64 0
%17 = call i32 @Softmax(float* %16, i32 2)
%18 = getelementptr inbounds [2 x float], [2 x float]* %9, i64 0, i64 1
%19 = load float, float* %18
ret float %19
}

LLVM IR (-O2):
define float @BinaryScore(i32 %0, float* %1, float* %2, float* %3) {
%5 = alloca [2 x float]
%6 = bitcast [2 x float]* %5 to i8*
%7 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%8 = call i32 @DenseLinearLayer(i32 %0, i32 2, float* %1, float* %2, float* %3, float* %7)
%9 = call i32 @Softmax(float* %7, i32 2)
%10 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 1
%11 = load float, float* %10
ret float %11
}
int *foo3(int **a, int b) { return __sync_fetch_and_add(a, b); }


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rax
lock xadd %rax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo3>:
movslq %esi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i32* @foo3(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 = bitcast i32** %5 to i64*
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = ptrtoint i32* %9 to i64
%11 = atomicrmw add i64* %6, i64 %10 seq_cst
%12 = inttoptr i64 %11 to i32*
ret i32* %12
}

LLVM IR (-O2):
define i32* @foo3(i32** nocapture %0, i32 %1) {
%3 = bitcast i32** %0 to i64*
%4 = sext i32 %1 to i64
%5 = atomicrmw add i64* %3, i64 %4 seq_cst
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
unsigned xrop3_40_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk1 = D & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_40_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_40_0_0>:
mov    %edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_40_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_40_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
int g(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @g() {
ret i32 0
}