xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
uint8_t update_ait_encryption_mode(struct list_head *m, void *p, int value) {
  ;
  return 0x00;
}


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

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

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @update_ait_encryption_mode(%struct.list_head* %0, i8* %1, i32 %2) {
%4 = alloca %struct.list_head*
%5 = alloca i8*
%6 = alloca i32
store %struct.list_head* %0, %struct.list_head** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @update_ait_encryption_mode(%struct.list_head* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
void test_asm() {
  int src = 1;
  int dst;
  asm("mov %1, %0\n\t"
      "add $1, %0"
      : "=r"(dst)
      : "r"(src));
  printf("%d\n", dst);
}


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

x86 assembly (clang, -O2):
<test_asm>:
mov    $0x1,%eax
mov    %eax,%esi
add    $0x1,%esi
lea    0xedf(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @test_asm() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
%3 = load i32, i32* %1
%4 = call i32 asm "mov $1, $0\0A\09add $$1, $0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @test_asm() {
%1 = tail call i32 asm "mov $1, $0\0A\09add $$1, $0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 1)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmACos3f(float *, float *);
void glmACos3f_(float x[3]) { glmACos3f(x, x); }


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

x86 assembly (clang, -O2):
<glmACos3f_>:
mov    %rdi,%rsi
jmp    1030 <glmACos3f@plt>

LLVM IR (-O0):
define void @glmACos3f_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float*, float** %2
%5 = call i32 @glmACos3f(float* %3, float* %4)
ret void
}

LLVM IR (-O2):
define void @glmACos3f_(float* %0) {
%2 = tail call i32 @glmACos3f(float* %0, float* %0)
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, size_t);
void *space(unsigned size) {
  void *pointer;
  if ((pointer = (void *)calloc(1, (size_t)size)) == NULL) {
  }
  return pointer;
}


x86 assembly (clang, -O0):
<space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%esi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    113d <space+0x2d>
jmp    113d <space+0x2d>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<space>:
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @space(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = call i64 @calloc(i32 1, i64 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @space(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i64 @calloc(i32 1, i64 %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
uint32_t get_time() {
  struct timeval t;
  gettimeofday(&t, 0);
  uint64_t r = t.tv_sec * 1000000;
  r += t.tv_usec;
  return r / 1000;
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%eax
add    0x10(%rsp),%eax
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @get_time() {
%1 = alloca %struct.timeval
%2 = alloca i32
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
store i32 %6, i32* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = add nsw i64 %10, %8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 1000
ret i32 %14
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @get_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = add i32 %6, %9
%11 = sdiv i32 %10, 1000
ret i32 %11
}
int qsc6085_init_modemctl_device(struct modem_ctl *mc,
                                 struct modem_data *pdata) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @qsc6085_init_modemctl_device(%struct.modem_ctl* %0, %struct.modem_data* %1) {
%3 = alloca %struct.modem_ctl*
%4 = alloca %struct.modem_data*
store %struct.modem_ctl* %0, %struct.modem_ctl** %3
store %struct.modem_data* %1, %struct.modem_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @qsc6085_init_modemctl_device(%struct.modem_ctl* nocapture readnone %0, %struct.modem_data* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
char tolower(char);
int gph_is_quitkey(char key) {
  key = tolower(key);
  if (key == 'q')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<gph_is_quitkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
jne    1143 <gph_is_quitkey+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <gph_is_quitkey+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gph_is_quitkey>:
push   %rax
call   1030 <tolower@plt>
xor    %ecx,%ecx
cmp    $0x71,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gph_is_quitkey(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call signext i8 @tolower(i8 signext %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 113
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @gph_is_quitkey(i8 signext %0) {
%2 = tail call signext i8 @tolower(i8 signext %0)
%3 = icmp eq i8 %2, 113
%4 = zext i1 %3 to i32
ret i32 %4
}
int ohci_mem_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ohci_mem_init() {
ret i32 0
}
void avformat_write_header() {}


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

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

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

LLVM IR (-O2):
define void @avformat_write_header() {
ret void
}
/* Type definitions */
struct sigaction {
  int /*<<< orphan*/ *sa_handler;
};

/* Variables and functions */
int sigaction(int, struct sigaction *, int /*<<< orphan*/ *);
int gwtUninstallSignal(struct sigaction *handler, int sig) {
  if (handler->sa_handler == NULL)
    return 0;
  return sigaction(sig, handler, NULL);
}


x86 assembly (clang, -O0):
<gwtUninstallSignal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1139 <gwtUninstallSignal+0x29>
movl   $0x0,-0x4(%rbp)
jmp    114c <gwtUninstallSignal+0x3c>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gwtUninstallSignal>:
cmpq   $0x0,(%rdi)
je     1125 <gwtUninstallSignal+0x15>
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
xor    %edx,%edx
jmp    1030 <sigaction@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.sigaction = type { i32* }
define i32 @gwtUninstallSignal(%struct.sigaction* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.sigaction*
%5 = alloca i32
store %struct.sigaction* %0, %struct.sigaction** %4
store i32 %1, i32* %5
%6 = load %struct.sigaction*, %struct.sigaction** %4
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %6, i32 0, i32 0
%8 = load i32*, i32** %7
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load %struct.sigaction*, %struct.sigaction** %4
%14 = call i32 @sigaction(i32 %12, %struct.sigaction* %13, i32* null)
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.sigaction = type { i32* }
define i32 @gwtUninstallSignal(%struct.sigaction* %0, i32 %1) {
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @sigaction(i32 %1, %struct.sigaction* %0, i32* null)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
void mmtree64_mutex_unlock(void *x, int id) {
  if (x) {
  }
  return;
}


x86 assembly (clang, -O0):
<mmtree64_mutex_unlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111b <mmtree64_mutex_unlock+0x1b>
jmp    111b <mmtree64_mutex_unlock+0x1b>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mmtree64_mutex_unlock(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 %7, label %8
7: ; preds = %2
br label %8
8: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @mmtree64_mutex_unlock(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ MAP_PRIVATE;
int /*<<< orphan*/ PROT_READ;
int /*<<< orphan*/ *mmap_or_null(int /*<<< orphan*/ *, size_t,
                                 int /*<<< orphan*/, int /*<<< orphan*/, int,
                                 int /*<<< orphan*/);
u_char *memzone_map_file_ro(int fd, size_t len) {
  return (mmap_or_null(NULL, len, PROT_READ, MAP_PRIVATE, fd, (off_t)0));
}


x86 assembly (clang, -O0):
<memzone_map_file_ro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edx
mov    0x2ea5(%rip),%rax
mov    (%rax),%ecx
mov    -0x4(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1030 <mmap_or_null@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memzone_map_file_ro>:
mov    %edi,%r8d
mov    0x2ede(%rip),%rax
mov    (%rax),%edx
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
xor    %r9d,%r9d
jmp    1030 <mmap_or_null@plt>

LLVM IR (-O0):
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
define i32* @memzone_map_file_ro(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i32, i32* @PROT_READ
%7 = load i32, i32* @MAP_PRIVATE
%8 = load i32, i32* %3
%9 = call i32* @mmap_or_null(i32* null, i64 %5, i32 %6, i32 %7, i32 %8, i32 0)
ret i32* %9
}

LLVM IR (-O2):
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
define i32* @memzone_map_file_ro(i32 %0, i64 %1) {
%3 = load i32, i32* @PROT_READ
%4 = load i32, i32* @MAP_PRIVATE
%5 = tail call i32* @mmap_or_null(i32* null, i64 %1, i32 %3, i32 %4, i32 %0, i32 0)
ret i32* %5
}
void foo762(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo762(i32 %0) {
ret void
}
void *dlopen(const char *path, int mode) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @dlopen(i8* nocapture readnone %0, i32 %1) {
ret i8* null
}
int grid_xbus_ispeer(int socktype) { return socktype == (7 * 16 + 0) ? 1 : 0; }


x86 assembly (clang, -O0):
<grid_xbus_ispeer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x70,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid_xbus_ispeer>:
xor    %eax,%eax
cmp    $0x70,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @grid_xbus_ispeer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 112
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @grid_xbus_ispeer(i32 %0) {
%2 = icmp eq i32 %0, 112
%3 = zext i1 %2 to i32
ret i32 %3
}
int main() {
  struct foo {
    unsigned a : 16;
    unsigned b : 32 __attribute__((packed));
  } x;
  x.b = 0x56789abcL;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movabs $0xffff00000000ffff,%rax
and    -0x10(%rbp),%rax
movabs $0x56789abc0000,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.foo = type { i48 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.foo
store i32 0, i32* %1
%3 = bitcast %struct.foo* %2 to i64*
%4 = load i64, i64* %3
%5 = and i64 %4, -281474976645121
%6 = or i64 %5, 95075992076288
store i64 %6, i64* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *mysql2american_date(char *, char *);
char *timlib_mysql_date2ddmmyyyy(char *destination, char *source) {
  return mysql2american_date(destination, source);
}


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

x86 assembly (clang, -O2):
<timlib_mysql_date2ddmmyyyy>:
jmp    1030 <mysql2american_date@plt>

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

LLVM IR (-O2):
define i8* @timlib_mysql_date2ddmmyyyy(i8* %0, i8* %1) {
%3 = tail call i8* @mysql2american_date(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int __sigblock(int /*<<< orphan*/);
int siggetmask(void) { return __sigblock(0); }


x86 assembly (clang, -O0):
<siggetmask>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <__sigblock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<siggetmask>:
xor    %edi,%edi
jmp    1030 <__sigblock@plt>

LLVM IR (-O0):
define i32 @siggetmask() {
%1 = call i32 @__sigblock(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @siggetmask() {
%1 = tail call i32 @__sigblock(i32 0)
ret i32 %1
}
void *unsigned_nan(unsigned short numbits) {
  char *result = calloc(1, sizeof(unsigned long));
  int i;
  for (i = 0; i < numbits / 8; i++)
    result[i] = ~'\0';
  return result;
}


x86 assembly (clang, -O0):
<unsigned_nan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x1,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1172 <unsigned_nan+0x62>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0xff,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <unsigned_nan+0x29>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_nan>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
cmp    $0x8,%bp
jb     1151 <unsigned_nan+0x31>
movzwl %bp,%edx
shr    $0x3,%rdx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define noalias i8* @unsigned_nan(i16 zeroext %0) {
%2 = tail call dereferenceable_or_null(8) i8* @calloc(i64 1, i64 8)
%3 = icmp ult i16 %0, 8
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = lshr i16 %0, 3
%6 = zext i16 %5 to i64
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int const, char const *);
int /*<<< orphan*/ stderr;
void warning_error(const int err_num, const char *err_msg) {
  fprintf(stderr, "WARNING: %d: %s\n", err_num, err_msg);
}


x86 assembly (clang, -O0):
<warning_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning_error>:
mov    %rsi,%rcx
mov    %edi,%edx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"WARNING: %d: %s\0A\00"
define void @warning_error(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
void antic_do_nothing(void) {}


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

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

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

LLVM IR (-O2):
define void @antic_do_nothing() {
ret void
}
/* Variables and functions */
void *_talloc_zero(void const *, size_t, char *);
void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count,
                         const char *name) {
  return _talloc_zero(ctx, el_size * count,
                      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/osmocom/libosmocore/"
                      "refs/heads/master/src/pseudotalloc/pseudotalloc.c"
                      ":"
                      "87");
}


x86 assembly (clang, -O0):
<_talloc_zero_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
imul   %rax,%rsi
lea    0xec3(%rip),%rdx
call   1030 <_talloc_zero@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_talloc_zero_array>:
mov    %edx,%eax
imul   %rax,%rsi
lea    0xee3(%rip),%rdx
jmp    1030 <_talloc_zero@plt>

LLVM IR (-O0):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/osmocom/libosmocore/refs/heads/master/src/pseudotalloc/pseudotalloc.c:87\00"
define i8* @_talloc_zero_array(i8* %0, i64 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i32, i32* %7
%12 = zext i32 %11 to i64
%13 = mul i64 %10, %12
%14 = call i8* @_talloc_zero(i8* %9, i64 %13, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0))
ret i8* %14
}

LLVM IR (-O2):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/osmocom/libosmocore/refs/heads/master/src/pseudotalloc/pseudotalloc.c:87\00"
define i8* @_talloc_zero_array(i8* %0, i64 %1, i32 %2, i8* nocapture readnone %3) {
%5 = zext i32 %2 to i64
%6 = mul i64 %5, %1
%7 = tail call i8* @_talloc_zero(i8* %0, i64 %6, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}
/* Variables and functions */
char *normalized_xpath(char *q) { return (!q ? NULL : (q + 1)); }


x86 assembly (clang, -O0):
<normalized_xpath>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    111e <normalized_xpath+0x1e>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    112a <normalized_xpath+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalized_xpath>:
lea    0x1(%rdi),%rax
test   %rdi,%rdi
cmove  %rdi,%rax
ret

LLVM IR (-O0):
define i8* @normalized_xpath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
br label %9
9: ; preds = %6, %5
%10 = phi i8* [ null, %5 ], [ %8, %6 ]
ret i8* %10
}

LLVM IR (-O2):
define i8* @normalized_xpath(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = select i1 %2, i8* null, i8* %3
ret i8* %4
}
int f2(struct s1 *p) {
  return (__extension__(struct s7 { int j; } *) p)->j;
}


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

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

LLVM IR (-O0):
%struct.s1 = type opaque
%struct.s7 = type { i32 }
define i32 @f2(%struct.s1* %0) {
%2 = alloca %struct.s1*
store %struct.s1* %0, %struct.s1** %2
%3 = load %struct.s1*, %struct.s1** %2
%4 = bitcast %struct.s1* %3 to %struct.s7*
%5 = getelementptr inbounds %struct.s7, %struct.s7* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.s1 = type opaque
define i32 @f2(%struct.s1* nocapture %0) {
%2 = bitcast %struct.s1* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int get_salt_size(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 4
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 4
}
/* Variables and functions */
unsigned int _andn_u32(unsigned int, unsigned int);
unsigned int test_andn_u32(unsigned int __X, unsigned int __Y) {
  return _andn_u32(__X, __Y);
}


x86 assembly (clang, -O0):
<test_andn_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_andn_u32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_andn_u32>:
jmp    1030 <_andn_u32@plt>

LLVM IR (-O0):
define i32 @test_andn_u32(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 @_andn_u32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_andn_u32(i32 %0, i32 %1) {
%3 = tail call i32 @_andn_u32(i32 %0, i32 %1)
ret i32 %3
}
void __DELETE_java_util_LinkedList_Link(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_util_LinkedList_Link(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void wl_sjl(s) char *s;
{
  wl_s(s);
  wl_j(s);
  wl_l(s);
}


x86 assembly (clang, -O0):
<wl_sjl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <wl_s@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <wl_j@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <wl_l@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_sjl>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <wl_s@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <wl_j@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <wl_l@plt>

LLVM IR (-O0):
define void @wl_sjl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @wl_s to i32 (i8*, ...)*)(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @wl_j to i32 (i8*, ...)*)(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @wl_l to i32 (i8*, ...)*)(i8* %7)
ret void
}

LLVM IR (-O2):
define void @wl_sjl(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @wl_s to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @wl_j to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @wl_l to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr,
          "Usage: %s src [dst]\n"
          "Find the most probable substitution\n",
          name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"Usage: %s src [dst]\0AFind the most probable substitution\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"Usage: %s src [dst]\0AFind the most probable substitution\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void foo_2_1_2_2_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_1_1_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IF_new_stackC();
int /*<<< orphan*/ IF_new_stackL();
int /*<<< orphan*/ IF_new_stackN();
void IF_new_stackAll(void) {
  IF_new_stackN();
  IF_new_stackC();
  IF_new_stackL();
}


x86 assembly (clang, -O0):
<IF_new_stackAll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <IF_new_stackN@plt>
mov    $0x0,%al
call   1030 <IF_new_stackC@plt>
mov    $0x0,%al
call   1040 <IF_new_stackL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_new_stackAll>:
push   %rax
xor    %eax,%eax
call   1050 <IF_new_stackN@plt>
xor    %eax,%eax
call   1030 <IF_new_stackC@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <IF_new_stackL@plt>

LLVM IR (-O0):
define void @IF_new_stackAll() {
%1 = call i32 (...) @IF_new_stackN()
%2 = call i32 (...) @IF_new_stackC()
%3 = call i32 (...) @IF_new_stackL()
ret void
}

LLVM IR (-O2):
define void @IF_new_stackAll() {
%1 = tail call i32 (...) @IF_new_stackN()
%2 = tail call i32 (...) @IF_new_stackC()
%3 = tail call i32 (...) @IF_new_stackL()
ret void
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, char *, int, int);
int shim_cacheflush(char *addr, int nbytes, int cache) {
  return (int)shim_enosys(0, addr, nbytes, cache);
}


x86 assembly (clang, -O0):
<shim_cacheflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_cacheflush>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_cacheflush(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 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i64 @shim_enosys(i32 0, i8* %7, i32 %8, i32 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @shim_cacheflush(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @shim_enosys(i32 0, i8* %0, i32 %1, i32 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
unsigned int swap_4byte(word4)
unsigned int word4;
{
  union {
    unsigned char character[4];
    unsigned int integer;
  } swap4byte;
  char temp0;
  char temp1;
  swap4byte.integer = word4;
  temp0 = swap4byte.character[0];
  temp1 = swap4byte.character[1];
  swap4byte.character[0] = swap4byte.character[3];
  swap4byte.character[1] = swap4byte.character[2];
  swap4byte.character[2] = temp1;
  swap4byte.character[3] = temp0;
  return (swap4byte.integer);
}


x86 assembly (clang, -O0):
<swap_4byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0xa(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @swap_4byte(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca i8
%5 = alloca i8
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = bitcast %union.anon* %3 to i32*
store i32 %6, i32* %7
%8 = bitcast %union.anon* %3 to [4 x i8]*
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 0
%10 = load i8, i8* %9
store i8 %10, i8* %4
%11 = bitcast %union.anon* %3 to [4 x i8]*
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 1
%13 = load i8, i8* %12
store i8 %13, i8* %5
%14 = bitcast %union.anon* %3 to [4 x i8]*
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %14, i64 0, i64 3
%16 = load i8, i8* %15
%17 = bitcast %union.anon* %3 to [4 x i8]*
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 0
store i8 %16, i8* %18
%19 = bitcast %union.anon* %3 to [4 x i8]*
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 2
%21 = load i8, i8* %20
%22 = bitcast %union.anon* %3 to [4 x i8]*
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %22, i64 0, i64 1
store i8 %21, i8* %23
%24 = load i8, i8* %5
%25 = bitcast %union.anon* %3 to [4 x i8]*
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %25, i64 0, i64 2
store i8 %24, i8* %26
%27 = load i8, i8* %4
%28 = bitcast %union.anon* %3 to [4 x i8]*
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %28, i64 0, i64 3
store i8 %27, i8* %29
%30 = bitcast %union.anon* %3 to i32*
%31 = load i32, i32* %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @swap_4byte(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void ExttProjectStatusAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttProjectStatusAuxTable() {
ret void
}
/* Variables and functions */
int hammingDistance(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 1;
  int y = 4;
  printf("%d", hammingDistance(x, y));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @hammingDistance(i32 1, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(char *, int, int, int /*<<< orphan*/ *);
int getLine(FILE *fp, char *buffer, int maxlen) {
  char temp;
  int i, j;
  for (i = 0, j = 0; i < maxlen; j++) {
    if (fread(&temp, sizeof(char), 1, fp) != 1) {
    }
  }
}


x86 assembly (clang, -O0):
<getLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1172 <getLine+0x62>
mov    -0x10(%rbp),%rcx
lea    -0x1d(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
je     115f <getLine+0x4f>
jmp    115f <getLine+0x4f>
jmp    1164 <getLine+0x54>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1131 <getLine+0x21>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLine>:
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1157 <getLine+0x47>
mov    %rdi,%rbx
lea    0x7(%rsp),%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
jmp    1140 <getLine+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @getLine(i32* nocapture %0, i8* nocapture readnone %1, i32 %2) {
%4 = alloca i8
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 @fread(i8* %4, i32 1, i32 1, i32* %0)
br label %8
8: ; preds = %8, %6
%9 = call i32 @fread(i8* %4, i32 1, i32 1, i32* %0)
br label %8
10: ; preds = %3
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
main() { printf("%s\n", "yo yo"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"yo yo\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *Unregister(void *);
int /*<<< orphan*/ starFree(void *);
void cnfFree(void *pointer) {
  pointer = (void *)((char *)pointer - Unregister(pointer));
  starFree(pointer);
}


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

x86 assembly (clang, -O2):
<cnfFree>:
push   %rbx
mov    %rdi,%rbx
call   1040 <Unregister@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <starFree@plt>

LLVM IR (-O0):
define void @cnfFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @Unregister(i8* %4)
%6 = ptrtoint i8* %3 to i64
%7 = ptrtoint i8* %5 to i64
%8 = sub i64 %6, %7
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @starFree(i8* %10)
ret void
}

LLVM IR (-O2):
define void @cnfFree(i8* %0) {
%2 = tail call i8* @Unregister(i8* %0)
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %2 to i64
%5 = sub i64 %3, %4
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @starFree(i8* %6)
ret void
}
void XShapeCombineShape() {}


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

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

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

LLVM IR (-O2):
define void @XShapeCombineShape() {
ret void
}
double potencia(double base, int expo) {
  int i;
  double pot = 1;
  for (i = 0; i < expo; i++)
    pot = pot * base;
  return pot;
}


x86 assembly (clang, -O0):
<potencia>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <potencia+0x49>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <potencia+0x20>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<potencia>:
test   %edi,%edi
jle    111b <potencia+0x1b>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1124 <potencia+0x24>
movsd  0xee7(%rip),%xmm1
jmp    1155 <potencia+0x55>
movsd  0xedd(%rip),%xmm0
ret
and    $0xfffffff8,%edi
movsd  0xed1(%rip),%xmm1
nop
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1130 <potencia+0x30>
test   %eax,%eax
je     1169 <potencia+0x69>
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1160 <potencia+0x60>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @potencia(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %6
store i32 0, i32* %5
br label %7
7: ; preds = %15, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load double, double* %6
%13 = load double, double* %3
%14 = fmul double %12, %13
store double %14, double* %6
br label %15
15: ; preds = %11
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %7
18: ; preds = %7
%19 = load double, double* %6
ret double %19
}

LLVM IR (-O2):
define double @potencia(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi double [ 1.000000e+00, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = fmul double %11, %0
%14 = fmul double %13, %0
%15 = fmul double %14, %0
%16 = fmul double %15, %0
%17 = fmul double %16, %0
%18 = fmul double %17, %0
%19 = fmul double %18, %0
%20 = fmul double %19, %0
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi double [ undef, %4 ], [ %20, %10 ]
%25 = phi double [ 1.000000e+00, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi double [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = fmul double %28, %0
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi double [ 1.000000e+00, %2 ], [ %24, %23 ], [ %30, %27 ]
ret double %34
}
/* Variables and functions */
int /*<<< orphan*/ CameraDesiredHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void CameraDesiredLogging() { UAVObjLogging(CameraDesiredHandle()); }


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

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

LLVM IR (-O0):
define void @CameraDesiredLogging() {
%1 = call i32 (...) @CameraDesiredHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @CameraDesiredLogging() {
%1 = tail call i32 (...) @CameraDesiredHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lisp_free(void *p) { free(p); }


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

LLVM IR (-O0):
define void @lisp_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 @lisp_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}