xunge/DecIR huggingface dataset:
int hash(const char *w) {
  int n = 1;
  for (; *w != '\0'; w++) {
    n *= *w - 64;
  }
  return n % 47;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1141 <hash+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x40,%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x2f,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1143 <hash+0x43>
add    $0x1,%rdi
mov    $0x1,%eax
nop
movsbl %cl,%ecx
add    $0xffffffc0,%ecx
imul   %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
cltq
imul   $0xffffffffae4c415d,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x2f,%ecx,%ecx
sub    %ecx,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(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 ], [ 1, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add nsw i32 %8, -64
%10 = mul nsw i32 %9, %6
%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, 47
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 1, %1 ], [ %15, %14 ]
ret i32 %17
}
void rop3_7_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & S;
  stk1 = T | stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_7_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_7_0_0>:
and    (%rdi),%sil
or     %dl,%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_7_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_7_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, -1
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int BIO_sock_init(void) {
  if (!OPENSSL_init_crypto(0, NULL))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<BIO_sock_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <OPENSSL_init_crypto@plt>
cmp    $0x0,%eax
jne    1138 <BIO_sock_init+0x28>
movl   $0x0,-0x4(%rbp)
jmp    113f <BIO_sock_init+0x2f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_sock_init>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <OPENSSL_init_crypto@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BIO_sock_init() {
%1 = alloca i32
%2 = call i32 @OPENSSL_init_crypto(i32 0, i32* null)
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 0, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @BIO_sock_init() {
%1 = tail call i32 @OPENSSL_init_crypto(i32 0, i32* null)
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_make_fd_cloexec() {
  printf("NOT IMPLEMENTED:"
         "pa_make_fd_cloexec"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"NOT IMPLEMENTED:pa_make_fd_cloexec\0A\00"
define i32 @pa_make_fd_cloexec() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_make_fd_cloexec\00"
define i32 @pa_make_fd_cloexec() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct token {
  int dummy;
};
struct ast_node {
  int dummy;
};

/* Variables and functions */
struct ast_node *create_ast_node();
struct ast_node *parse_tokens(struct token *t) {
  struct ast_node *root;
  struct token *cur;
  if (t == NULL)
    return NULL;
  root = create_ast_node();
  cur = t;
  while (cur != NULL) {
  }
}


x86 assembly (clang, -O0):
<parse_tokens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <parse_tokens+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1157 <parse_tokens+0x47>
mov    $0x0,%al
call   1030 <create_ast_node@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1157 <parse_tokens+0x47>
jmp    1147 <parse_tokens+0x37>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_tokens>:
test   %rdi,%rdi
je     1132 <parse_tokens+0x22>
push   %rax
xor    %eax,%eax
call   1030 <create_ast_node@plt>
add    $0x8,%rsp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1130 <parse_tokens+0x20>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
%struct.ast_node = type { i32 }
%struct.token = type { i32 }
define noalias %struct.ast_node* @parse_tokens(%struct.token* readnone %0) {
%2 = icmp eq %struct.token* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call %struct.ast_node* (...) @create_ast_node()
br label %5
5: ; preds = %5, %3
br label %5
6: ; preds = %1
ret %struct.ast_node* null
}
/* Variables and functions */
int wormParseChromRange(char *, char **, int *, int *);
int wormIsChromRange(char *in) {
  char *chromId;
  int start, end;
  int ok;
  ok = wormParseChromRange(in, &chromId, &start, &end);
  return ok;
}


x86 assembly (clang, -O0):
<wormIsChromRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1030 <wormParseChromRange@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wormIsChromRange>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <wormParseChromRange@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @wormIsChromRange(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @wormParseChromRange(i8* %7, i8** %3, i32* %4, i32* %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
ret i32 %9
}

LLVM IR (-O2):
define i32 @wormIsChromRange(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i8** %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = call i32 @wormParseChromRange(i8* %0, i8** %2, i32* %3, i32* %4)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ countSort(int *, int, int);
int getMax(int *, int);
void radixSort(int v[], int n) {
  int M = getMax(v, n);
  int e;
  for (e = 1; M / e > 0; e *= 10)
    countSort(v, n, e);
}


x86 assembly (clang, -O0):
<radixSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <getMax@plt>
mov    %eax,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
cmp    $0x0,%eax
jle    1170 <radixSort+0x50>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <countSort@plt>
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <radixSort+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radixSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
call   1040 <getMax@plt>
test   %eax,%eax
jle    115b <radixSort+0x3b>
mov    %eax,%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <countSort@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%ebx
mov    %ebp,%eax
cltd
idiv   %ebx
test   %eax,%eax
jg     1140 <radixSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @radixSort(i32* %0, i32 %1) {
%3 = tail call i32 @getMax(i32* %0, i32 %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 1, %2 ]
%7 = tail call i32 @countSort(i32* %0, i32 %1, i32 %6)
%8 = mul nsw i32 %6, 10
%9 = sdiv i32 %3, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %2
ret void
}
void ShowCursor(int Top, int Bottom) {}


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

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

LLVM IR (-O0):
define void @ShowCursor(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 @ShowCursor(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  union {
    double d;
    float f;
  } var;
  var.d = 10.0;
  printf("put in a double, pull out a float f = %f\n", var.f);
  var.f = 10.0;
  printf("put in a float, pull out a double d = %lf\n", var.d);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x4024000000000000,%rax
mov    %rax,(%rsp)
lea    0xeda(%rip),%rdi
xorps  %xmm0,%xmm0
call   1030 <printf@plt>
movl   $0x41200000,(%rsp)
movsd  (%rsp),%xmm0
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.anon = type { double }
@.str = [42 x i8] c"put in a double, pull out a float f = %f\0A\00"
@.str.1 = [43 x i8] c"put in a float, pull out a double d = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.anon
store i32 0, i32* %1
%3 = bitcast %union.anon* %2 to double*
store double 1.000000e+01, double* %3
%4 = bitcast %union.anon* %2 to float*
%5 = load float, float* %4
%6 = fpext float %5 to double
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), double %6)
%8 = bitcast %union.anon* %2 to float*
store float 1.000000e+01, float* %8
%9 = bitcast %union.anon* %2 to double*
%10 = load double, double* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"put in a double, pull out a float f = %f\0A\00"
@.str.1 = [43 x i8] c"put in a float, pull out a double d = %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 1.000000e+01, double* %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), double 0.000000e+00)
%4 = bitcast double* %1 to float*
store float 1.000000e+01, float* %4
%5 = load double, double* %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), double %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ slow_bitmap_or(unsigned long *, unsigned long const *,
                                  unsigned long const *, int);
void bitmap_or(unsigned long *dst, const unsigned long *src1,
               const unsigned long *src2, int nbits) {
  if (((nbits) <= (sizeof(unsigned long) * 8))) {
    *dst = *src1 | *src2;
  } else {
    slow_bitmap_or(dst, src1, src2, nbits);
  }
}


x86 assembly (clang, -O0):
<bitmap_or>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0x40,%rax
ja     114f <bitmap_or+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x18(%rbp),%rax
or     (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1163 <bitmap_or+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <slow_bitmap_or@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_or>:
cmp    $0x40,%ecx
ja     111f <bitmap_or+0xf>
mov    (%rdx),%rax
or     (%rsi),%rax
mov    %rax,(%rdi)
ret
jmp    1030 <slow_bitmap_or@plt>

LLVM IR (-O0):
define void @bitmap_or(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i32
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
%11 = icmp ule i64 %10, 64
br i1 %11, label %12, label %19
12: ; preds = %4
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = load i64*, i64** %7
%16 = load i64, i64* %15
%17 = or i64 %14, %16
%18 = load i64*, i64** %5
store i64 %17, i64* %18
br label %25
19: ; preds = %4
%20 = load i64*, i64** %5
%21 = load i64*, i64** %6
%22 = load i64*, i64** %7
%23 = load i32, i32* %8
%24 = call i32 @slow_bitmap_or(i64* %20, i64* %21, i64* %22, i32 %23)
br label %25
25: ; preds = %19, %12
ret void
}

LLVM IR (-O2):
define void @bitmap_or(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = icmp ult i32 %3, 65
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = load i64, i64* %1
%8 = load i64, i64* %2
%9 = or i64 %8, %7
store i64 %9, i64* %0
br label %12
10: ; preds = %4
%11 = tail call i32 @slow_bitmap_or(i64* %0, i64* %1, i64* %2, i32 %3)
br label %12
12: ; preds = %10, %6
ret void
}
/* Variables and functions */
int getchar();
int karakter() { return getchar(); }


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

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

LLVM IR (-O0):
define i32 @karakter() {
%1 = call i32 (...) @getchar()
ret i32 %1
}

LLVM IR (-O2):
define i32 @karakter() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
void send_alternate_message(void *data, int cmd) {}


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

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

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

LLVM IR (-O2):
define void @send_alternate_message(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
struct iovec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void log_packet_iov(struct sockaddr *src, struct sockaddr *dst,
                    struct iovec *iov, int iovcnt) {
  printf("log_packet_iov : commented , need to implement\n");
}


x86 assembly (clang, -O0):
<log_packet_iov>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.iovec = type { i32 }
@.str = [48 x i8] c"log_packet_iov : commented , need to implement\0A\00"
define void @log_packet_iov(%struct.sockaddr* %0, %struct.sockaddr* %1, %struct.iovec* %2, i32 %3) {
%5 = alloca %struct.sockaddr*
%6 = alloca %struct.sockaddr*
%7 = alloca %struct.iovec*
%8 = alloca i32
store %struct.sockaddr* %0, %struct.sockaddr** %5
store %struct.sockaddr* %1, %struct.sockaddr** %6
store %struct.iovec* %2, %struct.iovec** %7
store i32 %3, i32* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
%struct.iovec = type { i32 }
@str = [47 x i8] c"log_packet_iov : commented , need to implement\00"
define void @log_packet_iov(%struct.sockaddr* nocapture readnone %0, %struct.sockaddr* nocapture readnone %1, %struct.iovec* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
char eleccion() {
  char op;
  do {
    printf("Que carta quieres, derecha [d] o izquierda [i]? ");
    scanf(" %c", &op);
  } while (op != 'i' && op != 'd');
  return op;
}


x86 assembly (clang, -O0):
<eleccion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x69,%ecx
mov    %al,-0x2(%rbp)
je     1163 <eleccion+0x43>
movsbl -0x1(%rbp),%eax
cmp    $0x64,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1128 <eleccion+0x8>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eleccion>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%r14
lea    0xefa(%rip),%r15
lea    0xf(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movzbl 0xf(%rsp),%eax
cmp    $0x69,%al
je     1160 <eleccion+0x40>
cmp    $0x64,%al
jne    1140 <eleccion+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Que carta quieres, derecha [d] o izquierda [i]? \00"
@.str.1 = [4 x i8] c" %c\00"
define signext i8 @eleccion() {
%1 = alloca i8
br label %2
2: ; preds = %13, %0
%3 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %5
5: ; preds = %2
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 105
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8, i8* %1
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 100
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br i1 %14, label %2, label %15
15: ; preds = %13
%16 = load i8, i8* %1
ret i8 %16
}

LLVM IR (-O2):
@.str = [49 x i8] c"Que carta quieres, derecha [d] o izquierda [i]? \00"
@.str.1 = [4 x i8] c" %c\00"
define signext i8 @eleccion() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = load i8, i8* %1
switch i8 %5, label %2 [
i8 105, label %6
i8 100, label %6
]
6: ; preds = %2, %2
ret i8 %5
}
/* Type definitions */
struct hash {
  int dummy;
};

/* Variables and functions */
struct hash *hash_create_size(int, unsigned int (*)(void *),
                              int (*)(void const *, void const *));
struct hash *hash_create(unsigned int (*hash_key)(void *),
                         int (*hash_cmp)(const void *, const void *)) {
  return hash_create_size(1024, hash_key, hash_cmp);
}


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

x86 assembly (clang, -O2):
<hash_create>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x400,%edi
jmp    1030 <hash_create_size@plt>

LLVM IR (-O0):
%struct.hash = type { i32 }
define %struct.hash* @hash_create(i32 (i8*)* %0, i32 (i8*, i8*)* %1) {
%3 = alloca i32 (i8*)*
%4 = alloca i32 (i8*, i8*)*
store i32 (i8*)* %0, i32 (i8*)** %3
store i32 (i8*, i8*)* %1, i32 (i8*, i8*)** %4
%5 = load i32 (i8*)*, i32 (i8*)** %3
%6 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %4
%7 = call %struct.hash* @hash_create_size(i32 1024, i32 (i8*)* %5, i32 (i8*, i8*)* %6)
ret %struct.hash* %7
}

LLVM IR (-O2):
%struct.hash = type { i32 }
define %struct.hash* @hash_create(i32 (i8*)* %0, i32 (i8*, i8*)* %1) {
%3 = tail call %struct.hash* @hash_create_size(i32 1024, i32 (i8*)* %0, i32 (i8*, i8*)* %1)
ret %struct.hash* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ siphash24_mac(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int, int /*<<< orphan*/ const *);
void siphash24_cbc_update_nonce(uint8_t *nonce, uint8_t *hash,
                                const uint8_t *key) {
  uint8_t buffer[16];
  memcpy(buffer, nonce, 8);
  memcpy(buffer + 8, hash, 8);
  siphash24_mac(nonce, buffer, 16, key);
}


x86 assembly (clang, -O0):
<siphash24_cbc_update_nonce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
lea    -0x60(%rbp),%rdi
add    $0x20,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x10,%edx
call   1040 <siphash24_mac@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<siphash24_cbc_update_nonce>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
mov    %r14,%rcx
call   1040 <siphash24_mac@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @siphash24_cbc_update_nonce(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca [16 x i32]
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %7, i64 0, i64 0
%9 = load i32*, i32** %4
%10 = call i32 @memcpy(i32* %8, i32* %9, i32 8)
%11 = getelementptr inbounds [16 x i32], [16 x i32]* %7, i64 0, i64 0
%12 = getelementptr inbounds i32, i32* %11, i64 8
%13 = load i32*, i32** %5
%14 = call i32 @memcpy(i32* %12, i32* %13, i32 8)
%15 = load i32*, i32** %4
%16 = getelementptr inbounds [16 x i32], [16 x i32]* %7, i64 0, i64 0
%17 = load i32*, i32** %6
%18 = call i32 @siphash24_mac(i32* %15, i32* %16, i32 16, i32* %17)
ret void
}

LLVM IR (-O2):
define void @siphash24_cbc_update_nonce(i32* %0, i32* %1, i32* %2) {
%4 = alloca [16 x i32]
%5 = bitcast [16 x i32]* %4 to i8*
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 0
%7 = call i32 @memcpy(i32* %6, i32* %0, i32 8)
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 8
%9 = call i32 @memcpy(i32* %8, i32* %1, i32 8)
%10 = call i32 @siphash24_mac(i32* %0, i32* %6, i32 16, i32* %2)
ret void
}
/* Type definitions */
struct Edge {
  int dummy;
};

/* Variables and functions */
struct Edge *edge_oNext(int /*<<< orphan*/);
int /*<<< orphan*/ edge_sym(struct Edge *);
struct Edge *edge_rPrev(struct Edge *edge) {
  return edge_oNext(edge_sym(edge));
}


x86 assembly (clang, -O0):
<edge_rPrev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <edge_sym@plt>
mov    %eax,%edi
call   1030 <edge_oNext@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<edge_rPrev>:
push   %rax
call   1040 <edge_sym@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <edge_oNext@plt>

LLVM IR (-O0):
%struct.Edge = type { i32 }
define %struct.Edge* @edge_rPrev(%struct.Edge* %0) {
%2 = alloca %struct.Edge*
store %struct.Edge* %0, %struct.Edge** %2
%3 = load %struct.Edge*, %struct.Edge** %2
%4 = call i32 @edge_sym(%struct.Edge* %3)
%5 = call %struct.Edge* @edge_oNext(i32 %4)
ret %struct.Edge* %5
}

LLVM IR (-O2):
%struct.Edge = type { i32 }
define %struct.Edge* @edge_rPrev(%struct.Edge* %0) {
%2 = tail call i32 @edge_sym(%struct.Edge* %0)
%3 = tail call %struct.Edge* @edge_oNext(i32 %2)
ret %struct.Edge* %3
}
/* Variables and functions */
int mystery2(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char string[80];
  puts("Enter a string: ");
  scanf("%79s", string);
  printf("%d\n", mystery2(string));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
lea    -0x60(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x60(%rbp),%rdi
call   1050 <mystery2@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1050 <mystery2@plt>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a string: \00"
@.str.1 = [5 x i8] c"%79s\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%7 = call i32 @mystery2(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a string: \00"
@.str.1 = [5 x i8] c"%79s\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @mystery2(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
void document_output_body_stream(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void document_output_body(char *application_name, char *onload_control_string) {
  return document_output_body_stream(stdout, application_name,
                                     onload_control_string);
}


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

x86 assembly (clang, -O2):
<document_output_body>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <document_output_body_stream@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @document_output_body(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @document_output_body(i8* %0, i8* %1) {
%3 = load i32, i32* @stdout
tail call void @document_output_body_stream(i32 %3, i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ opng_panic_memory();
void *realloc(void *, size_t);
void *opng_xrealloc(void *ptr, size_t size) {
  void *result;
  result = realloc(ptr, size);
  if (result == NULL)
    opng_panic_memory();
  return result;
}


x86 assembly (clang, -O0):
<opng_xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <opng_xrealloc+0x33>
mov    $0x0,%al
call   1040 <opng_panic_memory@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opng_xrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <opng_xrealloc+0x15>
xor    %eax,%eax
call   1040 <opng_panic_memory@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @opng_xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @opng_panic_memory()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ dpop();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ to_fixnum(int /*<<< orphan*/);
void primitive_exit_impl(void) { exit(to_fixnum(dpop())); }


x86 assembly (clang, -O0):
<primitive_exit_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <to_fixnum@plt>
mov    %eax,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<primitive_exit_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <to_fixnum@plt>
mov    %eax,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @primitive_exit_impl() {
%1 = call i32 (...) @dpop()
%2 = call i32 @to_fixnum(i32 %1)
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
define void @primitive_exit_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call i32 @to_fixnum(i32 %1)
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32x3_jenkins2v_data64(double const *, size_t,
                                               uintptr_t, int /*<<< orphan*/ *);
void rgph_u32x3_jenkins2v_f64a(const double *key, size_t len, uintptr_t seed,
                               uint32_t *h) {
  rgph_u32x3_jenkins2v_data64(key, len, seed, h);
}


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

x86 assembly (clang, -O2):
<rgph_u32x3_jenkins2v_f64a>:
jmp    1030 <rgph_u32x3_jenkins2v_data64@plt>

LLVM IR (-O0):
define void @rgph_u32x3_jenkins2v_f64a(double* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca double*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store double* %0, double** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load double*, double** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i32 @rgph_u32x3_jenkins2v_data64(double* %9, i64 %10, i64 %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @rgph_u32x3_jenkins2v_f64a(double* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i32 @rgph_u32x3_jenkins2v_data64(double* %0, i64 %1, i64 %2, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ va_arg_int(int *, int);
void call_va_arg_int_Good_FP() {
  int a[10];
  va_arg_int(a, 5);
}


x86 assembly (clang, -O0):
<call_va_arg_int_Good_FP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1030 <va_arg_int@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_va_arg_int_Good_FP>:
sub    $0x28,%rsp
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <va_arg_int@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @call_va_arg_int_Good_FP() {
%1 = alloca [10 x i32]
%2 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%3 = call i32 @va_arg_int(i32* %2, i32 5)
ret void
}

LLVM IR (-O2):
define void @call_va_arg_int_Good_FP() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @va_arg_int(i32* %3, i32 5)
ret void
}
/* Variables and functions */
double drand48();
void fill_dp_vector(double *vec, int size) {
  int ind;
  for (ind = 0; ind < size; ind++)
    vec[ind] = drand48();
}


x86 assembly (clang, -O0):
<fill_dp_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <fill_dp_vector+0x44>
mov    $0x0,%al
call   1030 <drand48@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <fill_dp_vector+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_dp_vector>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1146 <fill_dp_vector+0x36>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <drand48@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fill_dp_vector+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fill_dp_vector(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call double (...) @drand48()
%12 = load double*, double** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
store double %11, double* %15
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @fill_dp_vector(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call double (...) @drand48()
%9 = getelementptr inbounds double, double* %0, i64 %7
store double %8, double* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
scalar_t__ isalpha(char const);
int tolower(char const);
int alphabet_index(const char c) {
  if (isalpha(c))
    return tolower(c) - 'a';
  return -1;
}


x86 assembly (clang, -O0):
<alphabet_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     1155 <alphabet_index+0x35>
movsbl -0x5(%rbp),%edi
call   1030 <tolower@plt>
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    115c <alphabet_index+0x3c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alphabet_index>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
test   %rax,%rax
je     113a <alphabet_index+0x1a>
movsbl %bl,%edi
call   1030 <tolower@plt>
add    $0xffffff9f,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @alphabet_index(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalpha(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call i32 @tolower(i8 signext %8)
%10 = sub nsw i32 %9, 97
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @alphabet_index(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @tolower(i8 signext %0)
%6 = add nsw i32 %5, -97
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char const *, char const *);
int strlen(char const *);
char *xmalloc(size_t);
char *newpath(const char *dirname, const char *filename) {
  char *path;
  size_t path_len;
  path_len = strlen(dirname) + 1 + strlen(filename) + 1;
  path = xmalloc(path_len);
  snprintf(path, path_len, "%s/%s", dirname, filename);
  return path;
}


x86 assembly (clang, -O0):
<newpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xe74(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newpath>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %ebx,%eax
add    $0x2,%eax
movslq %eax,%rbx
mov    %rbx,%rdi
call   1050 <xmalloc@plt>
mov    %rax,%r12
lea    0xe99(%rip),%rdx
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <snprintf@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @newpath(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = add nsw i32 %8, 1
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %9, %11
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
store i64 %14, i64* %6
%15 = load i64, i64* %6
%16 = call i8* @xmalloc(i64 %15)
store i8* %16, i8** %5
%17 = load i8*, i8** %5
%18 = load i64, i64* %6
%19 = load i8*, i8** %3
%20 = load i8*, i8** %4
%21 = call i32 @snprintf(i8* %17, i64 %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %19, i8* %20)
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @newpath(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 2
%6 = add i32 %5, %4
%7 = sext i32 %6 to i64
%8 = tail call i8* @xmalloc(i64 %7)
%9 = tail call i32 @snprintf(i8* %8, i64 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void countdown(unsigned seconds) {
  if (seconds > 0) {
    printf("%u...\n", seconds--);
    countdown(seconds);
  } else
    printf("Blast off!\n");
}


x86 assembly (clang, -O0):
<countdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    115b <countdown+0x3b>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <countdown@plt>
jmp    1169 <countdown+0x49>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countdown>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     1151 <countdown+0x31>
mov    %edi,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <countdown+0x20>
lea    0xeaf(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%u...\0A\00"
@.str.1 = [12 x i8] c"Blast off!\0A\00"
define void @countdown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add i32 %6, -1
store i32 %7, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%9 = load i32, i32* %2
br label %12
10: ; preds = %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %5
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%u...\0A\00"
@str = [11 x i8] c"Blast off!\00"
define void @countdown(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add i32 %4, -1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
int gcd(int a, int b) {
  if (a == 0)
    return b;
  return gcd(b % a, a);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <gcd+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <gcd+0x37>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%eax
test   %edi,%edi
je     111d <gcd+0x1d>
mov    %edi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %1, %2 ], [ %6, %4 ]
ret i32 %10
}