xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __sigpause(int sig_or_mask, int is_sig) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__sigpause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sigpause>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__sigpause(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__sigpause(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void get_architecture(void) { printf("MIPS"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"MIPS\00"
define void @get_architecture() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strchr(char *, int);
int foo(int a) {
  int b;
  b = 0;
  if ("/"[1] != '\0')
    if (strchr("/", a))
      b = 1;
  return b;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
void hline(int ch, int len) {}


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

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

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

LLVM IR (-O2):
define void @hline(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float gasto, total;
  scanf("%f", &gasto);
  total = gasto + 0.1 * gasto;
  printf("%.2f\n", total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebc(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %8, double %6)
%10 = fptrunc double %9 to float
store float %10, float* %3
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.000000e-01, double %5)
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void strcat_symbolic_dst_length(char *dst) {
  strcat(dst, "1234");
  if (strlen(dst) < 4)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcat_symbolic_dst_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x4,%eax
jge    114e <strcat_symbolic_dst_length+0x2e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat_symbolic_dst_length>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strcat@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
define void @strcat_symbolic_dst_length(i8* %0) {
%2 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @strlen(i8* %0)
ret void
}
void a2d_ASN1_OBJECT(void) {}


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

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

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

LLVM IR (-O2):
define void @a2d_ASN1_OBJECT() {
ret void
}
int bytes(int n) { return (n + 7) / 8; }


x86 assembly (clang, -O0):
<bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes>:
lea    0x7(%rdi),%ecx
lea    0xe(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = sdiv i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @bytes(i32 %0) {
%2 = add nsw i32 %0, 7
%3 = sdiv i32 %2, 8
ret i32 %3
}
/* Variables and functions */
char *convert(double, char *, int, int *, int *, int);
char *f_cvt(double value, char *buf, int ndigit, int *decpt, int *sign) {
  return convert(value, buf, ndigit, decpt, sign, 1);
}


x86 assembly (clang, -O0):
<f_cvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <convert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_cvt>:
mov    $0x1,%r8d
jmp    1030 <convert@plt>

LLVM IR (-O0):
define i8* @f_cvt(double %0, i8* %1, i32 %2, i32* %3, i32* %4) {
%6 = alloca double
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
store double %0, double* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load double, double* %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = call i8* @convert(double %11, i8* %12, i32 %13, i32* %14, i32* %15, i32 1)
ret i8* %16
}

LLVM IR (-O2):
define i8* @f_cvt(double %0, i8* %1, i32 %2, i32* %3, i32* %4) {
%6 = tail call i8* @convert(double %0, i8* %1, i32 %2, i32* %3, i32* %4, i32 1)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, unsigned long);
int copyin(void *src, void *dst, unsigned long size) {
  memcpy(dst, src, size);
  return 0;
}


x86 assembly (clang, -O0):
<copyin>:
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    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyin>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @copyin(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i64 %2)
ret i32 0
}
/* Variables and functions */
int close(int);
int raw_close(int sockd) { return close(sockd); }


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

x86 assembly (clang, -O2):
<raw_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @raw_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Type definitions */
struct editor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ replace(struct editor *, int, int /*<<< orphan*/,
                           unsigned char *, int, int);
void insert(struct editor *ed, int pos, unsigned char *buf, int bufsize) {
  replace(ed, pos, 0, buf, bufsize, 1);
}


x86 assembly (clang, -O0):
<insert>:
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),%rcx
mov    -0x1c(%rbp),%r8d
xor    %edx,%edx
mov    $0x1,%r9d
call   1030 <replace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert>:
mov    %ecx,%r8d
mov    %rdx,%rcx
xor    %edx,%edx
mov    $0x1,%r9d
jmp    1030 <replace@plt>

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

LLVM IR (-O2):
%struct.editor = type { i32 }
define void @insert(%struct.editor* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @replace(%struct.editor* %0, i32 %1, i32 0, i8* %2, i32 %3, i32 1)
ret void
}
int dma_get_cache_alignment(void) {
  extern int ia64_max_cacheline_size;
  return ia64_max_cacheline_size;
}


x86 assembly (clang, -O0):
<dma_get_cache_alignment>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma_get_cache_alignment>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@ia64_max_cacheline_size = external global i32
define i32 @dma_get_cache_alignment() {
%1 = load i32, i32* @ia64_max_cacheline_size
ret i32 %1
}

LLVM IR (-O2):
@ia64_max_cacheline_size = external global i32
define i32 @dma_get_cache_alignment() {
%1 = load i32, i32* @ia64_max_cacheline_size
ret i32 %1
}
/* Type definitions */
struct chanfd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ chanfd_send(struct chanfd *, int const *);
void chanfd_send_int(struct chanfd *channel, const int *elem) {
  chanfd_send(channel, elem);
}


x86 assembly (clang, -O0):
<chanfd_send_int>:
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 <chanfd_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chanfd_send_int>:
jmp    1030 <chanfd_send@plt>

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

LLVM IR (-O2):
%struct.chanfd = type { i32 }
define void @chanfd_send_int(%struct.chanfd* %0, i32* %1) {
%3 = tail call i32 @chanfd_send(%struct.chanfd* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_world(int a) { printf("hello world"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define void @hello_world(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getch();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  printf("%i , %c\n", getch(), getch());
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getch@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getch@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getch@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getch@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%i , %c\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getch()
%2 = tail call i32 (...) @getch()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int wait(int *);
void sig_child(int signo) {
  int pid;
  int ret;
  pid = wait(&ret);
}


x86 assembly (clang, -O0):
<sig_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <wait@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_child>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <wait@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @sig_child(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @wait(i32* %2)
ret void
}
int test_imm_12int64_highword_reg(long long val) {
  return ((val >> 32) & (0x12 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_12int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x12,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_12int64_highword_reg>:
movabs $0x1200000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_12int64_highword_reg(i64 %0) {
%2 = and i64 %0, 77309411328
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ TCODE_LOCK_WRAP_ADD;
int /*<<< orphan*/ do_lock_request(int /*<<< orphan*/);
void do_wrap_add(void) { do_lock_request(TCODE_LOCK_WRAP_ADD); }


x86 assembly (clang, -O0):
<do_wrap_add>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <do_lock_request@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_wrap_add>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <do_lock_request@plt>

LLVM IR (-O0):
@TCODE_LOCK_WRAP_ADD = global i32 0
define void @do_wrap_add() {
%1 = load i32, i32* @TCODE_LOCK_WRAP_ADD
%2 = call i32 @do_lock_request(i32 %1)
ret void
}

LLVM IR (-O2):
@TCODE_LOCK_WRAP_ADD = global i32 0
define void @do_wrap_add() {
%1 = load i32, i32* @TCODE_LOCK_WRAP_ADD
%2 = tail call i32 @do_lock_request(i32 %1)
ret void
}
/* Variables and functions */
float FloatFR_logDualis(int);
float FloatFR_getNumOctaves(int a, int b) {
  ;
  ;
  ;
  ;
  ;
  return (FloatFR_logDualis(b) - FloatFR_logDualis(a));
}


x86 assembly (clang, -O0):
<FloatFR_getNumOctaves>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <FloatFR_logDualis@plt>
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <FloatFR_logDualis@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FloatFR_getNumOctaves>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <FloatFR_logDualis@plt>
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1030 <FloatFR_logDualis@plt>
movss  0xc(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @FloatFR_getNumOctaves(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call float @FloatFR_logDualis(i32 %5)
%7 = load i32, i32* %3
%8 = call float @FloatFR_logDualis(i32 %7)
%9 = fsub float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @FloatFR_getNumOctaves(i32 %0, i32 %1) {
%3 = tail call float @FloatFR_logDualis(i32 %1)
%4 = tail call float @FloatFR_logDualis(i32 %0)
%5 = fsub float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ glmLog23f(float *, float *);
void glmLog23f_(float x[3]) { glmLog23f(x, x); }


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

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

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

LLVM IR (-O2):
define void @glmLog23f_(float* %0) {
%2 = tail call i32 @glmLog23f(float* %0, float* %0)
ret void
}
int str_rtrim(char *p) {
  char *lc = p;
  while (*p != '\0') {
    if (*p != ' ' && *p != '\t')
      lc = p;
    ++p;
  }
  *++lc = '\0';
  return p - lc;
}


x86 assembly (clang, -O0):
<str_rtrim>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <str_rtrim+0x59>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1148 <str_rtrim+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1148 <str_rtrim+0x48>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <str_rtrim+0x10>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_rtrim>:
lea    -0x1(%rdi),%eax
mov    %rdi,%rcx
jmp    1117 <str_rtrim+0x17>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdi
add    $0x1,%eax
movzbl (%rdi),%edx
cmp    $0x9,%dl
je     1110 <str_rtrim+0x10>
cmp    $0x20,%dl
je     1110 <str_rtrim+0x10>
test   %dl,%dl
je     112d <str_rtrim+0x2d>
mov    %rdi,%rcx
jmp    1110 <str_rtrim+0x10>
movb   $0x0,0x1(%rcx)
add    $0x1,%rcx
sub    %ecx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @str_rtrim(i8* %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i8* [ %0, %1 ], [ %9, %7 ]
%4 = phi i8* [ %0, %1 ], [ %8, %7 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %10
i8 32, label %7
i8 9, label %7
]
6: ; preds = %2
br label %7
7: ; preds = %2, %2, %6
%8 = phi i8* [ %3, %6 ], [ %4, %2 ], [ %4, %2 ]
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %2
%11 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %11
%12 = ptrtoint i8* %3 to i64
%13 = ptrtoint i8* %11 to i64
%14 = sub i64 %12, %13
%15 = trunc i64 %14 to i32
ret i32 %15
}
unsigned xrop3_156_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_156_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_156_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
mov    %ecx,%edx
xor    %eax,%edx
or     %esi,%eax
not    %eax
or     %edx,%eax
xor    %esi,%eax
and    %ecx,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_156_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = and i32 %31, %32
%34 = load i32, i32* %8
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = or i32 %33, %37
%39 = load i32, i32* %7
%40 = load i32, i32* %6
%41 = xor i32 %40, -1
%42 = and i32 %39, %41
%43 = load i32, i32* %5
%44 = and i32 %42, %43
%45 = or i32 %38, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_156_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %5
%8 = xor i32 %4, %6
%9 = xor i32 %7, -1
%10 = or i32 %8, %9
%11 = and i32 %10, %4
%12 = xor i32 %4, -1
%13 = and i32 %12, %5
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int f(int);
int g(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", f(5));
  printf("%d\n", g(5));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
call   1050 <g@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
call   1030 <f@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5,%edi
call   1050 <g@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @f(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @g(i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=10 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Tue "
         "Aug  7 15:37:14 CST 2012 BUILD=DEBUG CPU= USING_UMP=1 USING_PMM=1 "
         "USING_MALI200=0 USING_MALI400=7 USING_MALI400_L2_CACHE=2 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c "
         "platform/meson_platform/mali_fix.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 "
         "USING_GPU_UTILIZATION=0 USING_MALI_RUN_TIME_PM=0";
}


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

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

LLVM IR (-O0):
@.str = [472 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Tue Aug 7 15:37:14 CST 2012 BUILD=DEBUG CPU= USING_UMP=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=7 USING_MALI400_L2_CACHE=2 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_GPU_UTILIZATION=0 USING_MALI_RUN_TIME_PM=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([472 x i8], [472 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [472 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Tue Aug 7 15:37:14 CST 2012 BUILD=DEBUG CPU= USING_UMP=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=7 USING_MALI400_L2_CACHE=2 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_GPU_UTILIZATION=0 USING_MALI_RUN_TIME_PM=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([472 x i8], [472 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcat(char *, char);
int /*<<< orphan*/ strcpy(char *, char);
int main(void) {
  char message[4];
  char driver = 0;
  char breakChar = '/';
  char value = 255;
  strcpy(message, driver);
  strcat(message, breakChar);
  strcat(message, value);
  puts("!!!Hello World!!!");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x9(%rbp)
movb   $0x2f,-0xa(%rbp)
movb   $0xff,-0xb(%rbp)
lea    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movsbl %al,%esi
call   1030 <strcpy@plt>
lea    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1050 <strcat@plt>
lea    -0x8(%rbp),%rdi
movsbl -0xb(%rbp),%esi
call   1050 <strcat@plt>
lea    0xe85(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1050 <strcat@plt>
lea    0xe9b(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"!!!Hello World!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %3
store i8 47, i8* %4
store i8 -1, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%7 = load i8, i8* %3
%8 = call i32 @strcpy(i8* %6, i8 signext %7)
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%10 = load i8, i8* %4
%11 = call i32 @strcat(i8* %9, i8 signext %10)
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%13 = load i8, i8* %5
%14 = call i32 @strcat(i8* %12, i8 signext %13)
%15 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}

LLVM IR (-O2):
@.str = [18 x i8] c"!!!Hello World!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8 signext 0)
%4 = call i32 @strcat(i8* %2, i8 signext 47)
%5 = call i32 @strcat(i8* %2, i8 signext -1)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int yyerror(const char *msg) {
  extern char *yytext;
  fprintf(stderr, "error yacc : %s\n", yytext);
  return 0;
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%rdx
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"error yacc : %s\0A\00"
@yytext = external global i8*
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** @yytext
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"error yacc : %s\0A\00"
@yytext = external global i8*
define i32 @yyerror(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** @yytext
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ geteuid();
scalar_t__ getuid();
int /*<<< orphan*/ panic(char *);
void check_for_root_maybe_die(void) {
  if (geteuid() != 0 || geteuid() != getuid())
    panic("Uhhuh, not root?! \n");
}


x86 assembly (clang, -O0):
<check_for_root_maybe_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <geteuid@plt>
cmp    $0x0,%rax
jne    116b <check_for_root_maybe_die+0x3b>
mov    $0x0,%al
call   1050 <geteuid@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
je     1177 <check_for_root_maybe_die+0x47>
lea    0xe8e(%rip),%rdi
call   1040 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_for_root_maybe_die>:
push   %rbx
xor    %eax,%eax
call   1050 <geteuid@plt>
test   %rax,%rax
jne    1155 <check_for_root_maybe_die+0x25>
xor    %eax,%eax
call   1050 <geteuid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getuid@plt>
cmp    %rax,%rbx
jne    1155 <check_for_root_maybe_die+0x25>
pop    %rbx
ret
lea    0xea4(%rip),%rdi
pop    %rbx
jmp    1040 <panic@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Uhhuh, not root?! \0A\00"
define void @check_for_root_maybe_die() {
%1 = call i64 (...) @geteuid()
%2 = icmp ne i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = call i64 (...) @geteuid()
%5 = call i64 (...) @getuid()
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3, %0
%8 = call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %3
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Uhhuh, not root?! \0A\00"
define void @check_for_root_maybe_die() {
%1 = tail call i64 (...) @geteuid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @geteuid()
%5 = tail call i64 (...) @getuid()
%6 = icmp eq i64 %4, %5
br i1 %6, label %9, label %7
7: ; preds = %3, %0
%8 = tail call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %3
ret void
}
void output_number(num) int num;
{
  output_byte('#');
  output_decimal(num);
}


x86 assembly (clang, -O0):
<output_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x23,%edi
mov    $0x0,%al
call   1040 <output_byte@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <output_decimal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_number>:
push   %rbx
mov    %edi,%ebx
mov    $0x23,%edi
xor    %eax,%eax
call   1040 <output_byte@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <output_decimal@plt>

LLVM IR (-O0):
define void @output_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @output_byte to i32 (i32, ...)*)(i32 35)
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @output_decimal to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @output_number(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @output_byte to i32 (i32, ...)*)(i32 35)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @output_decimal to i32 (i32, ...)*)(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void newline() { putchar('\n'); }


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

x86 assembly (clang, -O2):
<newline>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @newline() {
%1 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @newline() {
%1 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ copro_opc6_write_mem(int /*<<< orphan*/, int /*<<< orphan*/);
void dbg_memwrite(uint32_t addr, uint32_t value) {
  copro_opc6_write_mem(addr, value);
}


x86 assembly (clang, -O0):
<dbg_memwrite>:
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 <copro_opc6_write_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_memwrite>:
jmp    1030 <copro_opc6_write_mem@plt>

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

LLVM IR (-O2):
define void @dbg_memwrite(i32 %0, i32 %1) {
%3 = tail call i32 @copro_opc6_write_mem(i32 %0, i32 %1)
ret void
}
char *getcwd(char *__buf, unsigned long int __size) {
  char *return_value___getcwd_chk$1;
  char *return_value___getcwd_chk_warn$2;
  char *return_value___getcwd_alias$3;
  return_value___getcwd_alias$3 = __getcwd_alias(__buf, __size);
  return return_value___getcwd_alias$3;
}


x86 assembly (clang, -O0):
<getcwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <__getcwd_alias@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @getcwd(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @__getcwd_alias to i32 (i8*, i64, ...)*)(i8* %8, i64 %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %7
%13 = load i8*, i8** %7
ret i8* %13
}

LLVM IR (-O2):
define i8* @getcwd(i8* %0, i64 %1) {
%3 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @__getcwd_alias to i32 (i8*, i64, ...)*)(i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
void *ft_memset(void *b, int c, size_t len) {
  unsigned int i;
  unsigned char *cache;
  i = 0;
  cache = (unsigned char *)b;
  while (i < (unsigned int)len) {
    cache[i] = c;
    i++;
  }
  return (b);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    %ecx,%eax
jae    114a <ft_memset+0x4a>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111e <ft_memset+0x1e>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
je     1122 <ft_memset+0x12>
mov    %edx,%edx
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = trunc i64 %2 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = trunc i32 %1 to i8
%8 = and i64 %2, 4294967295
br label %9
9: ; preds = %6, %3
ret i8* %0
}
/* Variables and functions */
char getch_(int);
char _getche(void) { return getch_(1); }


x86 assembly (clang, -O0):
<_getche>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <getch_@plt>
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @_getche() {
%1 = call signext i8 @getch_(i32 1)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @_getche() {
%1 = tail call signext i8 @getch_(i32 1)
ret i8 %1
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rdx;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
int cpuid_num_fixed_perf_counters() {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 10;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  return (((uint64_t)(rdx) &
           ((((uint64_t)1 << (((4)) - ((0)) + 1)) - 1) << ((0)))) >>
          (0));
}


x86 assembly (clang, -O0):
<cpuid_num_fixed_perf_counters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x10(%rbp),%eax
and    $0x1f,%eax
sar    $0x0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_num_fixed_perf_counters>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    $0xa,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
and    $0x1f,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuid_num_fixed_perf_counters() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 10, i32* %5
%6 = load i32, i32* %5
%7 = call i32 @cpuid(i32 %6, i32* %1, i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %4
%9 = and i32 %8, 31
%10 = ashr i32 %9, 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @cpuid_num_fixed_perf_counters() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 10, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %4
%11 = and i32 %10, 31
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ generate_keys(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  generate_keys(atoi(argv[1]), atoi(argv[2]));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1030 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <generate_keys@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
%14 = call i32 @generate_keys(i32 %9, i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i32 @generate_keys(i32 %5, i32 %8)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long window;
};
struct TYPE_4__ {
  TYPE_1__ xcirculaterequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcirculaterequest_window(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xcirculaterequest.window = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcirculaterequest_window>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xcirculaterequest_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcirculaterequest_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void rb_fast_mark_table_remove_filename(char *filename) { filename[-1] = 0; }


x86 assembly (clang, -O0):
<rb_fast_mark_table_remove_filename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,-0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_fast_mark_table_remove_filename>:
movb   $0x0,-0x1(%rdi)
ret

LLVM IR (-O0):
define void @rb_fast_mark_table_remove_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8 0, i8* %4
ret void
}

LLVM IR (-O2):
define void @rb_fast_mark_table_remove_filename(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
store i8 0, i8* %2
ret void
}