xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cg(int, double const *, int const *, int, double const *,
                      double *, double);
void sparse_linsolve_d(int n, const double *M, const int *Mcol, int Mnd,
                       const double *b, double *x, double anorm) {
  cg(n, M, Mcol, Mnd, b, x, anorm);
}


x86 assembly (clang, -O0):
<sparse_linsolve_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
movsd  -0x38(%rbp),%xmm0
call   1030 <cg@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sparse_linsolve_d>:
jmp    1030 <cg@plt>

LLVM IR (-O0):
define void @sparse_linsolve_d(i32 %0, double* %1, i32* %2, i32 %3, double* %4, double* %5, double %6) {
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
store i32 %0, i32* %8
store double* %1, double** %9
store i32* %2, i32** %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
store double %6, double* %14
%15 = load i32, i32* %8
%16 = load double*, double** %9
%17 = load i32*, i32** %10
%18 = load i32, i32* %11
%19 = load double*, double** %12
%20 = load double*, double** %13
%21 = load double, double* %14
%22 = call i32 @cg(i32 %15, double* %16, i32* %17, i32 %18, double* %19, double* %20, double %21)
ret void
}

LLVM IR (-O2):
define void @sparse_linsolve_d(i32 %0, double* %1, i32* %2, i32 %3, double* %4, double* %5, double %6) {
%8 = tail call i32 @cg(i32 %0, double* %1, i32* %2, i32 %3, double* %4, double* %5, double %6)
ret void
}
/* Variables and functions */
int getchar();
int wsh_getchar(void) { return getchar(); }


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

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

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

