xunge/DecIR huggingface dataset:
void bar() {
#pragma omp for
  for (int i = 0; i < 10; ++i)
#pragma omp task
    ++i;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    112c <bar+0x2c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <bar+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bar() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @bar() {
ret void
}
extern int f(int y, ...) {
  int f = y * y * y;
  return f;
}


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

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

LLVM IR (-O0):
define i32 @f(i32 %0, ...) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @f(i32 %0, ...) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
ret i32 %3
}
char *var_var(char *base, unsigned long offset) { return base + offset; }


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

x86 assembly (clang, -O2):
<var_var>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i8* @var_var(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @var_var(i8* readnone %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
eddie(char a, int b) { printf("B: %c %d\n", a, b); }


x86 assembly (clang, -O0):
<eddie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
lea    0xed2(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eddie>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"B: %c %d\0A\00"
define i32 @eddie(i8 signext %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %0, i32 %1)
ret i32 undef
}
void *sub3(void *P) { return P - 4; }


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

x86 assembly (clang, -O2):
<sub3>:
lea    -0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @sub3(i8* readnone %0) {
%2 = getelementptr i8, i8* %0, i64 -4
ret i8* %2
}
void setTextUChar(char *buffer, char numOfChars, unsigned char value) {
  for (char index = 0; index < numOfChars; index++) {
    buffer[numOfChars - 1 - index] = (value % 10) + 0x30;
    value /= 10;
  }
}


x86 assembly (clang, -O0):
<setTextUChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movb   $0x0,-0xb(%rbp)
movsbl -0xb(%rbp),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jge    1169 <setTextUChar+0x69>
movzbl -0xa(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    -0x8(%rbp),%rax
movsbl -0x9(%rbp),%ecx
sub    $0x1,%ecx
movsbl -0xb(%rbp),%esi
sub    %esi,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
movzbl -0xa(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %al,-0xa(%rbp)
mov    -0xb(%rbp),%al
add    $0x1,%al
mov    %al,-0xb(%rbp)
jmp    1117 <setTextUChar+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setTextUChar>:
test   %sil,%sil
jle    1132 <setTextUChar+0x32>
movzbl %sil,%eax
nopl   0x0(%rax)
movzbl %dl,%ecx
imul   $0xcd,%ecx,%edx
shr    $0xb,%edx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
sub    %sil,%cl
or     $0x30,%cl
mov    %cl,-0x1(%rdi,%rax,1)
add    $0xffffffffffffffff,%rax
jne    1110 <setTextUChar+0x10>
ret

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

LLVM IR (-O2):
define void @setTextUChar(i8* nocapture writeonly %0, i8 signext %1, i8 zeroext %2) {
%4 = icmp sgt i8 %1, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = zext i8 %1 to i64
%7 = zext i8 %1 to i64
br label %9
8: ; preds = %9, %3
ret void
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %18, %9 ]
%11 = phi i8 [ %2, %5 ], [ %17, %9 ]
%12 = urem i8 %11, 10
%13 = or i8 %12, 48
%14 = xor i64 %10, -1
%15 = add nsw i64 %14, %6
%16 = getelementptr inbounds i8, i8* %0, i64 %15
store i8 %13, i8* %16
%17 = udiv i8 %11, 10
%18 = add nuw nsw i64 %10, 1
%19 = icmp eq i64 %18, %7
br i1 %19, label %8, label %9
}
int unregister_blkdev(unsigned int major___0, char const *name) {
  { return (0); }
}


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

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

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

LLVM IR (-O2):
define i32 @unregister_blkdev(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
int csvNeedsParsing(char *s) {
  if (strchr(s, ','))
    return 1;
  return *s == '"';
}


x86 assembly (clang, -O0):
<csvNeedsParsing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1140 <csvNeedsParsing+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1155 <csvNeedsParsing+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csvNeedsParsing>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112d <csvNeedsParsing+0x1d>
pop    %rbx
ret
xor    %eax,%eax
cmpb   $0x22,(%rbx)
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @csvNeedsParsing(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strchr(i8* %4, i8 signext 44)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 34
%13 = zext i1 %12 to i32
store i32 %13, i32* %2
br label %14
14: ; preds = %8, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @csvNeedsParsing(i8* %0) {
%2 = tail call i64 @strchr(i8* %0, i8 signext 44)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 34
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 1, %1 ]
ret i32 %9
}
/* Type definitions */
struct ibv_cq {
  int dummy;
};
struct ibv_comp_channel {
  int dummy;
};

/* Variables and functions */
int ibv_get_cq_event(struct ibv_comp_channel *, struct ibv_cq **, void **);
int mlx4_glue_get_cq_event(struct ibv_comp_channel *channel, struct ibv_cq **cq,
                           void **cq_context) {
  return ibv_get_cq_event(channel, cq, cq_context);
}


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

x86 assembly (clang, -O2):
<mlx4_glue_get_cq_event>:
jmp    1030 <ibv_get_cq_event@plt>

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

LLVM IR (-O2):
%struct.ibv_comp_channel = type { i32 }
%struct.ibv_cq = type { i32 }
define i32 @mlx4_glue_get_cq_event(%struct.ibv_comp_channel* %0, %struct.ibv_cq** %1, i8** %2) {
%4 = tail call i32 @ibv_get_cq_event(%struct.ibv_comp_channel* %0, %struct.ibv_cq** %1, i8** %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Tut_Free(void *ptr) { free(ptr); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ epoll64(struct __test_metadata *);
void wrapper_epoll64(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll64(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll64>:
jmp    1030 <epoll64@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll64(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll64(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll64(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll64(%struct.__test_metadata* %0)
ret void
}
double max_d(double a, double b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<max_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <max_d+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <max_d+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_d>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @max_d(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
unsigned long xstrtoull_sfx(char const *, int, struct suffix_mult const *);
__attribute__((always_)) unsigned long
xstrtoul_sfx(const char *str, int b, const struct suffix_mult *sfx) {
  return xstrtoull_sfx(str, b, sfx);
}


x86 assembly (clang, -O0):
<xstrtoul_sfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <xstrtoull_sfx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtoul_sfx>:
jmp    1030 <xstrtoull_sfx@plt>

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

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i64 @xstrtoul_sfx(i8* %0, i32 %1, %struct.suffix_mult* %2) {
%4 = tail call i64 @xstrtoull_sfx(i8* %0, i32 %1, %struct.suffix_mult* %2)
ret i64 %4
}
/* Variables and functions */
char *concatenate(char *, char *, int, char const *, char *);
char *get_container_launcher_file(const char *work_dir) {
  return concatenate("%s/%s", "container launcher", 2, work_dir,
                     "launch_container.sh");
}


x86 assembly (clang, -O0):
<get_container_launcher_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xed9(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x2,%edx
lea    0xedf(%rip),%r8
call   1030 <concatenate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_container_launcher_file>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xef1(%rip),%r8
mov    $0x2,%edx
jmp    1030 <concatenate@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [19 x i8] c"container launcher\00"
@.str.2 = [20 x i8] c"launch_container.sh\00"
define i8* @get_container_launcher_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @concatenate(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [19 x i8] c"container launcher\00"
@.str.2 = [20 x i8] c"launch_container.sh\00"
define i8* @get_container_launcher_file(i8* %0) {
%2 = tail call i8* @concatenate(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void imul_reg32(unsigned int reg32) {
  put8(0xF7);
  put8(0xE8 + reg32);
}


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

x86 assembly (clang, -O2):
<imul_reg32>:
push   %rbx
mov    %edi,%ebx
mov    $0xf7,%edi
call   1030 <put8@plt>
add    $0xe8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @imul_reg32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 247)
%4 = load i32, i32* %2
%5 = add i32 232, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @imul_reg32(i32 %0) {
%2 = tail call i32 @put8(i32 247)
%3 = add i32 %0, 232
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ init_terminal_os(int);
int /*<<< orphan*/ reset_terminal_os();
char jm_getch_(int echo) {
  char ch;
  init_terminal_os(echo);
  ch = getchar();
  reset_terminal_os();
  return ch;
}


x86 assembly (clang, -O0):
<jm_getch_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <init_terminal_os@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
mov    $0x0,%al
call   1050 <reset_terminal_os@plt>
movsbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jm_getch_>:
push   %rbx
call   1030 <init_terminal_os@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <reset_terminal_os@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @jm_getch_(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @init_terminal_os(i32 %4)
%6 = call signext i8 (...) @getchar()
store i8 %6, i8* %3
%7 = call i32 (...) @reset_terminal_os()
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @jm_getch_(i32 %0) {
%2 = tail call i32 @init_terminal_os(i32 %0)
%3 = tail call signext i8 (...) @getchar()
%4 = tail call i32 (...) @reset_terminal_os()
ret i8 %3
}
int hl_hash_utf8(const char *name) {
  int h = 0;
  while (*name) {
    h = 223 * h + (unsigned)*name;
    name++;
  }
  h %= 0x1FFFFF7B;
  return h;
}


x86 assembly (clang, -O0):
<hl_hash_utf8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <hl_hash_utf8+0x40>
imul   $0xdf,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hl_hash_utf8+0xf>
mov    -0xc(%rbp),%eax
mov    $0x1fffff7b,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hl_hash_utf8>:
mov    (%rdi),%al
test   %al,%al
je     1149 <hl_hash_utf8+0x49>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
imul   $0xdf,%ecx,%edx
movsbl %al,%ecx
add    %edx,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hl_hash_utf8+0x10>
movslq %ecx,%rax
imul   $0xffffffff80000215,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x1c,%ecx
add    %edx,%ecx
imul   $0x1fffff7b,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hl_hash_utf8(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul nsw i32 %6, 223
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %10, 536870779
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
int islower(int ch) { return (ch >= 'a' && ch <= 'z'); }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int l_round(x)
double x;
{ return (x >= 0.0 ? (int)(x + .5) : (int)(x - .5)); }


x86 assembly (clang, -O0):
<l_round>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1134 <l_round+0x34>
movsd  0xedd(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
jmp    114c <l_round+0x4c>
movsd  -0x8(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_round>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @l_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
%8 = fptosi double %7 to i32
br label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fsub double %10, 5.000000e-01
%12 = fptosi double %11 to i32
br label %13
13: ; preds = %9, %5
%14 = phi i32 [ %8, %5 ], [ %12, %9 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @l_round(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PHYS_PAGES;
size_t sysconf(int /*<<< orphan*/);
size_t gu_phys_pages() { return sysconf(_SC_PHYS_PAGES); }


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

x86 assembly (clang, -O2):
<gu_phys_pages>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_PHYS_PAGES = global i32 0
define i64 @gu_phys_pages() {
%1 = load i32, i32* @_SC_PHYS_PAGES
%2 = call i64 @sysconf(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
@_SC_PHYS_PAGES = global i32 0
define i64 @gu_phys_pages() {
%1 = load i32, i32* @_SC_PHYS_PAGES
%2 = tail call i64 @sysconf(i32 %1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void vector_double_free(double *Vector) { free(Vector); }


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

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

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


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

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

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

LLVM IR (-O2):
define void @RTSemRWSetSubClass() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stdscr;
int strlen(char *);
int /*<<< orphan*/ wgetnstr(int /*<<< orphan*/, char *, int);
void get_string(char *string) {
  int len;
  wgetnstr(stdscr, string, (80));
  len = strlen(string);
  if (len > 0 && string[len - 1] == '\n')
    string[len - 1] = '\0';
}


x86 assembly (clang, -O0):
<get_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    $0x50,%edx
call   1040 <wgetnstr@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1184 <get_string+0x64>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1184 <get_string+0x64>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
mov    $0x50,%edx
call   1040 <wgetnstr@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1153 <get_string+0x33>
add    $0xffffffff,%eax
cmpb   $0xa,(%rbx,%rax,1)
jne    1153 <get_string+0x33>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
@stdscr = global i32 0
define void @get_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @stdscr
%5 = load i8*, i8** %2
%6 = call i32 @wgetnstr(i32 %4, i8* %5, i32 80)
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 10
br i1 %19, label %20, label %26
20: ; preds = %11
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sub nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %21, i64 %24
store i8 0, i8* %25
br label %26
26: ; preds = %20, %11, %1
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @get_string(i8* %0) {
%2 = load i32, i32* @stdscr
%3 = tail call i32 @wgetnstr(i32 %2, i8* %0, i32 80)
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = add nsw i32 %4, -1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 10
br i1 %11, label %12, label %13
12: ; preds = %6
store i8 0, i8* %9
br label %13
13: ; preds = %12, %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inplace_reverse(char *);
char *malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strdup(char *);
int strlen(char *);
char *palindrome3(char *s) {
  int n = strlen(s);
  char *dest = malloc((2 * n + 1) * sizeof(char));
  strcpy(dest, s);
  char *rev = strdup(s);
  inplace_reverse(rev);
  strcat(dest, rev);
  return dest;
}


x86 assembly (clang, -O0):
<palindrome3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1080 <inplace_reverse@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrome3>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    (%rax,%rax,1),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1070 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1080 <inplace_reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <strcat@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @palindrome3(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = mul nsw i32 2, %8
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = call i8* @malloc(i32 %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %2
%19 = call i8* @strdup(i8* %18)
store i8* %19, i8** %5
%20 = load i8*, i8** %5
%21 = call i32 @inplace_reverse(i8* %20)
%22 = load i8*, i8** %4
%23 = load i8*, i8** %5
%24 = call i32 @strcat(i8* %22, i8* %23)
%25 = load i8*, i8** %4
ret i8* %25
}

LLVM IR (-O2):
define i8* @palindrome3(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = shl nsw i32 %2, 1
%4 = or i32 %3, 1
%5 = tail call i8* @malloc(i32 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
%7 = tail call i8* @strdup(i8* %0)
%8 = tail call i32 @inplace_reverse(i8* %7)
%9 = tail call i32 @strcat(i8* %5, i8* %7)
ret i8* %5
}
int cast_short_int(short int x) { return (int)x; }


x86 assembly (clang, -O0):
<cast_short_int>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cast_short_int(i16 signext %0) {
%2 = sext i16 %0 to i32
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_be16(int /*<<< orphan*/,
                                        int /*<<< orphan*/ *);
void put_unaligned_be16(uint16_t val, void *p) {
  __put_unaligned_be16(val, (uint8_t *)p);
}


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

x86 assembly (clang, -O2):
<put_unaligned_be16>:
jmp    1030 <__put_unaligned_be16@plt>

LLVM IR (-O0):
define void @put_unaligned_be16(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = call i32 @__put_unaligned_be16(i32 %5, i32* %7)
ret void
}

LLVM IR (-O2):
define void @put_unaligned_be16(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @__put_unaligned_be16(i32 %0, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cls();
int /*<<< orphan*/ drawHorizontalBorder(int, int, int, int);
int /*<<< orphan*/ drawVerticalBorder(int, int /*<<< orphan*/, int, int);
void drawBoard() {
  cls();
  drawVerticalBorder(30, 0, 36, 0xdb);
  drawVerticalBorder(64, 0, 36, 0xdb);
  drawHorizontalBorder(30, 36, 64 - 30, 0xdb);
}


x86 assembly (clang, -O0):
<drawBoard>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cls@plt>
mov    $0x1e,%edi
xor    %esi,%esi
mov    $0x24,%edx
mov    $0xdb,%ecx
call   1050 <drawVerticalBorder@plt>
mov    $0x40,%edi
xor    %esi,%esi
mov    $0x24,%edx
mov    $0xdb,%ecx
call   1050 <drawVerticalBorder@plt>
mov    $0x1e,%edi
mov    $0x24,%esi
mov    $0x22,%edx
mov    $0xdb,%ecx
call   1030 <drawHorizontalBorder@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawBoard>:
push   %rax
xor    %eax,%eax
call   1040 <cls@plt>
mov    $0x1e,%edi
xor    %esi,%esi
mov    $0x24,%edx
mov    $0xdb,%ecx
call   1050 <drawVerticalBorder@plt>
mov    $0x40,%edi
xor    %esi,%esi
mov    $0x24,%edx
mov    $0xdb,%ecx
call   1050 <drawVerticalBorder@plt>
mov    $0x1e,%edi
mov    $0x24,%esi
mov    $0x22,%edx
mov    $0xdb,%ecx
pop    %rax
jmp    1030 <drawHorizontalBorder@plt>

LLVM IR (-O0):
define void @drawBoard() {
%1 = call i32 (...) @cls()
%2 = call i32 @drawVerticalBorder(i32 30, i32 0, i32 36, i32 219)
%3 = call i32 @drawVerticalBorder(i32 64, i32 0, i32 36, i32 219)
%4 = call i32 @drawHorizontalBorder(i32 30, i32 36, i32 34, i32 219)
ret void
}

LLVM IR (-O2):
define void @drawBoard() {
%1 = tail call i32 (...) @cls()
%2 = tail call i32 @drawVerticalBorder(i32 30, i32 0, i32 36, i32 219)
%3 = tail call i32 @drawVerticalBorder(i32 64, i32 0, i32 36, i32 219)
%4 = tail call i32 @drawHorizontalBorder(i32 30, i32 36, i32 34, i32 219)
ret void
}
/* Variables and functions */
double __dcosd(double);
double intr_wrap_034(double p1) { return __dcosd(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_034>:
jmp    1030 <__dcosd@plt>

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

LLVM IR (-O2):
define double @intr_wrap_034(double %0) {
%2 = tail call double @__dcosd(double %0)
ret double %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long background;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_background(void *_p, unsigned long _v) {
  ((XGCValues *)_p)->background = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XGCValues_background>:
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_XGCValues_background>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XGCValues_background(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_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XGCValues_background(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
void store_word(uint8_t *loc, uint32_t index, uint16_t word) {
  *(loc + index + 0) = (word & 0xFF00) >> 8;
  *(loc + index + 1) = (word & 0x00FF);
}


x86 assembly (clang, -O0):
<store_word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
and    $0xff00,%edx
sar    $0x8,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%edx
and    $0xff,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,0x4(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_word>:
movzbl %dh,%eax
movslq %esi,%rcx
mov    %eax,(%rdi,%rcx,4)
movzbl %dl,%eax
mov    %eax,0x4(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @store_word(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = and i32 %7, 65280
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = getelementptr inbounds i32, i32* %13, i64 0
store i32 %9, i32* %14
%15 = load i32, i32* %6
%16 = and i32 %15, 255
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = getelementptr inbounds i32, i32* %20, i64 1
store i32 %16, i32* %21
ret void
}

LLVM IR (-O2):
define void @store_word(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = lshr i32 %2, 8
%5 = and i32 %4, 255
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %5, i32* %7
%8 = and i32 %2, 255
%9 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ svcExitProcess();
void _exit() { svcExitProcess(); }


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <svcExitProcess@plt>

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

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @svcExitProcess()
unreachable
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
%2 = tail call i32 (...) @svcExitProcess()
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t hash_tw3(uint32_t a) {
  a = (a ^ 61) ^ (a >> 16);
  a = a + (a << 3);
  a = a ^ (a >> 4);
  a = a * 0x27d4eb2d;
  a = a ^ (a >> 15);
  return a;
}


x86 assembly (clang, -O0):
<hash_tw3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x3d,%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
imul   $0x27d4eb2d,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0xf,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_tw3>:
mov    %edi,%eax
sar    $0x10,%eax
xor    %edi,%eax
xor    $0x3d,%eax
lea    (%rax,%rax,8),%eax
mov    %eax,%ecx
sar    $0x4,%ecx
xor    %eax,%ecx
imul   $0x27d4eb2d,%ecx,%ecx
mov    %ecx,%eax
sar    $0xf,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash_tw3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, 61
%5 = load i32, i32* %2
%6 = ashr i32 %5, 16
%7 = xor i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = shl i32 %9, 3
%11 = add nsw i32 %8, %10
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = xor i32 %12, %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, 668265261
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = load i32, i32* %2
%20 = ashr i32 %19, 15
%21 = xor i32 %18, %20
store i32 %21, i32* %2
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @hash_tw3(i32 %0) {
%2 = ashr i32 %0, 16
%3 = xor i32 %2, %0
%4 = xor i32 %3, 61
%5 = mul i32 %4, 9
%6 = ashr i32 %5, 4
%7 = xor i32 %6, %5
%8 = mul nsw i32 %7, 668265261
%9 = ashr i32 %8, 15
%10 = xor i32 %9, %8
ret i32 %10
}
int valid3coords(const char *coords) {
  return ('a' <= coords[0] && coords[0] <= 'c' && '1' <= coords[1] &&
          coords[1] <= '3');
}


x86 assembly (clang, -O0):
<valid3coords>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x61,%ecx
cmp    %edx,%ecx
mov    %al,-0x9(%rbp)
jg     1161 <valid3coords+0x61>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x63,%ecx
mov    %al,-0x9(%rbp)
jg     1161 <valid3coords+0x61>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edx
xor    %eax,%eax
mov    $0x31,%ecx
cmp    %edx,%ecx
mov    %al,-0x9(%rbp)
jg     1161 <valid3coords+0x61>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x33,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid3coords>:
mov    (%rdi),%cl
add    $0x9f,%cl
xor    %eax,%eax
cmp    $0x2,%cl
ja     111c <valid3coords+0x1c>
mov    0x1(%rdi),%cl
cmp    $0x31,%cl
jl     111c <valid3coords+0x1c>
xor    %eax,%eax
cmp    $0x34,%cl
setb   %al
ret

LLVM IR (-O0):
define i32 @valid3coords(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sle i32 97, %6
br i1 %7, label %8, label %26
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 99
br i1 %13, label %14, label %26
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 49, %18
br i1 %19, label %20, label %26
20: ; preds = %14
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 51
br label %26
26: ; preds = %20, %14, %8, %1
%27 = phi i1 [ false, %14 ], [ false, %8 ], [ false, %1 ], [ %25, %20 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @valid3coords(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -97
%4 = icmp ult i8 %3, 3
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp sgt i8 %7, 48
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = icmp ult i8 %7, 52
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %9, %5, %1
%13 = phi i32 [ 0, %5 ], [ 0, %1 ], [ %11, %9 ]
ret i32 %13
}
void UYVYToARGBRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToARGBRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, int /*<<< orphan*/);
void gen_dst_buf(void *p, size_t size) { memset(p, 255, 0); }


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

x86 assembly (clang, -O2):
<gen_dst_buf>:
mov    $0xff,%esi
xor    %edx,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @gen_dst_buf(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @memset(i8* %5, i32 255, i32 0)
ret void
}

LLVM IR (-O2):
define void @gen_dst_buf(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 255, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_matriz(uint8_t **const addr_matriz) {
  free(*addr_matriz);
  *addr_matriz = NULL;
}


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

x86 assembly (clang, -O2):
<free_matriz>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @free_matriz(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @free(i32* %2)
store i32* null, i32** %0
ret void
}
int test_imm_E5uint16_reg(unsigned short val) {
  return ((val) & (-0xE5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E5uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -229
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}