xunge/DecIR huggingface dataset:
void pollen_net_transport_BufferManager_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @pollen_net_transport_BufferManager_targetInit__I() {
ret void
}
void empty() { ; }


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

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

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

LLVM IR (-O2):
define void @empty() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void print_vertexsignature(unsigned int sig) {
  int id, label, index;
  label = sig & 0xff;
  sig = sig >> 8;
  id = sig & 0xff;
  sig = sig >> 8;
  index = sig & 0xff;
  printf("id of the vertex %d, label of the edge %d, index of the next vertex "
         "%d \n",
         id, label, index);
}


x86 assembly (clang, -O0):
<print_vertexsignature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_vertexsignature>:
mov    %edi,%eax
movzbl %al,%edx
movzbl %ah,%esi
shr    $0x10,%eax
movzbl %al,%ecx
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [73 x i8] c"id of the vertex %d, label of the edge %d, index of the next vertex %d \0A\00"
define void @print_vertexsignature(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = and i32 %6, 255
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = lshr i32 %8, 8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 255
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = lshr i32 %12, 8
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = and i32 %14, 255
store i32 %15, i32* %5
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [73 x i8] c"id of the vertex %d, label of the edge %d, index of the next vertex %d \0A\00"
define void @print_vertexsignature(i32 %0) {
%2 = and i32 %0, 255
%3 = lshr i32 %0, 8
%4 = and i32 %3, 255
%5 = lshr i32 %0, 16
%6 = and i32 %5, 255
%7 = tail call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %2, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void doSomethingWithACharPointer(char *charPointer) {
  *charPointer++;
  printf("*charPointer: %c\n", *charPointer);
}


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

x86 assembly (clang, -O2):
<doSomethingWithACharPointer>:
movsbl 0x1(%rdi),%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"*charPointer: %c\0A\00"
define void @doSomethingWithACharPointer(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Greetings!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Greetings!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Greetings!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void print_bits_reverse(unsigned long n) {
  int i;
  unsigned long m;
  m = 0x8000000000000000;
  for (i = 0; i < 64; i++) {
  }
}


x86 assembly (clang, -O0):
<print_bits_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x8000000000000000,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    113a <print_bits_reverse+0x3a>
jmp    112c <print_bits_reverse+0x2c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <print_bits_reverse+0x1d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @print_bits_reverse(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
store i64 %0, i64* %2
store i64 -9223372036854775808, i64* %4
store i32 0, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 64
br i1 %7, label %8, label %12
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @print_bits_reverse(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void popad() { db(0x61); }


x86 assembly (clang, -O0):
<popad>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<popad>:
mov    $0x61,%edi
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @popad() {
%1 = call i32 @db(i32 97)
ret void
}

LLVM IR (-O2):
define void @popad() {
%1 = tail call i32 @db(i32 97)
ret void
}
int main() {
  int z$1 = ({
    int x$1 = 0;
    x$1;
  });
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
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 i32
%3 = alloca i32
store i32 0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
store i32 %5, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_ISGID;
int file_setgid(const struct stat *stat) {
  return (stat->st_mode & S_ISGID) == 0;
}


x86 assembly (clang, -O0):
<file_setgid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ecb(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_setgid>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
test   %ecx,(%rdi)
sete   %al
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_ISGID = global i32 0
define i32 @file_setgid(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load i32, i32* @S_ISGID
%7 = and i32 %5, %6
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_ISGID = global i32 0
define i32 @file_setgid(%struct.stat* nocapture %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @S_ISGID
%5 = and i32 %4, %3
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void func3(a) char *a;
{ foobar("Hello world"); }


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

x86 assembly (clang, -O2):
<func3>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <foobar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
define void @func3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @foobar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
define void @func3(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @foobar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
int compare_values(const void *_value1, const void *_value2) {
  int *value1 = (int *)_value1;
  int *value2 = (int *)_value2;
  if (*value1 > *value2) {
    return 1;
  }
  if (*value1 < *value2) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compare_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    113a <compare_values+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    115f <compare_values+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    1158 <compare_values+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <compare_values+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_values>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_values(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
%8 = icmp slt i32 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ hybris_set_mutex_attr(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
pthread_mutex_t *hybris_alloc_init_mutex(int android_mutex) {
  pthread_mutex_t *realmutex = malloc(sizeof(pthread_mutex_t));
  pthread_mutexattr_t attr;
  hybris_set_mutex_attr(android_mutex, &attr);
  pthread_mutex_init(realmutex, &attr);
  return realmutex;
}


x86 assembly (clang, -O0):
<hybris_alloc_init_mutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1030 <hybris_set_mutex_attr@plt>
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <pthread_mutex_init@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hybris_alloc_init_mutex>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%r14
mov    %ebp,%edi
mov    %r14,%rsi
call   1030 <hybris_set_mutex_attr@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <pthread_mutex_init@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @hybris_alloc_init_mutex(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32* @malloc(i32 4)
store i32* %5, i32** %3
%6 = load i32, i32* %2
%7 = call i32 @hybris_set_mutex_attr(i32 %6, i32* %4)
%8 = load i32*, i32** %3
%9 = call i32 @pthread_mutex_init(i32* %8, i32* %4)
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
define i32* @hybris_alloc_init_mutex(i32 %0) {
%2 = alloca i32
%3 = tail call i32* @malloc(i32 4)
%4 = bitcast i32* %2 to i8*
%5 = call i32 @hybris_set_mutex_attr(i32 %0, i32* %2)
%6 = call i32 @pthread_mutex_init(i32* %3, i32* %2)
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int file_exists(const char *name) {
  FILE *fp;
  if ((fp = fopen(name, "r"))) {
    fclose(fp);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115f <file_exists+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1166 <file_exists+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
int cmp_lt_wchar(const void *p, const void *q) {
  const wchar_t a = *(const wchar_t *)p;
  const wchar_t b = *(const wchar_t *)q;
  do {
    if (a > b)
      return +1;
    if (b > a)
      return -1;
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<cmp_lt_wchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    113c <cmp_lt_wchar+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_lt_wchar+0x5d>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    1156 <cmp_lt_wchar+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_lt_wchar+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_lt_wchar>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rax,%rcx
setg   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_lt_wchar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp sgt i64 %6, %4
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ ErrorExit(char *, char *);
void usage(char *prog) {
  ErrorExit("Usage: %s main_title <titles> main_gamecode <gamecodes> "
            "<compressionlevels> <files>\n",
            prog);
}


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

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

LLVM IR (-O0):
@.str = [85 x i8] c"Usage: %s main_title <titles> main_gamecode <gamecodes> <compressionlevels> <files>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ErrorExit(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [85 x i8] c"Usage: %s main_title <titles> main_gamecode <gamecodes> <compressionlevels> <files>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @ErrorExit(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f(int x, int y) {
  int z;
  z = y;
  if (x == z)
    if (y == x + 10)
      abort();
  return 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    114d <f+0x3d>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jne    1148 <f+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    114d <f+0x3d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* %5
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 10
%14 = icmp eq i32 %11, %13
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %10
br label %18
18: ; preds = %17, %2
ret i32 0
}

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

/* Variables and functions */
int pthread_rwlock_timedrdlock(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) {
  return pthread_rwlock_timedrdlock(rwlock, NULL);
}


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

x86 assembly (clang, -O2):
<pthread_rwlock_rdlock>:
xor    %esi,%esi
jmp    1030 <pthread_rwlock_timedrdlock@plt>

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

LLVM IR (-O2):
define i32 @pthread_rwlock_rdlock(i32* %0) {
%2 = tail call i32 @pthread_rwlock_timedrdlock(i32* %0, i32* null)
ret i32 %2
}
void fun(void) {
  float *fp;
#pragma acc parallel copy(fp [0:2], fp [0:2])
  ;
#pragma acc kernels present_or_copyin(fp[3]) present_or_copyout(fp [7:4])
  ;
#pragma acc data create(fp[:10]) deviceptr(fp)
  ;
#pragma acc data create(fp) present(fp)
  ;
}


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

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

LLVM IR (-O0):
define void @fun() {
%1 = alloca float*
ret void
}

LLVM IR (-O2):
define void @fun() {
ret void
}
float UI_ProportionalSizeScale(int style) {
  if (style & 0x00000010) {
    return 0.75;
  }
  if (style & 0x00020000) {
    return 0.4;
  }
  return 1.00;
}


x86 assembly (clang, -O0):
<UI_ProportionalSizeScale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1128 <UI_ProportionalSizeScale+0x28>
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1158 <UI_ProportionalSizeScale+0x58>
mov    -0x8(%rbp),%eax
and    $0x20000,%eax
cmp    $0x0,%eax
je     114b <UI_ProportionalSizeScale+0x4b>
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1158 <UI_ProportionalSizeScale+0x58>
movss  0xead(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_ProportionalSizeScale>:
xor    %eax,%eax
test   $0x20000,%edi
sete   %cl
test   $0x10,%dil
je     111a <UI_ProportionalSizeScale+0x1a>
movss  0xeef(%rip),%xmm0
ret
mov    %cl,%al
lea    0xedd(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @UI_ProportionalSizeScale(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store float 7.500000e-01, float* %2
br label %14
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, 131072
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store float 0x3FD99999A0000000, float* %2
br label %14
13: ; preds = %8
store float 1.000000e+00, float* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @UI_ProportionalSizeScale(i32 %0) {
%2 = and i32 %0, 16
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 131072
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, float 1.000000e+00, float 0x3FD99999A0000000
%7 = select i1 %3, float %6, float 7.500000e-01
ret float %7
}
void insertC(char c, char *s) {
  char *w;
  w = s;
  while (*w != '\0')
    w++;
  while (w >= s) {
    *(w + 1) = *w;
    w--;
  }
  *s = c;
}


x86 assembly (clang, -O0):
<insertC>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1137 <insertC+0x37>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1116 <insertC+0x16>
jmp    113c <insertC+0x3c>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1168 <insertC+0x68>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    113c <insertC+0x3c>
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insertC>:
lea    -0x1(%rsi),%rax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,0x1(%rax)
lea    0x1(%rax),%rax
jne    1110 <insertC+0x10>
cmp    %rsi,%rax
jae    1123 <insertC+0x23>
mov    %dil,(%rsi)
ret
movb   $0x0,0x1(%rax)
nopw   0x0(%rax,%rax,1)
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jb     111f <insertC+0x1f>
movzbl (%rax),%ecx
mov    %cl,0x1(%rax)
jmp    1130 <insertC+0x30>

LLVM IR (-O0):
define void @insertC(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
br label %7
7: ; preds = %12, %2
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %5
br label %7
15: ; preds = %7
br label %16
16: ; preds = %20, %15
%17 = load i8*, i8** %5
%18 = load i8*, i8** %4
%19 = icmp uge i8* %17, %18
br i1 %19, label %20, label %27
20: ; preds = %16
%21 = load i8*, i8** %5
%22 = load i8, i8* %21
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 1
store i8 %22, i8* %24
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i32 -1
store i8* %26, i8** %5
br label %16
27: ; preds = %16
%28 = load i8, i8* %3
%29 = load i8*, i8** %4
store i8 %28, i8* %29
ret void
}

LLVM IR (-O2):
define void @insertC(i8 signext %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = icmp ult i8* %4, %1
br i1 %9, label %20, label %10
10: ; preds = %8
%11 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %11
%12 = getelementptr inbounds i8, i8* %4, i64 -1
%13 = icmp ult i8* %12, %1
br i1 %13, label %20, label %14
14: ; preds = %10, %14
%15 = phi i8* [ %18, %14 ], [ %12, %10 ]
%16 = load i8, i8* %15
%17 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %16, i8* %17
%18 = getelementptr inbounds i8, i8* %15, i64 -1
%19 = icmp ult i8* %18, %1
br i1 %19, label %20, label %14
20: ; preds = %14, %10, %8
store i8 %0, i8* %1
ret void
}
void history_purge() {}


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

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

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

LLVM IR (-O2):
define void @history_purge() {
ret void
}
int support_fpu_flag(int flag __attribute__((unused))) { return 1; }


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

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

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

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

/* Variables and functions */
int Z_ERRNO;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *, char *, char const *);
char *gzerror(int /*<<< orphan*/, int *);
void gzfatal(gzFile f, char *what) {
  int err;
  const char *msg = gzerror(f, &err);
  error(1, (err == Z_ERRNO) ? errno : 0, "%s: %s", what, msg);
}


x86 assembly (clang, -O0):
<gzfatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1030 <gzerror@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%eax
jne    1162 <gzfatal+0x42>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    116c <gzfatal+0x4c>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    116c <gzfatal+0x4c>
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x1,%edi
lea    0xe7d(%rip),%rdx
call   1040 <error@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gzfatal>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xc(%rsp),%rsi
call   1030 <gzerror@plt>
mov    0xc(%rsp),%ecx
mov    0x2eab(%rip),%rdx
xor    %esi,%esi
cmp    (%rdx),%ecx
jne    114c <gzfatal+0x2c>
mov    0x2e8e(%rip),%rcx
mov    (%rcx),%esi
lea    0xead(%rip),%rdx
mov    $0x1,%edi
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@Z_ERRNO = global i32 0
@errno = global i32 0
@.str = [7 x i8] c"%s: %s\00"
define void @gzfatal(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i32, i32* %3
%8 = call i8* @gzerror(i32 %7, i32* %5)
store i8* %8, i8** %6
%9 = load i32, i32* %5
%10 = load i32, i32* @Z_ERRNO
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* @errno
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 0, %14 ]
%17 = load i8*, i8** %4
%18 = load i8*, i8** %6
%19 = call i32 @error(i32 1, i32 %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
@Z_ERRNO = global i32 0
@errno = global i32 0
@.str = [7 x i8] c"%s: %s\00"
define void @gzfatal(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i8* @gzerror(i32 %0, i32* %3)
%6 = load i32, i32* %3
%7 = load i32, i32* @Z_ERRNO
%8 = icmp eq i32 %6, %7
%9 = load i32, i32* @errno
%10 = select i1 %8, i32 %9, i32 0
%11 = call i32 @error(i32 1, i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xe5() {
  Assert_real((isalpha(229) == 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_isalpha.c",
              1150, ("isalpha should be 0 for 0xe5"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xe5>:
push   %rax
mov    $0xe5,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x47e,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xe5\00"
define void @t_isalpha_0xe5() {
%1 = call i64 @isalpha(i32 229)
%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 1150, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xe5\00"
define void @t_isalpha_0xe5() {
%1 = tail call i64 @isalpha(i32 229)
%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 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void Dico_Long_Stop(int nb_longs) {}


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

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

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

LLVM IR (-O2):
define void @Dico_Long_Stop(i32 %0) {
ret void
}
/* Type definitions */
struct buf {
  int dummy;
};

/* Variables and functions */
int do_slurp(int, struct buf *, int /*<<< orphan*/);
int fslurp(int fd, struct buf *b) { return do_slurp(fd, b, 0); }


x86 assembly (clang, -O0):
<fslurp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <do_slurp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fslurp>:
xor    %edx,%edx
jmp    1030 <do_slurp@plt>

LLVM IR (-O0):
%struct.buf = type { i32 }
define i32 @fslurp(i32 %0, %struct.buf* %1) {
%3 = alloca i32
%4 = alloca %struct.buf*
store i32 %0, i32* %3
store %struct.buf* %1, %struct.buf** %4
%5 = load i32, i32* %3
%6 = load %struct.buf*, %struct.buf** %4
%7 = call i32 @do_slurp(i32 %5, %struct.buf* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.buf = type { i32 }
define i32 @fslurp(i32 %0, %struct.buf* %1) {
%3 = tail call i32 @do_slurp(i32 %0, %struct.buf* %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_null_node_get_number(void *p, double *number, char **error) {
  mdea_error(error, "Expected number, got null");
  return -1;
}


x86 assembly (clang, -O0):
<mdea_null_node_get_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_null_node_get_number>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Expected number, got null\00"
define i32 @mdea_null_node_get_number(i8* %0, double* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca double*
%6 = alloca i8**
store i8* %0, i8** %4
store double* %1, double** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
%8 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [26 x i8] c"Expected number, got null\00"
define i32 @mdea_null_node_get_number(i8* nocapture readnone %0, double* nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
float MIN(float r, float g, float b) {
  float tmp;
  if (r < g) {
    tmp = r;
  } else {
    tmp = g;
  }
  if (tmp < b) {
    return (tmp);
  } else {
    return (b);
  }
}


x86 assembly (clang, -O0):
<MIN>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <MIN+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    113f <MIN+0x3f>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1161 <MIN+0x61>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116b <MIN+0x6b>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIN>:
minss  %xmm1,%xmm0
minss  %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @MIN(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = select i1 %4, float %0, float %1
%6 = fcmp olt float %5, %2
%7 = select i1 %6, float %5, float %2
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct serial_port {
  int dummy;
};

/* Variables and functions */
scalar_t__ serial_read(struct serial_port *, int /*<<< orphan*/ *, int);
void clear_buffer(struct serial_port *port) {
  uint8_t b;
  while (serial_read(port, &b, 1))
    ;
}


x86 assembly (clang, -O0):
<clear_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x1,%edx
call   1030 <serial_read@plt>
cmp    $0x0,%rax
je     113d <clear_buffer+0x2d>
jmp    111c <clear_buffer+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_buffer>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <serial_read@plt>
test   %rax,%rax
jne    1120 <clear_buffer+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.serial_port = type { i32 }
define void @clear_buffer(%struct.serial_port* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = call i64 @serial_read(%struct.serial_port* %0, i32* %2, i32 1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
ret void
}
/* Type definitions */
typedef int n;

/* Variables and functions */
scalar_t__ is_little();
unsigned endian_little_to_host(unsigned n) {
  return is_little() ? n
                     : ((n) << 24 | ((n)&0xff00) << 8 | (n) >> 24 |
                        ((n)&0xff0000) >> 8);
}


x86 assembly (clang, -O0):
<endian_little_to_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <is_little@plt>
cmp    $0x0,%rax
je     1137 <endian_little_to_host+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <endian_little_to_host+0x54>
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x18,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endian_little_to_host>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <is_little@plt>
test   %rax,%rax
mov    %ebx,%eax
bswap  %eax
cmovne %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @endian_little_to_host(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @is_little()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %21
7: ; preds = %1
%8 = load i32, i32* %2
%9 = shl i32 %8, 24
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = lshr i32 %14, 24
%16 = or i32 %13, %15
%17 = load i32, i32* %2
%18 = and i32 %17, 16711680
%19 = lshr i32 %18, 8
%20 = or i32 %16, %19
br label %21
21: ; preds = %7, %5
%22 = phi i32 [ %6, %5 ], [ %20, %7 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @endian_little_to_host(i32 %0) {
%2 = tail call i64 (...) @is_little()
%3 = icmp eq i64 %2, 0
%4 = tail call i32 @llvm.bswap.i32(i32 %0)
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
unsigned int bi_reverse(unsigned int code, int len) {
  register unsigned int res;
  {
    res = 0U;
    while (1) {
      res |= code & 1U;
      code >>= 1;
      res <<= 1;
      len--;
      if (!(len > 0)) {
        break;
      }
    }
    return (res >> 1);
  }
}


x86 assembly (clang, -O0):
<bi_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1147 <bi_reverse+0x47>
jmp    114c <bi_reverse+0x4c>
jmp    1111 <bi_reverse+0x11>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_reverse>:
add    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
and    $0x1,%eax
or     %ecx,%eax
shr    %edi
lea    (%rax,%rax,1),%ecx
add    $0xffffffff,%esi
cmp    $0x1,%esi
jg     1110 <bi_reverse+0x10>
and    $0x7fffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @bi_reverse(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ %1, %2 ], [ %11, %3 ]
%6 = phi i32 [ 0, %2 ], [ %10, %3 ]
%7 = and i32 %4, 1
%8 = or i32 %6, %7
%9 = lshr i32 %4, 1
%10 = shl i32 %8, 1
%11 = add nsw i32 %5, -1
%12 = icmp sgt i32 %5, 1
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = and i32 %8, 2147483647
ret i32 %14
}
void stmp3xxx_ram_freq_scale(struct stmp3xxx_emi_scaling_data *p) {}


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

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

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

LLVM IR (-O2):
%struct.stmp3xxx_emi_scaling_data = type opaque
define void @stmp3xxx_ram_freq_scale(%struct.stmp3xxx_emi_scaling_data* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tdestroy(void *, void (*)(void *));
void tdestroy_finalize(void **tree, void (*cb)(void *)) {
  void *root = *tree;
  *tree = NULL;
  tdestroy(root, cb);
}


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

x86 assembly (clang, -O2):
<tdestroy_finalize>:
mov    (%rdi),%rax
movq   $0x0,(%rdi)
mov    %rax,%rdi
jmp    1030 <tdestroy@plt>

LLVM IR (-O0):
define void @tdestroy_finalize(i8** %0, void (i8*)* %1) {
%3 = alloca i8**
%4 = alloca void (i8*)*
%5 = alloca i8*
store i8** %0, i8*** %3
store void (i8*)* %1, void (i8*)** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %3
store i8* null, i8** %8
%9 = load i8*, i8** %5
%10 = load void (i8*)*, void (i8*)** %4
%11 = call i32 @tdestroy(i8* %9, void (i8*)* %10)
ret void
}

LLVM IR (-O2):
define void @tdestroy_finalize(i8** nocapture %0, void (i8*)* %1) {
%3 = load i8*, i8** %0
store i8* null, i8** %0
%4 = tail call i32 @tdestroy(i8* %3, void (i8*)* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ *wcsncpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                            size_t);
wchar_t *ya_wcscpy(wchar_t *dest, const wchar_t *src, size_t n) {
  assert(dest && src);
  memset(dest, 0, n * sizeof(wchar_t));
  return wcsncpy(dest, src, n - 1);
}


x86 assembly (clang, -O0):
<ya_wcscpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     115f <ya_wcscpy+0x2f>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1040 <wcsncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ya_wcscpy>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
lea    0x0(,%rbx,4),%rdx
mov    %r15,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
add    $0xffffffffffffffff,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <wcsncpy@plt>

LLVM IR (-O0):
define i32* @ya_wcscpy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32*, i32** %5
%11 = icmp ne i32* %10, null
br label %12
12: ; preds = %9, %3
%13 = phi i1 [ false, %3 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32*, i32** %4
%17 = load i64, i64* %6
%18 = mul i64 %17, 4
%19 = call i32 @memset(i32* %16, i32 0, i64 %18)
%20 = load i32*, i32** %4
%21 = load i32*, i32** %5
%22 = load i64, i64* %6
%23 = sub i64 %22, 1
%24 = call i32* @wcsncpy(i32* %20, i32* %21, i64 %23)
ret i32* %24
}

LLVM IR (-O2):
define i32* @ya_wcscpy(i32* %0, i32* %1, i64 %2) {
%4 = icmp ne i32* %0, null
%5 = icmp ne i32* %1, null
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = shl i64 %2, 2
%10 = tail call i32 @memset(i32* %0, i32 0, i64 %9)
%11 = add i64 %2, -1
%12 = tail call i32* @wcsncpy(i32* %0, i32* %1, i64 %11)
ret i32* %12
}