xunge/DecIR huggingface dataset:
int main() {
  int x = 53191;
  short sx = (short)x;
  show_bytes(&x, sizeof(x));
  show_bytes(&sx, sizeof(sx));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xcfc7,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %ax,-0xa(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <show_bytes@plt>
lea    -0xa(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <show_bytes@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xcfc7,0x4(%rsp)
movw   $0xcfc7,0x2(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <show_bytes@plt>
lea    0x2(%rsp),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <show_bytes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16
store i32 0, i32* %1
store i32 53191, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i16
store i16 %5, i16* %3
%6 = call i32 (i32*, i64, ...) bitcast (i32 (...)* @show_bytes to i32 (i32*, i64, ...)*)(i32* %2, i64 4)
%7 = call i32 (i16*, i64, ...) bitcast (i32 (...)* @show_bytes to i32 (i16*, i64, ...)*)(i16* %3, i64 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = bitcast i32* %1 to i8*
store i32 53191, i32* %1
%4 = bitcast i16* %2 to i8*
store i16 -12345, i16* %2
%5 = call i32 (i32*, i64, ...) bitcast (i32 (...)* @show_bytes to i32 (i32*, i64, ...)*)(i32* %1, i64 4)
%6 = call i32 (i16*, i64, ...) bitcast (i32 (...)* @show_bytes to i32 (i16*, i64, ...)*)(i16* %2, i64 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((constructor)) __attribute__((used)) D13(void) {
  printf("Test4\n");
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"Test4\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @D13, i8* null }]
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @D13 to i8*)], section "llvm.metadata"
define void @D13() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @D13, i8* null }]
@str = [6 x i8] c"Test4\00"
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @D13 to i8*)], section "llvm.metadata"
define void @D13() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_5Eint64_midword_reg(long long val) {
  return ((val >> 16) & (0x5E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Eint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x5e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Eint64_midword_reg>:
test   $0x5e0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_5Eint64_midword_reg(i64 %0) {
%2 = and i64 %0, 6160384
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ sds_mmap(void *, int /*<<< orphan*/, int /*<<< orphan*/ *);
unsigned long cma_mmap(unsigned long phyAddr, uint32_t len) {
  return (unsigned long)sds_mmap((void *)phyAddr, len, NULL);
}


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

x86 assembly (clang, -O2):
<cma_mmap>:
xor    %edx,%edx
jmp    1030 <sds_mmap@plt>

LLVM IR (-O0):
define i64 @cma_mmap(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = inttoptr i64 %5 to i8*
%7 = load i32, i32* %4
%8 = call i64 @sds_mmap(i8* %6, i32 %7, i32* null)
ret i64 %8
}

LLVM IR (-O2):
define i64 @cma_mmap(i64 %0, i32 %1) {
%3 = inttoptr i64 %0 to i8*
%4 = tail call i64 @sds_mmap(i8* %3, i32 %1, i32* null)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ resolver_initialize();
void sock_initialize(void) { resolver_initialize(); }


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

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

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

LLVM IR (-O2):
define void @sock_initialize() {
%1 = tail call i32 (...) @resolver_initialize()
ret void
}
/* Variables and functions */
char getch();
int /*<<< orphan*/ printf(char *, char);
int main() {
  char c = 0;
  while (c != 10) {
    c = getch();
    printf("%c ", c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     115f <main+0x3f>
mov    $0x0,%al
call   1040 <getch@plt>
mov    %al,-0x5(%rbp)
lea    0xeaf(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    1133 <main+0x13>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getch@plt>
movsbl %al,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    $0xa,%bpl
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
br label %3
3: ; preds = %7, %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = call signext i8 (...) @getch()
store i8 %8, i8* %2
%9 = load i8, i8* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %9)
br label %3
11: ; preds = %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call signext i8 (...) @getch()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %2)
%4 = icmp eq i8 %2, 10
br i1 %4, label %5, label %1
5: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int);
void cgdec2pi(int v) { ngen("%s\t$%d,(%%rdx)", "subq", v); }


x86 assembly (clang, -O0):
<cgdec2pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <ngen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdec2pi>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s\09$%d,(%%rdx)\00"
@.str.1 = [5 x i8] c"subq\00"
define void @cgdec2pi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ngen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s\09$%d,(%%rdx)\00"
@.str.1 = [5 x i8] c"subq\00"
define void @cgdec2pi(i32 %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ KeccakF200_StateExtractBytesInLane(void *, unsigned int,
                                                      unsigned char *,
                                                      unsigned int, int);
unsigned char Ket_StateExtractByte(void *state, unsigned int offset) {
  unsigned char data[1];
  KeccakF200_StateExtractBytesInLane(state, offset / 1, data, offset % 1, 1);
  return data[0];
}


x86 assembly (clang, -O0):
<Ket_StateExtractByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shr    $0x0,%esi
lea    -0xd(%rbp),%rdx
mov    -0xc(%rbp),%ecx
and    $0x0,%ecx
mov    $0x1,%r8d
call   1030 <KeccakF200_StateExtractBytesInLane@plt>
movzbl -0xd(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ket_StateExtractByte>:
push   %rax
lea    0x7(%rsp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <KeccakF200_StateExtractBytesInLane@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @Ket_StateExtractByte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = udiv i32 %7, 1
%9 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%10 = load i32, i32* %4
%11 = urem i32 %10, 1
%12 = call i32 @KeccakF200_StateExtractBytesInLane(i8* %6, i32 %8, i8* %9, i32 %11, i32 1)
%13 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%14 = load i8, i8* %13
ret i8 %14
}

LLVM IR (-O2):
define zeroext i8 @Ket_StateExtractByte(i8* %0, i32 %1) {
%3 = alloca [1 x i8]
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = call i32 @KeccakF200_StateExtractBytesInLane(i8* %0, i32 %1, i8* %4, i32 0, i32 1)
%6 = load i8, i8* %4
ret i8 %6
}
long long uszs() { return 0x7fffffff0000ffffLL; }


x86 assembly (clang, -O0):
<uszs>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fffffff0000ffff,%rax
ff ff 7f
pop    %rbp
ret

x86 assembly (clang, -O2):
<uszs>:
movabs $0x7fffffff0000ffff,%rax
ff ff 7f
ret

LLVM IR (-O0):
define i64 @uszs() {
ret i64 9223372032559874047
}

LLVM IR (-O2):
define i64 @uszs() {
ret i64 9223372032559874047
}
/* Variables and functions */
int /*<<< orphan*/ test_negative_timeout();
int /*<<< orphan*/ test_positive_timeout();
int main(void) {
  test_negative_timeout();
  test_positive_timeout();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_negative_timeout@plt>
mov    $0x0,%al
call   1040 <test_positive_timeout@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_negative_timeout@plt>
xor    %eax,%eax
call   1040 <test_positive_timeout@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_negative_timeout()
%3 = call i32 (...) @test_positive_timeout()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_negative_timeout()
%2 = tail call i32 (...) @test_positive_timeout()
ret i32 0
}
void XWindowEvent() {}


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

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

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

LLVM IR (-O2):
define void @XWindowEvent() {
ret void
}
int resolvePowerOfi(int powerOfi) { return powerOfi % 4; }


x86 assembly (clang, -O0):
<resolvePowerOfi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolvePowerOfi>:
mov    %edi,%eax
lea    0x3(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @resolvePowerOfi(i32 %0) {
%2 = srem i32 %0, 4
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int args, char **argv) {
  puts("hello, world");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"hello, world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void sig_chld(int sig_no) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0) {
    printf("The child process %d is now dead.\n", pid);
  }
}


x86 assembly (clang, -O0):
<sig_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1162 <sig_chld+0x42>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <sig_chld+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2eb8(%rip),%r15
mov    (%r15),%edx
lea    0xc(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
test   %eax,%eax
jle    117e <sig_chld+0x5e>
lea    0xeb3(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1160 <sig_chld+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [35 x i8] c"The child process %d is now dead.\0A\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [35 x i8] c"The child process %d is now dead.\0A\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 -1, i32* %2, i32 %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ %5, %1 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @WNOHANG
%11 = call i32 @waitpid(i32 -1, i32* %2, i32 %10)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %7, %1
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ get_now_time(scalar_t__ *);
void add_millisec_to_now(int32_t msec, int64_t *rmsec) {
  int64_t cur_msec;
  get_now_time(&cur_msec);
  *rmsec = cur_msec + msec;
}


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

x86 assembly (clang, -O2):
<add_millisec_to_now>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1030 <get_now_time@plt>
add    (%rsp),%rbx
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @add_millisec_to_now(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
%5 = alloca i64
store i64 %0, i64* %3
store i64* %1, i64** %4
%6 = call i32 @get_now_time(i64* %5)
%7 = load i64, i64* %5
%8 = load i64, i64* %3
%9 = add nsw i64 %7, %8
%10 = load i64*, i64** %4
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @add_millisec_to_now(i64 %0, i64* nocapture writeonly %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @get_now_time(i64* %3)
%6 = load i64, i64* %3
%7 = add nsw i64 %6, %0
store i64 %7, i64* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, int, char const *);
void send_status(FILE *client, int code, const char *reason_phrase) {
  if (fprintf(client, "HTTP/1.1 %d %s\r\n", code, reason_phrase) < 0) {
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<send_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
jge    115e <send_status+0x3e>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_status>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
test   %rax,%rax
js     1139 <send_status+0x19>
pop    %rax
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"HTTP/1.1 %d %s\0D\0A\00"
define void @send_status(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i64 @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"HTTP/1.1 %d %s\0D\0A\00"
define void @send_status(i32* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i64 @fprintf(i32* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ALcompressorState_Delete(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<ALcompressorState_Delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ALcompressorState_Delete(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void glBindVertexArray(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glBindVertexArray() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_configure_baud_rate(int, int);
int /*<<< orphan*/ serial_configure_fifo(int, int);
int /*<<< orphan*/ serial_configure_line(int, int);
void serial_init() {
  serial_configure_baud_rate(0x3F8, 2);
  serial_configure_line(0x3F8, 0x03);
  serial_configure_fifo(0x3F8, 0xC7);
}


x86 assembly (clang, -O0):
<serial_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f8,%edi
mov    $0x2,%esi
call   1040 <serial_configure_baud_rate@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <serial_configure_line@plt>
mov    $0x3f8,%edi
mov    $0xc7,%esi
call   1050 <serial_configure_fifo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_init>:
push   %rax
mov    $0x3f8,%edi
mov    $0x2,%esi
call   1040 <serial_configure_baud_rate@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <serial_configure_line@plt>
mov    $0x3f8,%edi
mov    $0xc7,%esi
pop    %rax
jmp    1050 <serial_configure_fifo@plt>

LLVM IR (-O0):
define void @serial_init() {
%1 = call i32 @serial_configure_baud_rate(i32 1016, i32 2)
%2 = call i32 @serial_configure_line(i32 1016, i32 3)
%3 = call i32 @serial_configure_fifo(i32 1016, i32 199)
ret void
}

LLVM IR (-O2):
define void @serial_init() {
%1 = tail call i32 @serial_configure_baud_rate(i32 1016, i32 2)
%2 = tail call i32 @serial_configure_line(i32 1016, i32 3)
%3 = tail call i32 @serial_configure_fifo(i32 1016, i32 199)
ret void
}
const char *show_records(struct list_head *pages) { return ""; }


x86 assembly (clang, -O0):
<show_records>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.list_head = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @show_records(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.list_head = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @show_records(%struct.list_head* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ doCallBack(int, int, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
void doSpecial(int ch) { doCallBack(5, ch, NULL, NULL); }


x86 assembly (clang, -O0):
<doSpecial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <doCallBack@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doSpecial>:
mov    %edi,%esi
mov    $0x5,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <doCallBack@plt>

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

LLVM IR (-O2):
define void @doSpecial(i32 %0) {
%2 = tail call i32 @doCallBack(i32 5, i32 %0, i32* null, i32* null)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void main_clk_init() {
  uint32_t val;
  val = (3);
  (*(volatile uint32_t *)((0x40048000 + 0x070)) = (val & 0x3));
  val = (1);
  (*(volatile uint32_t *)((0x40048000 + 0x074)) = (val & 0x1));
}


x86 assembly (clang, -O0):
<main_clk_init>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x3,%ecx
mov    $0x40048070,%eax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
mov    $0x40048074,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_clk_init>:
movl   $0x3,0x40048070
movl   $0x1,0x40048074
ret

LLVM IR (-O0):
define void @main_clk_init() {
%1 = alloca i32
store i32 3, i32* %1
%2 = load i32, i32* %1
%3 = and i32 %2, 3
store volatile i32 %3, i32* inttoptr (i64 1074036848 to i32*)
store i32 1, i32* %1
%4 = load i32, i32* %1
%5 = and i32 %4, 1
store volatile i32 %5, i32* inttoptr (i64 1074036852 to i32*)
ret void
}

LLVM IR (-O2):
define void @main_clk_init() {
store volatile i32 3, i32* inttoptr (i64 1074036848 to i32*)
store volatile i32 1, i32* inttoptr (i64 1074036852 to i32*)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ format;
};
struct TYPE_4__ {
  TYPE_1__ xclient;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xclient_format(void *_p) {
  return (int)((XEvent *)_p)->xclient.format;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xclient_format>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XEvent_xclient_format(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int LZ5_decompress_safe(char const *, char *, int, int);
int LZ5_uncompress_unknownOutputSize(const char *source, char *dest, int isize,
                                     int maxOutputSize) {
  return LZ5_decompress_safe(source, dest, isize, maxOutputSize);
}


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

x86 assembly (clang, -O2):
<LZ5_uncompress_unknownOutputSize>:
jmp    1030 <LZ5_decompress_safe@plt>

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

LLVM IR (-O2):
define i32 @LZ5_uncompress_unknownOutputSize(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @LZ5_decompress_safe(i8* %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}
void rtc_dev_add_device(struct rtc_device *rtc) {}


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

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

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

LLVM IR (-O2):
%struct.rtc_device = type opaque
define void @rtc_dev_add_device(%struct.rtc_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indirectx();
int /*<<< orphan*/ readmem65816(int /*<<< orphan*/);
int /*<<< orphan*/ sbc8(int /*<<< orphan*/);
void sbcIndirectx8(void) { sbc8(readmem65816(indirectx())); }


x86 assembly (clang, -O0):
<sbcIndirectx8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <indirectx@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
call   1030 <sbc8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbcIndirectx8>:
push   %rax
xor    %eax,%eax
call   1040 <indirectx@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sbc8@plt>

LLVM IR (-O0):
define void @sbcIndirectx8() {
%1 = call i32 (...) @indirectx()
%2 = call i32 @readmem65816(i32 %1)
%3 = call i32 @sbc8(i32 %2)
ret void
}

LLVM IR (-O2):
define void @sbcIndirectx8() {
%1 = tail call i32 (...) @indirectx()
%2 = tail call i32 @readmem65816(i32 %1)
%3 = tail call i32 @sbc8(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ nums;

/* Variables and functions */
int maxSubArray(int *, int);
int printf(char *, int);
int main(int argc, char *argv[]) {
  int nums[] = {-5, 8, -5, 1, 1, -3, 5, 5, -3, -3, 6, 4, -7, -4, -8, 0, -1, -6};
  int size = sizeof(nums) / 4;
  int ret = maxSubArray(nums, size);
  return printf("%d\n", ret);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x48,%edx
call   1040 <memcpy@plt>
movl   $0x12,-0x64(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x64(%rbp),%esi
call   1050 <maxSubArray@plt>
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0xf15(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x12,%esi
call   1040 <maxSubArray@plt>
lea    0xed5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x48,%rsp
ret

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

LLVM IR (-O2):
@__const.main.nums = [18 x i32] [i32 -5, i32 8, i32 -5, i32 1, i32 1, i32 -3, i32 5, i32 5, i32 -3, i32 -3, i32 6, i32 4, i32 -7, i32 -4, i32 -8, i32 0, i32 -1, i32 -6]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [18 x i32]
%4 = bitcast [18 x i32]* %3 to i8*
%5 = getelementptr inbounds [18 x i32], [18 x i32]* %3, i64 0, i64 0
%6 = call i32 @maxSubArray(i32* %5, i32 18)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
int get_XPointerMovedEvent_y(void *_p) {
  return (int)((XPointerMovedEvent *)_p)->y;
}


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

x86 assembly (clang, -O2):
<get_XPointerMovedEvent_y>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XPointerMovedEvent_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XPointerMovedEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int fedisableexcept(int excepts) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @fedisableexcept(i32 %0) {
ret i32 -1
}
int main() {
  char str[20] = {"abcde"};
  rev(str);
  printf("in main %s \n", str);
  rev_ver1(str);
  printf("in main %s \n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <rev@plt>
lea    -0x20(%rbp),%rsi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1050 <rev_ver1@plt>
lea    -0x20(%rbp),%rsi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xec2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <rev@plt>
lea    0xeb6(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <rev_ver1@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [20 x i8] c"abcde\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [13 x i8] c"in main %s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @rev to i32 (i8*, ...)*)(i8* %4)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @rev_ver1 to i32 (i8*, ...)*)(i8* %8)
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [20 x i8] c"abcde\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [13 x i8] c"in main %s \0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @rev to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @rev_ver1 to i32 (i8*, ...)*)(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
void PicoShutdown(void) { return; }


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

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

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

LLVM IR (-O2):
define void @PicoShutdown() {
ret void
}
/* Variables and functions */
float __ocml_fmax_f32(float, float);
float fmaxf(float x, float y) { return __ocml_fmax_f32(x, y); }


x86 assembly (clang, -O0):
<fmaxf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__ocml_fmax_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxf>:
jmp    1030 <__ocml_fmax_f32@plt>

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

LLVM IR (-O2):
define float @fmaxf(float %0, float %1) {
%3 = tail call float @__ocml_fmax_f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
int print(char **, int *);
int sprintf(char *out, const char *format, ...) {
  int *varg = (int *)(char *)(&format);
  return print(&out, varg);
}


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

x86 assembly (clang, -O2):
<sprintf>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <print@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = bitcast i8** %4 to i8*
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @print(i8** %3, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = bitcast i8** %4 to i32*
%6 = call i32 @print(i8** %3, i32* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_compatible() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_compatible"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"NOT IMPLEMENTED:pa_cvolume_compatible\0A\00"
define i32 @pa_cvolume_compatible() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_cvolume_compatible\00"
define i32 @pa_cvolume_compatible() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void websils_asn1_abi_0() {}


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

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

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

LLVM IR (-O2):
define void @websils_asn1_abi_0() {
ret void
}
int sr_class3_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sr_class3_init() {
ret i32 0
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/tc.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tc.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tc.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
int cpuid_rdrand_test() {
  int ecx, eax = 1;
  asm("cpuid" : "=c"(ecx), "+a"(eax)::"ebx", "edx");
  return ecx & (1 << 30) ? 1 : 0;
}


x86 assembly (clang, -O0):
<cpuid_rdrand_test>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cpuid
mov    %ecx,-0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edx
and    $0x40000000,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_rdrand_test>:
push   %rbx
mov    $0x1,%eax
cpuid
mov    %ecx,%eax
shr    $0x1e,%eax
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cpuid_rdrand_test() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = call { i32, i32 } asm "cpuid", "={cx},={ax},1,~{ebx},~{edx},~{dirflag},~{fpsr},~{flags}"(i32 %3)
%5 = extractvalue { i32, i32 } %4, 0
%6 = extractvalue { i32, i32 } %4, 1
store i32 %5, i32* %1
store i32 %6, i32* %2
%7 = load i32, i32* %1
%8 = and i32 %7, 1073741824
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @cpuid_rdrand_test() {
%1 = tail call { i32, i32 } asm "cpuid", "={cx},={ax},1,~{ebx},~{edx},~{dirflag},~{fpsr},~{flags}"(i32 1)
%2 = extractvalue { i32, i32 } %1, 0
%3 = lshr i32 %2, 30
%4 = and i32 %3, 1
ret i32 %4
}
char *findeq(cp)
register char *cp;
{
  while (*cp != '\0' && *cp != '=')
    cp++;
  return (cp);
}


x86 assembly (clang, -O0):
<findeq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <findeq+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <findeq+0x3d>
jmp    114e <findeq+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <findeq+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findeq>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <findeq+0x22>
cmp    $0x3d,%cl
je     1122 <findeq+0x22>
add    $0x1,%rax
jmp    1110 <findeq+0x10>
ret

LLVM IR (-O0):
define i8* @findeq(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 61
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @findeq(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 61, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
ret i8* %3
}
void XSetModifierMapping() {}


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

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

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

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