LLVM IR (-O2):
define i32 @wsh_getchar() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_read_dobldobl_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(340, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_read_dobldobl_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x154,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_read_dobldobl_solutions>:
mov    $0x154,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_read_dobldobl_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 340, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_read_dobldobl_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 340, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int rmdir(char const *);
int outside_rmdir(const char *path) { return rmdir(path); }


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

x86 assembly (clang, -O2):
<outside_rmdir>:
jmp    1030 <rmdir@plt>

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

LLVM IR (-O2):
define i32 @outside_rmdir(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ dprintf(int, char *, int, int);
scalar_t__ errno;
int read(int, char *, int);
int ReadFromFile(int fdFile, char *pchTo, int cchMax) {
  int cchOut;
  cchOut = read(fdFile, pchTo, cchMax);
  dprintf(0x0008, "buffer: read %d byte(s) (errno=%d)", cchOut, (int)errno);
  return cchOut;
}


x86 assembly (clang, -O0):
<ReadFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edx
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    %eax,%ecx
mov    $0x8,%edi
lea    0xea1(%rip),%rsi
call   1030 <dprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadFromFile>:
push   %rbx
call   1040 <read@plt>
mov    %eax,%ebx
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
lea    0xec8(%rip),%rsi
mov    $0x8,%edi
mov    %ebx,%edx
call   1030 <dprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"buffer: read %d byte(s) (errno=%d)\00"
@errno = global i64 0
define i32 @ReadFromFile(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @read(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = load i64, i64* @errno
%14 = trunc i64 %13 to i32
%15 = call i32 @dprintf(i32 8, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
@.str = [35 x i8] c"buffer: read %d byte(s) (errno=%d)\00"
@errno = global i64 0
define i32 @ReadFromFile(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = load i64, i64* @errno
%6 = trunc i64 %5 to i32
%7 = tail call i32 @dprintf(i32 8, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
ret i32 %4
}
/* Variables and functions */
int FastLog2(float);
float FastPower(float, int);
float FastBias(float b, float x) {
  return FastPower(x, FastLog2(b) / FastLog2(0.5f));
}


x86 assembly (clang, -O0):
<FastBias>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <FastLog2@plt>
mov    %eax,-0xc(%rbp)
movss  0xeaf(%rip),%xmm0
call   1030 <FastLog2@plt>
movss  -0x10(%rbp),%xmm0
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <FastPower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastBias>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
call   1030 <FastLog2@plt>
mov    %eax,%ebx
movss  0xec6(%rip),%xmm0
call   1030 <FastLog2@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
movss  0xc(%rsp),%xmm0
mov    %eax,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <FastPower@plt>

LLVM IR (-O0):
define float @FastBias(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = call i32 @FastLog2(float %6)
%8 = call i32 @FastLog2(float 5.000000e-01)
%9 = sdiv i32 %7, %8
%10 = call float @FastPower(float %5, i32 %9)
ret float %10
}

LLVM IR (-O2):
define float @FastBias(float %0, float %1) {
%3 = tail call i32 @FastLog2(float %0)
%4 = tail call i32 @FastLog2(float 5.000000e-01)
%5 = sdiv i32 %3, %4
%6 = tail call float @FastPower(float %1, i32 %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ Q_strncpyz(char *, char const *, int);
char *trap_TranslateString(const char *string) {
  static char staticbuf[2][32000];
  static int bufcount = 0;
  char *buf;
  buf = staticbuf[bufcount++ % 2];
  Q_strncpyz(buf, string, 32000);
  return buf;
}


x86 assembly (clang, -O0):
<trap_TranslateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x1291e(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x12913(%rip)
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq %edx,%rcx
lea    0x2f01(%rip),%rax
imul   $0x7d00,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x7d00,%edx
call   1030 <Q_strncpyz@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trap_TranslateString>:
push   %rbx
mov    %rdi,%rsi
mov    0x12926(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x1291d(%rip)
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
cltq
imul   $0x7d00,%rax,%rax
lea    0x2f01(%rip),%rbx
add    %rax,%rbx
mov    %rbx,%rdi
mov    $0x7d00,%edx
call   1030 <Q_strncpyz@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@trap_TranslateString.staticbuf = internal global [2 x [32000 x i8]] zeroinitializer
@trap_TranslateString.bufcount = internal global i32 0
define i8* @trap_TranslateString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i32, i32* @trap_TranslateString.bufcount
%5 = add nsw i32 %4, 1
store i32 %5, i32* @trap_TranslateString.bufcount
%6 = srem i32 %4, 2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [2 x [32000 x i8]], [2 x [32000 x i8]]* @trap_TranslateString.staticbuf, i64 0, i64 %7
%9 = getelementptr inbounds [32000 x i8], [32000 x i8]* %8, i64 0, i64 0
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @Q_strncpyz(i8* %10, i8* %11, i32 32000)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@trap_TranslateString.staticbuf = internal global [2 x [32000 x i8]] zeroinitializer
@trap_TranslateString.bufcount = internal unnamed_addr global i32 0
define i8* @trap_TranslateString(i8* %0) {
%2 = load i32, i32* @trap_TranslateString.bufcount
%3 = add nsw i32 %2, 1
store i32 %3, i32* @trap_TranslateString.bufcount
%4 = srem i32 %2, 2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [2 x [32000 x i8]], [2 x [32000 x i8]]* @trap_TranslateString.staticbuf, i64 0, i64 %5, i64 0
%7 = tail call i32 @Q_strncpyz(i8* %6, i8* %0, i32 32000)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int ip_get_ihl(int /*<<< orphan*/ *);
uint8_t *ip_payload(uint8_t *p_ip) { return p_ip + 4 * ip_get_ihl(p_ip); }


x86 assembly (clang, -O0):
<ip_payload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ip_get_ihl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
shl    $0x2,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_payload>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ip_get_ihl@plt>
shl    $0x2,%eax
cltq
lea    (%rbx,%rax,4),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @ip_payload(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @ip_get_ihl(i32* %4)
%6 = mul nsw i32 4, %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %3, i64 %7
ret i32* %8
}

LLVM IR (-O2):
define i32* @ip_payload(i32* %0) {
%2 = tail call i32 @ip_get_ihl(i32* %0)
%3 = shl nsw i32 %2, 2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
ret i32* %5
}
const char *getTitle_HelpScreen(void) { return ("Help Screen"); }


x86 assembly (clang, -O0):
<getTitle_HelpScreen>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTitle_HelpScreen>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Help Screen\00"
define i8* @getTitle_HelpScreen() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Help Screen\00"
define i8* @getTitle_HelpScreen() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
char *langRomTypeEseRam128() { return "128kB Ese-RAM"; }


x86 assembly (clang, -O0):
<langRomTypeEseRam128>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeEseRam128>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"128kB Ese-RAM\00"
define i8* @langRomTypeEseRam128() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"128kB Ese-RAM\00"
define i8* @langRomTypeEseRam128() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int rand();
int random(int max) { return (rand() % max); }


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

x86 assembly (clang, -O2):
<random>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @random(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
void common_sid_block_start() {}


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

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

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

LLVM IR (-O2):
define void @common_sid_block_start() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_movntdq(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/);
void __attribute__((__always___, __nodebug__))
_mm_stream_si128(__m128i *p, __m128i a) {
  __builtin_ia32_movntdq(p, a);
}


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

x86 assembly (clang, -O2):
<_mm_stream_si128>:
jmp    1030 <__builtin_ia32_movntdq@plt>

LLVM IR (-O0):
define void @_mm_stream_si128(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 @__builtin_ia32_movntdq(i32* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @_mm_stream_si128(i32* %0, i32 %1) {
%3 = tail call i32 @__builtin_ia32_movntdq(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int MaxSubSum(int const *, int /*<<< orphan*/, int);
int MaxSubSeriesSum(const int A[], int N) { return MaxSubSum(A, 0, N - 1); }


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

x86 assembly (clang, -O2):
<MaxSubSeriesSum>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <MaxSubSum@plt>

LLVM IR (-O0):
define i32 @MaxSubSeriesSum(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 = sub nsw i32 %6, 1
%8 = call i32 @MaxSubSum(i32* %5, i32 0, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @MaxSubSeriesSum(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @MaxSubSum(i32* %0, i32 0, i32 %3)
ret i32 %4
}
/* Type definitions */
struct flub {
  int dummy;
};

/* Variables and functions */
unsigned long flub_yoink_normal(struct flub *);
unsigned long flub_error_get_normal(struct flub *flub) {
  return flub_yoink_normal(flub);
}


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

x86 assembly (clang, -O2):
<flub_error_get_normal>:
jmp    1030 <flub_yoink_normal@plt>

LLVM IR (-O0):
%struct.flub = type { i32 }
define i64 @flub_error_get_normal(%struct.flub* %0) {
%2 = alloca %struct.flub*
store %struct.flub* %0, %struct.flub** %2
%3 = load %struct.flub*, %struct.flub** %2
%4 = call i64 @flub_yoink_normal(%struct.flub* %3)
ret i64 %4
}

LLVM IR (-O2):
%struct.flub = type { i32 }
define i64 @flub_error_get_normal(%struct.flub* %0) {
%2 = tail call i64 @flub_yoink_normal(%struct.flub* %0)
ret i64 %2
}
void rcu_exit_nohz(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_exit_nohz() {
ret void
}
int tersini_bul(int x) {
  int S = 0;
  while (x > 0) {
    int b = x % 10;
    S = (S * 10) + b;
    x /= 10;
  }
  return S;
}


x86 assembly (clang, -O0):
<tersini_bul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1143 <tersini_bul+0x43>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
imul   $0xa,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <tersini_bul+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tersini_bul>:
xor    %eax,%eax
test   %edi,%edi
jle    1131 <tersini_bul+0x31>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
lea    (%rcx,%rax,2),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <tersini_bul+0x10>
ret

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

LLVM IR (-O2):
define i32 @tersini_bul(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = urem i32 %4, 10
%7 = mul nsw i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = udiv i32 %4, 10
%10 = icmp ult i32 %4, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, int, unsigned int);
int shim_pkey_set(int pkey, unsigned int rights) {
  return (int)shim_enosys(0, pkey, rights);
}


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

x86 assembly (clang, -O2):
<shim_pkey_set>:
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_pkey_set(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 i64 @shim_enosys(i32 0, i32 %5, i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @shim_pkey_set(i32 %0, i32 %1) {
%3 = tail call i64 @shim_enosys(i32 0, i32 %0, i32 %1)
%4 = trunc i64 %3 to i32
ret i32 %4
}
extern void __attribute__((used, __gnu___, always_, __artificial__))
prefetch(const void *restrict x) {
  asm volatile("prefetcht0 %0" ::"m"(*(unsigned long *)x));
}


x86 assembly (clang, -O0):
<prefetch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
prefetcht0 (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefetch>:
prefetcht0 (%rdi)
ret

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void (i8*)* @prefetch to i8*)], section "llvm.metadata"
define void @prefetch(i8* noalias %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
ret void
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void (i8*)* @prefetch to i8*)], section "llvm.metadata"
define void @prefetch(i8* noalias %0) {
%2 = bitcast i8* %0 to i64*
tail call void asm sideeffect "prefetcht0 $0", "*m,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %2)
ret void
}
void kol_paint_image(unsigned x, unsigned y, unsigned w, unsigned h, char *d) {
  asm("int $0x40" ::"a"(7), "c"(w * 65536 + h), "d"(x * 65536 + y), "b"(d));
}


x86 assembly (clang, -O0):
<kol_paint_image>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x14(%rbp),%ecx
shl    $0x10,%ecx
add    -0x18(%rbp),%ecx
mov    -0xc(%rbp),%edx
shl    $0x10,%edx
add    -0x10(%rbp),%edx
mov    -0x20(%rbp),%rbx
mov    $0x7,%eax
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_paint_image>:
push   %rbx
mov    %r8,%rbx
shl    $0x10,%edx
add    %edx,%ecx
shl    $0x10,%edi
lea    (%rdi,%rsi,1),%edx
mov    $0x7,%eax
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define void @kol_paint_image(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32, i32* %8
%12 = mul i32 %11, 65536
%13 = load i32, i32* %9
%14 = add i32 %12, %13
%15 = load i32, i32* %6
%16 = mul i32 %15, 65536
%17 = load i32, i32* %7
%18 = add i32 %16, %17
%19 = load i8*, i8** %10
ret void
}

LLVM IR (-O2):
define void @kol_paint_image(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = shl i32 %2, 16
%7 = add i32 %6, %3
%8 = shl i32 %0, 16
%9 = add i32 %8, %1
tail call void asm sideeffect "int $$0x40", "{ax},{cx},{dx},{bx},~{dirflag},~{fpsr},~{flags}"(i32 7, i32 %7, i32 %9, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sortRange(int *, int /*<<< orphan*/, int);
void quickSort(int *a, int size) { sortRange(a, 0, size); }


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

x86 assembly (clang, -O2):
<quickSort>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <sortRange@plt>

LLVM IR (-O0):
define void @quickSort(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 @sortRange(i32* %5, i32 0, i32 %6)
ret void
}

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1) {
%3 = tail call i32 @sortRange(i32* %0, i32 0, i32 %1)
ret void
}
min(int a, int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int kontrolaCasu(int h, int m) {
  if (h < 0 || m < 0 || m > 59) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<kontrolaCasu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1128 <kontrolaCasu+0x28>
cmpl   $0x0,-0xc(%rbp)
jl     1128 <kontrolaCasu+0x28>
cmpl   $0x3b,-0xc(%rbp)
jle    1134 <kontrolaCasu+0x34>
movl   $0x0,-0x4(%rbp)
jmp    113b <kontrolaCasu+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kontrolaCasu>:
or     %esi,%edi
setns  %al
cmp    $0x3c,%esi
setl   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @kontrolaCasu(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp sgt i32 %3, -1
%5 = icmp slt i32 %1, 60
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello, World!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sdbm(char const *);
int main(int argc, char *argv[]) {
  const char *str = "Hello World";
  printf("\nThe hash is %lu", sdbm(str));
  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)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <sdbm@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [17 x i8] c"\0AThe hash is %lu\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @sdbm(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [17 x i8] c"\0AThe hash is %lu\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sdbm(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
void ff_hevc_put_hevc_epel_hv6_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv6_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_aux_carry_flag(int);
void handle_aux_carry_flag_sub(const int value1, const int value2) {
  set_aux_carry_flag(((value1 & 0xF) - (value2 & 0xF)) < 0);
}


x86 assembly (clang, -O0):
<handle_aux_carry_flag_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <set_aux_carry_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_aux_carry_flag_sub>:
and    $0xf,%edi
and    $0xf,%esi
xor    %eax,%eax
cmp    %esi,%edi
setb   %al
mov    %eax,%edi
jmp    1030 <set_aux_carry_flag@plt>

LLVM IR (-O0):
define void @handle_aux_carry_flag_sub(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 = and i32 %5, 15
%7 = load i32, i32* %4
%8 = and i32 %7, 15
%9 = sub nsw i32 %6, %8
%10 = icmp slt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @set_aux_carry_flag(i32 %11)
ret void
}

LLVM IR (-O2):
define void @handle_aux_carry_flag_sub(i32 %0, i32 %1) {
%3 = and i32 %0, 15
%4 = and i32 %1, 15
%5 = icmp ult i32 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @set_aux_carry_flag(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EPOLL_CLOEXEC;
int epoll_create1(int /*<<< orphan*/);
int /*<<< orphan*/ throw(char *);
int _request_epoll_fd() {
  int epfd;
  if ((epfd = epoll_create1(EPOLL_CLOEXEC)) == -1) {
    throw("Error requesting epoll master file descriptor");
  }
  return epfd;
}


x86 assembly (clang, -O0):
<_request_epoll_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <epoll_create1@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
jne    114e <_request_epoll_fd+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <throw@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_request_epoll_fd>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1040 <epoll_create1@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1142 <_request_epoll_fd+0x22>
lea    0xec3(%rip),%rdi
call   1030 <throw@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EPOLL_CLOEXEC = global i32 0
@.str = [46 x i8] c"Error requesting epoll master file descriptor\00"
define i32 @_request_epoll_fd() {
%1 = alloca i32
%2 = load i32, i32* @EPOLL_CLOEXEC
%3 = call i32 @epoll_create1(i32 %2)
store i32 %3, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @throw(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@EPOLL_CLOEXEC = global i32 0
@.str = [46 x i8] c"Error requesting epoll master file descriptor\00"
define i32 @_request_epoll_fd() {
%1 = load i32, i32* @EPOLL_CLOEXEC
%2 = tail call i32 @epoll_create1(i32 %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @throw(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ f0(int);
void test() { f0(17); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11,%edi
call   1030 <f0@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    $0x11,%edi
jmp    1030 <f0@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 @f0(i32 17)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @f0(i32 17)
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_49(uint64_t x) {
  __asm__("rolq $49, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_49>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x31,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_49>:
mov    %rdi,%rax
rol    $0x31,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_49(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$49, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_49(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$49, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
char *xtoa(unsigned long, char *, int, int);
char *ltoa(long val, char *buf, int radix) {
  return xtoa((unsigned long)val, buf, radix, (radix == 10 && val < 0));
}


x86 assembly (clang, -O0):
<ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jne    1153 <ltoa+0x43>
cmpq   $0x0,-0x8(%rbp)
setl   %al
mov    %al,-0x15(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdi
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%ecx
call   1030 <xtoa@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltoa>:
cmp    $0xa,%edx
sete   %al
test   %rdi,%rdi
sets   %cl
and    %al,%cl
movzbl %cl,%ecx
jmp    1030 <xtoa@plt>

LLVM IR (-O0):
define i8* @ltoa(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 10
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i64, i64* %4
%14 = icmp slt i64 %13, 0
br label %15
15: ; preds = %12, %3
%16 = phi i1 [ false, %3 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = call i8* @xtoa(i64 %7, i8* %8, i32 %9, i32 %17)
ret i8* %18
}

LLVM IR (-O2):
define i8* @ltoa(i64 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 10
%5 = icmp slt i64 %0, 0
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
%8 = tail call i8* @xtoa(i64 %0, i8* %1, i32 %2, i32 %7)
ret i8* %8
}
void int_bounds(register int *what, register int lower_limit,
                register int upper_limit) {
  if (*what < lower_limit)
    *what = lower_limit;
  else if (*what > upper_limit)
    *what = upper_limit;
}


x86 assembly (clang, -O0):
<int_bounds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jge    112b <int_bounds+0x2b>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    1148 <int_bounds+0x48>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0x10(%rbp),%eax
jle    1143 <int_bounds+0x43>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    1148 <int_bounds+0x48>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_bounds>:
mov    (%rdi),%eax
cmp    %esi,%eax
jl     110c <int_bounds+0xc>
mov    %edx,%esi
cmp    %edx,%eax
jle    110e <int_bounds+0xe>
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @int_bounds(i32* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* %0
%5 = icmp slt i32 %4, %1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = icmp sgt i32 %4, %2
br i1 %7, label %8, label %10
8: ; preds = %6, %3
%9 = phi i32 [ %1, %3 ], [ %2, %6 ]
store i32 %9, i32* %0
br label %10
10: ; preds = %8, %6
ret void
}
int convert_long(long number, int target[]) {
  int i;
  long aux = number;
  for (i = 0; aux > 0; i++) {
    target[i] = aux % 10;
    aux = aux / 10;
  }
  return i;
}


x86 assembly (clang, -O0):
<convert_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x20(%rbp)
jle    115f <convert_long+0x5f>
mov    -0x20(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <convert_long+0x1b>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_long>:
xor    %ecx,%ecx
test   %rdi,%rdi
jle    1146 <convert_long+0x46>
movabs $0xcccccccccccccccd,%r8
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%r9d
mov    %edi,%eax
sub    %r9d,%eax
mov    %eax,(%rsi,%rcx,4)
add    $0x1,%rcx
cmp    $0x9,%rdi
mov    %rdx,%rdi
ja     1120 <convert_long+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @convert_long(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i64
store i64 %0, i64* %3
store i32* %1, i32** %4
%7 = load i64, i64* %3
store i64 %7, i64* %6
store i32 0, i32* %5
br label %8
8: ; preds = %21, %2
%9 = load i64, i64* %6
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i64, i64* %6
%13 = srem i64 %12, 10
%14 = trunc i64 %13 to i32
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
%19 = load i64, i64* %6
%20 = sdiv i64 %19, 10
store i64 %20, i64* %6
br label %21
21: ; preds = %11
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %8
24: ; preds = %8
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @convert_long(i64 %0, i32* nocapture writeonly %1) {
%3 = icmp sgt i64 %0, 0
br i1 %3, label %4, label %15
4: ; preds = %2, %4
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = phi i64 [ %10, %4 ], [ %0, %2 ]
%7 = urem i64 %6, 10
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds i32, i32* %1, i64 %5
store i32 %8, i32* %9
%10 = udiv i64 %6, 10
%11 = add nuw i64 %5, 1
%12 = icmp ult i64 %6, 10
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = trunc i64 %11 to i32
br label %15
15: ; preds = %13, %2
%16 = phi i32 [ 0, %2 ], [ %14, %13 ]
ret i32 %16
}
void ARGB1555ToUVRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGB1555ToUVRow_NEON() {
ret void
}
unsigned int GPMCPrefetchCountValGet(unsigned int baseAddr) {
  unsigned int cntVal;
  cntVal = ((*((volatile unsigned int *)(baseAddr + (0x1F0)))) & (0x00003FFFu));
  return (cntVal);
}


x86 assembly (clang, -O0):
<GPMCPrefetchCountValGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f0,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x3fff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCPrefetchCountValGet>:
add    $0x1f0,%edi
mov    $0x3fff,%eax
and    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @GPMCPrefetchCountValGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 496
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 16383
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @GPMCPrefetchCountValGet(i32 %0) {
%2 = add i32 %0, 496
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 16383
ret i32 %6
}
/* Variables and functions */
int pq_implementation_stop();
int pq_stop(void) { return pq_implementation_stop(); }


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

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

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

LLVM IR (-O2):
define i32 @pq_stop() {
%1 = tail call i32 (...) @pq_implementation_stop()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __fcntl(int fd, int cmd, ...) {
  if (fd < 0) {
    __set_errno(EBADF);
    return -1;
  }
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__fcntl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1142 <__fcntl+0x32>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <__fcntl+0x47>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fcntl>:
push   %rax
test   %edi,%edi
jns    111e <__fcntl+0xe>
mov    0x2ebc(%rip),%rax
jmp    1125 <__fcntl+0x15>
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EBADF = global i32 0
@ENOSYS = global i32 0
define i32 @__fcntl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @EBADF
%10 = call i32 @__set_errno(i32 %9)
store i32 -1, i32* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* @ENOSYS
%13 = call i32 @__set_errno(i32 %12)
store i32 -1, i32* %3
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@EBADF = global i32 0
@ENOSYS = global i32 0
define i32 @__fcntl(i32 %0, i32 %1, ...) {
%3 = icmp slt i32 %0, 0
%4 = load i32, i32* @EBADF
%5 = load i32, i32* @ENOSYS
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @__set_errno(i32 %6)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ compilerAssert();
void chpl_decRefCountsForDomainsInArrayEltTypes(void) {
  compilerAssert();
  return;
}


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

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

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

LLVM IR (-O2):
define void @chpl_decRefCountsForDomainsInArrayEltTypes() {
%1 = tail call i32 (...) @compilerAssert()
ret void
}
/* Variables and functions */
scalar_t__ xmalloc_memory_rss();
float xmalloc_used_memory();
float xmalloc_fragmentation_ratio(void) {
  return (float)xmalloc_memory_rss() / xmalloc_used_memory();
}


x86 assembly (clang, -O0):
<xmalloc_fragmentation_ratio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <xmalloc_memory_rss@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <xmalloc_used_memory@plt>
movaps %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc_fragmentation_ratio>:
push   %rax
xor    %eax,%eax
call   1030 <xmalloc_memory_rss@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1040 <xmalloc_used_memory@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @xmalloc_fragmentation_ratio() {
%1 = call i64 (...) @xmalloc_memory_rss()
%2 = sitofp i64 %1 to float
%3 = call float (...) @xmalloc_used_memory()
%4 = fdiv float %2, %3
ret float %4
}

LLVM IR (-O2):
define float @xmalloc_fragmentation_ratio() {
%1 = tail call i64 (...) @xmalloc_memory_rss()
%2 = sitofp i64 %1 to float
%3 = tail call float (...) @xmalloc_used_memory()
%4 = fdiv float %2, %3
ret float %4
}
void ff_hevc_put_hevc_uni_pel_pixels24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels24_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x72() {
  Assert_real((isascii(114)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              575, ("isascii should be 1 for r"));
}


x86 assembly (clang, -O0):
<t_isascii_0x72>:
push   %rbp
mov    %rsp,%rbp
mov    $0x72,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x23f,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x72>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x23f,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for r\00"
define void @t_isascii_0x72() {
%1 = call i32 @isascii(i32 114)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for r\00"
define void @t_isascii_0x72() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int addition(int lhs, int rhs, int taillealpha) {
  return (lhs + rhs) % taillealpha;
}


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

x86 assembly (clang, -O2):
<addition>:
mov    %edx,%ecx
lea    (%rdi,%rsi,1),%eax
cltd
idiv   %ecx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @addition(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = srem i32 %4, %2
ret i32 %5
}