xunge/DecIR huggingface dataset:
double pathcon_nm2_twice(double x) { return x + x; }


x86 assembly (clang, -O0):
<pathcon_nm2_twice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm2_twice>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm2_twice(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fadd double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pathcon_nm2_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ fail(char *);
void *realloc(void *, size_t);
void *xrealloc(void *p, size_t s) {
  void *r = realloc(p, s);
  if (!r)
    fail("realloc failed");
  return r;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <xrealloc+0x38>
lea    0xead(%rip),%rdi
call   1030 <fail@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xrealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <fail@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"realloc failed\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fail(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void dbglog(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @dbglog(i8* nocapture %0, ...) {
ret void
}
/* Type definitions */
struct group {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int internal_getgrent_r(struct group *, char *, size_t, int *);
int /*<<< orphan*/ sss_nss_lock();
int /*<<< orphan*/ sss_nss_unlock();
enum nss_status _nss_sss_getgrent_r(struct group *result, char *buffer,
                                    size_t buflen, int *errnop) {
  enum nss_status nret;
  sss_nss_lock();
  nret = internal_getgrent_r(result, buffer, buflen, errnop);
  sss_nss_unlock();
  return nret;
}


x86 assembly (clang, -O0):
<_nss_sss_getgrent_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <sss_nss_lock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <internal_getgrent_r@plt>
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1050 <sss_nss_unlock@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_sss_getgrent_r>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <sss_nss_lock@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <internal_getgrent_r@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <sss_nss_unlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.group = type { i32 }
define i32 @_nss_sss_getgrent_r(%struct.group* %0, i8* %1, i64 %2, i32* %3) {
%5 = alloca %struct.group*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i32
store %struct.group* %0, %struct.group** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = call i32 (...) @sss_nss_lock()
%11 = load %struct.group*, %struct.group** %5
%12 = load i8*, i8** %6
%13 = load i64, i64* %7
%14 = load i32*, i32** %8
%15 = call i32 @internal_getgrent_r(%struct.group* %11, i8* %12, i64 %13, i32* %14)
store i32 %15, i32* %9
%16 = call i32 (...) @sss_nss_unlock()
%17 = load i32, i32* %9
ret i32 %17
}

LLVM IR (-O2):
%struct.group = type { i32 }
define i32 @_nss_sss_getgrent_r(%struct.group* %0, i8* %1, i64 %2, i32* %3) {
%5 = tail call i32 (...) @sss_nss_lock()
%6 = tail call i32 @internal_getgrent_r(%struct.group* %0, i8* %1, i64 %2, i32* %3)
%7 = tail call i32 (...) @sss_nss_unlock()
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int EAST_CD_0(int in) {
  FILE *fin = fopen("func_header.h.ecov", "a");
  if (fin) {
    fprintf(fin, "CD0:%d\n", in);
  }
  fclose(fin);
  return in;
}


x86 assembly (clang, -O0):
<EAST_CD_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1170 <EAST_CD_0+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EAST_CD_0>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <EAST_CD_0+0x31>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"func_header.h.ecov\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"CD0:%d\0A\00"
define i32 @EAST_CD_0(i32 returned %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @fclose(i32* %2)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ free3(void ***);
void free3int(int ***p) { free3((void ***)p); }


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

x86 assembly (clang, -O2):
<free3int>:
jmp    1030 <free3@plt>

LLVM IR (-O0):
define void @free3int(i32*** %0) {
%2 = alloca i32***
store i32*** %0, i32**** %2
%3 = load i32***, i32**** %2
%4 = bitcast i32*** %3 to i8***
%5 = call i32 @free3(i8*** %4)
ret void
}

LLVM IR (-O2):
define void @free3int(i32*** %0) {
%2 = bitcast i32*** %0 to i8***
%3 = tail call i32 @free3(i8*** %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void warn(void) { abort(); }


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

x86 assembly (clang, -O2):
<warn>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @warn() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @warn() {
%1 = tail call i32 (...) @abort()
unreachable
}
unsigned int m_idx(unsigned int row, unsigned int col,
                   unsigned int row_length) {
  return (row - 1) * row_length + col - 1;
}


x86 assembly (clang, -O0):
<m_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_idx>:
add    $0xffffffff,%edi
imul   %edx,%edi
lea    (%rsi,%rdi,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @m_idx(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sub i32 %7, 1
%9 = load i32, i32* %6
%10 = mul i32 %8, %9
%11 = load i32, i32* %5
%12 = add i32 %10, %11
%13 = sub i32 %12, 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @m_idx(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %0, -1
%5 = mul i32 %4, %2
%6 = add i32 %1, -1
%7 = add i32 %6, %5
ret i32 %7
}
/* Type definitions */
struct _stor_fstat_req {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ osapi_free(struct _stor_fstat_req *);
void stor_fstat_req_free(struct _stor_fstat_req *ptr) { osapi_free(ptr); }


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

x86 assembly (clang, -O2):
<stor_fstat_req_free>:
jmp    1030 <osapi_free@plt>

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

LLVM IR (-O2):
%struct._stor_fstat_req = type { i32 }
define void @stor_fstat_req_free(%struct._stor_fstat_req* %0) {
%2 = tail call i32 @osapi_free(%struct._stor_fstat_req* %0)
ret void
}
err(s) char *s;
{
  printf("? %s\n", s);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"? %s\0A\00"
define i32 @err(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
tail call void @exit(i32 1)
unreachable
}
void *no_copy_func(void *key) { return key; }


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

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

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

LLVM IR (-O2):
define i8* @no_copy_func(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ LOG_print(char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void mem_allocated(char *ptr, int n) {
  if (!ptr) {
    LOG_print("Error: malloc( %d ).\n", n);
    printf("Error: malloc( %d ).\n", n);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<mem_allocated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1176 <mem_allocated+0x46>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1040 <LOG_print@plt>
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_allocated>:
test   %rdi,%rdi
je     1136 <mem_allocated+0x6>
ret
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
lea    0xebd(%rip),%r14
mov    %r14,%rdi
call   1040 <LOG_print@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Error: malloc( %d ).\0A\00"
@EXIT_FAILURE = global i32 0
define void @mem_allocated(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %14, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @LOG_print(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Error: malloc( %d ).\0A\00"
@EXIT_FAILURE = global i32 0
define void @mem_allocated(i8* readnone %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = tail call i32 @LOG_print(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _io_hlt();
int /*<<< orphan*/ _write_mem8(int, int);
void main() {
  int i;
  for (i = 0xa0000; i < 0xaffff; i++) {
    _write_mem8(i, i & 0x0f);
  }
  for (;;) {
    _io_hlt();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa0000,-0x4(%rbp)
cmpl   $0xaffff,-0x4(%rbp)
jge    1158 <main+0x38>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0xf,%esi
call   1030 <_write_mem8@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <main+0xf>
jmp    115d <main+0x3d>
mov    $0x0,%al
call   1040 <_io_hlt@plt>
jmp    115d <main+0x3d>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa0000,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%esi
and    $0xf,%esi
mov    %ebx,%edi
call   1030 <_write_mem8@plt>
add    $0x1,%ebx
cmp    $0xaffff,%ebx
jne    1130 <main+0x10>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <_io_hlt@plt>
jmp    1150 <main+0x30>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 655360, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 720895
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = and i32 %7, 15
%9 = call i32 @_write_mem8(i32 %6, i32 %8)
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
br label %14
14: ; preds = %14, %13
%15 = call i32 (...) @_io_hlt()
br label %14
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 655360, %0 ], [ %5, %1 ]
%3 = and i32 %2, 15
%4 = tail call i32 @_write_mem8(i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 720895
br i1 %6, label %7, label %1
7: ; preds = %1, %7
%8 = tail call i32 (...) @_io_hlt()
br label %7
}
void PROXY_CERT_INFO_EXTENSION_new(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ stun_init_command_str(int /*<<< orphan*/, unsigned char *,
                                         size_t *);
int /*<<< orphan*/ stun_make_request(int /*<<< orphan*/);
void stun_init_request_str(uint16_t method, unsigned char *buf, size_t *len) {
  stun_init_command_str(stun_make_request(method), buf, len);
}


x86 assembly (clang, -O0):
<stun_init_request_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <stun_make_request@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <stun_init_command_str@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @stun_init_request_str(i32 %0, i8* %1, i64* %2) {
%4 = tail call i32 @stun_make_request(i32 %0)
%5 = tail call i32 @stun_init_command_str(i32 %4, i8* %1, i64* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main_fini3(void) {
  printf("main_fini3"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"main_fini3\00"
define void @main_fini3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void z_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<z_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):
<z_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @z_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 @z_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
float edge_inv_func(float f) { return (-1.0 / f) + 1.2; }


x86 assembly (clang, -O0):
<edge_inv_func>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<edge_inv_func>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @edge_inv_func(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double -1.000000e+00, %4
%6 = fadd double %5, 1.200000e+00
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @edge_inv_func(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double 1.000000e+00, %2
%4 = fsub double 1.200000e+00, %3
%5 = fptrunc double %4 to float
ret float %5
}
int int_overflow() {
  int intmax = (~0U) >> 1;
  return intmax * 2;
}


x86 assembly (clang, -O0):
<int_overflow>:
push   %rbp
mov    %rsp,%rbp
movl   $0x7fffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int_overflow() {
%1 = alloca i32
store i32 2147483647, i32* %1
%2 = load i32, i32* %1
%3 = mul nsw i32 %2, 2
ret i32 %3
}

LLVM IR (-O2):
define i32 @int_overflow() {
ret i32 -2
}
/* Variables and functions */
int /*<<< orphan*/ coloration(char *, char *);
void victoireMastermindMulti(void) {
  coloration("Le joueur 1 a gagne !\n", "32");
}


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

x86 assembly (clang, -O2):
<victoireMastermindMulti>:
lea    0xee9(%rip),%rdi
lea    0xef9(%rip),%rsi
jmp    1030 <coloration@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Le joueur 1 a gagne !\0A\00"
@.str.1 = [3 x i8] c"32\00"
define void @victoireMastermindMulti() {
%1 = call i32 @coloration(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Le joueur 1 a gagne !\0A\00"
@.str.1 = [3 x i8] c"32\00"
define void @victoireMastermindMulti() {
%1 = tail call i32 @coloration(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_2650(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_2650() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Type definitions */
struct proc_dir_entry {
  int dummy;
};
struct net {
  int dummy;
};

/* Variables and functions */
struct proc_dir_entry *proc_mkdir_data_restrict(char const *,
                                                int /*<<< orphan*/,
                                                struct proc_dir_entry *,
                                                struct net *);
struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
                                      struct proc_dir_entry *parent) {
  return proc_mkdir_data_restrict(name, 0, parent, net);
}


x86 assembly (clang, -O0):
<proc_net_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
xor    %esi,%esi
call   1030 <proc_mkdir_data_restrict@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_net_mkdir>:
mov    %rdi,%rcx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <proc_mkdir_data_restrict@plt>

LLVM IR (-O0):
%struct.net = type { i32 }
%struct.proc_dir_entry = type { i32 }
define %struct.proc_dir_entry* @proc_net_mkdir(%struct.net* %0, i8* %1, %struct.proc_dir_entry* %2) {
%4 = alloca %struct.net*
%5 = alloca i8*
%6 = alloca %struct.proc_dir_entry*
store %struct.net* %0, %struct.net** %4
store i8* %1, i8** %5
store %struct.proc_dir_entry* %2, %struct.proc_dir_entry** %6
%7 = load i8*, i8** %5
%8 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %6
%9 = load %struct.net*, %struct.net** %4
%10 = call %struct.proc_dir_entry* @proc_mkdir_data_restrict(i8* %7, i32 0, %struct.proc_dir_entry* %8, %struct.net* %9)
ret %struct.proc_dir_entry* %10
}

LLVM IR (-O2):
%struct.net = type { i32 }
%struct.proc_dir_entry = type { i32 }
define %struct.proc_dir_entry* @proc_net_mkdir(%struct.net* %0, i8* %1, %struct.proc_dir_entry* %2) {
%4 = tail call %struct.proc_dir_entry* @proc_mkdir_data_restrict(i8* %1, i32 0, %struct.proc_dir_entry* %2, %struct.net* %0)
ret %struct.proc_dir_entry* %4
}
/* Variables and functions */
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double sinh(double);
double SenoHiperbolico(double x) {
  printf(gettext("Enter a number: "));
  scanf("%lf", &x);
  return (sinh(x));
}


x86 assembly (clang, -O0):
<SenoHiperbolico>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xeac(%rip),%rdi
call   1040 <gettext@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SenoHiperbolico>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xeb3(%rip),%rdi
call   1040 <gettext@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm0
call   1030 <sinh@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @SenoHiperbolico(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i8* @gettext(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @sinh(double %6)
ret double %7
}
/* Variables and functions */
unsigned long get_sp(void) { __asm__("movl %esp, %eax"); }


x86 assembly (clang, -O0):
<get_sp>:
push   %rbp
mov    %rsp,%rbp
mov    %esp,%eax
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sp>:
mov    %esp,%eax
ret

LLVM IR (-O0):
define i64 @get_sp() {
%1 = alloca i64
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @get_sp() {
tail call void asm sideeffect "movl %esp, %eax", "~{dirflag},~{fpsr},~{flags}"()
ret i64 undef
}
int ParseFallback(int iToken) {
  (void)iToken;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ParseFallback(i32 %0) {
ret i32 0
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int __test(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int rt_test_switch_begin(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return __test(101, tv.tv_sec, tv.tv_usec);
}


x86 assembly (clang, -O0):
<rt_test_switch_begin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x65,%edi
call   1040 <__test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_test_switch_begin>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%esi
mov    $0x65,%edi
pop    %rax
jmp    1040 <__test@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @rt_test_switch_begin() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @__test(i32 101, i32 %4, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @rt_test_switch_begin() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @__test(i32 101, i32 %5, i32 %7)
ret i32 %8
}
int test35() {
lbl:
  if (1)
    goto lbl;
}


x86 assembly (clang, -O0):
<test35>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <test35+0x9>
jmp    1109 <test35+0x9>

x86 assembly (clang, -O2):
<test35>:
jmp    1100 <test35>

LLVM IR (-O0):
define i32 @test35() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define i32 @test35() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
char toupper(char);
void bp_sw_capitalise(char *word) {
  for (; *word; word++)
    *word = toupper(*word);
}


x86 assembly (clang, -O0):
<bp_sw_capitalise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <bp_sw_capitalise+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <bp_sw_capitalise+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bp_sw_capitalise(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %12, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @toupper(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
br label %12
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @bp_sw_capitalise(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_kernel_heap();
int mem_heap_unlock(int /*<<< orphan*/);
int kheap_unlock() { return mem_heap_unlock(get_kernel_heap()); }


x86 assembly (clang, -O0):
<kheap_unlock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_kernel_heap@plt>
mov    %eax,%edi
call   1040 <mem_heap_unlock@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @kheap_unlock() {
%1 = call i32 (...) @get_kernel_heap()
%2 = call i32 @mem_heap_unlock(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @kheap_unlock() {
%1 = tail call i32 (...) @get_kernel_heap()
%2 = tail call i32 @mem_heap_unlock(i32 %1)
ret i32 %2
}
void genblez() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ prg16setBank0(int);
void m93_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  prg16setBank0(((val >> 4) & 7) << 14);
}


x86 assembly (clang, -O0):
<m93_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
and    $0x7,%edi
shl    $0xe,%edi
call   1030 <prg16setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m93_setParams>:
mov    %esi,%edi
and    $0x70,%edi
shl    $0xa,%edi
jmp    1030 <prg16setBank0@plt>

LLVM IR (-O0):
define void @m93_setParams(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 = ashr i32 %6, 4
%8 = and i32 %7, 7
%9 = shl i32 %8, 14
%10 = call i32 @prg16setBank0(i32 %9)
ret void
}

LLVM IR (-O2):
define void @m93_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = and i32 %3, 114688
%5 = tail call i32 @prg16setBank0(i32 %4)
ret void
}
/* Variables and functions */
int lid_open(void) {}


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

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

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

LLVM IR (-O2):
define i32 @lid_open() {
ret i32 undef
}
void encrypt(char *Message, int pKey) {
  char c;
  while (*Message) {
    *Message = *Message ^ pKey;
    Message++;
  }
}


x86 assembly (clang, -O0):
<encrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113b <encrypt+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
xor    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <encrypt+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<encrypt>:
mov    (%rdi),%al
test   %al,%al
je     1121 <encrypt+0x21>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
xor    %sil,%al
mov    %al,-0x1(%rdi)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <encrypt+0x10>
ret

LLVM IR (-O0):
define void @encrypt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %10, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i32, i32* %4
%15 = xor i32 %13, %14
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %3
store i8 %16, i8* %17
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @encrypt(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %7
%8 = phi i8 [ %3, %5 ], [ %12, %7 ]
%9 = phi i8* [ %0, %5 ], [ %11, %7 ]
%10 = xor i8 %8, %6
store i8 %10, i8* %9
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret void
}
void ExttIPAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttIPAuxTable() {
ret void
}
/* Variables and functions */
unsigned int bar();
void foo0xf(void) {
  unsigned int a = bar();
  if (a <= 0xf)
    bar();
}


x86 assembly (clang, -O0):
<foo0xf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
ja     1133 <foo0xf+0x23>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo0xf>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0xf,%eax
ja     1125 <foo0xf+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo0xf() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ule i32 %3, 15
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @bar()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @foo0xf() {
%1 = tail call i32 (...) @bar()
%2 = icmp ult i32 %1, 16
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t cpu_to_be16(uint16_t native) { return native; }


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

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

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

LLVM IR (-O2):
define i32 @cpu_to_be16(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *realloc(void *ptr, size_t size) {
  void *ptr2 = malloc(size);
  if (ptr && size) {
    memcpy(ptr2, ptr, size);
  }
  return ptr2;
}


x86 assembly (clang, -O0):
<realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1164 <realloc+0x44>
cmpq   $0x0,-0x10(%rbp)
je     1164 <realloc+0x44>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %r15,%r15
je     114e <realloc+0x2e>
test   %rbx,%rbx
je     114e <realloc+0x2e>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i64, i64* %4
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = load i64, i64* %4
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
br label %18
18: ; preds = %13, %10, %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @realloc(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp ne i8* %0, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %9
9: ; preds = %7, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ refresh();
int curs_refresh() { refresh(); }


x86 assembly (clang, -O0):
<curs_refresh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <refresh@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @curs_refresh() {
%1 = alloca i32
%2 = call i32 (...) @refresh()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @curs_refresh() {
%1 = tail call i32 (...) @refresh()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mp_msg(int, int, char *);
scalar_t__ mp_msg_test(int, int);
void vo_draw_alpha_init(void) {
  if (mp_msg_test(30, 6)) {
    mp_msg(30, 4, "Using Unoptimized OnScreenDisplay\n");
  }
}


x86 assembly (clang, -O0):
<vo_draw_alpha_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e,%edi
mov    $0x6,%esi
call   1030 <mp_msg_test@plt>
cmp    $0x0,%rax
je     1153 <vo_draw_alpha_init+0x33>
mov    $0x1e,%edi
mov    $0x4,%esi
lea    0xeb2(%rip),%rdx
call   1040 <mp_msg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vo_draw_alpha_init>:
push   %rax
mov    $0x1e,%edi
mov    $0x6,%esi
call   1030 <mp_msg_test@plt>
test   %rax,%rax
je     114c <vo_draw_alpha_init+0x2c>
lea    0xec4(%rip),%rdx
mov    $0x1e,%edi
mov    $0x4,%esi
pop    %rax
jmp    1040 <mp_msg@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Using Unoptimized OnScreenDisplay\0A\00"
define void @vo_draw_alpha_init() {
%1 = call i64 @mp_msg_test(i32 30, i32 6)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @mp_msg(i32 30, i32 4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Using Unoptimized OnScreenDisplay\0A\00"
define void @vo_draw_alpha_init() {
%1 = tail call i64 @mp_msg_test(i32 30, i32 6)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @mp_msg(i32 30, i32 4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
void noprint(const char *fmt, ...) { return; }


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

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

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

LLVM IR (-O2):
define void @noprint(i8* nocapture %0, ...) {
ret void
}
int test_imm_87uint16_reg(unsigned short val) {
  return ((val) & (-0x87 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_87uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff79,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_87uint16_reg>:
test   $0xff79,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_87uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -135
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, void *);
int /*<<< orphan*/ stdout;
void SHOW_DEBUG(const char *s, void *address) {
  fprintf(stdout, "%s : %p\n", s, address);
}


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

x86 assembly (clang, -O2):
<SHOW_DEBUG>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"%s : %p\0A\00"
define void @SHOW_DEBUG(i8* %0, i8* %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int c;
  x = __VERIFIER_nondet_int();
  c = 1;
  while (c > 0) {
    if (x > 100) {
      x = x - 10;
      c = c - 1;
    } else {
      x = x + 11;
      c = c + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1172 <main+0x62>
cmpl   $0x64,-0x8(%rbp)
jle    115b <main+0x4b>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x5d>
mov    -0x8(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x1,%ecx
nopl   (%rax)
lea    0xb(%rax),%edx
xor    %esi,%esi
cmp    $0x65,%eax
lea    -0xa(%rax),%eax
setl   %sil
cmovl  %edx,%eax
lea    (%rcx,%rsi,2),%ecx
add    $0xffffffff,%ecx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 1, %0 ], [ %9, %2 ]
%4 = phi i32 [ %1, %0 ], [ %7, %2 ]
%5 = icmp sgt i32 %4, 100
%6 = select i1 %5, i32 -10, i32 11
%7 = add nsw i32 %6, %4
%8 = select i1 %5, i32 -1, i32 1
%9 = add nsw i32 %8, %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2
ret i32 0
}