xunge/DecIR huggingface dataset:
/* Variables and functions */
int isspace(char c) {
  int temp = 0;
  switch (c) {
  case ' ':
  case '\t':
  case '\n':
    temp = 1;
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0x10(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     113a <isspace+0x3a>
jmp    1129 <isspace+0x29>
mov    -0x10(%rbp),%eax
sub    $0x20,%eax
jne    114d <isspace+0x4d>
jmp    113a <isspace+0x3a>
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x4(%rbp)
jmp    1154 <isspace+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isspace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 0, i32* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
switch i32 %6, label %8 [
i32 32, label %7
i32 9, label %7
i32 10, label %7
]
7: ; preds = %1, %1, %1
store i32 1, i32* %4
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @isspace(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 32, label %4
i32 9, label %4
i32 10, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
float h(float x) { return x * (x < 0.f ? -1.f : 1.f); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xee5(%rip),%xmm4
movss  0xee1(%rip),%xmm3
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm1
movaps %xmm1,%xmm2
andps  %xmm4,%xmm2
andnps %xmm3,%xmm1
orps   %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @h(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fcmp olt float %4, 0.000000e+00
%6 = zext i1 %5 to i64
%7 = select i1 %5, float -1.000000e+00, float 1.000000e+00
%8 = fmul float %3, %7
ret float %8
}

LLVM IR (-O2):
define float @h(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ core13_swap(char *, int);
void U_EMRTRANSPARENTBLT_swap(char *record, int torev) {
  core13_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRTRANSPARENTBLT_swap>:
jmp    1030 <core13_swap@plt>

LLVM IR (-O0):
define void @U_EMRTRANSPARENTBLT_swap(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 = load i32, i32* %4
%7 = call i32 @core13_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_EMRTRANSPARENTBLT_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core13_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ mhandle_out_of_memory(char *);
void *__xmalloc(size_t size, char *at) {
  void *ptr;
  ptr = malloc(size);
  if (!ptr)
    mhandle_out_of_memory(at);
  return ptr;
}


x86 assembly (clang, -O0):
<__xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <__xmalloc+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <mhandle_out_of_memory@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <__xmalloc+0x1c>
mov    %r14,%rdi
call   1030 <mhandle_out_of_memory@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @__xmalloc(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @mhandle_out_of_memory(i8* %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ err_exit(char *);
void close_file(int fd) {
  if (close(fd) == -1)
    err_exit("close");
}


x86 assembly (clang, -O0):
<close_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1148 <close_file+0x28>
lea    0xebd(%rip),%rdi
call   1040 <err_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file>:
push   %rax
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     112d <close_file+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <err_exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"close\00"
define void @close_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @err_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @close_file(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ dashes;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
char get_XGCValues_dashes(void *_p) { return (char)((XGCValues *)_p)->dashes; }


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

x86 assembly (clang, -O2):
<get_XGCValues_dashes>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i8 @get_XGCValues_dashes(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @get_XGCValues_dashes(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}
void glPointSizex(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glPointSizex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
main() {
  g(0x1234567887654321ll);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x87654321,%edi
call   1030 <g@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x87654321,%edi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 -2023406815)
ret i32 0
}
int mvpstb_get_aud_pts(unsigned long long *apts) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mvpstb_get_aud_pts(i64* nocapture readnone %0) {
ret i32 0
}
void mdp4_writeback_dma_stop(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_writeback_dma_stop(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Variables and functions */
char *strpbrk_or_eos(char const *, char *);
int path_length(const char *url) {
  const char *q = strpbrk_or_eos(url, "?;#");
  return q - url;
}


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

x86 assembly (clang, -O2):
<path_length>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strpbrk_or_eos@plt>
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"?;#\00"
define i32 @path_length(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strpbrk_or_eos(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"?;#\00"
define i32 @path_length(i8* %0) {
%2 = tail call i8* @strpbrk_or_eos(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = ptrtoint i8* %2 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ print_file_content(char const *);
int main() {
  const char *pathToFile = "sample_text.txt";
  print_file_content(pathToFile);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_file_content@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"sample_text.txt\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_file_content(i8* %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@.str = [16 x i8] c"sample_text.txt\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @print_file_content(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
unsigned int fn7(unsigned int x) { return x + (x % 2); }


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

x86 assembly (clang, -O2):
<fn7>:
mov    %edi,%eax
and    $0x1,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = urem i32 %4, 2
%6 = add i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @fn7(i32 %0) {
%2 = and i32 %0, 1
%3 = add i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char *);
char *strcat(char *dst, const char *src) {
  size_t offset = strlen(dst);
  strcpy(dst + offset, src);
  return dst;
}


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

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    (%rax,%rbx,1),%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @strcpy(i8* %4, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void d_free_align(double *pA) { free(pA); }


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

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

LLVM IR (-O2):
define void @d_free_align(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Type definitions */
struct parse_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ next_ch(struct parse_ctx *);
int /*<<< orphan*/ next_tok(struct parse_ctx *);
int parse_prog(struct parse_ctx *);
int parse(struct parse_ctx *pctx) {
  next_ch(pctx);
  next_tok(pctx);
  return parse_prog(pctx);
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <next_ch@plt>
mov    -0x8(%rbp),%rdi
call   1050 <next_tok@plt>
mov    -0x8(%rbp),%rdi
call   1040 <parse_prog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse>:
push   %rbx
mov    %rdi,%rbx
call   1030 <next_ch@plt>
mov    %rbx,%rdi
call   1050 <next_tok@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <parse_prog@plt>

LLVM IR (-O0):
%struct.parse_ctx = type { i32 }
define i32 @parse(%struct.parse_ctx* %0) {
%2 = alloca %struct.parse_ctx*
store %struct.parse_ctx* %0, %struct.parse_ctx** %2
%3 = load %struct.parse_ctx*, %struct.parse_ctx** %2
%4 = call i32 @next_ch(%struct.parse_ctx* %3)
%5 = load %struct.parse_ctx*, %struct.parse_ctx** %2
%6 = call i32 @next_tok(%struct.parse_ctx* %5)
%7 = load %struct.parse_ctx*, %struct.parse_ctx** %2
%8 = call i32 @parse_prog(%struct.parse_ctx* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.parse_ctx = type { i32 }
define i32 @parse(%struct.parse_ctx* %0) {
%2 = tail call i32 @next_ch(%struct.parse_ctx* %0)
%3 = tail call i32 @next_tok(%struct.parse_ctx* %0)
%4 = tail call i32 @parse_prog(%struct.parse_ctx* %0)
ret i32 %4
}
/* Variables and functions */
char *lp_get_var(int /*<<< orphan*/, char *);
char *lp_version() { return lp_get_var(0, "VERSION"); }


x86 assembly (clang, -O0):
<lp_version>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
call   1030 <lp_get_var@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lp_version>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <lp_get_var@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"VERSION\00"
define i8* @lp_version() {
%1 = call i8* @lp_get_var(i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"VERSION\00"
define i8* @lp_version() {
%1 = tail call i8* @lp_get_var(i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ print_array();
int /*<<< orphan*/ quicksort(int /*<<< orphan*/, int);
int main(int argv, char *argc[]) {
  quicksort(0, 8);
  print_array();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <quicksort@plt>
mov    $0x0,%al
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <quicksort@plt>
xor    %eax,%eax
call   1030 <print_array@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @quicksort(i32 0, i32 8)
%7 = call i32 (...) @print_array()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @quicksort(i32 0, i32 8)
%4 = tail call i32 (...) @print_array()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free2(void *p) {
  if (p != NULL) {
    free(p);
  }
}


x86 assembly (clang, -O0):
<free2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <free2+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free2>:
test   %rdi,%rdi
je     111a <free2+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @free2(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 %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @free2(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int _anetTcpServer(char *, int, char *, int /*<<< orphan*/, int);
int anetTcp6Server(char *err, int port, char *bindaddr, int backlog) {
  return _anetTcpServer(err, port, bindaddr, AF_INET6, backlog);
}


x86 assembly (clang, -O0):
<anetTcp6Server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%ecx
mov    -0x1c(%rbp),%r8d
call   1030 <_anetTcpServer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anetTcp6Server>:
mov    %ecx,%r8d
mov    0x2ece(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <_anetTcpServer@plt>

LLVM IR (-O0):
@AF_INET6 = global i32 0
define i32 @anetTcp6Server(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* @AF_INET6
%13 = load i32, i32* %8
%14 = call i32 @_anetTcpServer(i8* %9, i32 %10, i8* %11, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@AF_INET6 = global i32 0
define i32 @anetTcp6Server(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = load i32, i32* @AF_INET6
%6 = tail call i32 @_anetTcpServer(i8* %0, i32 %1, i8* %2, i32 %5, i32 %3)
ret i32 %6
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void *memalign(size_t, size_t);
void *_memalign_r(struct _reent *ptr, size_t alignment, size_t bytes) {
  return memalign(alignment, bytes);
}


x86 assembly (clang, -O0):
<_memalign_r>:
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),%rsi
call   1030 <memalign@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_memalign_r>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <memalign@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i8* @_memalign_r(%struct._reent* %0, i64 %1, i64 %2) {
%4 = alloca %struct._reent*
%5 = alloca i64
%6 = alloca i64
store %struct._reent* %0, %struct._reent** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %6
%9 = call i8* @memalign(i64 %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define noalias i8* @_memalign_r(%struct._reent* nocapture readnone %0, i64 %1, i64 %2) {
%4 = tail call i8* @memalign(i64 %1, i64 %2)
ret i8* %4
}
void iwm_debugfs_init(struct iwm_priv *iwm) {}


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

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

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

LLVM IR (-O2):
%struct.iwm_priv = type opaque
define void @iwm_debugfs_init(%struct.iwm_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char const *);
int /*<<< orphan*/ write(int, char *, int);
void ft_putendl(char const *s) {
  int i;
  ft_putstr(s);
  write(1, "\n", 1);
}


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

x86 assembly (clang, -O2):
<ft_putendl>:
push   %rax
call   1040 <ft_putstr@plt>
lea    0xed3(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
pop    %rax
jmp    1030 <write@plt>

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

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


x86 assembly (clang, -O0):
<max_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <max_size+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max_size+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_size>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max_size(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncasecmp(char const *, char const *, int /*<<< orphan*/);
int s_begins_with(const char *s, const char *begins_with) {
  return (strncasecmp(s, begins_with, strlen(begins_with)) == 0);
}


x86 assembly (clang, -O0):
<s_begins_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <strncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_begins_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <strncasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @s_begins_with(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 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncasecmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @s_begins_with(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncasecmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int lpm_reverse_integer(int i) {
  unsigned char c1, c2, c3, c4;
  c1 = i & 255;
  c2 = (i >> 8) & 255;
  c3 = (i >> 16) & 255;
  c4 = (i >> 24) & 255;
  return ((int)c1 << 24) + ((int)c2 << 16) + ((int)c3 << 8) + c4;
}


x86 assembly (clang, -O0):
<lpm_reverse_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x8(%rbp)
movzbl -0x5(%rbp),%eax
shl    $0x18,%eax
movzbl -0x6(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
movzbl -0x7(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
movzbl -0x8(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @lpm_reverse_integer(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i32, i32* %2
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
store i8 %13, i8* %4
%14 = load i32, i32* %2
%15 = ashr i32 %14, 16
%16 = and i32 %15, 255
%17 = trunc i32 %16 to i8
store i8 %17, i8* %5
%18 = load i32, i32* %2
%19 = ashr i32 %18, 24
%20 = and i32 %19, 255
%21 = trunc i32 %20 to i8
store i8 %21, i8* %6
%22 = load i8, i8* %3
%23 = zext i8 %22 to i32
%24 = shl i32 %23, 24
%25 = load i8, i8* %4
%26 = zext i8 %25 to i32
%27 = shl i32 %26, 16
%28 = add nsw i32 %24, %27
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = shl i32 %30, 8
%32 = add nsw i32 %28, %31
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = add nsw i32 %32, %34
ret i32 %35
}

LLVM IR (-O2):
define i32 @lpm_reverse_integer(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memmove(short *, short *, int);
void move_svector_1right_block(short *v, long nl, long nh) {
  memmove(v + nl + 1, v + nl, 2 * (nh - nl + 1));
}


x86 assembly (clang, -O0):
<move_svector_1right_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rdi
add    $0x2,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x1,%rax
mov    %eax,%edx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_svector_1right_block>:
lea    (%rdi,%rsi,2),%rax
lea    (%rdi,%rsi,2),%rdi
add    $0x2,%rdi
sub    %esi,%edx
add    %edx,%edx
add    $0x2,%edx
mov    %rax,%rsi
jmp    1030 <memmove@plt>

LLVM IR (-O0):
define void @move_svector_1right_block(i16* %0, i64 %1, i64 %2) {
%4 = alloca i16*
%5 = alloca i64
%6 = alloca i64
store i16* %0, i16** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i16*, i16** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i16, i16* %7, i64 %8
%10 = getelementptr inbounds i16, i16* %9, i64 1
%11 = load i16*, i16** %4
%12 = load i64, i64* %5
%13 = getelementptr inbounds i16, i16* %11, i64 %12
%14 = load i64, i64* %6
%15 = load i64, i64* %5
%16 = sub nsw i64 %14, %15
%17 = add nsw i64 %16, 1
%18 = mul nsw i64 2, %17
%19 = trunc i64 %18 to i32
%20 = call i32 @memmove(i16* %10, i16* %13, i32 %19)
ret void
}

LLVM IR (-O2):
define void @move_svector_1right_block(i16* %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i16, i16* %0, i64 %1
%5 = getelementptr inbounds i16, i16* %4, i64 1
%6 = sub nsw i64 %2, %1
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 1
%9 = add i32 %8, 2
%10 = tail call i32 @memmove(i16* %5, i16* %4, i32 %9)
ret void
}
int cli_quit(int client_fd, char **parameters, int numparameters) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @cli_quit(i32 %0, i8** nocapture readnone %1, i32 %2) {
ret i32 1
}
int k_quicksort_cmp(int data1, int data2) { return data1 - data2; }


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

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

LLVM IR (-O0):
define i32 @k_quicksort_cmp(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @k_quicksort_cmp(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ join_style;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
int get_XGCValues_join_style(void *_p) {
  return (int)((XGCValues *)_p)->join_style;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XGCValues_join_style(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XGCValues_join_style(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
indreg0adrreg1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (*p0) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<indreg0adrreg1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  0x10f444(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0adrreg1_set>:
movss  0x10f444(%rcx),%xmm0
movss  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define i32 @indreg0adrreg1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = getelementptr inbounds float, float* %16, i64 277777
%18 = load float, float* %17
%19 = load float*, float** %12
store float %18, float* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @indreg0adrreg1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = getelementptr inbounds float, float* %5, i64 277777
%8 = load float, float* %7
store float %8, float* %4
ret i32 undef
}
int strcmp(const char *str1, const char *str2) {
  while (*str1 == *str2) {
    if (*str1 == '\0') {
      return 0;
    }
    str1++;
    str2++;
  }
  return (*str1 - *str2);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    115b <strcmp+0x5b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113e <strcmp+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    116e <strcmp+0x6e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
cmp    %cl,%al
jne    1124 <strcmp+0x24>
mov    $0x1,%edx
nopl   (%rax)
test   %al,%al
je     112d <strcmp+0x2d>
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
add    $0x1,%rdx
cmp    %cl,%al
je     1110 <strcmp+0x10>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2, %11
%7 = phi i8 [ %14, %11 ], [ %3, %2 ]
%8 = phi i8* [ %13, %11 ], [ %1, %2 ]
%9 = phi i8* [ %12, %11 ], [ %0, %2 ]
%10 = icmp eq i8 %7, 0
br i1 %10, label %23, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %12
%15 = load i8, i8* %13
%16 = icmp eq i8 %14, %15
br i1 %16, label %6, label %17
17: ; preds = %11, %2
%18 = phi i8 [ %3, %2 ], [ %14, %11 ]
%19 = phi i8 [ %4, %2 ], [ %15, %11 ]
%20 = sext i8 %18 to i32
%21 = sext i8 %19 to i32
%22 = sub nsw i32 %20, %21
br label %23
23: ; preds = %6, %17
%24 = phi i32 [ %22, %17 ], [ 0, %6 ]
ret i32 %24
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello 6502 world from libc!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Hello 6502 world from libc!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [28 x i8] c"Hello 6502 world from libc!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void atomic_or_int(volatile int *var, int v) {
  asm volatile("lock ;"
               " "
               "orl %1, %0"
               " \n\t"
               : "=m"(*var)
               : "ri"(v), "m"(*var)
               : "cc", "memory");
}


x86 assembly (clang, -O0):
<atomic_or_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rdx
lock or %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_or_int>:
lock or %esi,(%rdi)
ret

LLVM IR (-O0):
define void @atomic_or_int(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 = load i32*, i32** %3
ret void
}

LLVM IR (-O2):
define void @atomic_or_int(i32* %0, i32 %1) {
tail call void asm sideeffect "lock ; orl $1, $0 \0A\09", "=*m,ri,*m,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 %1, i32* elementtype(i32) %0)
ret void
}
/* Type definitions */
struct in6_addr {
  int /*<<< orphan*/ *s6_addr32;
};
typedef int /*<<< orphan*/ __be32;

/* Variables and functions */
int /*<<< orphan*/ __ipv6_addr_set_half(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
void ipv6_addr_set(struct in6_addr *addr, __be32 w1, __be32 w2, __be32 w3,
                   __be32 w4) {
  __ipv6_addr_set_half(&addr->s6_addr32[0], w1, w2);
  __ipv6_addr_set_half(&addr->s6_addr32[2], w3, w4);
}


x86 assembly (clang, -O0):
<ipv6_addr_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <__ipv6_addr_set_half@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
add    $0x8,%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <__ipv6_addr_set_half@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_addr_set>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <__ipv6_addr_set_half@plt>
mov    (%rbx),%rdi
add    $0x8,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <__ipv6_addr_set_half@plt>

LLVM IR (-O0):
%struct.in6_addr = type { i32* }
define void @ipv6_addr_set(%struct.in6_addr* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.in6_addr*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.in6_addr* %0, %struct.in6_addr** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.in6_addr*, %struct.in6_addr** %6
%12 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @__ipv6_addr_set_half(i32* %14, i32 %15, i32 %16)
%18 = load %struct.in6_addr*, %struct.in6_addr** %6
%19 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %18, i32 0, i32 0
%20 = load i32*, i32** %19
%21 = getelementptr inbounds i32, i32* %20, i64 2
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = call i32 @__ipv6_addr_set_half(i32* %21, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
%struct.in6_addr = type { i32* }
define void @ipv6_addr_set(%struct.in6_addr* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %0, i64 0, i32 0
%7 = load i32*, i32** %6
%8 = tail call i32 @__ipv6_addr_set_half(i32* %7, i32 %1, i32 %2)
%9 = load i32*, i32** %6
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = tail call i32 @__ipv6_addr_set_half(i32* %10, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage() {
  printf("WikkaFS: \n"
         "usage: wikkafs [OPTS] mountpoint\n"
         "  -d : fuse debug (message on stderr)\n"
         "  -f : fuse foreground (message on stderr)\n"
         "  -w : wiki user (should be set otherwise updated/created will be as "
         "orphans !)\n"
         "  -t : mysql prefix for table\n"
         "  -u : sql username (default: wiki)\n"
         "  -p : sql password (default: wiki)\n"
         "  -b : sql database to use (default: wiki)\n"
         "  -h : host (default: 127.0.0.1)\n"
         "  -l : port to use (default: 3306)\n"
         "  -s : use SSL with connect to SQL\n"
         "\n"
         "You can also use WIKKAFS as env variable\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [495 x i8] c"WikkaFS: \0Ausage: wikkafs [OPTS] mountpoint\0A -d : fuse debug (message on stderr)\0A -f : fuse foreground (message on stderr)\0A -w : wiki user (should be set otherwise updated/created will be as orphans !)\0A -t : mysql prefix for table\0A -u : sql username (default: wiki)\0A -p : sql password (default: wiki)\0A -b : sql database to use (default: wiki)\0A -h : host (default: 127.0.0.1)\0A -l : port to use (default: 3306)\0A -s : use SSL with connect to SQL\0A\0AYou can also use WIKKAFS as env variable\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([495 x i8], [495 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [494 x i8] c"WikkaFS: \0Ausage: wikkafs [OPTS] mountpoint\0A -d : fuse debug (message on stderr)\0A -f : fuse foreground (message on stderr)\0A -w : wiki user (should be set otherwise updated/created will be as orphans !)\0A -t : mysql prefix for table\0A -u : sql username (default: wiki)\0A -p : sql password (default: wiki)\0A -b : sql database to use (default: wiki)\0A -h : host (default: 127.0.0.1)\0A -l : port to use (default: 3306)\0A -s : use SSL with connect to SQL\0A\0AYou can also use WIKKAFS as env variable\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([494 x i8], [494 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *lstrip(char *);
char *rstrip(char *);
char *trim(char *ptr) {
  ptr = lstrip(ptr);
  ptr = rstrip(ptr);
  return ptr;
}


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

x86 assembly (clang, -O2):
<trim>:
push   %rax
call   1040 <lstrip@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <rstrip@plt>

LLVM IR (-O0):
define i8* @trim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @lstrip(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @rstrip(i8* %5)
store i8* %6, i8** %2
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @trim(i8* %0) {
%2 = tail call i8* @lstrip(i8* %0)
%3 = tail call i8* @rstrip(i8* %2)
ret i8* %3
}
/* Type definitions */
struct itimerspec {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, int, struct itimerspec const *, struct itimerspec *);
int timerfd_settime(int ufc, int flags, const struct itimerspec *utmr,
                    struct itimerspec *otmr) {
  return syscall(286, ufc, flags, utmr, otmr);
}


x86 assembly (clang, -O0):
<timerfd_settime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x11e,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerfd_settime>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x11e,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.itimerspec = type { i32 }
define i32 @timerfd_settime(i32 %0, i32 %1, %struct.itimerspec* %2, %struct.itimerspec* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.itimerspec*
%8 = alloca %struct.itimerspec*
store i32 %0, i32* %5
store i32 %1, i32* %6
store %struct.itimerspec* %2, %struct.itimerspec** %7
store %struct.itimerspec* %3, %struct.itimerspec** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load %struct.itimerspec*, %struct.itimerspec** %7
%12 = load %struct.itimerspec*, %struct.itimerspec** %8
%13 = call i32 @syscall(i32 286, i32 %9, i32 %10, %struct.itimerspec* %11, %struct.itimerspec* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.itimerspec = type { i32 }
define i32 @timerfd_settime(i32 %0, i32 %1, %struct.itimerspec* %2, %struct.itimerspec* %3) {
%5 = tail call i32 @syscall(i32 286, i32 %0, i32 %1, %struct.itimerspec* %2, %struct.itimerspec* %3)
ret i32 %5
}
/* Type definitions */
struct io_stream {
  int dummy;
};

/* Variables and functions */
char *io_get_mime_type(struct io_stream *s) { return NULL; }


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

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

LLVM IR (-O0):
%struct.io_stream = type { i32 }
define i8* @io_get_mime_type(%struct.io_stream* %0) {
%2 = alloca %struct.io_stream*
store %struct.io_stream* %0, %struct.io_stream** %2
ret i8* null
}

LLVM IR (-O2):
%struct.io_stream = type { i32 }
define noalias i8* @io_get_mime_type(%struct.io_stream* nocapture readnone %0) {
ret i8* null
}