xunge/DecIR huggingface dataset:
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
void cmd_getch(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_int(getch());
}


x86 assembly (clang, -O0):
<cmd_getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_getch+0x27>
jmp    117f <cmd_getch+0x3f>
mov    $0x1,%edi
call   1040 <report_count@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    %eax,%edi
call   1050 <report_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_getch>:
push   %rax
xor    %esi,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_getch+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
xor    %eax,%eax
call   1060 <getch@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <report_int@plt>

LLVM IR (-O0):
define void @cmd_getch(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @getch()
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_getch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @getch()
%8 = tail call i32 @report_int(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int fsize(char const *);
int FILE_SIZE(const char *fname, int len) { return fsize(fname); }


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

x86 assembly (clang, -O2):
<FILE_SIZE>:
jmp    1030 <fsize@plt>

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

LLVM IR (-O2):
define i32 @FILE_SIZE(i8* %0, i32 %1) {
%3 = tail call i32 @fsize(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void t8(char **x) { free((*x) + 8); }


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

x86 assembly (clang, -O2):
<t8>:
mov    (%rdi),%rdi
add    $0x8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @t8(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 8
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @t8(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 8
%4 = tail call i32 @free(i8* %3)
ret void
}
void eat_lexeme(char **text, int *length) {
  if (!*length)
    return;
  if (**text == '\\' && *length > 1)
    (*text) += 2, (*length) -= 2;
  else
    (*text) += 1, (*length) -= 1;
}


x86 assembly (clang, -O0):
<eat_lexeme>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    111e <eat_lexeme+0x1e>
jmp    1175 <eat_lexeme+0x75>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    115c <eat_lexeme+0x5c>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jle    115c <eat_lexeme+0x5c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x2,%ecx
mov    %ecx,(%rax)
jmp    1175 <eat_lexeme+0x75>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_lexeme>:
mov    (%rsi),%eax
test   %eax,%eax
je     112c <eat_lexeme+0x2c>
mov    (%rdi),%rcx
cmpb   $0x5c,(%rcx)
sete   %r8b
cmp    $0x2,%eax
setge  %dl
and    %r8b,%dl
movzbl %dl,%edx
add    %rdx,%rcx
add    $0x1,%rcx
mov    %rcx,(%rdi)
not    %edx
add    %eax,%edx
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define void @eat_lexeme(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 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
br label %33
9: ; preds = %2
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 92
br i1 %14, label %15, label %26
15: ; preds = %9
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8* %22, i8** %20
%23 = load i32*, i32** %4
%24 = load i32, i32* %23
%25 = sub nsw i32 %24, 2
store i32 %25, i32* %23
br label %33
26: ; preds = %15, %9
%27 = load i8**, i8*** %3
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 1
store i8* %29, i8** %27
%30 = load i32*, i32** %4
%31 = load i32, i32* %30
%32 = sub nsw i32 %31, 1
store i32 %32, i32* %30
br label %33
33: ; preds = %8, %26, %19
ret void
}

LLVM IR (-O2):
define void @eat_lexeme(i8** nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2
%6 = load i8*, i8** %0
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 92
%9 = icmp sgt i32 %3, 1
%10 = select i1 %8, i1 %9, i1 false
%11 = select i1 %10, i64 2, i64 1
%12 = select i1 %10, i32 -2, i32 -1
%13 = getelementptr inbounds i8, i8* %6, i64 %11
store i8* %13, i8** %0
%14 = add nsw i32 %3, %12
store i32 %14, i32* %1
br label %15
15: ; preds = %5, %2
ret void
}
void Hardware_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Hardware_Init() {
ret void
}
/* Variables and functions */
scalar_t__ _U_Qfcmp(long double, long double, int);
int _U_Qfle(long double a, long double b) { return (_U_Qfcmp(a, b, 13) != 0); }


x86 assembly (clang, -O0):
<_U_Qfle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0xd,%edi
call   1030 <_U_Qfcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qfle>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0xd,%edi
call   1030 <_U_Qfcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @_U_Qfle(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @_U_Qfcmp(x86_fp80 %5, x86_fp80 %6, i32 13)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_U_Qfle(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @_U_Qfcmp(x86_fp80 %0, x86_fp80 %1, i32 13)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_error_msg(void) {
  printf("'ellip_pt' tests various methods of converting parallax\n"
         "constants to/from latitude/altitude.  Run it as either:\n"
         "\n"
         "ellip_pt (rho cos phi) (rho sin phi) p\n"
         "ellip_pt (latitude) (altitude in meters) p\n"
         "\n"
         "To this can be added 'e(axis ratio).  The default axis ratio\n"
         "is that for the WGS-84 ellipsoid.\n");
}


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

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

LLVM IR (-O0):
@.str = [292 x i8] c"'ellip_pt' tests various methods of converting parallax\0Aconstants to/from latitude/altitude. Run it as either:\0A\0Aellip_pt (rho cos phi) (rho sin phi) p\0Aellip_pt (latitude) (altitude in meters) p\0A\0ATo this can be added 'e(axis ratio). The default axis ratio\0Ais that for the WGS-84 ellipsoid.\0A\00"
define void @show_error_msg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [291 x i8] c"'ellip_pt' tests various methods of converting parallax\0Aconstants to/from latitude/altitude. Run it as either:\0A\0Aellip_pt (rho cos phi) (rho sin phi) p\0Aellip_pt (latitude) (altitude in meters) p\0A\0ATo this can be added 'e(axis ratio). The default axis ratio\0Ais that for the WGS-84 ellipsoid.\00"
define void @show_error_msg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([291 x i8], [291 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
void setArrayB(int8_t *arr, int idx, int8_t v) { arr[idx] = v; }


x86 assembly (clang, -O0):
<setArrayB>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setArrayB>:
movslq %esi,%rax
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @setArrayB(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 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 %7, i32* %11
ret void
}

LLVM IR (-O2):
define void @setArrayB(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %2, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sset_point_gauss_legendre_(int *, int *, float *, float *);
void SSET_POINT_GAUSS_LEGENDRE(int *nbe, int *e, float *xe, float *we) {
  sset_point_gauss_legendre_(nbe, e, xe, we);
}


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

x86 assembly (clang, -O2):
<SSET_POINT_GAUSS_LEGENDRE>:
jmp    1030 <sset_point_gauss_legendre_@plt>

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

LLVM IR (-O2):
define void @SSET_POINT_GAUSS_LEGENDRE(i32* %0, i32* %1, float* %2, float* %3) {
%5 = tail call i32 @sset_point_gauss_legendre_(i32* %0, i32* %1, float* %2, float* %3)
ret void
}
float f(float x, float y) { return x - y; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
subss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @f(float %0, float %1) {
%3 = fsub float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
void _flushlbf(void) { fflush(0); }


x86 assembly (clang, -O0):
<_flushlbf>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_flushlbf>:
xor    %edi,%edi
jmp    1030 <fflush@plt>

LLVM IR (-O0):
define void @_flushlbf() {
%1 = call i32 @fflush(i32 0)
ret void
}

LLVM IR (-O2):
define void @_flushlbf() {
%1 = tail call i32 @fflush(i32 0)
ret void
}
void leela_random_dummy__() {}


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

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

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

LLVM IR (-O2):
define void @leela_random_dummy__() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int n;
  n = 25;
  printf("Before manipulation with pointers \n");
  printf("n is: %d\n", 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)
movl   $0x19,-0x14(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x19,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Before manipulation with pointers \0A\00"
@.str.1 = [10 x i8] c"n is: %d\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
store i32 25, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"n is: %d\0A\00"
@str = [35 x i8] c"Before manipulation with pointers \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 25)
ret i32 0
}
/* Variables and functions */
int unlink(char *);
int pce_pidfile_delete(char *pathname) { return unlink(pathname); }


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

x86 assembly (clang, -O2):
<pce_pidfile_delete>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @pce_pidfile_delete(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void intern_free_dico(char **dico) {
  int i = 0;
  char **d = dico;
  while (i < 27) {
    char **x = (char **)d[i];
    if (x) {
      intern_free_dico(x);
      free(x);
    }
    ++i;
  }
}


x86 assembly (clang, -O0):
<intern_free_dico>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1b,-0xc(%rbp)
jge    1180 <intern_free_dico+0x60>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1172 <intern_free_dico+0x52>
mov    -0x20(%rbp),%rdi
call   1040 <intern_free_dico@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <intern_free_dico+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intern_free_dico>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
jmp    113a <intern_free_dico+0x1a>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    $0x1b,%rbx
je     1155 <intern_free_dico+0x35>
mov    (%r14,%rbx,8),%r15
test   %r15,%r15
je     1130 <intern_free_dico+0x10>
mov    %r15,%rdi
call   1040 <intern_free_dico@plt>
mov    %r15,%rdi
call   1030 <free@plt>
jmp    1130 <intern_free_dico+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @intern_free_dico(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8**
store i8** %0, i8*** %2
store i32 0, i32* %3
%6 = load i8**, i8*** %2
store i8** %6, i8*** %4
br label %7
7: ; preds = %23, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 27
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load i8**, i8*** %4
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
%16 = bitcast i8* %15 to i8**
store i8** %16, i8*** %5
%17 = load i8**, i8*** %5
%18 = icmp ne i8** %17, null
br i1 %18, label %19, label %23
19: ; preds = %10
%20 = load i8**, i8*** %5
%21 = load i8**, i8*** %5
%22 = call i32 @free(i8** %21)
br label %23
23: ; preds = %19, %10
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %7
26: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @intern_free_dico(i8** nocapture %0) {
br label %2
2: ; preds = %1, %10
%3 = phi i64 [ 0, %1 ], [ %11, %10 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = bitcast i8** %4 to i8***
%6 = load i8**, i8*** %5
%7 = icmp eq i8** %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
tail call void @intern_free_dico(i8** %6)
%9 = tail call i32 @free(i8** %6)
br label %10
10: ; preds = %8, %2
%11 = add nuw nsw i64 %3, 1
%12 = icmp eq i64 %11, 27
br i1 %12, label %13, label %2
13: ; preds = %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GMP_RNDD;
int /*<<< orphan*/ mpfr_set_default_rounding_mode(int /*<<< orphan*/);
double mul_lo(double x, double y) {
  mpfr_set_default_rounding_mode(GMP_RNDD);
  ;
  return (x * y);
}


x86 assembly (clang, -O0):
<mul_lo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1030 <mpfr_set_default_rounding_mode@plt>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_lo>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1030 <mpfr_set_default_rounding_mode@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@GMP_RNDD = global i32 0
define double @mul_lo(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load i32, i32* @GMP_RNDD
%6 = call i32 @mpfr_set_default_rounding_mode(i32 %5)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fmul double %7, %8
ret double %9
}

LLVM IR (-O2):
@GMP_RNDD = global i32 0
define double @mul_lo(double %0, double %1) {
%3 = load i32, i32* @GMP_RNDD
%4 = tail call i32 @mpfr_set_default_rounding_mode(i32 %3)
%5 = fmul double %0, %1
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_version();
scalar_t__ strcmp(char *, char *);
void parse_argv(int argc, char *argv[]) {
  if (argc == 2 && 0 == strcmp(argv[1], "-v")) {
    print_version();
    exit(0);
  }
}


x86 assembly (clang, -O0):
<parse_argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1179 <parse_argv+0x49>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea8(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1179 <parse_argv+0x49>
mov    $0x0,%al
call   1030 <print_version@plt>
xor    %edi,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_argv>:
push   %rax
cmp    $0x2,%edi
jne    114b <parse_argv+0x1b>
mov    0x8(%rsi),%rdi
lea    0xebf(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     114d <parse_argv+0x1d>
pop    %rax
ret
xor    %eax,%eax
call   1030 <print_version@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"-v\00"
define void @parse_argv(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = tail call i32 (...) @print_version()
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %4, %2
ret void
}
void gtk_init_add() {}


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

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

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

LLVM IR (-O2):
define void @gtk_init_add() {
ret void
}
int strcmp(const char *str1, const char *str2) {
  for (; *str1 && *str1 == *str2; ++str1, ++str2)
    ;
  return *((unsigned char *)str1) - *((unsigned char *)str2);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1169 <strcmp+0x69>
jmp    114c <strcmp+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
test   %al,%al
je     1123 <strcmp+0x23>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
cmp    (%rsi),%al
jne    1125 <strcmp+0x25>
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
movzbl %al,%eax
movzbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %7
%10 = icmp eq i8 %6, %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i8* [ %1, %2 ], [ %13, %11 ], [ %7, %5 ]
%18 = phi i8 [ 0, %2 ], [ 0, %11 ], [ %6, %5 ]
%19 = zext i8 %18 to i32
%20 = load i8, i8* %17
%21 = zext i8 %20 to i32
%22 = sub nsw i32 %19, %21
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *appname) {
  printf("usage: %s [-f J|C[separator]] [-o outputfile] [-a sum_name] "
         "metadata.mfs PATH ...\n",
         appname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"usage: %s [-f J|C[separator]] [-o outputfile] [-a sum_name] metadata.mfs PATH ...\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [83 x i8] c"usage: %s [-f J|C[separator]] [-o outputfile] [-a sum_name] metadata.mfs PATH ...\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int resetty();
int wrap_resetty(void) { return resetty(); }


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

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

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

LLVM IR (-O2):
define i32 @wrap_resetty() {
%1 = tail call i32 (...) @resetty()
ret i32 %1
}
int main(int argv, char **argc) {
  printf("%d\n", &main);
  print_chars(*(argc + 1));
  printf("%d\n", strlen(*(argc + 1)));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
mov    0x2e9b(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1030 <print_chars@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    %rax,%rsi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0xec2(%rip),%r14
mov    0x2ea3(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %eax,%eax
call   1030 <print_chars@plt>
mov    0x8(%rbx),%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 (i32, i8**)* @main)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print_chars to i32 (i8*, ...)*)(i8* %5)
%7 = load i8*, i8** %4
%8 = tail call i64 @strlen(i8* dereferenceable(1) %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addone(int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 1;
  addone(&i);
  printf("%d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <addone@plt>
mov    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @addone(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void ff_hevc_put_hevc_uni_epel_v8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v8_10_sse4() {
ret void
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
uint32_t get_uint32le(unsigned char *p) {
  return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0];
}


x86 assembly (clang, -O0):
<get_uint32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint32le>:
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @get_uint32le(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ KVM_RUN;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int kvm_run(int fd) { return ioctl(fd, KVM_RUN, 0); }


x86 assembly (clang, -O0):
<kvm_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ecb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kvm_run>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@KVM_RUN = global i32 0
define i32 @kvm_run(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @KVM_RUN
%5 = call i32 @ioctl(i32 %3, i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
@KVM_RUN = global i32 0
define i32 @kvm_run(i32 %0) {
%2 = load i32, i32* @KVM_RUN
%3 = tail call i32 @ioctl(i32 %0, i32 %2, i32 0)
ret i32 %3
}
int kill(int pid, int sig) {}


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

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

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

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
ret i32 undef
}
unsigned char max_pred_sfb(const unsigned char sr_index) {
  static const unsigned char pred_sfb_max[] = {33, 33, 38, 40, 40, 40,
                                               41, 41, 37, 37, 37, 34};
  if (sr_index < 12)
    return pred_sfb_max[sr_index];
  return 0;
}


x86 assembly (clang, -O0):
<max_pred_sfb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0xc,%eax
jge    112f <max_pred_sfb+0x2f>
movzbl -0x2(%rbp),%eax
mov    %eax,%ecx
lea    0xedc(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
jmp    1133 <max_pred_sfb+0x33>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_pred_sfb>:
cmp    $0xb,%dil
ja     1115 <max_pred_sfb+0x15>
movzbl %dil,%eax
lea    0xeef(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@max_pred_sfb.pred_sfb_max = internal constant [12 x i8] c"!!&((())%%%\22"
define zeroext i8 @max_pred_sfb(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 12
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i64
%10 = getelementptr inbounds [12 x i8], [12 x i8]* @max_pred_sfb.pred_sfb_max, i64 0, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %2
br label %13
12: ; preds = %1
store i8 0, i8* %2
br label %13
13: ; preds = %12, %7
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
@max_pred_sfb.pred_sfb_max = internal unnamed_addr constant [12 x i8] c"!!&((())%%%\22"
define zeroext i8 @max_pred_sfb(i8 zeroext %0) {
%2 = icmp ult i8 %0, 12
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = zext i8 %0 to i64
%5 = getelementptr inbounds [12 x i8], [12 x i8]* @max_pred_sfb.pred_sfb_max, i64 0, i64 %4
%6 = load i8, i8* %5
br label %7
7: ; preds = %1, %3
%8 = phi i8 [ %6, %3 ], [ 0, %1 ]
ret i8 %8
}
/* Variables and functions */
int KMP_match(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *s1 = "bababaababababca";
  char *s2 = "ababababca";
  int offset = KMP_match(s1, s2);
  printf("offset is %d\n", offset);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <KMP_match@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <KMP_match@plt>
lea    0xed6(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"bababaababababca\00"
@.str.1 = [11 x i8] c"ababababca\00"
@.str.2 = [14 x i8] c"offset is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @KMP_match(i8* %5, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"bababaababababca\00"
@.str.1 = [11 x i8] c"ababababca\00"
@.str.2 = [14 x i8] c"offset is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @KMP_match(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_attr_getstacksize(const pthread_attr_t *a, size_t *b) { assert(0); }


x86 assembly (clang, -O0):
<pthread_attr_getstacksize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_attr_getstacksize>:
xor    %edi,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define i32 @pthread_attr_getstacksize(i32* nocapture readnone %0, i64* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
_Complex int foo_int(_Complex int x) { return x; }


x86 assembly (clang, -O0):
<foo_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_int>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @foo_int(i64 %0) {
%2 = alloca { i32, i32 }
%3 = alloca { i32, i32 }
%4 = bitcast { i32, i32 }* %3 to i64*
store i64 %0, i64* %4
%5 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %3, i32 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %3, i32 0, i32 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %2, i32 0, i32 0
%10 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %2, i32 0, i32 1
store i32 %6, i32* %9
store i32 %8, i32* %10
%11 = bitcast { i32, i32 }* %2 to i64*
%12 = load i64, i64* %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @foo_int(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
size_t cblUSizeMax(size_t lhs, size_t rhs) { return (lhs > rhs) ? lhs : rhs; }


x86 assembly (clang, -O0):
<cblUSizeMax>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <cblUSizeMax+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <cblUSizeMax+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cblUSizeMax>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @cblUSizeMax(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 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @cblUSizeMax(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void av_write_image_line() {}


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

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

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

LLVM IR (-O2):
define void @av_write_image_line() {
ret void
}
int test_imm_4Duint32_mem(unsigned int *val) {
  return ((*val) & (0x4D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Duint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x4d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Duint32_mem>:
testb  $0x4d,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Duint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 77
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void halMcuInit(void) {}


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

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

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

LLVM IR (-O2):
define void @halMcuInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *t_fun(int arg) {
  assert(arg == 3);
  return NULL;
}


x86 assembly (clang, -O0):
<t_fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_fun>:
push   %rax
xor    %eax,%eax
cmp    $0x3,%edi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @t_fun(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 3
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @t_fun(i32 %0) {
%2 = icmp eq i32 %0, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ v(char const *, int, int, int, int /*<<< orphan*/);
void f(const char *f) { v(f, 1, 2, 3, 0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %r8d,%r8d
call   1030 <v@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %r8d,%r8d
jmp    1030 <v@plt>

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

LLVM IR (-O2):
define void @f(i8* %0) {
%2 = tail call i32 @v(i8* %0, i32 1, i32 2, i32 3, i32 0)
ret void
}
char *memclr(char *s, unsigned int n) {
  for (unsigned int i = 0; i < n; i++) {
    *(s + i) = 0;
  }
  return s;
}


x86 assembly (clang, -O0):
<memclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1137 <memclr+0x37>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <memclr+0x12>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memclr>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
je     1124 <memclr+0x14>
mov    %esi,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memclr(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 = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @memclr(i8* returned writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void printFileError(char *fileName, char *permission) {
  fprintf(stderr, "Error: couldn't open %s with %s permission\n", fileName,
          permission);
}


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

x86 assembly (clang, -O2):
<printFileError>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Error: couldn't open %s with %s permission\0A\00"
define void @printFileError(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Error: couldn't open %s with %s permission\0A\00"
define void @printFileError(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int _printFloat(float a) {
  printf("%f\n", a);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @_printFloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @_printFloat(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %0)
ret i32 0
}