xunge/DecIR huggingface dataset:
int SCE_Init_Matrix(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SCE_Init_Matrix() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Handle1MsInterrupt();
void INT_IT(void) { Handle1MsInterrupt(); }


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

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

LLVM IR (-O0):
define void @INT_IT() {
%1 = call i32 (...) @Handle1MsInterrupt()
ret void
}

LLVM IR (-O2):
define void @INT_IT() {
%1 = tail call i32 (...) @Handle1MsInterrupt()
ret void
}
/* Variables and functions */
int rand();
int get_rand(int min, int max) {
  int x;
  if (min > max) {
    return -1;
  }
  x = rand() % (max + 1 - min);
  return (x + min);
}


x86 assembly (clang, -O0):
<get_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1136 <get_rand+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <get_rand+0x45>
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rand>:
mov    $0xffffffff,%eax
cmp    %esi,%edi
jg     1139 <get_rand+0x29>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebx,%ebp
add    $0x1,%ebp
cltd
idiv   %ebp
mov    %edx,%eax
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_rand(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i32 (...) @rand()
%6 = sub i32 1, %0
%7 = add i32 %6, %1
%8 = srem i32 %5, %7
%9 = add nsw i32 %8, %0
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ trap_Cvar_Set(char const *, int /*<<< orphan*/);
int trap_Cvar_VariableValue(char const *);
int /*<<< orphan*/ va(char *, int);
void trap_Cvar_CopyValue_i(const char *in_var, const char *out_var) {
  int v1 = trap_Cvar_VariableValue(in_var);
  trap_Cvar_Set(out_var, va("%i", v1));
}


x86 assembly (clang, -O0):
<trap_Cvar_CopyValue_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <trap_Cvar_VariableValue@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1040 <va@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1050 <trap_Cvar_Set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trap_Cvar_CopyValue_i>:
push   %rbx
mov    %rsi,%rbx
call   1030 <trap_Cvar_VariableValue@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
call   1040 <va@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1050 <trap_Cvar_Set@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define void @trap_Cvar_CopyValue_i(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @trap_Cvar_VariableValue(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @va(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @trap_Cvar_Set(i8* %8, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @trap_Cvar_CopyValue_i(i8* %0, i8* %1) {
%3 = tail call i32 @trap_Cvar_VariableValue(i8* %0)
%4 = tail call i32 @va(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @trap_Cvar_Set(i8* %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int, int, int, int, int, int, int);
int main() {
  int a = 1;
  switch (a) {
  case 0:
    assert(0);
  case 1:
    foo(a, a, a, a, a, a, a);
    break;
  case 2:
    assert(0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     116b <main+0x4b>
jmp    1149 <main+0x29>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1172 <main+0x52>
jmp    115a <main+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1196 <main+0x76>
jmp    119d <main+0x7d>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x8(%rbp),%r9d
mov    -0x8(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <foo@plt>
jmp    119d <main+0x7d>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,(%rsp)
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %17 [
i32 0, label %4
i32 1, label %6
i32 2, label %15
]
4: ; preds = %0
%5 = call i32 @assert(i32 0)
br label %6
6: ; preds = %0, %4
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = call i32 @foo(i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13)
br label %17
15: ; preds = %0
%16 = call i32 @assert(i32 0)
br label %17
17: ; preds = %15, %0, %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1)
ret i32 0
}
/* Variables and functions */
int chacha_avx_crypto_stream_xor(unsigned char *, unsigned char *,
                                 unsigned long long, unsigned char const *,
                                 unsigned char const *);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/,
                          unsigned long long);
int chacha_avx_crypto_stream(unsigned char *out, unsigned long long outlen,
                             const unsigned char *n, const unsigned char *k) {
  memset(out, 0, outlen);
  return chacha_avx_crypto_stream_xor(out, out, outlen, n, k);
}


x86 assembly (clang, -O0):
<chacha_avx_crypto_stream>:
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),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1040 <chacha_avx_crypto_stream_xor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chacha_avx_crypto_stream>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <chacha_avx_crypto_stream_xor@plt>

LLVM IR (-O0):
define i32 @chacha_avx_crypto_stream(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
%12 = load i8*, i8** %5
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = call i32 @chacha_avx_crypto_stream_xor(i8* %12, i8* %13, i64 %14, i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @chacha_avx_crypto_stream(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
%6 = tail call i32 @chacha_avx_crypto_stream_xor(i8* %0, i8* %0, i64 %1, i8* %2, i8* %3)
ret i32 %6
}
void c(int i) {}


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

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

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

LLVM IR (-O2):
define void @c(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vrna_seq_toupper(char *);
void str_uppercase(char *sequence) { vrna_seq_toupper(sequence); }


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

x86 assembly (clang, -O2):
<str_uppercase>:
jmp    1030 <vrna_seq_toupper@plt>

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

LLVM IR (-O2):
define void @str_uppercase(i8* %0) {
%2 = tail call i32 @vrna_seq_toupper(i8* %0)
ret void
}
unsigned long read_msr(unsigned int msr) {
  unsigned long value;
  __asm__ __volatile__("rdmsr" : "=A"(value) : "c"(msr));
  return value;
}


x86 assembly (clang, -O0):
<read_msr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
rdmsr
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_msr>:
mov    %edi,%ecx
rdmsr
ret

LLVM IR (-O0):
define i64 @read_msr(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 asm sideeffect "rdmsr", "=A,{cx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @read_msr(i32 %0) {
%2 = tail call i64 asm sideeffect "rdmsr", "=A,{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i64 %2
}
void free_cmatrix(char **m, int nr) {
  int i;
  for (i = 0; i < nr; i++)
    free(m[i]);
  free(m);
}


x86 assembly (clang, -O0):
<free_cmatrix>:
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    1151 <free_cmatrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_cmatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_cmatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_cmatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_cmatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_cmatrix(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %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 = load i8**, i8*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
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
%20 = load i8**, i8*** %3
%21 = bitcast i8** %20 to i8*
ret void
}

LLVM IR (-O2):
define void @free_cmatrix(i8** nocapture %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 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %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
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void cb_RequestError(void *data, int error) {
  printf("[*] Error: %d\n", error);
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"[*] Error: %d\0A\00"
define void @cb_RequestError(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int div_cont(int x) {
  int i, cont = 0;
  for (i = 1; i <= x; i++) {
    if (x % i == 0) {
      cont++;
    }
  }
  return cont;
}


x86 assembly (clang, -O0):
<div_cont>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     114d <div_cont+0x4d>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    113a <div_cont+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <div_cont+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <div_cont+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_cont>:
test   %edi,%edi
jle    1115 <div_cont+0x15>
mov    %edi,%r9d
cmp    $0x1,%edi
jne    1118 <div_cont+0x18>
mov    $0x1,%esi
xor    %ecx,%ecx
jmp    1153 <div_cont+0x53>
xor    %eax,%eax
ret
mov    %r9d,%r8d
and    $0xfffffffe,%r8d
mov    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %r9d,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
adc    $0x0,%ecx
lea    0x1(%rsi),%edi
mov    %r9d,%eax
cltd
idiv   %edi
cmp    $0x1,%edx
adc    $0x0,%ecx
add    $0x2,%esi
cmp    %r8d,%edi
jne    1130 <div_cont+0x30>
test   $0x1,%r9b
je     1165 <div_cont+0x65>
mov    %r9d,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
adc    $0x0,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @div_cont(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %34, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %0, 1
br i1 %5, label %24, label %6
6: ; preds = %3
%7 = and i32 %0, -2
br label %8
8: ; preds = %8, %6
%9 = phi i32 [ 0, %6 ], [ %20, %8 ]
%10 = phi i32 [ 1, %6 ], [ %21, %8 ]
%11 = phi i32 [ 0, %6 ], [ %22, %8 ]
%12 = srem i32 %0, %10
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = add nuw nsw i32 %9, %14
%16 = add nuw i32 %10, 1
%17 = srem i32 %0, %16
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = add nuw nsw i32 %15, %19
%21 = add nuw i32 %10, 2
%22 = add i32 %11, 2
%23 = icmp eq i32 %22, %7
br i1 %23, label %24, label %8
24: ; preds = %8, %3
%25 = phi i32 [ undef, %3 ], [ %20, %8 ]
%26 = phi i32 [ 0, %3 ], [ %20, %8 ]
%27 = phi i32 [ 1, %3 ], [ %21, %8 ]
%28 = icmp eq i32 %4, 0
br i1 %28, label %34, label %29
29: ; preds = %24
%30 = srem i32 %0, %27
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = add nuw nsw i32 %26, %32
br label %34
34: ; preds = %29, %24, %1
%35 = phi i32 [ 0, %1 ], [ %25, %24 ], [ %33, %29 ]
ret i32 %35
}
/* Variables and functions */
int /*<<< orphan*/ sceKernelExitGame();
int exit_callback(int arg1, int arg2, void *common) {
  sceKernelExitGame();
  return 0;
}


x86 assembly (clang, -O0):
<exit_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <sceKernelExitGame@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @exit_callback(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @sceKernelExitGame()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bus_list();
int /*<<< orphan*/ verbosity_printf(int, char *);
int perform_list(void) {
  verbosity_printf(1, "Action: list");
  bus_list();
  return 0;
}


x86 assembly (clang, -O0):
<perform_list>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
call   1040 <verbosity_printf@plt>
mov    $0x0,%al
call   1030 <bus_list@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<perform_list>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
call   1040 <verbosity_printf@plt>
xor    %eax,%eax
call   1030 <bus_list@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Action: list\00"
define i32 @perform_list() {
%1 = call i32 @verbosity_printf(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @bus_list()
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Action: list\00"
define i32 @perform_list() {
%1 = tail call i32 @verbosity_printf(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @bus_list()
ret i32 0
}
/* Variables and functions */
int find(int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int first = 2;
  int last = 4;
  int n = 3;
  int d = 5;
  int res = find(n, d, first, last);
  printf("Result is %d", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
call   1040 <find@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x5,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
call   1040 <find@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"Result is %d\00"
define void @main() {
%1 = tail call i32 @find(i32 3, i32 5, i32 2, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("你好，\n");
  printf("我叫柴田望洋！\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\E4\BD\A0\E5\A5\BD\EF\BC\8C\0A\00"
@.str.1 = [23 x i8] c"\E6\88\91\E5\8F\AB\E6\9F\B4\E7\94\B0\E6\9C\9B\E6\B4\8B\EF\BC\81\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"\E4\BD\A0\E5\A5\BD\EF\BC\8C\00"
@str.2 = [22 x i8] c"\E6\88\91\E5\8F\AB\E6\9F\B4\E7\94\B0\E6\9C\9B\E6\B4\8B\EF\BC\81\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long);
void print_two_longs(long x, long y) { printf("%li %li", x, y); }


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

x86 assembly (clang, -O2):
<print_two_longs>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%li %li\00"
define void @print_two_longs(i64 %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
#pragma omp parallel
  printf("Hello world\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_help();
int /*<<< orphan*/ printf(char *);
void print_hello() {
  printf("Calculates statistics criteria of pseudo-random sequence\n");
  printf("using posix threads\n");
  print_help();
}


x86 assembly (clang, -O0):
<print_hello>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_help@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hello>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_help@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Calculates statistics criteria of pseudo-random sequence\0A\00"
@.str.1 = [21 x i8] c"using posix threads\0A\00"
define void @print_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @print_help()
ret void
}

LLVM IR (-O2):
@str = [57 x i8] c"Calculates statistics criteria of pseudo-random sequence\00"
@str.2 = [20 x i8] c"using posix threads\00"
define void @print_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @print_help()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ getrope(char const *);
void rope_free(const char *str) {
  if (str != NULL)
    free(getrope(str));
}


x86 assembly (clang, -O0):
<rope_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <rope_free+0x27>
mov    -0x8(%rbp),%rdi
call   1040 <getrope@plt>
mov    %eax,%edi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rope_free>:
test   %rdi,%rdi
je     1133 <rope_free+0x13>
push   %rax
call   1040 <getrope@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @rope_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @getrope(i8* %0)
%5 = tail call i32 @free(i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ close_sqlite(int /*<<< orphan*/ *);
int /*<<< orphan*/ *connect_sqlite();
int /*<<< orphan*/ create_url_tables(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  sqlite3 *db = connect_sqlite();
  create_url_tables(db);
  close_sqlite(db);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <connect_sqlite@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <create_url_tables@plt>
mov    -0x10(%rbp),%rdi
call   1050 <close_sqlite@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <connect_sqlite@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <create_url_tables@plt>
mov    %rbx,%rdi
call   1050 <close_sqlite@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* (...) @connect_sqlite()
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @create_url_tables(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @close_sqlite(i32* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* (...) @connect_sqlite()
%2 = tail call i32 @create_url_tables(i32* %1)
%3 = tail call i32 @close_sqlite(i32* %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ lua_check_string(int, char *);
int /*<<< orphan*/ lua_pushnil();
int /*<<< orphan*/ lua_pushnumber(int);
scalar_t__ remove(int /*<<< orphan*/);
void io_remove(void) {
  if (remove(lua_check_string(1, "remove")) == 0)
    lua_pushnumber(1);
  else
    lua_pushnil();
}


x86 assembly (clang, -O0):
<io_remove>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1040 <lua_check_string@plt>
mov    %eax,%edi
call   1030 <remove@plt>
cmp    $0x0,%rax
jne    1175 <io_remove+0x35>
mov    $0x1,%edi
call   1050 <lua_pushnumber@plt>
jmp    117c <io_remove+0x3c>
mov    $0x0,%al
call   1060 <lua_pushnil@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_remove>:
push   %rax
lea    0xeb8(%rip),%rsi
mov    $0x1,%edi
call   1040 <lua_check_string@plt>
mov    %eax,%edi
call   1030 <remove@plt>
test   %rax,%rax
je     1166 <io_remove+0x26>
xor    %eax,%eax
pop    %rcx
jmp    1060 <lua_pushnil@plt>
mov    $0x1,%edi
pop    %rax
jmp    1050 <lua_pushnumber@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"remove\00"
define void @io_remove() {
%1 = tail call i32 @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @remove(i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @lua_pushnumber(i32 1)
br label %8
6: ; preds = %0
%7 = tail call i32 (...) @lua_pushnil()
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int tst_bv_entry(int, char **);
int main(int argc, char **argv) { return tst_bv_entry(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <tst_bv_entry@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @tst_bv_entry(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int c(int, int);
int b(int i, int j, int k, int B) {
  static const int T[8] = {0x15, 0x38, 0x32, 0x2c, 0x0d, 0x13, 0x07, 0x2a};
  return T[c(i, B) << 2 | c(j, B) << 1 | c(k, B)];
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <c@plt>
shl    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <c@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <c@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
movslq %eax,%rcx
lea    0xe97(%rip),%rax
mov    (%rax,%rcx,4),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r12d
mov    %edx,%r14d
mov    %esi,%r15d
mov    %ecx,%esi
call   1030 <c@plt>
mov    %eax,%ebp
shl    $0x2,%ebp
mov    %r15d,%edi
mov    %r12d,%esi
call   1030 <c@plt>
mov    %eax,%ebx
add    %eax,%ebx
or     %ebp,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
call   1030 <c@plt>
or     %ebx,%eax
cltq
lea    0xeac(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@b.T = internal constant [8 x i32] [i32 21, i32 56, i32 50, i32 44, i32 13, i32 19, i32 7, i32 42]
define i32 @b(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %8
%11 = call i32 @c(i32 %9, i32 %10)
%12 = shl i32 %11, 2
%13 = load i32, i32* %6
%14 = load i32, i32* %8
%15 = call i32 @c(i32 %13, i32 %14)
%16 = shl i32 %15, 1
%17 = or i32 %12, %16
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @c(i32 %18, i32 %19)
%21 = or i32 %17, %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [8 x i32], [8 x i32]* @b.T, i64 0, i64 %22
%24 = load i32, i32* %23
ret i32 %24
}

LLVM IR (-O2):
@b.T = internal unnamed_addr constant [8 x i32] [i32 21, i32 56, i32 50, i32 44, i32 13, i32 19, i32 7, i32 42]
define i32 @b(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @c(i32 %0, i32 %3)
%6 = shl i32 %5, 2
%7 = tail call i32 @c(i32 %1, i32 %3)
%8 = shl i32 %7, 1
%9 = or i32 %8, %6
%10 = tail call i32 @c(i32 %2, i32 %3)
%11 = or i32 %9, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [8 x i32], [8 x i32]* @b.T, i64 0, i64 %12
%14 = load i32, i32* %13
ret i32 %14
}
int foo2(int **ppa) {
  int ***pppa = &ppa;
  int b = 21;
  return b + ***pppa;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x15,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
mov    (%rcx),%rcx
add    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
mov    (%rdi),%rax
mov    (%rax),%eax
add    $0x15,%eax
ret

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

LLVM IR (-O2):
define i32 @foo2(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 21
ret i32 %4
}
void simple8_help(void) { printf("%s - TBD\n", __func__); }


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

x86 assembly (clang, -O2):
<simple8_help>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s - TBD\0A\00"
@__func__.simple8_help = [13 x i8] c"simple8_help\00"
define void @simple8_help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.simple8_help, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s - TBD\0A\00"
@__func__.simple8_help = [13 x i8] c"simple8_help\00"
define void @simple8_help() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.simple8_help, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ f0(int /*<<< orphan*/ **);
void f4(long unsigned int a, long unsigned int b) {
  if (a <= 5 && b <= 2) {
    uint32_t x[a][b];
    f0(x);
  }
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x5,-0x8(%rbp)
ja     1175 <f4+0x65>
cmpq   $0x2,-0x10(%rbp)
ja     1175 <f4+0x65>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rdi
sub    %rdx,%rdi
mov    %rdi,%rsp
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
call   1030 <f0@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
cmp    $0x5,%rdi
ja     114c <f4+0x3c>
cmp    $0x2,%rsi
ja     114c <f4+0x3c>
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rsp,%rbx
imul   %rdi,%rsi
lea    0xf(,%rsi,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rdi
sub    %rax,%rdi
mov    %rdi,%rsp
call   1030 <f0@plt>
mov    %rbx,%rsp
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @f4(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
%9 = icmp ule i64 %8, 5
br i1 %9, label %10, label %22
10: ; preds = %2
%11 = load i64, i64* %4
%12 = icmp ule i64 %11, 2
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %5
%17 = mul nuw i64 %14, %15
%18 = alloca i32, i64 %17
store i64 %14, i64* %6
store i64 %15, i64* %7
%19 = bitcast i32* %18 to i32**
%20 = call i32 @f0(i32** %19)
%21 = load i8*, i8** %5
br label %22
22: ; preds = %13, %10, %2
ret void
}

LLVM IR (-O2):
define void @f4(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, 6
%4 = icmp ult i64 %1, 3
%5 = and i1 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = tail call i8* @llvm.stacksave()
%8 = mul nuw nsw i64 %1, %0
%9 = alloca i32, i64 %8
%10 = bitcast i32* %9 to i32**
%11 = call i32 @f0(i32** %10)
br label %12
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *_mktemp(char *, int, int *, int);
int mkostemps(char *template, int suffixlen, int flags) {
  int fd = -1;
  if (_mktemp(template, suffixlen, &fd, flags) == NULL)
    return -1;
  return fd;
}


x86 assembly (clang, -O0):
<mkostemps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%ecx
lea    -0x1c(%rbp),%rdx
call   1030 <_mktemp@plt>
cmp    $0x0,%rax
jne    1152 <mkostemps+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <mkostemps+0x48>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkostemps>:
push   %rax
mov    %edx,%ecx
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rdx
call   1030 <_mktemp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mkostemps(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 -1, i32* %4
%6 = call i32* @_mktemp(i8* %0, i32 %1, i32* %4, i32 %2)
%7 = icmp eq i32* %6, null
%8 = load i32, i32* %4
%9 = select i1 %7, i32 -1, i32 %8
ret i32 %9
}
ISR(SPM_READY_vect) {
  DEBUG("ISR "
        "SPM_READY"
        " occured");
}


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

x86 assembly (clang, -O2):
<ISR>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DEBUG@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"ISR SPM_READY occured\00"
define i32 @ISR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [22 x i8] c"ISR SPM_READY occured\00"
define i32 @ISR(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int mt_rand_double_1();
double rand_double(void) { return (mt_rand_double_1() * 1000); }


x86 assembly (clang, -O0):
<rand_double>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_rand_double_1@plt>
imul   $0x3e8,%eax,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_double>:
push   %rax
xor    %eax,%eax
call   1030 <mt_rand_double_1@plt>
imul   $0x3e8,%eax,%eax
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rand_double() {
%1 = call i32 (...) @mt_rand_double_1()
%2 = mul nsw i32 %1, 1000
%3 = sitofp i32 %2 to double
ret double %3
}

LLVM IR (-O2):
define double @rand_double() {
%1 = tail call i32 (...) @mt_rand_double_1()
%2 = mul nsw i32 %1, 1000
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ XIMStyles;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XIMStyles(void *_p) {
  if (_p == NULL)
    abort();
  free((XIMStyles *)_p);
}


x86 assembly (clang, -O0):
<free_XIMStyles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XIMStyles+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XIMStyles>:
test   %rdi,%rdi
je     112a <free_XIMStyles+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XIMStyles(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XIMStyles(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
char *ft_uitobase(unsigned int, unsigned int, unsigned int);
char *ft_itobase(unsigned int n, unsigned int base, unsigned int pad) {
  return (ft_uitobase(n, base, pad));
}


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

x86 assembly (clang, -O2):
<ft_itobase>:
jmp    1030 <ft_uitobase@plt>

LLVM IR (-O0):
define i8* @ft_itobase(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i8* @ft_uitobase(i32 %7, i32 %8, i32 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @ft_itobase(i32 %0, i32 %1, i32 %2) {
%4 = tail call i8* @ft_uitobase(i32 %0, i32 %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int rand();
int slach_rand_int_range_4(int min, int max) {
  return rand() % (max - min + 1) + min - 1;
}


x86 assembly (clang, -O0):
<slach_rand_int_range_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slach_rand_int_range_4>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
xor    %eax,%eax
call   1030 <rand@plt>
sub    %r14d,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
lea    (%r14,%rdx,1),%eax
add    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @slach_rand_int_range_4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = sub nsw i32 %12, 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @slach_rand_int_range_4(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add i32 %0, -1
%8 = add i32 %7, %6
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int stub1(int);
int call_func(int n, int (*f)(int)) {
  int ret;
  ret = (*f)(n);
  if (ret <= 0) {
    printf("An error occurred!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<call_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
call   *%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1141 <call_func+0x31>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_func>:
push   %rax
call   *%rsi
test   %eax,%eax
jg     1123 <call_func+0x13>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [19 x i8] c"An error occurred!\00"
define i32 @call_func(i32 %0, i32 (i32)* nocapture %1) {
%3 = tail call i32 %1(i32 %0)
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 0
}