xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void error_quit(const char *msg) {
  printf("%s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<error_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_quit>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @error_quit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void strspacetoplus(char *str) {
  register int x;
  for (x = 0; str[x]; x++)
    if (str[x] == ' ')
      str[x] = '+';
}


x86 assembly (clang, -O0):
<strspacetoplus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <strspacetoplus+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1142 <strspacetoplus+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x2b,(%rax,%rcx,1)
jmp    1147 <strspacetoplus+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strspacetoplus+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strspacetoplus>:
jmp    1117 <strspacetoplus+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2b,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x20,%al
je     1110 <strspacetoplus+0x10>
test   %al,%al
jne    1113 <strspacetoplus+0x13>
ret

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

LLVM IR (-O2):
define void @strspacetoplus(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 32, label %6
]
6: ; preds = %2
store i8 43, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void err_sys(const char *msg) {
  printf("yassl error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<err_sys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_sys>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"yassl error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err_sys(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"yassl error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err_sys(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void libmapping_matrix_free(void *m) {
  void **p = (void **)m;
  free(p[0]);
  free(p);
}


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

x86 assembly (clang, -O2):
<libmapping_matrix_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @libmapping_matrix_free(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = bitcast i8* %8 to i8**
%10 = call i32 @free(i8** %9)
%11 = load i8**, i8*** %3
%12 = call i32 @free(i8** %11)
ret void
}

LLVM IR (-O2):
define void @libmapping_matrix_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = bitcast i8* %0 to i8***
%4 = load i8**, i8*** %3
%5 = tail call i32 @free(i8** %4)
%6 = tail call i32 @free(i8** %2)
ret void
}
void RTAvlrPVGetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrPVGetBestFit() {
ret void
}
/* Variables and functions */
char toupper(char c) { return ((c >= 'a' && c <= 'z') ? c - 32 : c); }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <toupper+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <toupper+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <toupper+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @toupper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 32
br label %17
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
br label %17
17: ; preds = %14, %10
%18 = phi i32 [ %13, %10 ], [ %16, %14 ]
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @toupper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_make_secure_parent_dir() {
  printf("NOT IMPLEMENTED:"
         "pa_make_secure_parent_dir"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"NOT IMPLEMENTED:pa_make_secure_parent_dir\0A\00"
define i32 @pa_make_secure_parent_dir() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_make_secure_parent_dir\00"
define i32 @pa_make_secure_parent_dir() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ pthread_exit(void *);
scalar_t__ pthread_self();
void *thr_fn2(void *arg) {
  printf("thread 2: ID is %u\n", (unsigned int)pthread_self());
  pthread_exit((void *)0);
}


x86 assembly (clang, -O0):
<thr_fn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr_fn2>:
push   %rax
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"thread 2: ID is %u\0A\00"
define i8* @thr_fn2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @pthread_self()
%5 = trunc i64 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @pthread_exit(i8* null)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [20 x i8] c"thread 2: ID is %u\0A\00"
define noalias i8* @thr_fn2(i8* nocapture readnone %0) {
%2 = tail call i64 (...) @pthread_self()
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @pthread_exit(i8* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ SubChannelOrganizationClean();
int FIC_DEC_SubChInfoClean(void) {
  SubChannelOrganizationClean();
  return 0;
}


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

x86 assembly (clang, -O2):
<FIC_DEC_SubChInfoClean>:
push   %rax
xor    %eax,%eax
call   1030 <SubChannelOrganizationClean@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @FIC_DEC_SubChInfoClean() {
%1 = call i32 (...) @SubChannelOrganizationClean()
ret i32 0
}

LLVM IR (-O2):
define i32 @FIC_DEC_SubChInfoClean() {
%1 = tail call i32 (...) @SubChannelOrganizationClean()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lendo(int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/);
void *leitor(void *ptr) {
  int indice = (int)(size_t)ptr;
  while (1) {
    lendo(indice);
  }
  pthread_exit(0);
}


x86 assembly (clang, -O0):
<leitor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <lendo@plt>
jmp    1123 <leitor+0x13>

x86 assembly (clang, -O2):
<leitor>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
call   1030 <lendo@plt>
jmp    1120 <leitor+0x10>

LLVM IR (-O0):
define i8* @leitor(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
br label %7
7: ; preds = %1, %7
%8 = load i32, i32* %3
%9 = call i32 @lendo(i32 %8)
br label %7
}

LLVM IR (-O2):
define noalias i8* @leitor(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
br label %4
4: ; preds = %4, %1
%5 = tail call i32 @lendo(i32 %3)
br label %4
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
#pragma omp parallel
  { printf("Hello World... from thread = %d\n", omp_get_thread_num()); }
}


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

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

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

LLVM IR (-O2):
@.str = [33 x i8] c"Hello World... from thread = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void ol_backend_time_posix_uninit(struct ol_backend_time_s *self) {
  (void)(self);
}


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

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

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

LLVM IR (-O2):
%struct.ol_backend_time_s = type opaque
define void @ol_backend_time_posix_uninit(%struct.ol_backend_time_s* nocapture %0) {
ret void
}
void upPrivilege() {}


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

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

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

LLVM IR (-O2):
define void @upPrivilege() {
ret void
}
int test_imm_19uint8_mem(unsigned char *val) {
  return ((*val) & (0x19 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_19uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x19,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_19uint8_mem>:
testb  $0x19,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_19uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 25
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_19uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 25
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void ssd1306_showFrameBuffer(struct ssd1306Display *display) {}


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

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

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

LLVM IR (-O2):
%struct.ssd1306Display = type opaque
define void @ssd1306_showFrameBuffer(%struct.ssd1306Display* nocapture %0) {
ret void
}
/* Variables and functions */
int syscall3(int, int, int, int);
int Open(const char *filename, int flags, int mode) {
  return syscall3(0x05, (int)filename, flags, mode);
}


x86 assembly (clang, -O0):
<Open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x5,%edi
call   1030 <syscall3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Open>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x5,%edi
jmp    1030 <syscall3@plt>

LLVM IR (-O0):
define i32 @Open(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i32
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @syscall3(i32 5, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @Open(i8* %0, i32 %1, i32 %2) {
%4 = ptrtoint i8* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @syscall3(i32 5, i32 %5, i32 %1, i32 %2)
ret i32 %6
}
int time_ms() {
  int int_num = 2;
  int tmp;
  __asm__("int $0x80" : "=a"(tmp) : "a"(int_num));
  return tmp;
}


x86 assembly (clang, -O0):
<time_ms>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
int    $0x80
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @time_ms() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 asm "int $$0x80", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @time_ms() {
%1 = tail call i32 asm "int $$0x80", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char const *);
void ft_putendl(char const *s) {
  ft_putstr(s);
  ft_putstr("\n");
}


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

x86 assembly (clang, -O2):
<ft_putendl>:
push   %rax
call   1030 <ft_putstr@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <ft_putstr@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @ft_putendl(i8* %0) {
%2 = tail call i32 @ft_putstr(i8* %0)
%3 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int int_max(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<int_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <int_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <int_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @int_max(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @int_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
double cos(double);
double sin(double);
double newtan(double x) { return sin(x) / cos(x); }


x86 assembly (clang, -O0):
<newtan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newtan>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @newtan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
%5 = load double, double* %2
%6 = call double @cos(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @newtan(double %0) {
%2 = tail call double @sin(double %0)
%3 = tail call double @cos(double %0)
%4 = fdiv double %2, %3
ret double %4
}
void glEGLImageTargetTexture2DOES(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glEGLImageTargetTexture2DOES() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo2(long long);
void foo1(long long param1) {
  foo2(param1);
  return;
}


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

x86 assembly (clang, -O2):
<foo1>:
jmp    1030 <foo2@plt>

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

LLVM IR (-O2):
define void @foo1(i64 %0) {
%2 = tail call i32 @foo2(i64 %0)
ret void
}
/* Variables and functions */
long __infer_nondet_long_int();
long int lrint(double x) { return __infer_nondet_long_int(); }


x86 assembly (clang, -O0):
<lrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_long_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @lrint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i64 (...) @__infer_nondet_long_int()
ret i64 %3
}

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = tail call i64 (...) @__infer_nondet_long_int()
ret i64 %2
}
/* Variables and functions */
bool nrf91_errata_20(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_20() {
ret i32 0
}
void gdk_list_visuals() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
void readflip(FILE *in, char *inbuf) {
  int y;
  for (y = 0; y < 144; y++) {
    fread(inbuf + 224 * (143 - y), 224, 1, in);
  }
}


x86 assembly (clang, -O0):
<readflip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x90,-0x14(%rbp)
jge    116c <readflip+0x5c>
mov    -0x10(%rbp),%rdi
mov    $0x8f,%eax
sub    -0x14(%rbp),%eax
imul   $0xe0,%eax,%eax
cltq
add    %rax,%rdi
mov    -0x8(%rbp),%rcx
mov    $0xe0,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <readflip+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readflip>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x7d20,%ebx
lea    (%r14,%rbx,1),%rdi
mov    $0xe0,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1030 <fread@plt>
add    $0xffffffffffffff20,%rbx
cmp    $0xffffffffffffff20,%rbx
jne    1120 <readflip+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @readflip(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 144
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = sub nsw i32 143, %11
%13 = mul nsw i32 224, %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %10, i64 %14
%16 = load i32*, i32** %3
%17 = call i32 @fread(i8* %15, i32 224, i32 1, i32* %16)
br label %18
18: ; preds = %9
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @readflip(i32* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %9, %3 ]
%5 = sub nuw nsw i64 143, %4
%6 = mul nuw nsw i64 %5, 224
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = tail call i32 @fread(i8* %7, i32 224, i32 1, i32* %0)
%9 = add nuw nsw i64 %4, 1
%10 = icmp eq i64 %9, 144
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void console_move_cursor(int x, int y) {
  putchar(0x1b);
  putchar('Y');
  putchar(' ' + y);
  putchar(' ' + x);
}


x86 assembly (clang, -O0):
<console_move_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x59,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_move_cursor>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x59,%edi
call   1030 <putchar@plt>
add    $0x20,%bl
movsbl %bl,%edi
call   1030 <putchar@plt>
add    $0x20,%bpl
movsbl %bpl,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @console_move_cursor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @putchar(i8 signext 27)
%6 = call i32 @putchar(i8 signext 89)
%7 = load i32, i32* %4
%8 = add nsw i32 32, %7
%9 = trunc i32 %8 to i8
%10 = call i32 @putchar(i8 signext %9)
%11 = load i32, i32* %3
%12 = add nsw i32 32, %11
%13 = trunc i32 %12 to i8
%14 = call i32 @putchar(i8 signext %13)
ret void
}

LLVM IR (-O2):
define void @console_move_cursor(i32 %0, i32 %1) {
%3 = tail call i32 @putchar(i8 signext 27)
%4 = tail call i32 @putchar(i8 signext 89)
%5 = trunc i32 %1 to i8
%6 = add i8 %5, 32
%7 = tail call i32 @putchar(i8 signext %6)
%8 = trunc i32 %0 to i8
%9 = add i8 %8, 32
%10 = tail call i32 @putchar(i8 signext %9)
ret void
}
/* Type definitions */
struct inode_dir_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct inode_dir_ctx *);
void inode_dir_ctx_put(struct inode_dir_ctx *ctx) { free(ctx); }


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

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

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

LLVM IR (-O2):
%struct.inode_dir_ctx = type { i32 }
define void @inode_dir_ctx_put(%struct.inode_dir_ctx* nocapture %0) {
%2 = tail call i32 @free(%struct.inode_dir_ctx* %0)
ret void
}
void ckd_free_3d(void ***ptr) {
  free(ptr[0][0]);
  free(ptr[0]);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<ckd_free_3d>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ckd_free_3d(i8*** %0) {
%2 = alloca i8***
store i8*** %0, i8**** %2
%3 = load i8***, i8**** %2
%4 = getelementptr inbounds i8**, i8*** %3, i64 0
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i8***, i8**** %2
%9 = getelementptr inbounds i8**, i8*** %8, i64 0
%10 = load i8**, i8*** %9
%11 = bitcast i8** %10 to i8*
%12 = load i8***, i8**** %2
%13 = bitcast i8*** %12 to i8*
ret void
}

LLVM IR (-O2):
define void @ckd_free_3d(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast i8*** %0 to i8**
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = bitcast i8*** %0 to i8*
tail call void @free(i8* %6)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_xrl_to_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "XRL   "
          "0x%02X"
          ", A                   ",
          direct);
}


x86 assembly (clang, -O0):
<fprint_xrl_to_direct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_xrl_to_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"XRL 0x%02X, A \00"
define void @fprint_xrl_to_direct(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"XRL 0x%02X, A \00"
define void @fprint_xrl_to_direct(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
char *make(v)
char *v;
{
  register char *p;
  if (v) {
    movstr(v, p = alloc(length(v)));
    return (p);
  } else
    return (0);
}


x86 assembly (clang, -O0):
<make>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1182 <make+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <length@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1040 <alloc@plt>
mov    -0x20(%rbp),%rdi
movslq %eax,%rsi
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1050 <movstr@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118a <make+0x5a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115e <make+0x2e>
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <length@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1040 <alloc@plt>
movslq %eax,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <movstr@plt>
jmp    1161 <make+0x31>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @make(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @length to i32 (i8*, ...)*)(i8* %9)
%11 = call i32 (i32, ...) bitcast (i32 (...)* @alloc to i32 (i32, ...)*)(i32 %10)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @movstr to i32 (i8*, i8*, ...)*)(i8* %8, i8* %13)
%15 = load i8*, i8** %4
store i8* %15, i8** %2
br label %17
16: ; preds = %1
store i8* null, i8** %2
br label %17
17: ; preds = %16, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @make(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @length to i32 (i8*, ...)*)(i8* %0)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @alloc to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @movstr to i32 (i8*, i8*, ...)*)(i8* %0, i8* %7)
br label %9
9: ; preds = %1, %3
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
char func_c();
char func_b() {
  if (func_c() != 'c') {
    exit(3);
  }
  return 'b';
}


x86 assembly (clang, -O0):
<func_b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <func_c@plt>
movsbl %al,%eax
cmp    $0x63,%eax
je     1141 <func_b+0x21>
mov    $0x3,%edi
call   1040 <exit@plt>
mov    $0x62,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_b>:
push   %rax
xor    %eax,%eax
call   1030 <func_c@plt>
cmp    $0x63,%al
jne    1130 <func_b+0x10>
mov    $0x62,%al
pop    %rcx
ret
mov    $0x3,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define signext i8 @func_b() {
%1 = call signext i8 (...) @func_c()
%2 = sext i8 %1 to i32
%3 = icmp ne i32 %2, 99
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 3)
unreachable
6: ; preds = %0
ret i8 98
}

LLVM IR (-O2):
define signext i8 @func_b() {
%1 = tail call signext i8 (...) @func_c()
%2 = icmp eq i8 %1, 99
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 3)
unreachable
5: ; preds = %0
ret i8 98
}
/* Variables and functions */
scalar_t__ is_bookmark(int const);
int /*<<< orphan*/ silent_remove_bookmark(int const);
int /*<<< orphan*/ status_bar_message(char *);
void remove_bookmark(const int x) {
  if (is_bookmark(x))
    silent_remove_bookmark(x);
  else
    status_bar_message("Could not find mark");
}


x86 assembly (clang, -O0):
<remove_bookmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_bookmark@plt>
cmp    $0x0,%rax
je     115a <remove_bookmark+0x2a>
mov    -0x4(%rbp),%edi
call   1050 <silent_remove_bookmark@plt>
jmp    1166 <remove_bookmark+0x36>
lea    0xe9f(%rip),%rdi
call   1040 <status_bar_message@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_bookmark>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_bookmark@plt>
test   %rax,%rax
je     1145 <remove_bookmark+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <silent_remove_bookmark@plt>
lea    0xeb4(%rip),%rdi
pop    %rbx
jmp    1040 <status_bar_message@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Could not find mark\00"
define void @remove_bookmark(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @is_bookmark(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @silent_remove_bookmark(i32 %7)
br label %11
9: ; preds = %1
%10 = call i32 @status_bar_message(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Could not find mark\00"
define void @remove_bookmark(i32 %0) {
%2 = tail call i64 @is_bookmark(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @silent_remove_bookmark(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @status_bar_message(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret void
}
char *langRomTypeEseSCC512() { return "512kB Ese-SCC"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"512kB Ese-SCC\00"
define i8* @langRomTypeEseSCC512() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"512kB Ese-SCC\00"
define i8* @langRomTypeEseSCC512() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ kore_parse_config_file(int /*<<< orphan*/ *);
int configure_include(char *path) {
  FILE *fp;
  if ((fp = fopen(path, "r")) == NULL)
    fatal("failed to open include '%s'", path);
  kore_parse_config_file(fp);
  (void)fclose(fp);
  return (1);
}


x86 assembly (clang, -O0):
<configure_include>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    117a <configure_include+0x3a>
mov    -0x8(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1060 <fatal@plt>
mov    -0x10(%rbp),%rdi
call   1030 <kore_parse_config_file@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<configure_include>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xeb2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116a <configure_include+0x2a>
lea    0xea0(%rip),%rdi
mov    %r14,%rsi
call   1060 <fatal@plt>
mov    %rbx,%rdi
call   1030 <kore_parse_config_file@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [28 x i8] c"failed to open include '%s'\00"
define i32 @configure_include(i8* %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 %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @kore_parse_config_file(i32* %2)
%8 = tail call i32 @fclose(i32* %2)
ret i32 1
}
void oil_test_get_value(void) {}


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

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

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

LLVM IR (-O2):
define void @oil_test_get_value() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlcat(void *, char *, int);
void f5() { strlcat(((void *)0), "abcdef", 6); }


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
lea    0xee1(%rip),%rsi
mov    $0x6,%edx
call   1030 <strlcat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
mov    $0x6,%edx
jmp    1030 <strlcat@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"abcdef\00"
define void @f5() {
%1 = tail call i32 @strlcat(i8* null, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_stroke_data();
void stroke_init(void) { init_stroke_data(); }


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

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

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

LLVM IR (-O2):
define void @stroke_init() {
%1 = tail call i32 (...) @init_stroke_data()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ level1();
int /*<<< orphan*/ simputn(int);
int /*<<< orphan*/ simputs(char *);
main() {
  simputs("Hello World!\n");
  simputs("The answer is ");
  simputn(6 * 7);
  simputs("\n");
  level1();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <simputs@plt>
lea    0xec7(%rip),%rdi
call   1030 <simputs@plt>
mov    $0x2a,%edi
call   1050 <simputn@plt>
lea    0xeaf(%rip),%rdi
call   1030 <simputs@plt>
mov    $0x0,%al
call   1040 <level1@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <simputs@plt>
lea    0xeca(%rip),%rdi
call   1030 <simputs@plt>
mov    $0x2a,%edi
call   1050 <simputn@plt>
lea    0xeb2(%rip),%rdi
call   1030 <simputs@plt>
xor    %eax,%eax
call   1040 <level1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [15 x i8] c"The answer is \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = call i32 @simputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @simputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @simputn(i32 42)
%4 = call i32 @simputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @level1()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [15 x i8] c"The answer is \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @simputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @simputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @simputn(i32 42)
%4 = tail call i32 @simputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (...) @level1()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ x;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 40;
  printf("\n%d", (((int)(x) + ((4) - 1)) & ~((4) - 1)));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x28,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x3,%esi
and    $0xfffffffc,%esi
lea    0xed1(%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
mov    $0x28,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 40)
ret i32 0
}
void WDTimerStatusClear(void) {
  (*((volatile unsigned long *)(0x40003008))) = 0;
}


x86 assembly (clang, -O0):
<WDTimerStatusClear>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40003008,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WDTimerStatusClear>:
movq   $0x0,0x40003008
ret

LLVM IR (-O0):
define void @WDTimerStatusClear() {
store volatile i64 0, i64* inttoptr (i64 1073754120 to i64*)
ret void
}

LLVM IR (-O2):
define void @WDTimerStatusClear() {
store volatile i64 0, i64* inttoptr (i64 1073754120 to i64*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, char *, char *);
void om_text_print_keykey_entry(FILE *fp, char *key1, char *key2, int num) {
  fprintf(fp, "%d)    %s: %s\n", num, key1, key2);
}


x86 assembly (clang, -O0):
<om_text_print_keykey_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_text_print_keykey_entry>:
mov    %rdx,%r8
mov    %rsi,%rax
lea    0xee3(%rip),%rsi
mov    %ecx,%edx
mov    %rax,%rcx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%d) %s: %s\0A\00"
define void @om_text_print_keykey_entry(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %8
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d) %s: %s\0A\00"
define void @om_text_print_keykey_entry(i32* nocapture %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int ap_get_single_string_command(int, int, char *, int);
int ap_get_stream_type(int session, char *str) {
  return (ap_get_single_string_command(session, 0xcc1c, str, 256));
}


x86 assembly (clang, -O0):
<ap_get_stream_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0xcc1c,%esi
mov    $0x100,%ecx
call   1030 <ap_get_single_string_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_get_stream_type>:
mov    %rsi,%rdx
mov    $0xcc1c,%esi
mov    $0x100,%ecx
jmp    1030 <ap_get_single_string_command@plt>

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

LLVM IR (-O2):
define i32 @ap_get_stream_type(i32 %0, i8* %1) {
%3 = tail call i32 @ap_get_single_string_command(i32 %0, i32 52252, i8* %1, i32 256)
ret i32 %3
}