xunge/DecIR huggingface dataset:
void foo_1_1_2_1_2_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_2_1_1_2_2() {
ret void
}
void RTEnvGetEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTEnvGetEx() {
ret void
}
/* Type definitions */
typedef scalar_t__ int_least32_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_int_least32_t(int_least32_t const k1,
                                            int_least32_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_int_least32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_int_least32_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_int_least32_t(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 eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_int_least32_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void fput(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<fput>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.fput = [5 x i8] c"fput\00"
define void @fput() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.fput, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.fput = [5 x i8] c"fput\00"
define void @fput() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.fput, i64 0, i64 0))
ret void
}
int test_imm_49uint32_reg(unsigned int val) {
  return ((val) & (0x49 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_49uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x49,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_49uint32_reg>:
test   $0x49,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_49uint32_reg(i32 %0) {
%2 = and i32 %0, 73
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void sws_getCachedContext() {}


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

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

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

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

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  }
  fprintf(stream, "Usage: %s <dir>\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [17 x i8] c"Usage: %s <dir>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [17 x i8] c"Usage: %s <dir>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long window;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xbutton_window(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xbutton.window = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xbutton_window>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xbutton_window>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xbutton_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xbutton_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void abort(void) {
  raise(SIGABRT);
  raise(SIGKILL);
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
jmp    1130 <abort+0x20>

x86 assembly (clang, -O2):
<abort>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
nopl   (%rax)
jmp    1130 <abort+0x20>

LLVM IR (-O0):
@SIGABRT = global i32 0
@SIGKILL = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = call i32 @raise(i32 %1)
%3 = load i32, i32* @SIGKILL
%4 = call i32 @raise(i32 %3)
br label %5
5: ; preds = %5, %0
br label %5
}

LLVM IR (-O2):
@SIGABRT = global i32 0
@SIGKILL = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i32 @raise(i32 %1)
%3 = load i32, i32* @SIGKILL
%4 = tail call i32 @raise(i32 %3)
br label %5
5: ; preds = %5, %0
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void StrFree(char *s) {
  if (s != 0)
    free(((int *)s) - 1);
}


x86 assembly (clang, -O0):
<StrFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <StrFree+0x24>
mov    -0x8(%rbp),%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrFree>:
test   %rdi,%rdi
je     111e <StrFree+0xe>
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @StrFree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -4
%5 = bitcast i8* %4 to i32*
%6 = tail call i32 @free(i32* %5)
br label %7
7: ; preds = %3, %1
ret void
}
void XtClass() {}


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

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

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

LLVM IR (-O2):
define void @XtClass() {
ret void
}
void __attribute__((weak)) dma1_stream4_isr() { debug_handler(__FUNCTION__); }


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

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

LLVM IR (-O0):
@__FUNCTION__.dma1_stream4_isr = [17 x i8] c"dma1_stream4_isr\00"
define weak void @dma1_stream4_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma1_stream4_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma1_stream4_isr = [17 x i8] c"dma1_stream4_isr\00"
define weak void @dma1_stream4_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma1_stream4_isr, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ getPowm(unsigned char *, unsigned long *, int /*<<< orphan*/,
                           unsigned char const *, unsigned long);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init_set_ui(int /*<<< orphan*/, int);
void getPublic(unsigned char *public, unsigned long *publen,
               const unsigned char *private, unsigned long prilen) {
  mpz_t base;
  mpz_init_set_ui(base, 65537);
  getPowm(public, publen, base, private, prilen);
  mpz_clear(base);
}


x86 assembly (clang, -O0):
<getPublic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x10001,%esi
call   1040 <mpz_init_set_ui@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <getPowm@plt>
mov    -0x24(%rbp),%edi
call   1050 <mpz_clear@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPublic>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    $0x10001,%esi
call   1040 <mpz_init_set_ui@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rcx
mov    %r14,%r8
call   1030 <getPowm@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <mpz_clear@plt>

LLVM IR (-O0):
define void @getPublic(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = load i32, i32* %9
%11 = call i32 @mpz_init_set_ui(i32 %10, i32 65537)
%12 = load i8*, i8** %5
%13 = load i64*, i64** %6
%14 = load i32, i32* %9
%15 = load i8*, i8** %7
%16 = load i64, i64* %8
%17 = call i32 @getPowm(i8* %12, i64* %13, i32 %14, i8* %15, i64 %16)
%18 = load i32, i32* %9
%19 = call i32 @mpz_clear(i32 %18)
ret void
}

LLVM IR (-O2):
define void @getPublic(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i32 @mpz_init_set_ui(i32 undef, i32 65537)
%6 = tail call i32 @getPowm(i8* %0, i64* %1, i32 undef, i8* %2, i64 %3)
%7 = tail call i32 @mpz_clear(i32 undef)
ret void
}
/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/);
double CO759_real_zeit(void) { return (double)time(0); }


x86 assembly (clang, -O0):
<CO759_real_zeit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <time@plt>
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CO759_real_zeit>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @CO759_real_zeit() {
%1 = call i64 @time(i32 0)
%2 = sitofp i64 %1 to double
ret double %2
}

LLVM IR (-O2):
define double @CO759_real_zeit() {
%1 = tail call i64 @time(i32 0)
%2 = sitofp i64 %1 to double
ret double %2
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
scalar_t__ iswdigit(int);
int getint(wchar_t **s) {
  int i;
  for (i = 0; iswdigit(**s); (*s)++)
    i = 10 * i + (**s - '0');
  return i;
}


x86 assembly (clang, -O0):
<getint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <iswdigit@plt>
cmp    $0x0,%rax
je     1163 <getint+0x53>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
jmp    1123 <getint+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getint>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rax
mov    (%rax),%edi
call   1030 <iswdigit@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1152 <getint+0x42>
nopl   0x0(%rax,%rax,1)
lea    (%rbx,%rbx,4),%eax
mov    (%r14),%rcx
mov    (%rcx),%edx
lea    (%rdx,%rax,2),%ebx
add    $0xffffffd0,%ebx
lea    0x4(%rcx),%rax
mov    %rax,(%r14)
mov    0x4(%rcx),%edi
call   1030 <iswdigit@plt>
test   %rax,%rax
jne    1130 <getint+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @getint(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32**, i32*** %2
%6 = load i32*, i32** %5
%7 = load i32, i32* %6
%8 = call i64 @iswdigit(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %22
10: ; preds = %4
%11 = load i32, i32* %3
%12 = mul nsw i32 10, %11
%13 = load i32**, i32*** %2
%14 = load i32*, i32** %13
%15 = load i32, i32* %14
%16 = sub nsw i32 %15, 48
%17 = add nsw i32 %12, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %10
%19 = load i32**, i32*** %2
%20 = load i32*, i32** %19
%21 = getelementptr inbounds i32, i32* %20, i32 1
store i32* %21, i32** %19
br label %4
22: ; preds = %4
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @getint(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = load i32, i32* %2
%4 = tail call i64 @iswdigit(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %12, %6 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 10
%9 = load i32*, i32** %0
%10 = load i32, i32* %9
%11 = add i32 %8, -48
%12 = add i32 %11, %10
%13 = getelementptr inbounds i32, i32* %9, i64 1
store i32* %13, i32** %0
%14 = load i32, i32* %13
%15 = tail call i64 @iswdigit(i32 %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %6, %1
%18 = phi i32 [ 0, %1 ], [ %12, %6 ]
ret i32 %18
}
/* Variables and functions */
int FUTEX_PRIVATE_FLAG;
int FUTEX_WAKE;
int errno;
scalar_t__ futex(int *, int, int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/);
int futex_wake(int *address, int count) {
  return futex(address, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, count, NULL, NULL, 0)
             ? errno
             : 0;
}


x86 assembly (clang, -O0):
<futex_wake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
mov    0x2ead(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
mov    %r8,%rcx
call   1030 <futex@plt>
cmp    $0x0,%rax
je     1163 <futex_wake+0x53>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    116d <futex_wake+0x5d>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    116d <futex_wake+0x5d>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futex_wake>:
push   %rbx
mov    %esi,%edx
mov    0x2eae(%rip),%rax
mov    0x2ebf(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
xor    %ebx,%ebx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <futex@plt>
test   %rax,%rax
je     1142 <futex_wake+0x32>
mov    0x2e98(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@FUTEX_WAKE = global i32 0
@FUTEX_PRIVATE_FLAG = global i32 0
@errno = global i32 0
define i32 @futex_wake(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* @FUTEX_WAKE
%7 = load i32, i32* @FUTEX_PRIVATE_FLAG
%8 = or i32 %6, %7
%9 = load i32, i32* %4
%10 = call i64 @futex(i32* %5, i32 %8, i32 %9, i32* null, i32* null, i32 0)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* @errno
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 0, %14 ]
ret i32 %16
}

LLVM IR (-O2):
@FUTEX_WAKE = global i32 0
@FUTEX_PRIVATE_FLAG = global i32 0
@errno = global i32 0
define i32 @futex_wake(i32* %0, i32 %1) {
%3 = load i32, i32* @FUTEX_WAKE
%4 = load i32, i32* @FUTEX_PRIVATE_FLAG
%5 = or i32 %4, %3
%6 = tail call i64 @futex(i32* %0, i32 %5, i32 %1, i32* null, i32* null, i32 0)
%7 = icmp eq i64 %6, 0
%8 = load i32, i32* @errno
%9 = select i1 %7, i32 0, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ mk_MD5Final(unsigned char *, void *);
void md5_final(unsigned char *digest, void *context) {
  mk_MD5Final(digest, context);
}


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

x86 assembly (clang, -O2):
<md5_final>:
jmp    1030 <mk_MD5Final@plt>

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

LLVM IR (-O2):
define void @md5_final(i8* %0, i8* %1) {
%3 = tail call i32 @mk_MD5Final(i8* %0, i8* %1)
ret void
}
unsigned char rev_low_nybble(unsigned char input) {
  static unsigned char rev_table[] = {0, 8, 4, 12, 2, 10, 6, 14,
                                      1, 9, 5, 13, 3, 11, 7, 15};
  int j;
  j = (int)(input & 0x0fu);
  return (input & 0xf0u) | rev_table[j];
}


x86 assembly (clang, -O0):
<rev_low_nybble>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
movslq -0x8(%rbp),%rdx
lea    0x2f08(%rip),%rcx
movzbl (%rcx,%rdx,1),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_low_nybble>:
mov    %edi,%eax
mov    %edi,%ecx
and    $0xf,%ecx
and    $0xf0,%al
lea    0xef0(%rip),%rdx
or     (%rcx,%rdx,1),%al
ret

LLVM IR (-O0):
@rev_low_nybble.rev_table = internal global [16 x i8] c"\00\08\04\0C\02\0A\06\0E\01\09\05\0D\03\0B\07\0F"
define zeroext i8 @rev_low_nybble(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 15
store i32 %6, i32* %3
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 240
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [16 x i8], [16 x i8]* @rev_low_nybble.rev_table, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %9, %14
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
@rev_low_nybble.rev_table = internal unnamed_addr constant [16 x i8] c"\00\08\04\0C\02\0A\06\0E\01\09\05\0D\03\0B\07\0F"
define zeroext i8 @rev_low_nybble(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = and i8 %0, -16
%4 = zext i8 %2 to i64
%5 = getelementptr inbounds [16 x i8], [16 x i8]* @rev_low_nybble.rev_table, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = or i8 %6, %3
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
void program_change(char a, char b) { printf("program_change %d %d\n", a, b); }


x86 assembly (clang, -O0):
<program_change>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
lea    0xed2(%rip),%rdi
movsbl %al,%esi
movsbl -0x2(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<program_change>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"program_change %d %d\0A\00"
define void @program_change(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8 signext %0, i8 signext %1)
ret void
}
/* Variables and functions */
scalar_t__ argint(int, int *);
int fetchstr(int, char **);
int argstr(int n, char **pp) {
  int addr;
  if (argint(n, &addr) < 0)
    return -1;
  return fetchstr(addr, pp);
}


x86 assembly (clang, -O0):
<argstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1040 <argint@plt>
cmp    $0x0,%rax
jge    1151 <argstr+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <argstr+0x40>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fetchstr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argstr>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xc(%rsp),%rsi
call   1040 <argint@plt>
test   %rax,%rax
js     1145 <argstr+0x25>
mov    0xc(%rsp),%edi
mov    %rbx,%rsi
call   1030 <fetchstr@plt>
jmp    114a <argstr+0x2a>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @argstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @argint(i32 %0, i32* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @fetchstr(i32 %8, i8** %1)
br label %10
10: ; preds = %2, %7
%11 = phi i32 [ %9, %7 ], [ -1, %2 ]
ret i32 %11
}
int max_from_two(int x, int y) {
  int __uni219;
  if (x > y) {
    __uni219 = x;
  } else {
    __uni219 = y;
  }
  return __uni219;
}


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

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

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

LLVM IR (-O2):
define i32 @max_from_two(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void clearScreen() {
  printf("\nPremere un tasto per continuare...\n");
  getchar();
  system("clear");
  return;
}


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xed7(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearScreen>:
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xeb5(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0APremere un tasto per continuare...\0A\00"
@.str.1 = [6 x i8] c"clear\00"
define void @clearScreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getchar()
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"clear\00"
@str = [36 x i8] c"\0APremere un tasto per continuare...\00"
define void @clearScreen() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int rc) {
  printf("usage: tone [-?hsqrwe] [-m output-magintude] [-f replay-freq] "
         "[wave-freq]\n\n"
         "\t-h?\tthis help\n"
         "\t-d\tdevice (/dev/dsp)\n"
         "\t-s\tsine wave output\n"
         "\t-q\tsquare wave output\n"
         "\t-r\tramp wave output\n"
         "\t-w\tsawtooth wave output\n"
         "\t-e\toutput big-endian data\n"
         "\t-f\tfrequency of replay engine\n"
         "\t-m\tmagintude of output (0-255)\n");
  exit(rc);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [293 x i8] c"usage: tone [-?hsqrwe] [-m output-magintude] [-f replay-freq] [wave-freq]\0A\0A\09-h?\09this help\0A\09-d\09device (/dev/dsp)\0A\09-s\09sine wave output\0A\09-q\09square wave output\0A\09-r\09ramp wave output\0A\09-w\09sawtooth wave output\0A\09-e\09output big-endian data\0A\09-f\09frequency of replay engine\0A\09-m\09magintude of output (0-255)\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([293 x i8], [293 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@str = [292 x i8] c"usage: tone [-?hsqrwe] [-m output-magintude] [-f replay-freq] [wave-freq]\0A\0A\09-h?\09this help\0A\09-d\09device (/dev/dsp)\0A\09-s\09sine wave output\0A\09-q\09square wave output\0A\09-r\09ramp wave output\0A\09-w\09sawtooth wave output\0A\09-e\09output big-endian data\0A\09-f\09frequency of replay engine\0A\09-m\09magintude of output (0-255)\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([292 x i8], [292 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int syscall(int, char const *, struct stat *);
int lstat(const char *restrict path, struct stat *restrict buf) {
  return syscall(107, path, buf);
}


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

x86 assembly (clang, -O2):
<lstat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x6b,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @lstat(i8* noalias %0, %struct.stat* noalias %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @syscall(i32 107, i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @lstat(i8* noalias %0, %struct.stat* noalias %1) {
%3 = tail call i32 @syscall(i32 107, i8* %0, %struct.stat* %1)
ret i32 %3
}
void f(int *p) { *p = 5; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movl   $0x5,(%rdi)
ret

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

LLVM IR (-O2):
define void @f(i32* nocapture writeonly %0) {
store i32 5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yy_z_foo__E();
void x2_x_pollen__run__E() { yy_z_foo__E(); }


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

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

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

LLVM IR (-O2):
define void @x2_x_pollen__run__E() {
%1 = tail call i32 (...) @yy_z_foo__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LRDP(char *);
void uc9_link_subdl() { LRDP("uc9:link_subdl IGNORED\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"uc9:link_subdl IGNORED\0A\00"
define void @uc9_link_subdl() {
%1 = call i32 @LRDP(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"uc9:link_subdl IGNORED\0A\00"
define void @uc9_link_subdl() {
%1 = tail call i32 @LRDP(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float expf(float);
double log(float);
int main(int argc, char *argv[]) {
  float e = expf(1.0f);
  double one = log(e);
  return one - 1;
}


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)
movss  0xeca(%rip),%xmm0
call   1030 <expf@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1040 <log@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xee7(%rip),%xmm0
call   1030 <log@plt>
addsd  0xee2(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call float @expf(float 1.000000e+00)
store float %8, float* %6
%9 = load float, float* %6
%10 = call double @log(float %9)
store double %10, double* %7
%11 = load double, double* %7
%12 = fsub double %11, 1.000000e+00
%13 = fptosi double %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @log(float 0x4005BF0A80000000)
%4 = fadd double %3, -1.000000e+00
%5 = fptosi double %4 to i32
ret i32 %5
}
void unittest_unflatten_overlay_base(void) {}


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

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

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

LLVM IR (-O2):
define void @unittest_unflatten_overlay_base() {
ret void
}
void do_swap4(void *i) {
  char *p = (char *)i;
  char tmp;
  tmp = p[3];
  p[3] = p[0];
  p[0] = tmp;
  tmp = p[2];
  p[2] = p[1];
  p[1] = tmp;
}


x86 assembly (clang, -O0):
<do_swap4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_swap4>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %al,0x3(%rdi)
mov    %cl,(%rdi)
rolw   $0x8,0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @do_swap4(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = load i8, i8* %0
store i8 %4, i8* %2
store i8 %3, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %6, i8* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_proxy {
  int dummy;
};
struct wl_keyboard {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_keyboard_get_version(struct wl_keyboard *wl_keyboard) {
  return wl_proxy_get_version((struct wl_proxy *)wl_keyboard);
}


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

x86 assembly (clang, -O2):
<wl_keyboard_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

LLVM IR (-O0):
%struct.wl_keyboard = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_keyboard_get_version(%struct.wl_keyboard* %0) {
%2 = alloca %struct.wl_keyboard*
store %struct.wl_keyboard* %0, %struct.wl_keyboard** %2
%3 = load %struct.wl_keyboard*, %struct.wl_keyboard** %2
%4 = bitcast %struct.wl_keyboard* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_get_version(%struct.wl_proxy* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.wl_keyboard = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_keyboard_get_version(%struct.wl_keyboard* %0) {
%2 = bitcast %struct.wl_keyboard* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
/* Variables and functions */
int fdt_next_node(void *, int, int *);
int fdt_node_end_offset_(void *fdt, int offset) {
  int depth = 0;
  while ((offset >= 0) && (depth >= 0))
    offset = fdt_next_node(fdt, offset, &depth);
  return offset;
}


x86 assembly (clang, -O0):
<fdt_node_end_offset_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jl     113f <fdt_node_end_offset_+0x2f>
cmpl   $0x0,-0x10(%rbp)
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114f <fdt_node_end_offset_+0x3f>
jmp    1167 <fdt_node_end_offset_+0x57>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1030 <fdt_next_node@plt>
mov    %eax,-0xc(%rbp)
jmp    1126 <fdt_node_end_offset_+0x16>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdt_node_end_offset_>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%eax
movl   $0x0,0x4(%rsp)
test   %esi,%esi
js     1148 <fdt_node_end_offset_+0x38>
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
call   1030 <fdt_next_node@plt>
test   %eax,%eax
js     1148 <fdt_node_end_offset_+0x38>
cmpl   $0x0,0x4(%rsp)
jns    1130 <fdt_node_end_offset_+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @fdt_node_end_offset_(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 = %14, %2
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %18
14: ; preds = %12
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @fdt_next_node(i8* %15, i32 %16, i32* %5)
store i32 %17, i32* %4
br label %6
18: ; preds = %12
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @fdt_node_end_offset_(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp sgt i32 %1, -1
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i32 [ %8, %6 ], [ %1, %2 ]
%8 = call i32 @fdt_next_node(i8* %0, i32 %7, i32* %3)
%9 = icmp sgt i32 %8, -1
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, -1
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %6, label %13
13: ; preds = %6, %2
%14 = phi i32 [ %1, %2 ], [ %8, %6 ]
ret i32 %14
}
void new_print(int a, int b) {
  printf("2333333");
  printf((a + b));
  a = a + b;
  printf("2333333", (a + b));
}


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

x86 assembly (clang, -O2):
<new_print>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee1(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    %ebx,%ebp
movslq %ebp,%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    %ebx,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"2333333\00"
define void @new_print(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
%11 = call i32 (i8*, ...) @printf(i8* %10)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"2333333\00"
define void @new_print(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %1, %0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6)
%8 = add nsw i32 %4, %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int puts(char *s) {
  while (*s) {
    putchar(*s++);
  }
  putchar('\n');
  return 1;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @putchar(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = tail call i32 @putchar(i8 signext 10)
ret i32 1
}
/* Variables and functions */
unsigned short crc16_byte(unsigned short, int /*<<< orphan*/);
unsigned short crc16(unsigned short crc, unsigned char const *buffer,
                     size_t len) {
  while (len--) {
    crc = crc16_byte(crc, *buffer++);
  }
  return crc;
}


x86 assembly (clang, -O0):
<crc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1167 <crc16+0x57>
mov    -0x2(%rbp),%ax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movzbl (%rcx),%esi
movzwl %ax,%edi
call   1030 <crc16_byte@plt>
mov    %ax,-0x2(%rbp)
jmp    1127 <crc16+0x17>
movzwl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc16>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%eax
test   %rdx,%rdx
je     1146 <crc16+0x36>
mov    %rdx,%r15
mov    %rsi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%r14,%rbx,1),%esi
movzwl %ax,%edi
call   1030 <crc16_byte@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <crc16+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define zeroext i16 @crc16(i16 zeroext %0, i8* %1, i64 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i64
store i16 %0, i16* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %7
7: ; preds = %11, %3
%8 = load i64, i64* %6
%9 = add i64 %8, -1
store i64 %9, i64* %6
%10 = icmp ne i64 %8, 0
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i16, i16* %4
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %5
%15 = load i8, i8* %13
%16 = zext i8 %15 to i32
%17 = call zeroext i16 @crc16_byte(i16 zeroext %12, i32 %16)
store i16 %17, i16* %4
br label %7
18: ; preds = %7
%19 = load i16, i16* %4
ret i16 %19
}

LLVM IR (-O2):
define zeroext i16 @crc16(i16 zeroext %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ %2, %3 ]
%7 = phi i8* [ %10, %5 ], [ %1, %3 ]
%8 = phi i16 [ %13, %5 ], [ %0, %3 ]
%9 = add i64 %6, -1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %7
%12 = zext i8 %11 to i32
%13 = tail call zeroext i16 @crc16_byte(i16 zeroext %8, i32 %12)
%14 = icmp eq i64 %9, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %3
%16 = phi i16 [ %0, %3 ], [ %13, %5 ]
ret i16 %16
}