xunge/DecIR huggingface dataset:
int main() {
  int a[3] = {1, 2, 3};
  int *p;
  int *pp;
  p = &a[2];
  pp = &((((((((((((((a[2]))))))))))))));
  return *p == *pp;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
%5 = bitcast [3 x i32]* %2 to i8*
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
store i32* %6, i32** %3
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
store i32* %7, i32** %4
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = icmp eq i32 %9, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fexist(char *fname) {
  FILE *test;
  if (fname == NULL)
    return 0;
  test = fopen(fname, "r");
  if (test == NULL)
    return 0;
  else {
    fclose(test);
    return 1;
  }
}


x86 assembly (clang, -O0):
<fexist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <fexist+0x23>
movl   $0x0,-0x4(%rbp)
jmp    117e <fexist+0x5e>
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116e <fexist+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    117e <fexist+0x5e>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fexist>:
push   %rbx
xor    %ebx,%ebx
test   %rdi,%rdi
je     1146 <fexist+0x26>
lea    0xed1(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1146 <fexist+0x26>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @fexist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %4
%11 = load i32*, i32** %4
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 0, i32* %2
br label %17
14: ; preds = %8
%15 = load i32*, i32** %4
%16 = call i32 @fclose(i32* %15)
store i32 1, i32* %2
br label %17
17: ; preds = %14, %13, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @fexist(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @fclose(i32* %4)
br label %8
8: ; preds = %3, %1, %6
%9 = phi i32 [ 1, %6 ], [ 0, %1 ], [ 0, %3 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_EX_new;
typedef int /*<<< orphan*/ CRYPTO_EX_free;
typedef int /*<<< orphan*/ CRYPTO_EX_dup;

/* Variables and functions */
int /*<<< orphan*/ CRYPTO_EX_INDEX_SSL_SESSION;
int CRYPTO_get_ex_new_index(int /*<<< orphan*/, long, void *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *);
int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
                                 CRYPTO_EX_dup *dup_func,
                                 CRYPTO_EX_free *free_func) {
  return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_SESSION, argl, argp,
                                 new_func, dup_func, free_func);
}


x86 assembly (clang, -O0):
<SSL_SESSION_get_ex_new_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1030 <CRYPTO_get_ex_new_index@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSL_SESSION_get_ex_new_index>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
jmp    1030 <CRYPTO_get_ex_new_index@plt>

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

LLVM IR (-O2):
@CRYPTO_EX_INDEX_SSL_SESSION = global i32 0
define i32 @SSL_SESSION_get_ex_new_index(i64 %0, i8* %1, i32* %2, i32* %3, i32* %4) {
%6 = load i32, i32* @CRYPTO_EX_INDEX_SSL_SESSION
%7 = tail call i32 @CRYPTO_get_ex_new_index(i32 %6, i64 %0, i8* %1, i32* %2, i32* %3, i32* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ rm_fd(int);
int /*<<< orphan*/ signal_main_thread();
void rm_fd_and_signal(int fd) {
  rm_fd(fd);
  signal_main_thread();
}


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

x86 assembly (clang, -O2):
<rm_fd_and_signal>:
push   %rax
call   1030 <rm_fd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <signal_main_thread@plt>

LLVM IR (-O0):
define void @rm_fd_and_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rm_fd(i32 %3)
%5 = call i32 (...) @signal_main_thread()
ret void
}

LLVM IR (-O2):
define void @rm_fd_and_signal(i32 %0) {
%2 = tail call i32 @rm_fd(i32 %0)
%3 = tail call i32 (...) @signal_main_thread()
ret void
}
void SkipWhiteSpace(ptr) char **ptr;
{
  SkipComments(ptr);
  while (is_space_char(**ptr) && **ptr != '\0')
    CInc(ptr);
}


x86 assembly (clang, -O0):
<SkipWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <SkipComments@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
mov    $0x0,%al
call   1040 <is_space_char@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     117b <SkipWhiteSpace+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    118b <SkipWhiteSpace+0x5b>
jmp    119b <SkipWhiteSpace+0x6b>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <CInc@plt>
jmp    1147 <SkipWhiteSpace+0x17>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipWhiteSpace>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <SkipComments@plt>
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%rax
movsbl (%rax),%edi
xor    %eax,%eax
call   1040 <is_space_char@plt>
test   %eax,%eax
je     1165 <SkipWhiteSpace+0x35>
mov    (%rbx),%rax
cmpb   $0x0,(%rax)
je     1165 <SkipWhiteSpace+0x35>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <CInc@plt>
jmp    1140 <SkipWhiteSpace+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @SkipWhiteSpace(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 (i8**, ...) bitcast (i32 (...)* @SkipComments to i32 (i8**, ...)*)(i8** %3)
br label %5
5: ; preds = %20, %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = call i32 (i32, ...) bitcast (i32 (...)* @is_space_char to i32 (i32, ...)*)(i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %5
%13 = load i8**, i8*** %2
%14 = load i8*, i8** %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %12, %5
%19 = phi i1 [ false, %5 ], [ %17, %12 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8**, i8*** %2
%22 = call i32 (i8**, ...) bitcast (i32 (...)* @CInc to i32 (i8**, ...)*)(i8** %21)
br label %5
23: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @SkipWhiteSpace(i8** %0) {
%2 = tail call i32 (i8**, ...) bitcast (i32 (...)* @SkipComments to i32 (i8**, ...)*)(i8** %0)
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @is_space_char to i32 (i32, ...)*)(i32 %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %19, label %8
8: ; preds = %1, %12
%9 = load i8*, i8** %0
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %8
%13 = tail call i32 (i8**, ...) bitcast (i32 (...)* @CInc to i32 (i8**, ...)*)(i8** %0)
%14 = load i8*, i8** %0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @is_space_char to i32 (i32, ...)*)(i32 %16)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %8
19: ; preds = %8, %12, %1
ret void
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ perror(char *);
void sqImageFileClose(int f) {
  if (close(f) < 0)
    perror("sqImageFileClose close");
}


x86 assembly (clang, -O0):
<sqImageFileClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
jge    1149 <sqImageFileClose+0x29>
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqImageFileClose>:
push   %rax
call   1030 <close@plt>
test   %rax,%rax
js     112d <sqImageFileClose+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

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

LLVM IR (-O2):
@.str = [23 x i8] c"sqImageFileClose close\00"
define void @sqImageFileClose(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
scalar_t__ _stp_random_u(int);
int _stp_random_pm(unsigned n) {
  return -(int)n + (int)_stp_random_u(2 * n + 1);
}


x86 assembly (clang, -O0):
<_stp_random_pm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    $0x1,%edi
call   1030 <_stp_random_u@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stp_random_pm>:
push   %rbx
mov    %edi,%ebx
lea    (%rbx,%rbx,1),%edi
add    $0x1,%edi
call   1030 <_stp_random_u@plt>
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_stp_random_pm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = load i32, i32* %2
%6 = mul i32 2, %5
%7 = add i32 %6, 1
%8 = call i64 @_stp_random_u(i32 %7)
%9 = trunc i64 %8 to i32
%10 = add nsw i32 %4, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @_stp_random_pm(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
%4 = tail call i64 @_stp_random_u(i32 %3)
%5 = trunc i64 %4 to i32
%6 = sub i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int dq_size_impl();
int dq_size() { return dq_size_impl(); }


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

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

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

LLVM IR (-O2):
define i32 @dq_size() {
%1 = tail call i32 (...) @dq_size_impl()
ret i32 %1
}
float npfade(float t) { return (t * t * t * (t * (t * 6.0f - 15.0f) + 10.0f)); }


x86 assembly (clang, -O0):
<npfade>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  0xeda(%rip),%xmm3
mulss  %xmm3,%xmm2
movss  0xed2(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xeba(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<npfade>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xeed(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  0xee5(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  0xedd(%rip),%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @npfade(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = load float, float* %2
%10 = call float @llvm.fmuladd.f32(float %9, float 6.000000e+00, float -1.500000e+01)
%11 = call float @llvm.fmuladd.f32(float %8, float %10, float 1.000000e+01)
%12 = fmul float %7, %11
ret float %12
}

LLVM IR (-O2):
define float @npfade(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
%4 = tail call float @llvm.fmuladd.f32(float %0, float 6.000000e+00, float -1.500000e+01)
%5 = tail call float @llvm.fmuladd.f32(float %0, float %4, float 1.000000e+01)
%6 = fmul float %3, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ hires_timer(double *);
void HIRES_TIMER(double *d) { hires_timer(d); }


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

x86 assembly (clang, -O2):
<HIRES_TIMER>:
jmp    1030 <hires_timer@plt>

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

LLVM IR (-O2):
define void @HIRES_TIMER(double* %0) {
%2 = tail call i32 @hires_timer(double* %0)
ret void
}
/* Variables and functions */
scalar_t__ isupper(char);
char tolower(char);
void downcase(char *s) {
  while (*s != (char)0) {
    if (isupper(*s))
      *s = tolower(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<downcase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1177 <downcase+0x57>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     1166 <downcase+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <downcase+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<downcase>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1155 <downcase+0x35>
mov    %rdi,%rbx
jmp    113c <downcase+0x1c>
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1155 <downcase+0x35>
movsbl %al,%edi
call   1040 <isupper@plt>
test   %rax,%rax
je     1130 <downcase+0x10>
movsbl (%rbx),%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
jmp    1130 <downcase+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @downcase(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %18, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isupper(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = call signext i8 @tolower(i8 signext %15)
%17 = load i8*, i8** %2
store i8 %16, i8* %17
br label %18
18: ; preds = %13, %8
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
br label %3
21: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @downcase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i64 @isupper(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = tail call signext i8 @tolower(i8 signext %10)
store i8 %11, i8* %6
br label %12
12: ; preds = %9, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ texConv_ARGB1555_ARGB4444(unsigned char *, unsigned char *,
                                             int);
void TexConv_ARGB1555_ARGB4444(unsigned char *src, unsigned char *dst,
                               int width, int height) {
  int size = (width * height) >> 1;
  texConv_ARGB1555_ARGB4444(src, dst, size);
}


x86 assembly (clang, -O0):
<TexConv_ARGB1555_ARGB4444>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <texConv_ARGB1555_ARGB4444@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TexConv_ARGB1555_ARGB4444>:
imul   %ecx,%edx
sar    %edx
jmp    1030 <texConv_ARGB1555_ARGB4444@plt>

LLVM IR (-O0):
define void @TexConv_ARGB1555_ARGB4444(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = mul nsw i32 %10, %11
%13 = ashr i32 %12, 1
store i32 %13, i32* %9
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = load i32, i32* %9
%17 = call i32 @texConv_ARGB1555_ARGB4444(i8* %14, i8* %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @TexConv_ARGB1555_ARGB4444(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %2
%6 = ashr i32 %5, 1
%7 = tail call i32 @texConv_ARGB1555_ARGB4444(i8* %0, i8* %1, i32 %6)
ret void
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cintern(char *);
int /*<<< orphan*/ setvar(int /*<<< orphan*/, int /*<<< orphan*/, struct obj *);
void init_trace_version(void) {
  setvar(cintern("*trace-version*"),
         cintern("$Id: trace.c,v 1.1.1.1 2003/01/15 23:55:13 ulric Exp $"),
         ((struct obj *)0));
}


x86 assembly (clang, -O0):
<init_trace_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,-0x4(%rbp)
lea    0xed2(%rip),%rdi
call   1040 <cintern@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setvar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_trace_version>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,%ebx
lea    0xeda(%rip),%rdi
call   1040 <cintern@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <setvar@plt>

LLVM IR (-O0):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*trace-version*\00"
@.str.1 = [55 x i8] c"$Id: trace.c,v 1.1.1.1 2003/01/15 23:55:13 ulric Exp $\00"
define void @init_trace_version() {
%1 = call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cintern(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}

LLVM IR (-O2):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*trace-version*\00"
@.str.1 = [55 x i8] c"$Id: trace.c,v 1.1.1.1 2003/01/15 23:55:13 ulric Exp $\00"
define void @init_trace_version() {
%1 = tail call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cintern(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ xfwrite(char const *, size_t, int /*<<< orphan*/ *);
void write_binary_string(const char *string, size_t len, FILE *to) {
  xfwrite(string, len, to);
}


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

x86 assembly (clang, -O2):
<write_binary_string>:
jmp    1030 <xfwrite@plt>

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

LLVM IR (-O2):
define void @write_binary_string(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @xfwrite(i8* %0, i64 %1, i32* %2)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
int UINT64_C(int);
int UINT64_MAX;
uint64_t data__coco_calc(int32_t x, int32_t y) {
  uint64_t ii;
  ii = UINT64_C(900000000);
  ii += y;
  ii &= UINT64_MAX - 16384 + 1;
  ii <<= 32;
  ii += UINT64_C(1800000000);
  ii += x;
  return ii;
}


x86 assembly (clang, -O0):
<data__coco_calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x35a4e900,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
sub    $0x4000,%eax
add    $0x1,%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    $0x6b49d200,%edi
call   1030 <UINT64_C@plt>
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data__coco_calc>:
push   %rax
mov    $0x35a4e900,%edi
call   1030 <UINT64_C@plt>
mov    $0x6b49d200,%edi
pop    %rax
jmp    1030 <UINT64_C@plt>

LLVM IR (-O0):
@UINT64_MAX = global i32 0
define i32 @data__coco_calc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = call i32 @UINT64_C(i32 900000000)
store i32 %6, i32* %5
%7 = load i64, i64* %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* @UINT64_MAX
%13 = sub nsw i32 %12, 16384
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %5
%16 = and i32 %15, %14
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = shl i32 %17, 32
store i32 %18, i32* %5
%19 = call i32 @UINT64_C(i32 1800000000)
%20 = load i32, i32* %5
%21 = add nsw i32 %20, %19
store i32 %21, i32* %5
%22 = load i64, i64* %3
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = add nsw i64 %24, %22
%26 = trunc i64 %25 to i32
store i32 %26, i32* %5
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
@UINT64_MAX = global i32 0
define i32 @data__coco_calc(i64 %0, i64 %1) {
%3 = tail call i32 @UINT64_C(i32 900000000)
%4 = tail call i32 @UINT64_C(i32 1800000000)
ret i32 poison
}
unsigned short lcgrand(unsigned *state) {
  *state = (*state) * 1103515245 + 12345;
  return (*state) >> 16;
}


x86 assembly (clang, -O0):
<lcgrand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x41c64e6d,(%rax),%ecx
add    $0x3039,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shr    $0x10,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcgrand>:
imul   $0x41c64e6d,(%rdi),%eax
add    $0x3039,%eax
mov    %eax,(%rdi)
shr    $0x10,%eax
ret

LLVM IR (-O0):
define zeroext i16 @lcgrand(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul i32 %4, 1103515245
%6 = add i32 %5, 12345
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = load i32*, i32** %2
%9 = load i32, i32* %8
%10 = lshr i32 %9, 16
%11 = trunc i32 %10 to i16
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @lcgrand(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, 1103515245
%4 = add i32 %3, 12345
store i32 %4, i32* %0
%5 = lshr i32 %4, 16
%6 = trunc i32 %5 to i16
ret i16 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printBinary(unsigned int num) {
  int i;
  for (i = 0; i < 32; i++) {
    if (num & (1 << (31 - i))) {
      printf("1");
    } else {
      printf("0");
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    117b <printBinary+0x6b>
mov    -0x4(%rbp),%eax
mov    $0x1f,%ecx
sub    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     115c <printBinary+0x4c>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1168 <printBinary+0x58>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    116d <printBinary+0x5d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printBinary+0x12>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBinary>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%eax
mov    %ebp,%ecx
shl    %cl,%eax
and    $0x80000000,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x20,%ebp
jne    1120 <printBinary+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @printBinary(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %19, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = sub nsw i32 31, %9
%11 = shl i32 1, %10
%12 = and i32 %8, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %7
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %18
16: ; preds = %7
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %4
22: ; preds = %4
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @printBinary(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %9, %2 ]
%4 = lshr i32 -2147483648, %3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 48, i32 49
%8 = tail call i32 @putchar(i32 %7)
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %2
11: ; preds = %2
%12 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int first_3_of_5(int);
int last_2_of_5(int value) {
  int first3 = first_3_of_5(value);
  return value - first3 * 100;
}


x86 assembly (clang, -O0):
<last_2_of_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <first_3_of_5@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x64,-0x8(%rbp),%ecx
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_2_of_5>:
push   %rbx
mov    %edi,%ebx
call   1030 <first_3_of_5@plt>
imul   $0xffffff9c,%eax,%eax
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @last_2_of_5(i32 %0) {
%2 = tail call i32 @first_3_of_5(i32 %0)
%3 = mul i32 %2, -100
%4 = add i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int Kit_CubeHasLit(unsigned int, int);
int Kit_CubeIsMarked(unsigned uCube) { return Kit_CubeHasLit(uCube, 31); }


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

x86 assembly (clang, -O2):
<Kit_CubeIsMarked>:
mov    $0x1f,%esi
jmp    1030 <Kit_CubeHasLit@plt>

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

LLVM IR (-O2):
define i32 @Kit_CubeIsMarked(i32 %0) {
%2 = tail call i32 @Kit_CubeHasLit(i32 %0, i32 31)
ret i32 %2
}
int nn_bitset_isset(unsigned numbits, const unsigned *bits, unsigned idx) {
  return idx < numbits && (bits[idx / 32] & (1u << (31 - (idx % 32))));
}


x86 assembly (clang, -O0):
<nn_bitset_isset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x15(%rbp)
jae    114f <nn_bitset_isset+0x4f>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shr    $0x5,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%eax
mov    -0x14(%rbp),%edx
and    $0x1f,%edx
mov    $0x1f,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_bitset_isset>:
xor    %eax,%eax
cmp    %edi,%edx
jae    1117 <nn_bitset_isset+0x17>
mov    %edx,%eax
shr    $0x5,%eax
mov    (%rsi,%rax,4),%eax
not    %dl
mov    %edx,%ecx
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nn_bitset_isset(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %23
10: ; preds = %3
%11 = load i32*, i32** %5
%12 = load i32, i32* %6
%13 = udiv i32 %12, 32
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %11, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = urem i32 %17, 32
%19 = sub i32 31, %18
%20 = shl i32 1, %19
%21 = and i32 %16, %20
%22 = icmp ne i32 %21, 0
br label %23
23: ; preds = %10, %3
%24 = phi i1 [ false, %3 ], [ %22, %10 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @nn_bitset_isset(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp ult i32 %2, %0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = lshr i32 %2, 5
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %2, 31
%11 = xor i32 %10, 31
%12 = lshr i32 %9, %11
%13 = and i32 %12, 1
br label %14
14: ; preds = %5, %3
%15 = phi i32 [ 0, %3 ], [ %13, %5 ]
ret i32 %15
}
/* Variables and functions */
int syscall(int, int, void *, unsigned int, int /*<<< orphan*/,
            int /*<<< orphan*/, int /*<<< orphan*/);
int write(int fd, void *buffer, unsigned int size) {
  return syscall(4, fd, buffer, size, 0, 0, 0);
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x4,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    $0x4,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <syscall@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @syscall(i32 4, i32 %0, i8* %1, i32 %2, i32 0, i32 0, i32 0)
ret i32 %4
}
int g_DUMMY_cons_printf(const char *format, ...) {
  format = format;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @g_DUMMY_cons_printf(i8* nocapture readnone %0, ...) {
ret i32 0
}
int __doPreflopBet(struct hand *thishand) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hand = type opaque
define i32 @__doPreflopBet(%struct.hand* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(unsigned int *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  unsigned y;
  fprintf(stderr, "main 1\n");
  f(&y);
  fprintf(stderr, "main 2\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
lea    -0x14(%rbp),%rdi
call   1030 <f@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eb4(%rip),%rbx
mov    (%rbx),%edi
lea    0xecb(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xc(%rsp),%rdi
call   1030 <f@plt>
mov    (%rbx),%edi
lea    0xebb(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"main 1\0A\00"
@.str.1 = [8 x i8] c"main 2\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @f(i32* %6)
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"main 1\0A\00"
@.str.1 = [8 x i8] c"main 2\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @f(i32* %3)
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void clr7(int *x) { memset(x, 0, 7); }


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

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

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

LLVM IR (-O2):
define void @clr7(i32* %0) {
%2 = tail call i32 @memset(i32* %0, i32 0, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int strlen(char *);
int main() {
  char p[] = "hello world";
  if (strlen(p) != 11)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xb,%eax
je     115c <main+0x3c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,0x8(%rsp)
movl   $0x646c72,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <strlen@plt>
cmp    $0xb,%eax
jne    1151 <main+0x31>
xor    %eax,%eax
add    $0x18,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.p = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = bitcast [12 x i8]* %2 to i8*
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = icmp ne i32 %5, 11
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.p = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = icmp eq i32 %3, 11
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret i32 0
}
void func_nofb(void) {
  extern void func_nofb_marker(void);
  func_nofb_marker();
}


x86 assembly (clang, -O0):
<func_nofb>:
push   %rbp
mov    %rsp,%rbp
call   1030 <func_nofb_marker@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_nofb>:
jmp    1030 <func_nofb_marker@plt>

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

LLVM IR (-O2):
define void @func_nofb() {
tail call void @func_nofb_marker()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SO_SNDBUF;
int get_sockbuf_size(int, int /*<<< orphan*/, size_t *const, char *);
int get_sendbuf(int sockfd, size_t *const len) {
  return get_sockbuf_size(sockfd, SO_SNDBUF, len, "send");
}


x86 assembly (clang, -O0):
<get_sendbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rcx
call   1030 <get_sockbuf_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sendbuf>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
lea    0xedd(%rip),%rcx
jmp    1030 <get_sockbuf_size@plt>

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

LLVM IR (-O2):
@SO_SNDBUF = global i32 0
@.str = [5 x i8] c"send\00"
define i32 @get_sendbuf(i32 %0, i64* %1) {
%3 = load i32, i32* @SO_SNDBUF
%4 = tail call i32 @get_sockbuf_size(i32 %0, i32 %3, i64* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
void write(int **p) { *p = 1; }


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

x86 assembly (clang, -O2):
<write>:
movq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @write(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
store i32* inttoptr (i64 1 to i32*), i32** %3
ret void
}

LLVM IR (-O2):
define void @write(i32** nocapture writeonly %0) {
store i32* inttoptr (i64 1 to i32*), i32** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ event_pool_deinit();
int /*<<< orphan*/ event_pool_init();
void event_pool_remove_created_codes(void) {
  event_pool_deinit();
  event_pool_init();
}


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

x86 assembly (clang, -O2):
<event_pool_remove_created_codes>:
push   %rax
xor    %eax,%eax
call   1030 <event_pool_deinit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <event_pool_init@plt>

LLVM IR (-O0):
define void @event_pool_remove_created_codes() {
%1 = call i32 (...) @event_pool_deinit()
%2 = call i32 (...) @event_pool_init()
ret void
}

LLVM IR (-O2):
define void @event_pool_remove_created_codes() {
%1 = tail call i32 (...) @event_pool_deinit()
%2 = tail call i32 (...) @event_pool_init()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_xor_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_xor_si64(__m64 a, __m64 b) { return _mm_xor_si64(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_xor_si64>:
jmp    1030 <_mm_xor_si64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_xor_si64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_xor_si64(i32 %0, i32 %1)
ret i32 %3
}
void ff_hevc_put_hevc_bi_qpel_h16_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h16_10_avx2() {
ret void
}
/* Variables and functions */
size_t oct_idx(size_t a, size_t b, size_t c) {
  enum { xxx = 0, yyy, zzz, xxy, xxz, xyy, yyz, xzz, yzz, xyz };
  static const size_t idx[] = {xxx, xxy, xxz, xxy, xyy, xyz, xxz, xyz, xzz,
                               xxy, xyy, xyz, xyy, yyy, yyz, xyz, yyz, yzz,
                               xxz, xyz, xzz, xyz, yyz, yzz, xzz, yzz, zzz};
  return idx[a * 9 + b * 3 + c];
}


x86 assembly (clang, -O0):
<oct_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
imul   $0x9,-0x8(%rbp),%rcx
imul   $0x3,-0x10(%rbp),%rax
add    %rax,%rcx
add    -0x18(%rbp),%rcx
lea    0xed8(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct_idx>:
lea    (%rdi,%rdi,8),%rax
lea    (%rsi,%rsi,2),%rcx
add    %rax,%rcx
add    %rdx,%rcx
lea    0xeeb(%rip),%rax
mov    (%rax,%rcx,8),%rax
ret

LLVM IR (-O0):
@oct_idx.idx = internal constant [27 x i64] [i64 0, i64 3, i64 4, i64 3, i64 5, i64 9, i64 4, i64 9, i64 7, i64 3, i64 5, i64 9, i64 5, i64 1, i64 6, i64 9, i64 6, i64 8, i64 4, i64 9, i64 7, i64 9, i64 6, i64 8, i64 7, i64 8, i64 2]
define i64 @oct_idx(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = mul i64 %7, 9
%9 = load i64, i64* %5
%10 = mul i64 %9, 3
%11 = add i64 %8, %10
%12 = load i64, i64* %6
%13 = add i64 %11, %12
%14 = getelementptr inbounds [27 x i64], [27 x i64]* @oct_idx.idx, i64 0, i64 %13
%15 = load i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
@oct_idx.idx = internal unnamed_addr constant [27 x i64] [i64 0, i64 3, i64 4, i64 3, i64 5, i64 9, i64 4, i64 9, i64 7, i64 3, i64 5, i64 9, i64 5, i64 1, i64 6, i64 9, i64 6, i64 8, i64 4, i64 9, i64 7, i64 9, i64 6, i64 8, i64 7, i64 8, i64 2]
define i64 @oct_idx(i64 %0, i64 %1, i64 %2) {
%4 = mul i64 %0, 9
%5 = mul i64 %1, 3
%6 = add i64 %5, %4
%7 = add i64 %6, %2
%8 = getelementptr inbounds [27 x i64], [27 x i64]* @oct_idx.idx, i64 0, i64 %7
%9 = load i64, i64* %8
ret i64 %9
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *, char *);
void MSCP_ResponseSink_ConnectionManager_GetProtocolInfo(
    struct UPnPService *Service, int ErrorCode, void *User, char *Source,
    char *Sink) {
  printf("MSCP_ Invoke Response: "
         "ConnectionManager/GetProtocolInfo[ErrorCode:%d](%s,%s)\r\n",
         ErrorCode, Source, Sink);
}


x86 assembly (clang, -O0):
<MSCP_ResponseSink_ConnectionManager_GetProtocolInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MSCP_ResponseSink_ConnectionManager_GetProtocolInfo>:
lea    0xee9(%rip),%rdi
mov    %rcx,%rdx
mov    %r8,%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [80 x i8] c"MSCP_ Invoke Response: ConnectionManager/GetProtocolInfo[ErrorCode:%d](%s,%s)\0D\0A\00"
define void @MSCP_ResponseSink_ConnectionManager_GetProtocolInfo(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca %struct.UPnPService*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %7
%12 = load i8*, i8** %9
%13 = load i8*, i8** %10
%14 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [80 x i8] c"MSCP_ Invoke Response: ConnectionManager/GetProtocolInfo[ErrorCode:%d](%s,%s)\0D\0A\00"
define void @MSCP_ResponseSink_ConnectionManager_GetProtocolInfo(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3, i8* %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3, i8* %4)
ret void
}