xunge/DecIR huggingface dataset:
void matadd(vector, x, y, z) double vector[2][4];
double x, y, z;
{
  vector[1][1] += x;
  vector[1][2] += y;
  vector[1][3] += z;
}


x86 assembly (clang, -O0):
<matadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,0x28(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x30(%rax),%xmm0
movsd  %xmm0,0x30(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x38(%rax),%xmm0
movsd  %xmm0,0x38(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<matadd>:
movupd 0x28(%rdi),%xmm3
unpcklpd %xmm1,%xmm0
addpd  %xmm3,%xmm0
movupd %xmm0,0x28(%rdi)
addsd  0x38(%rdi),%xmm2
movsd  %xmm2,0x38(%rdi)
ret

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

LLVM IR (-O2):
define void @matadd([4 x double]* nocapture %0, double %1, double %2, double %3) {
%5 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 1
%6 = bitcast double* %5 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = insertelement <2 x double> poison, double %1, i64 0
%9 = insertelement <2 x double> %8, double %2, i64 1
%10 = fadd <2 x double> %7, %9
%11 = bitcast double* %5 to <2 x double>*
store <2 x double> %10, <2 x double>* %11
%12 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 3
%13 = load double, double* %12
%14 = fadd double %13, %3
store double %14, double* %12
ret void
}
void acpi_video_register(void) {}


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

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

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

LLVM IR (-O2):
define void @acpi_video_register() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void license_notice(void) {
  printf("bpt version %s -- Copyright (C) 2010  Amittai Aviram "
         "http://www.amittai.com\n",
         "1.13");
  printf("This program comes with ABSOLUTELY NO WARRANTY; for details "
         "type `show w'.\n"
         "This is free software, and you are welcome to redistribute it\n"
         "under certain conditions; type `show c' for details.\n\n");
}


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

x86 assembly (clang, -O2):
<license_notice>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf1e(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf15(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [77 x i8] c"bpt version %s -- Copyright (C) 2010 Amittai Aviram http://www.amittai.com\0A\00"
@.str.1 = [5 x i8] c"1.13\00"
@.str.2 = [192 x i8] c"This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; type `show c' for details.\0A\0A\00"
define void @license_notice() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([192 x i8], [192 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [77 x i8] c"bpt version %s -- Copyright (C) 2010 Amittai Aviram http://www.amittai.com\0A\00"
@.str.1 = [5 x i8] c"1.13\00"
@str = [191 x i8] c"This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; type `show c' for details.\0A\00"
define void @license_notice() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([191 x i8], [191 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
scalar_t__ strlen(char const *);
int /*<<< orphan*/ write(int, char *, scalar_t__);
int smtp_sendRecipient(int socket, const char *mailaddress) {
  char buf[1024];
  snprintf(buf, 1024, "RCPT TO:<%s>\r\n", mailaddress);
  write(socket, buf, 12 + strlen(mailaddress));
}


x86 assembly (clang, -O0):
<smtp_sendRecipient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x400,%esi
lea    0xea7(%rip),%rdx
call   1050 <snprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x41c(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x41c(%rbp),%edi
mov    -0x418(%rbp),%rsi
mov    %rax,%rdx
add    $0xc,%rdx
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smtp_sendRecipient>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeb9(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rcx
call   1050 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xc(%rax),%rdx
mov    %ebp,%edi
mov    %r14,%rsi
call   1030 <write@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"RCPT TO:<%s>\0D\0A\00"
define i32 @smtp_sendRecipient(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [1024 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%8 = load i8*, i8** %5
%9 = call i32 @snprintf(i8* %7, i32 1024, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %4
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = load i8*, i8** %5
%13 = call i64 @strlen(i8* %12)
%14 = add nsw i64 12, %13
%15 = call i32 @write(i32 %10, i8* %11, i64 %14)
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [15 x i8] c"RCPT TO:<%s>\0D\0A\00"
define i32 @smtp_sendRecipient(i32 %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = call i64 @strlen(i8* dereferenceable(1) %1)
%7 = add nsw i64 %6, 12
%8 = call i32 @write(i32 %0, i8* %4, i64 %7)
ret i32 undef
}
float neg(float a) { return (-a); }


x86 assembly (clang, -O0):
<neg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<neg>:
xorps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @neg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
ret float %4
}

LLVM IR (-O2):
define float @neg(float %0) {
%2 = fneg float %0
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_batch_context_reset() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_batch_context_reset>:
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_batch_context_reset>:
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_batch_context_reset() {
%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_batch_context_reset() {
%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
}
OP(fd, a8) { op_a8(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_a8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_a8()
ret i32 undef
}
/* Type definitions */
struct ll_node {
  int dummy;
};
struct ll_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ll_remove_next(struct ll_head *, int /*<<< orphan*/);
int /*<<< orphan*/ ll_search_prev(struct ll_head *, struct ll_node *);
void ll_remove(struct ll_head *list, struct ll_node *node) {
  ll_remove_next(list, ll_search_prev(list, node));
}


x86 assembly (clang, -O0):
<ll_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ll_search_prev@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <ll_remove_next@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ll_remove>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ll_search_prev@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ll_remove_next@plt>

LLVM IR (-O0):
%struct.ll_head = type { i32 }
%struct.ll_node = type { i32 }
define void @ll_remove(%struct.ll_head* %0, %struct.ll_node* %1) {
%3 = alloca %struct.ll_head*
%4 = alloca %struct.ll_node*
store %struct.ll_head* %0, %struct.ll_head** %3
store %struct.ll_node* %1, %struct.ll_node** %4
%5 = load %struct.ll_head*, %struct.ll_head** %3
%6 = load %struct.ll_head*, %struct.ll_head** %3
%7 = load %struct.ll_node*, %struct.ll_node** %4
%8 = call i32 @ll_search_prev(%struct.ll_head* %6, %struct.ll_node* %7)
%9 = call i32 @ll_remove_next(%struct.ll_head* %5, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.ll_head = type { i32 }
%struct.ll_node = type { i32 }
define void @ll_remove(%struct.ll_head* %0, %struct.ll_node* %1) {
%3 = tail call i32 @ll_search_prev(%struct.ll_head* %0, %struct.ll_node* %1)
%4 = tail call i32 @ll_remove_next(%struct.ll_head* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_version() {
  printf("ioreplay v%s, part of IOapps\n\nCopyright (C) 2010 Jiri Horky "
         "<jiri.horky@gmail.com>\n\nLicense GPLv2: GNU GPL version 2 "
         "<http://gnu.org/licenses/gpl.html>\nThis is free software; see the "
         "source for copying conditions.  There is NO\nwarranty; not even for "
         "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\nWritten by "
         "Jiri Horky, 2010-2013\n",
         "1.4-r2");
}


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

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0x1034(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [338 x i8] c"ioreplay v%s, part of IOapps\0A\0ACopyright (C) 2010 Jiri Horky <jiri.horky@gmail.com>\0A\0ALicense GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\0AWritten by Jiri Horky, 2010-2013\0A\00"
@.str.1 = [7 x i8] c"1.4-r2\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([338 x i8], [338 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [338 x i8] c"ioreplay v%s, part of IOapps\0A\0ACopyright (C) 2010 Jiri Horky <jiri.horky@gmail.com>\0A\0ALicense GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\0AWritten by Jiri Horky, 2010-2013\0A\00"
@.str.1 = [7 x i8] c"1.4-r2\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([338 x i8], [338 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xbe() {
  Assert_real((isxdigit(190) == 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_isxdigit.c",
              955, ("isxdigit should be 0 for 0xbe"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xbe>:
push   %rax
mov    $0xbe,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3bb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xbe\00"
define void @t_isxdigit_0xbe() {
%1 = call i64 @isxdigit(i32 190)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 955, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xbe\00"
define void @t_isxdigit_0xbe() {
%1 = tail call i64 @isxdigit(i32 190)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 955, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void *_sbrk(int a __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @_sbrk(i32 %0) {
ret i8* null
}
/* Type definitions */
struct globtree {
  int dummy;
};

/* Variables and functions */
struct globtree *globtree_new(int);
struct globtree *globtree_false(void) {
  struct globtree *gt;
  gt = globtree_new(6);
  return (gt);
}


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

x86 assembly (clang, -O2):
<globtree_false>:
mov    $0x6,%edi
jmp    1030 <globtree_new@plt>

LLVM IR (-O0):
%struct.globtree = type { i32 }
define %struct.globtree* @globtree_false() {
%1 = alloca %struct.globtree*
%2 = call %struct.globtree* @globtree_new(i32 6)
store %struct.globtree* %2, %struct.globtree** %1
%3 = load %struct.globtree*, %struct.globtree** %1
ret %struct.globtree* %3
}

LLVM IR (-O2):
%struct.globtree = type { i32 }
define %struct.globtree* @globtree_false() {
%1 = tail call %struct.globtree* @globtree_new(i32 6)
ret %struct.globtree* %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int action_register(__attribute__((unused)) char *args[]) {
  puts("dump\n"
       "Plug-in proxy dump (.dump)\n"
       "*.dump\n"
       "load save");
  return true;
}


x86 assembly (clang, -O0):
<action_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [49 x i8] c"dump\0APlug-in proxy dump (.dump)\0A*.dump\0Aload save\00"
define i32 @action_register(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [49 x i8] c"dump\0APlug-in proxy dump (.dump)\0A*.dump\0Aload save\00"
define i32 @action_register(i8** nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
scalar_t__ dcac_add_ops(int /*<<< orphan*/, int, int /*<<< orphan*/ *, int);
int dcac_add_uname_attr(int flags) {
  return (int)dcac_add_ops(0, -1, NULL, flags);
}


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

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

LLVM IR (-O0):
define i32 @dcac_add_uname_attr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @dcac_add_ops(i32 0, i32 -1, i32* null, i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @dcac_add_uname_attr(i32 %0) {
%2 = tail call i64 @dcac_add_ops(i32 0, i32 -1, i32* null, i32 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
putchar(c) char c;
{
  extern cout;
  cputc(c, cout);
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <cputc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
movsbl %dil,%edi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
jmp    1030 <cputc@plt>

LLVM IR (-O0):
@cout = external global i32
define i32 @putchar(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i32, i32* @cout
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cputc to i32 (i32, i32, ...)*)(i32 %6, i32 %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@cout = external global i32
define i32 @putchar(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = load i32, i32* @cout
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @cputc to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret i32 undef
}
unsigned SubStrings_Length(const char *const String) {
  register const char *Worker = String;
  while (*Worker)
    ++Worker;
  return Worker - String;
}


x86 assembly (clang, -O0):
<SubStrings_Length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112e <SubStrings_Length+0x2e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <SubStrings_Length+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SubStrings_Length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <SubStrings_Length+0x10>
ret

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

LLVM IR (-O2):
define i32 @SubStrings_Length(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
int ENOSYS;
int proc_modify_policy_min(unsigned int cpu, unsigned long min_freq) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<proc_modify_policy_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_modify_policy_min>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @proc_modify_policy_min(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @proc_modify_policy_min(i32 %0, i64 %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int get_sp();
int /*<<< orphan*/ printf(char *, int);
int main() { printf("Stack pointer (ESP): 0x%x\n", get_sp()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <get_sp@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"Stack pointer (ESP): 0x%x\0A\00"
define i32 @main() {
%1 = call i32 (...) @get_sp()
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Stack pointer (ESP): 0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @get_sp()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ myusec_calibrate_delay();
scalar_t__ selfcheck();
int flashrom_init(const int perform_selfcheck) {
  if (perform_selfcheck && selfcheck())
    return 1;
  myusec_calibrate_delay();
  return 0;
}


x86 assembly (clang, -O0):
<flashrom_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1152 <flashrom_init+0x32>
mov    $0x0,%al
call   1030 <selfcheck@plt>
cmp    $0x0,%rax
je     1152 <flashrom_init+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1160 <flashrom_init+0x40>
mov    $0x0,%al
call   1040 <myusec_calibrate_delay@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flashrom_init>:
push   %rbx
test   %edi,%edi
je     1136 <flashrom_init+0x16>
xor    %eax,%eax
call   1030 <selfcheck@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    113f <flashrom_init+0x1f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <myusec_calibrate_delay@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @flashrom_init(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 (...) @selfcheck()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3, %1
%7 = tail call i32 (...) @myusec_calibrate_delay()
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ TCFLSH;
char *getpass(char *);
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/, void *);
char *get_pass(void) {
  ioctl(0, TCFLSH, (void *)0);
  return getpass("password: ");
}


x86 assembly (clang, -O0):
<get_pass>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <ioctl@plt>
lea    0xec1(%rip),%rdi
call   1040 <getpass@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pass>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
xor    %edx,%edx
call   1030 <ioctl@plt>
lea    0xec6(%rip),%rdi
pop    %rax
jmp    1040 <getpass@plt>

LLVM IR (-O0):
@TCFLSH = global i32 0
@.str = [11 x i8] c"password: \00"
define i8* @get_pass() {
%1 = load i32, i32* @TCFLSH
%2 = call i32 @ioctl(i32 0, i32 %1, i8* null)
%3 = call i8* @getpass(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
@TCFLSH = global i32 0
@.str = [11 x i8] c"password: \00"
define i8* @get_pass() {
%1 = load i32, i32* @TCFLSH
%2 = tail call i32 @ioctl(i32 0, i32 %1, i8* null)
%3 = tail call i8* @getpass(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
struct TreeNode *helper(int *, int *, int, int /*<<< orphan*/, int);
struct TreeNode *buildTree(int *inorder, int inorderSize, int *postorder,
                           int postorderSize) {
  if (!inorder || !postorder)
    return NULL;
  return helper(inorder, postorder, postorderSize - 1, 0, inorderSize - 1);
}


x86 assembly (clang, -O0):
<buildTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113c <buildTree+0x2c>
cmpq   $0x0,-0x20(%rbp)
jne    1149 <buildTree+0x39>
movq   $0x0,-0x8(%rbp)
jmp    116a <buildTree+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
mov    -0x14(%rbp),%r8d
sub    $0x1,%r8d
xor    %ecx,%ecx
call   1030 <helper@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildTree>:
test   %rdi,%rdi
je     1130 <buildTree+0x20>
test   %rdx,%rdx
je     1130 <buildTree+0x20>
mov    %esi,%r8d
add    $0xffffffff,%ecx
add    $0xffffffff,%r8d
mov    %rdx,%rsi
mov    %ecx,%edx
xor    %ecx,%ecx
jmp    1030 <helper@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @buildTree(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca %struct.TreeNode*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
%10 = load i32*, i32** %6
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32*, i32** %8
%14 = icmp ne i32* %13, null
br i1 %14, label %16, label %15
15: ; preds = %12, %4
store %struct.TreeNode* null, %struct.TreeNode** %5
br label %24
16: ; preds = %12
%17 = load i32*, i32** %6
%18 = load i32*, i32** %8
%19 = load i32, i32* %9
%20 = sub nsw i32 %19, 1
%21 = load i32, i32* %7
%22 = sub nsw i32 %21, 1
%23 = call %struct.TreeNode* @helper(i32* %17, i32* %18, i32 %20, i32 0, i32 %22)
store %struct.TreeNode* %23, %struct.TreeNode** %5
br label %24
24: ; preds = %16, %15
%25 = load %struct.TreeNode*, %struct.TreeNode** %5
ret %struct.TreeNode* %25
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @buildTree(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = icmp ne i32* %0, null
%6 = icmp ne i32* %2, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = add nsw i32 %3, -1
%10 = add nsw i32 %1, -1
%11 = tail call %struct.TreeNode* @helper(i32* %0, i32* %2, i32 %9, i32 0, i32 %10)
br label %12
12: ; preds = %4, %8
%13 = phi %struct.TreeNode* [ %11, %8 ], [ null, %4 ]
ret %struct.TreeNode* %13
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int isFADD(const char *comm) { return strcmp(comm, "fadd") == 0; }


x86 assembly (clang, -O0):
<isFADD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFADD>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fadd\00"
define i32 @isFADD(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"fadd\00"
define i32 @isFADD(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned get_uart_ctrl(void) {
  return ((*((volatile unsigned *)((0xc8100000 | (0x01 << 10) | (0x30 << 2)) +
                                   (2 << 2)))) &
          0xFFF);
}


x86 assembly (clang, -O0):
<get_uart_ctrl>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc81004c8,%eax
mov    (%rax),%eax
and    $0xfff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uart_ctrl>:
mov    $0xc81004c8,%ecx
mov    $0xfff,%eax
and    (%rcx),%eax
ret

LLVM IR (-O0):
define i32 @get_uart_ctrl() {
%1 = load volatile i32, i32* inttoptr (i64 3356493000 to i32*)
%2 = and i32 %1, 4095
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_uart_ctrl() {
%1 = load volatile i32, i32* inttoptr (i64 3356493000 to i32*)
%2 = and i32 %1, 4095
ret i32 %2
}
int screen_focus_client() { return -1; }


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

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

LLVM IR (-O0):
define i32 @screen_focus_client() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @screen_focus_client() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ __cpuid(int, unsigned int, unsigned int, unsigned int,
                           unsigned int);
void cpuid(int info, unsigned *eax, unsigned *ebx, unsigned *ecx,
           unsigned *edx) {
  unsigned int _eax;
  unsigned int _ebx;
  unsigned int _ecx;
  unsigned int _edx;
  __cpuid(info, _eax, _ebx, _ecx, _edx);
  *eax = _eax;
  *ebx = _ebx;
  *ecx = _ecx;
  *edx = _edx;
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
call   1030 <__cpuid@plt>
mov    -0x2c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x34(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x38(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
jmp    1030 <__cpuid@plt>

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

LLVM IR (-O2):
define void @cpuid(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32* nocapture readnone %4) {
%6 = tail call i32 @__cpuid(i32 %0, i32 undef, i32 undef, i32 undef, i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AbEnd(char *, char const *, char const *, char const *,
                         unsigned int);
void DefaultCheckFailed(const char *Msg, const char *Cond, const char *File,
                        unsigned Line) {
  AbEnd("%s%s, file '%s', line %u", Msg, Cond, File, Line);
}


x86 assembly (clang, -O0):
<DefaultCheckFailed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    0xec2(%rip),%rdi
call   1030 <AbEnd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DefaultCheckFailed>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <AbEnd@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"%s%s, file '%s', line %u\00"
define void @DefaultCheckFailed(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @AbEnd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%s%s, file '%s', line %u\00"
define void @DefaultCheckFailed(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @AbEnd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i32 %3)
ret void
}
int getbin(int x) {
  if (x >= '0' && x <= '9')
    return x - '0';
  if (x >= 'A' && x <= 'F')
    return x - 'A' + 10;
  return x - 'a' + 10;
}


x86 assembly (clang, -O0):
<getbin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <getbin+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <getbin+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <getbin+0x5a>
cmpl   $0x41,-0x8(%rbp)
jl     114e <getbin+0x4e>
cmpl   $0x46,-0x8(%rbp)
jg     114e <getbin+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <getbin+0x5a>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbin>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     111a <getbin+0x1a>
lea    -0x41(%rdi),%eax
cmp    $0x5,%eax
ja     1115 <getbin+0x15>
add    $0xffffffc9,%edi
jmp    1118 <getbin+0x18>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @getbin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %26
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 70
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 65
%21 = add nsw i32 %20, 10
store i32 %21, i32* %2
br label %26
22: ; preds = %15, %12
%23 = load i32, i32* %3
%24 = sub nsw i32 %23, 97
%25 = add nsw i32 %24, 10
store i32 %25, i32* %2
br label %26
26: ; preds = %22, %18, %9
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @getbin(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = add i32 %0, -65
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -55
br label %11
9: ; preds = %4
%10 = add nsw i32 %0, -87
br label %11
11: ; preds = %1, %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ], [ %2, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int main() {
  int x = 10;
  do {
    print("hello!");
  } while (x < 700);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <print@plt>
cmpl   $0x2bc,-0x8(%rbp)
jl     1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <print@plt>
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
@.str = [7 x i8] c"hello!\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int descending_order(const void *a, const void *b) {
  return *(const uint32_t *)a + *(const uint32_t *)b;
}


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

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

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

LLVM IR (-O2):
define i32 @descending_order(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %4
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ descent;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
short get_XFontStruct_min_bounds_descent(void *_p) {
  return (short)((XFontStruct *)_p)->min_bounds.descent;
}


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

x86 assembly (clang, -O2):
<get_XFontStruct_min_bounds_descent>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define signext i16 @get_XFontStruct_min_bounds_descent(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 i16
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @get_XFontStruct_min_bounds_descent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Type definitions */
struct esh_shell {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
bool init_plugin(struct esh_shell *shell) {
  printf("Plugin 'rot13' initialized...\n");
  return true;
}


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

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

LLVM IR (-O0):
%struct.esh_shell = type { i32 }
@.str = [31 x i8] c"Plugin 'rot13' initialized...\0A\00"
define i32 @init_plugin(%struct.esh_shell* %0) {
%2 = alloca %struct.esh_shell*
store %struct.esh_shell* %0, %struct.esh_shell** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.esh_shell = type { i32 }
@str = [30 x i8] c"Plugin 'rot13' initialized...\00"
define i32 @init_plugin(%struct.esh_shell* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ execv(char *, char **);
int main(int argc, char **argv) {
  argv[0] = "view";
  execv("/vsta/bin/vi", argv);
  return (1);
}


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    -0x10(%rbp),%rax
lea    0xecf(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <execv@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rax
mov    %rax,(%rsi)
lea    0xee3(%rip),%rdi
call   1030 <execv@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"view\00"
@.str.1 = [13 x i8] c"/vsta/bin/vi\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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i8**, i8*** %5
%9 = call i32 @execv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %8)
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"view\00"
@.str.1 = [13 x i8] c"/vsta/bin/vi\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @execv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %1)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t isa_read_8(uint16_t port) {
  volatile uint8_t *addr = ((volatile uint8_t *)0x14000000 + 0x80000000) + port;
  return *addr;
}


x86 assembly (clang, -O0):
<isa_read_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    $0x14000000,%eax
movabs $0x200000000,%rdx
add    %rdx,%rax
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isa_read_8>:
movslq %edi,%rax
movabs $0x214000000,%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @isa_read_8(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* getelementptr inbounds (i32, i32* inttoptr (i64 335544320 to i32*), i64 2147483648), i64 %5
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load volatile i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @isa_read_8(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds i32, i32* inttoptr (i64 8925478912 to i32*), i64 %2
%4 = load volatile i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int cb_exit(int ec) {
  exit(ec);
  return (0);
}


x86 assembly (clang, -O0):
<cb_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cb_exit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @cb_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define i32 @cb_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}