xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_metadata_credentials_create_from_plugin() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_metadata_credentials_create_from_plugin>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_metadata_credentials_create_from_plugin>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_metadata_credentials_create_from_plugin() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_metadata_credentials_create_from_plugin() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
R0A1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (r0 <= (*((short *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movswl -0x6(%rbp),%eax
mov    $0xa98ac7,%ecx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jg     113f <R0A1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <R0A1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0A1>:
movswl %di,%ecx
movswl 0xa98ac7,%edx
xor    %eax,%eax
cmp    %edx,%ecx
setle  %al
ret

LLVM IR (-O0):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %8
%17 = sext i16 %16 to i32
%18 = load i16, i16* inttoptr (i64 11111111 to i16*)
%19 = sext i16 %18 to i32
%20 = icmp sle i32 %17, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = shl i32 %0, 16
%8 = ashr exact i32 %7, 16
%9 = load i16, i16* inttoptr (i64 11111111 to i16*)
%10 = sext i16 %9 to i32
%11 = icmp sle i32 %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
void foo172(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo172(i32 %0) {
ret void
}
void g_value_set_boolean() {}


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

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

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

LLVM IR (-O2):
define void @g_value_set_boolean() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EOPNOTSUPP;
int /*<<< orphan*/ errno;
int set_sndtimeo(int fd, void *optval, int optlen) {
  errno = EOPNOTSUPP;
  return -1;
}


x86 assembly (clang, -O0):
<set_sndtimeo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_sndtimeo>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @set_sndtimeo(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @EOPNOTSUPP
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @set_sndtimeo(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @EOPNOTSUPP
store i32 %4, i32* @errno
ret i32 -1
}
const char *TA_GetVersionDate(void) { return "Mar 15 2022"; }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Mar 15 2022\00"
define i8* @TA_GetVersionDate() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
int main() { return 1 & -0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_ipv4_checksum();
int /*<<< orphan*/ test_sctp_crc32c();
int /*<<< orphan*/ test_tcp_udp_v4_checksum();
int /*<<< orphan*/ test_tcp_udp_v6_checksum();
int main(void) {
  test_tcp_udp_v4_checksum();
  test_tcp_udp_v6_checksum();
  test_ipv4_checksum();
  test_sctp_crc32c();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_tcp_udp_v4_checksum@plt>
xor    %eax,%eax
call   1060 <test_tcp_udp_v6_checksum@plt>
xor    %eax,%eax
call   1030 <test_ipv4_checksum@plt>
xor    %eax,%eax
call   1040 <test_sctp_crc32c@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_tcp_udp_v4_checksum()
%3 = call i32 (...) @test_tcp_udp_v6_checksum()
%4 = call i32 (...) @test_ipv4_checksum()
%5 = call i32 (...) @test_sctp_crc32c()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_tcp_udp_v4_checksum()
%2 = tail call i32 (...) @test_tcp_udp_v6_checksum()
%3 = tail call i32 (...) @test_ipv4_checksum()
%4 = tail call i32 (...) @test_sctp_crc32c()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ errbuff;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int write(int, char *, int);
int senderr(int sock, int ecode) {
  char errbuff[7];
  snprintf(errbuff, sizeof(errbuff), "ERR %d", ecode);
  int bsent;
  bsent = write(sock, errbuff, sizeof(errbuff));
  if (bsent < sizeof(errbuff))
    return (-1);
  return 0;
}


x86 assembly (clang, -O0):
<senderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x13(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x7,%esi
lea    0xebf(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x8(%rbp),%edi
lea    -0x13(%rbp),%rsi
mov    $0x7,%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    $0x7,%rax
jae    1174 <senderr+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <senderr+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<senderr>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ecx
mov    %edi,%ebx
lea    0xed1(%rip),%rdx
lea    0x1(%rsp),%r14
mov    %r14,%rdi
mov    $0x7,%esi
call   1040 <snprintf@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x7,%edx
call   1030 <write@plt>
cmp    $0x7,%eax
sbb    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"ERR %d\00"
define i32 @senderr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [7 x i8]
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* %5
%10 = call i32 @snprintf(i8* %8, i32 7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %4
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%13 = call i32 @write(i32 %11, i8* %12, i32 7)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = icmp ult i64 %15, 7
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %19
18: ; preds = %2
store i32 0, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [7 x i8] c"ERR %d\00"
define i32 @senderr(i32 %0, i32 %1) {
%3 = alloca [7 x i8]
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @write(i32 %0, i8* %4, i32 7)
%7 = icmp ult i32 %6, 7
%8 = sext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ strv_free_erase(char **);
void strv_free_erasep(char ***p) {
  if (*p)
    strv_free_erase(*p);
}


x86 assembly (clang, -O0):
<strv_free_erasep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <strv_free_erasep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strv_free_erase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strv_free_erasep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <strv_free_erasep+0xd>
jmp    1030 <strv_free_erase@plt>
ret

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

LLVM IR (-O2):
define void @strv_free_erasep(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = icmp eq i8** %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strv_free_erase(i8** %2)
br label %6
6: ; preds = %4, %1
ret void
}
void rn_init() { ; }


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

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

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

LLVM IR (-O2):
define void @rn_init() {
ret void
}
/* Type definitions */
struct NameTableIter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct NameTableIter *);
void nt_iter_release(struct NameTableIter *it) { free(it); }


x86 assembly (clang, -O0):
<nt_iter_release>:
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):
<nt_iter_release>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.NameTableIter = type { i32 }
define void @nt_iter_release(%struct.NameTableIter* %0) {
%2 = alloca %struct.NameTableIter*
store %struct.NameTableIter* %0, %struct.NameTableIter** %2
%3 = load %struct.NameTableIter*, %struct.NameTableIter** %2
%4 = call i32 @free(%struct.NameTableIter* %3)
ret void
}

LLVM IR (-O2):
%struct.NameTableIter = type { i32 }
define void @nt_iter_release(%struct.NameTableIter* nocapture %0) {
%2 = tail call i32 @free(%struct.NameTableIter* %0)
ret void
}
/* Variables and functions */
scalar_t__ heir1(int *);
int /*<<< orphan*/ rvalue(int *);
expression() {
  int lval[2];
  if (heir1(lval))
    rvalue(lval);
}


x86 assembly (clang, -O0):
<expression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1040 <heir1@plt>
cmp    $0x0,%rax
je     1144 <expression+0x24>
lea    -0xc(%rbp),%rdi
call   1030 <rvalue@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expression>:
push   %rax
mov    %rsp,%rdi
call   1040 <heir1@plt>
test   %rax,%rax
je     1136 <expression+0x16>
mov    %rsp,%rdi
call   1030 <rvalue@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @expression() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%4 = call i64 @heir1(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%8 = call i32 @rvalue(i32* %7)
br label %9
9: ; preds = %6, %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @expression() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i64 @heir1(i32* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @rvalue(i32* %3)
br label %8
8: ; preds = %6, %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ generate_tune1();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("#include \"stfm1000-regs.h\"\n\n");
  generate_tune1();
  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    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <generate_tune1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"#include \22stfm1000-regs.h\22\0A\0A\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 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @generate_tune1()
ret i32 0
}

LLVM IR (-O2):
@str = [28 x i8] c"#include \22stfm1000-regs.h\22\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @generate_tune1()
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t Packet_getLen(uint16_t state) { return state & 0x3FFF; }


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

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

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

LLVM IR (-O2):
define i32 @Packet_getLen(i32 %0) {
%2 = and i32 %0, 16383
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void _checkNil(long *r) {
  if (r == 0) {
    fprintf(stderr, "Nil!\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<_checkNil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1156 <_checkNil+0x36>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_checkNil>:
test   %rdi,%rdi
je     1126 <_checkNil+0x6>
ret
push   %rax
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"Nil!\0A\00"
define void @_checkNil(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = icmp eq i64* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"Nil!\0A\00"
define void @_checkNil(i64* readnone %0) {
%2 = icmp eq i64* %0, null
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage: gather [-b bytes] [-s src_dir] [-d dst_dir] [-f file]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: gather [-b bytes] [-s src_dir] [-d dst_dir] [-f file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: gather [-b bytes] [-s src_dir] [-d dst_dir] [-f file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ *find_query(char *);
int get_color_loot() { return find_query("loot_colors") != NULL; }


x86 assembly (clang, -O0):
<get_color_loot>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <find_query@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_color_loot>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <find_query@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"loot_colors\00"
define i32 @get_color_loot() {
%1 = call i32* @find_query(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@.str = [12 x i8] c"loot_colors\00"
define i32 @get_color_loot() {
%1 = tail call i32* @find_query(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}
void PutLong(char *addr, int Value) {
  *addr++ = (char)(Value & 0xff);
  *addr++ = (char)((Value >> 8) & 0xff);
  *addr++ = (char)((Value >> 16) & 0xff);
  *addr = (char)((Value >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<PutLong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PutLong>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @PutLong(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %0
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %4
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %9, i8* %7
%11 = lshr i32 %1, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %10
ret void
}
int is_barebox_mips_head(const char *head) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_barebox_mips_head(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_7_recursive(double *, int);
void helper_double_7(double *buf) { helper_double_7_recursive(buf, 7); }


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

x86 assembly (clang, -O2):
<helper_double_7>:
mov    $0x7,%esi
jmp    1030 <helper_double_7_recursive@plt>

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

LLVM IR (-O2):
define void @helper_double_7(double* %0) {
%2 = tail call i32 @helper_double_7_recursive(double* %0, i32 7)
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(char);
int main(void) {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == ' ' || c == '\n' || c == '\t') {
      putchar('\n');
    } else {
      putchar('*');
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1184 <main+0x64>
cmpl   $0x20,-0x8(%rbp)
je     1166 <main+0x46>
cmpl   $0xa,-0x8(%rbp)
je     1166 <main+0x46>
cmpl   $0x9,-0x8(%rbp)
jne    1175 <main+0x55>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    117f <main+0x5f>
mov    $0x2a,%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%rbx
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
movabs $0x100000600,%r14
jmp    1165 <main+0x45>
nopl   0x0(%rax)
mov    $0x2a,%cl
movzbl %cl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1136 <main+0x16>
cmp    $0x20,%eax
ja     1150 <main+0x30>
mov    $0xa,%cl
mov    %eax,%eax
bt     %rax,%r14
jb     1152 <main+0x32>
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %20, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %21
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 32
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 10
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 9
br i1 %15, label %16, label %18
16: ; preds = %13, %10, %7
%17 = call i32 @putchar(i8 signext 10)
br label %20
18: ; preds = %13
%19 = call i32 @putchar(i8 signext 42)
br label %20
20: ; preds = %18, %16
br label %3
21: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %7
%5 = phi i32 [ %10, %7 ], [ %1, %0 ]
switch i32 %5, label %6 [
i32 32, label %7
i32 10, label %7
i32 9, label %7
]
6: ; preds = %4
br label %7
7: ; preds = %4, %4, %4, %6
%8 = phi i8 [ 42, %6 ], [ 10, %4 ], [ 10, %4 ], [ 10, %4 ]
%9 = tail call i32 @putchar(i8 signext %8)
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  char *animal = "Cat";
  if (animal == "Dog")
    printf("Animal is a dog\n");
  else if (animal == "Cat")
    printf("Animal is a cat\n");
  else
    printf("Some other animal\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed3(%rip),%rax
cmp    %rax,-0x10(%rbp)
jne    114c <main+0x3c>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x6f>
lea    0xead(%rip),%rax
cmp    %rax,-0x10(%rbp)
jne    116e <main+0x5e>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    117a <main+0x6a>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x6f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rax
lea    0xee9(%rip),%rdi
lea    0xede(%rip),%rcx
lea    0xed3(%rip),%rdx
cmp    %rcx,%rdx
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Cat\00"
@.str.1 = [4 x i8] c"Dog\00"
@.str.2 = [17 x i8] c"Animal is a dog\0A\00"
@.str.3 = [17 x i8] c"Animal is a cat\0A\00"
@.str.4 = [19 x i8] c"Some other animal\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %15
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = icmp eq i8* %8, getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
br label %15
15: ; preds = %14, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"Cat\00"
@.str.1 = [4 x i8] c"Dog\00"
@str = [16 x i8] c"Animal is a cat\00"
@str.5 = [16 x i8] c"Animal is a dog\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) select (i1 icmp eq (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0)))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xce() {
  Assert_real((isalnum(206) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1035, ("isalnum should be 0 for 0xce"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xce>:
push   %rbp
mov    %rsp,%rbp
mov    $0xce,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x40b,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xce>:
push   %rax
mov    $0xce,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x40b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xce\00"
define void @t_isalnum_0xce() {
%1 = call i64 @isalnum(i32 206)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1035, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xce\00"
define void @t_isalnum_0xce() {
%1 = tail call i64 @isalnum(i32 206)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1035, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void f() {
  struct first {
    float x;
    float y;
    float z;
  };
  struct second {
    int foo;
    float bar;
  };
  struct {
    float baz;
  };
  struct {
    int a;
    int b;
  };
}


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
scalar_t__ fstat(int, struct stat *);
void dofstat(const char *test, int fd, struct stat *sb) {
  if (fstat(fd, sb) < 0)
    err(-1, "%s: fstat", test);
}


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

x86 assembly (clang, -O2):
<dofstat>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    %rdx,%rsi
call   1040 <fstat@plt>
test   %rax,%rax
js     1135 <dofstat+0x15>
pop    %rbx
ret
lea    0xec4(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <err@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [10 x i8] c"%s: fstat\00"
define void @dofstat(i8* %0, i32 %1, %struct.stat* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.stat*
store i8* %0, i8** %4
store i32 %1, i32* %5
store %struct.stat* %2, %struct.stat** %6
%7 = load i32, i32* %5
%8 = load %struct.stat*, %struct.stat** %6
%9 = call i64 @fstat(i32 %7, %struct.stat* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i8*, i8** %4
%13 = call i32 @err(i32 -1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [10 x i8] c"%s: fstat\00"
define void @dofstat(i8* %0, i32 %1, %struct.stat* nocapture %2) {
%4 = tail call i64 @fstat(i32 %1, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err(i32 -1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ drawTree(int);
int main(int argc, const char *argv[]) {
  drawTree(5);
  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)
mov    $0x5,%edi
call   1030 <drawTree@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <drawTree@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 @drawTree(i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @drawTree(i32 5)
ret i32 0
}
/* Variables and functions */
int strtoul(char const *, int /*<<< orphan*/ *, int);
int vobsub_parse_tridx(const char *line) {
  int tridx;
  tridx = strtoul((line + 26), NULL, 16);
  tridx = ((tridx & 0x1000) >> 12) | ((tridx & 0x100) >> 7) |
          ((tridx & 0x10) >> 2) | ((tridx & 1) << 3);
  return tridx;
}


x86 assembly (clang, -O0):
<vobsub_parse_tridx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1a,%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1030 <strtoul@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1000,%eax
sar    $0xc,%eax
mov    -0xc(%rbp),%ecx
and    $0x100,%ecx
sar    $0x7,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0x10,%ecx
sar    $0x2,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vobsub_parse_tridx>:
push   %rax
add    $0x1a,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <strtoul@plt>
mov    %eax,%ecx
shr    $0xc,%ecx
and    $0x1,%ecx
mov    %eax,%edx
shr    $0x7,%edx
and    $0x2,%edx
or     %ecx,%edx
mov    %eax,%ecx
shr    $0x2,%ecx
and    $0x4,%ecx
or     %edx,%ecx
and    $0x1,%eax
lea    (%rcx,%rax,8),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vobsub_parse_tridx(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 26
%6 = call i32 @strtoul(i8* %5, i32* null, i32 16)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, 4096
%9 = ashr i32 %8, 12
%10 = load i32, i32* %3
%11 = and i32 %10, 256
%12 = ashr i32 %11, 7
%13 = or i32 %9, %12
%14 = load i32, i32* %3
%15 = and i32 %14, 16
%16 = ashr i32 %15, 2
%17 = or i32 %13, %16
%18 = load i32, i32* %3
%19 = and i32 %18, 1
%20 = shl i32 %19, 3
%21 = or i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @vobsub_parse_tridx(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 26
%3 = tail call i32 @strtoul(i8* nocapture %2, i32* null, i32 16)
%4 = lshr i32 %3, 12
%5 = and i32 %4, 1
%6 = lshr i32 %3, 7
%7 = and i32 %6, 2
%8 = or i32 %5, %7
%9 = lshr i32 %3, 2
%10 = and i32 %9, 4
%11 = or i32 %8, %10
%12 = shl i32 %3, 3
%13 = and i32 %12, 8
%14 = or i32 %11, %13
ret i32 %14
}
int eh_palindroma(int n, char *p) {
  if (n <= 1)
    return 1;
  if (p[0] != p[n - 1])
    return 0;
  return eh_palindroma(n - 2, p + 1);
}


x86 assembly (clang, -O0):
<eh_palindroma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1135 <eh_palindroma+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1177 <eh_palindroma+0x67>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1161 <eh_palindroma+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1177 <eh_palindroma+0x67>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1030 <eh_palindroma@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eh_palindroma>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     112b <eh_palindroma+0x2b>
lea    -0x1(%rdi),%ecx
add    $0x2,%edi
mov    %ecx,%r8d
movzbl (%rsi),%edx
cmp    (%rsi,%r8,1),%dl
jne    112c <eh_palindroma+0x2c>
add    $0x1,%rsi
add    $0xfffffffe,%ecx
add    $0xfffffffe,%edi
cmp    $0x3,%edi
jg     1110 <eh_palindroma+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @eh_palindroma(i32 %0, i8* nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %17, label %4
4: ; preds = %2, %13
%5 = phi i8* [ %15, %13 ], [ %1, %2 ]
%6 = phi i32 [ %14, %13 ], [ %0, %2 ]
%7 = load i8, i8* %5
%8 = add nsw i32 %6, -1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %7, %11
br i1 %12, label %13, label %17
13: ; preds = %4
%14 = add nsw i32 %6, -2
%15 = getelementptr inbounds i8, i8* %5, i64 1
%16 = icmp slt i32 %6, 4
br i1 %16, label %17, label %4
17: ; preds = %13, %4, %2
%18 = phi i32 [ 1, %2 ], [ 0, %4 ], [ 1, %13 ]
ret i32 %18
}
int tegra_cpu_edp_get_thermal_index(struct platform_device *pdev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.platform_device = type opaque
define i32 @tegra_cpu_edp_get_thermal_index(%struct.platform_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ catalan(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned int n;
  printf("Input n \nNth Catalan you want :");
  scanf("%d", &n);
  printf("Nth Catalan number is: %lu", catalan(n));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <catalan@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <catalan@plt>
lea    0xec3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Input n \0ANth Catalan you want :\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Nth Catalan number is: %lu\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @catalan(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Input n \0ANth Catalan you want :\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Nth Catalan number is: %lu\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @catalan(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
void vdfram(int itype) {}


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

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

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

LLVM IR (-O2):
define void @vdfram(i32 %0) {
ret void
}
/* Type definitions */
struct lirc_config {
  int dummy;
};

/* Variables and functions */
int lirc_readconfig_only_internal(char *, struct lirc_config **,
                                  int (*)(char *), int /*<<< orphan*/ *,
                                  int /*<<< orphan*/ *);
int lirc_readconfig_only(char *file, struct lirc_config **config,
                         int(check)(char *s)) {
  return lirc_readconfig_only_internal(file, config, check, NULL, NULL);
}


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

x86 assembly (clang, -O2):
<lirc_readconfig_only>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <lirc_readconfig_only_internal@plt>

LLVM IR (-O0):
%struct.lirc_config = type { i32 }
define i32 @lirc_readconfig_only(i8* %0, %struct.lirc_config** %1, i32 (i8*)* %2) {
%4 = alloca i8*
%5 = alloca %struct.lirc_config**
%6 = alloca i32 (i8*)*
store i8* %0, i8** %4
store %struct.lirc_config** %1, %struct.lirc_config*** %5
store i32 (i8*)* %2, i32 (i8*)** %6
%7 = load i8*, i8** %4
%8 = load %struct.lirc_config**, %struct.lirc_config*** %5
%9 = load i32 (i8*)*, i32 (i8*)** %6
%10 = call i32 @lirc_readconfig_only_internal(i8* %7, %struct.lirc_config** %8, i32 (i8*)* %9, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
%struct.lirc_config = type { i32 }
define i32 @lirc_readconfig_only(i8* %0, %struct.lirc_config** %1, i32 (i8*)* %2) {
%4 = tail call i32 @lirc_readconfig_only_internal(i8* %0, %struct.lirc_config** %1, i32 (i8*)* %2, i32* null, i32* null)
ret i32 %4
}
double nmea_degree2radian(double val) {
  return (val * ((3.141592653589793) / 180));
}


x86 assembly (clang, -O0):
<nmea_degree2radian>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmea_degree2radian>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @nmea_degree2radian(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3F91DF46A2529D39
ret double %4
}

LLVM IR (-O2):
define double @nmea_degree2radian(double %0) {
%2 = fmul double %0, 0x3F91DF46A2529D39
ret double %2
}
void nseel_asm_bor_end(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gentrunc_l_s() {
ret void
}
/* Variables and functions */
size_t strnlen(const char *s, size_t maxlen) {
  for (size_t len = 0; len != maxlen; len++) {
    if (s[len] == '\0') {
      return len;
    }
  }
  return maxlen;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     115a <strnlen+0x5a>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1144 <strnlen+0x44>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1162 <strnlen+0x62>
jmp    1149 <strnlen+0x49>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1114 <strnlen+0x14>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <strnlen+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1122 <strnlen+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <strnlen+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @strnlen(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i64 [ %10, %9 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %2
%13 = phi i64 [ 0, %2 ], [ %5, %4 ], [ %1, %9 ]
ret i64 %13
}