xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ld_a_nnmem();
void opcode_fa() { ld_a_nnmem(); }


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

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

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

LLVM IR (-O2):
define void @opcode_fa() {
%1 = tail call i32 (...) @ld_a_nnmem()
ret void
}
void video_destroy_renderer(struct host *base, struct render_backend *r) {}


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

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

LLVM IR (-O0):
%struct.host = type opaque
%struct.render_backend = type opaque
define void @video_destroy_renderer(%struct.host* %0, %struct.render_backend* %1) {
%3 = alloca %struct.host*
%4 = alloca %struct.render_backend*
store %struct.host* %0, %struct.host** %3
store %struct.render_backend* %1, %struct.render_backend** %4
ret void
}

LLVM IR (-O2):
%struct.host = type opaque
%struct.render_backend = type opaque
define void @video_destroy_renderer(%struct.host* nocapture %0, %struct.render_backend* nocapture %1) {
ret void
}
void foo107(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo107(i32 %0) {
ret void
}
double sqrt(double x) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  return 0;
}


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.sqrt = [5 x i8] c"sqrt\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @sqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.sqrt, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load double, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.sqrt = [5 x i8] c"sqrt\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @sqrt(double %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.sqrt, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void xt_net_client_socket_destroy(int clientsocket) {
  if (clientsocket != -1) {
    close(clientsocket);
  }
}


x86 assembly (clang, -O0):
<xt_net_client_socket_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     112d <xt_net_client_socket_destroy+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xt_net_client_socket_destroy>:
cmp    $0xffffffff,%edi
je     111a <xt_net_client_socket_destroy+0xa>
jmp    1030 <close@plt>
ret

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

LLVM IR (-O2):
define void @xt_net_client_socket_destroy(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
unsigned char hotcold_blue_transform(unsigned char grayscale) {
  if (grayscale <= 64 * 1)
    return 255;
  if (grayscale >= 64 * 2)
    return 0;
  return (64 * 2 - grayscale) * 4;
}


x86 assembly (clang, -O0):
<hotcold_blue_transform>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x40,%eax
jg     1120 <hotcold_blue_transform+0x20>
movb   $0xff,-0x1(%rbp)
jmp    1149 <hotcold_blue_transform+0x49>
movzbl -0x2(%rbp),%eax
cmp    $0x80,%eax
jl     1138 <hotcold_blue_transform+0x38>
movb   $0x0,-0x1(%rbp)
jmp    1149 <hotcold_blue_transform+0x49>
movzbl -0x2(%rbp),%ecx
mov    $0x80,%eax
sub    %ecx,%eax
shl    $0x2,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hotcold_blue_transform>:
lea    0x0(,%rdi,4),%eax
neg    %al
xor    %ecx,%ecx
test   %dil,%dil
movzbl %al,%edx
cmovs  %ecx,%edx
cmp    $0x41,%dil
mov    $0xff,%eax
cmovae %edx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @hotcold_blue_transform(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sle i32 %5, 64
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 -1, i8* %2
br label %19
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp sge i32 %10, 128
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 0, i8* %2
br label %19
13: ; preds = %8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = sub nsw i32 128, %15
%17 = mul nsw i32 %16, 4
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
br label %19
19: ; preds = %13, %12, %7
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define zeroext i8 @hotcold_blue_transform(i8 zeroext %0) {
%2 = icmp ult i8 %0, 65
%3 = icmp slt i8 %0, 0
%4 = mul i8 %0, -4
%5 = select i1 %3, i8 0, i8 %4
%6 = select i1 %2, i8 -1, i8 %5
ret i8 %6
}
/* Variables and functions */
int main(int argc, char *argv[]) {
  char *s = "hello world";
  int *ptr = NULL;
  *s = 'H';
  *ptr = 1;
  main(0, NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x48,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <main@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %5
store i32* null, i32** %6
%7 = load i8*, i8** %5
store i8 72, i8* %7
%8 = load i32*, i32** %6
store i32 1, i32* %8
%9 = call i32 @main(i32 0, i8** null)
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int _INTERRUPT_CAUSE();
int _sys_current_irq_key_get(void) { return _INTERRUPT_CAUSE(); }


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

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

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

LLVM IR (-O2):
define i32 @_sys_current_irq_key_get() {
%1 = tail call i32 (...) @_INTERRUPT_CAUSE()
ret i32 %1
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ check_intInput(unsigned int *);
unsigned int exchange_bits(unsigned int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Enter decimal: ");
  unsigned int n;
  check_intInput(&n);
  unsigned int result = exchange_bits(n, 3, 24);
  printf("%u -> %u", n, result);
  return (EXIT_SUCCESS);
}


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    -0x8(%rbp),%rdi
call   1030 <check_intInput@plt>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
mov    $0x18,%edx
call   1050 <exchange_bits@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%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    0x4(%rsp),%rdi
call   1030 <check_intInput@plt>
mov    0x4(%rsp),%edi
mov    $0x3,%esi
mov    $0x18,%edx
call   1050 <exchange_bits@plt>
mov    0x4(%rsp),%esi
lea    0xea9(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter decimal: \00"
@.str.1 = [9 x i8] c"%u -> %u\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @check_intInput(i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @exchange_bits(i32 %6, i32 3, i32 24)
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter decimal: \00"
@.str.1 = [9 x i8] c"%u -> %u\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = bitcast i32* %1 to i8*
%4 = call i32 @check_intInput(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @exchange_bits(i32 %5, i32 3, i32 24)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %6)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int,
                          unsigned int);
void print_chunk(unsigned int *ptr, unsigned int len) {
  printf("[ prev - 0x%08x ][ size - 0x%08x ][ data buffer (0x%08x) -------> "
         "... ] - from malloc(%d)\n",
         *(ptr - 2), *(ptr - 1), (unsigned int)ptr, len);
}


x86 assembly (clang, -O0):
<print_chunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%esi
mov    -0x8(%rbp),%rax
mov    -0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
mov    -0xc(%rbp),%r8d
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_chunk>:
mov    %esi,%r8d
mov    %rdi,%rcx
mov    -0x8(%rdi),%esi
mov    -0x4(%rdi),%edx
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [91 x i8] c"[ prev - 0x%08x ][ size - 0x%08x ][ data buffer (0x%08x) -------> ... ] - from malloc(%d)\0A\00"
define void @print_chunk(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 -2
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 -1
%10 = load i32, i32* %9
%11 = load i32*, i32** %3
%12 = ptrtoint i32* %11 to i32
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [91 x i8] c"[ prev - 0x%08x ][ size - 0x%08x ][ data buffer (0x%08x) -------> ... ] - from malloc(%d)\0A\00"
define void @print_chunk(i32* %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 -2
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 -1
%6 = load i32, i32* %5
%7 = ptrtoint i32* %0 to i64
%8 = trunc i64 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %8, i32 %1)
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main(int argc, char *argv[]) {
  char *addr;
  addr = getenv(argv[1]);
  printf("%s is at: %p\n", argv[1], addr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x18(%rbp),%rdx
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s is at: %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i8* @getenv(i8* %9)
store i8* %10, i8** %6
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8*, i8** %6
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s is at: %p\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i8* @getenv(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_help() {
  printf("Usage:  xlsxio_xlsx2csv [-h] [-s separator] [-n] xlsxfile ...\n"
         "Parameters:\n"
         "  -h          \tdisplay command line help\n"
         "  -s separator\tspecify separator to use (default is comma)\n"
         "  -b          \tdon't write UTF-8 BOM signature\n"
         "  -n          \tuse UNIX style line breaks\n"
         "  xlsxfile    \tpath to .xlsx file (multiple may be specified)\n"
         "Description:\n"
         "Converts all sheets in all specified .xlsx files to individual CSV "
         "(Comma Separated Values) files.\n"
         "Version: "
         "0"
         "."
         "2"
         "."
         "30"
         "\n"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [455 x i8] c"Usage: xlsxio_xlsx2csv [-h] [-s separator] [-n] xlsxfile ...\0AParameters:\0A -h \09display command line help\0A -s separator\09specify separator to use (default is comma)\0A -b \09don't write UTF-8 BOM signature\0A -n \09use UNIX style line breaks\0A xlsxfile \09path to .xlsx file (multiple may be specified)\0ADescription:\0AConverts all sheets in all specified .xlsx files to individual CSV (Comma Separated Values) files.\0AVersion: 0.2.30\0A\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([455 x i8], [455 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [454 x i8] c"Usage: xlsxio_xlsx2csv [-h] [-s separator] [-n] xlsxfile ...\0AParameters:\0A -h \09display command line help\0A -s separator\09specify separator to use (default is comma)\0A -b \09don't write UTF-8 BOM signature\0A -n \09use UNIX style line breaks\0A xlsxfile \09path to .xlsx file (multiple may be specified)\0ADescription:\0AConverts all sheets in all specified .xlsx files to individual CSV (Comma Separated Values) files.\0AVersion: 0.2.30\0A\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([454 x i8], [454 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void die(const char *msg) {
  if (!errno)
    fprintf(stderr, "%s\n", msg);
  else
    perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
cmpl   $0x0,(%rax)
jne    116a <die+0x3a>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea0(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1173 <die+0x43>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rax
cmpl   $0x0,(%rax)
je     1152 <die+0x22>
mov    %rdx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @errno
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @perror(i8* %10)
br label %12
12: ; preds = %9, %5
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @errno
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
7: ; preds = %1
%8 = tail call i32 @perror(i8* %0)
br label %9
9: ; preds = %7, %4
%10 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *ds1307_get_local_time_str(int);
char *ds1307_get_system_time_str() { return ds1307_get_local_time_str(2); }


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

x86 assembly (clang, -O2):
<ds1307_get_system_time_str>:
mov    $0x2,%edi
jmp    1030 <ds1307_get_local_time_str@plt>

LLVM IR (-O0):
define i8* @ds1307_get_system_time_str() {
%1 = call i8* @ds1307_get_local_time_str(i32 2)
ret i8* %1
}

LLVM IR (-O2):
define i8* @ds1307_get_system_time_str() {
%1 = tail call i8* @ds1307_get_local_time_str(i32 2)
ret i8* %1
}
/* Variables and functions */
int tracepoint_probe_unregister(char *, void *);
__attribute__((always_)) int unregister_trace_module_get(
    void (*probe)(struct module *mod, unsigned long ip, int refcnt)) {
  return tracepoint_probe_unregister("module_get", (void *)probe);
}


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

x86 assembly (clang, -O2):
<unregister_trace_module_get>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <tracepoint_probe_unregister@plt>

LLVM IR (-O0):
%struct.module = type opaque
@.str = [11 x i8] c"module_get\00"
define i32 @unregister_trace_module_get(void (%struct.module*, i64, i32)* %0) {
%2 = alloca void (%struct.module*, i64, i32)*
store void (%struct.module*, i64, i32)* %0, void (%struct.module*, i64, i32)** %2
%3 = load void (%struct.module*, i64, i32)*, void (%struct.module*, i64, i32)** %2
%4 = bitcast void (%struct.module*, i64, i32)* %3 to i8*
%5 = call i32 @tracepoint_probe_unregister(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.module = type opaque
@.str = [11 x i8] c"module_get\00"
define i32 @unregister_trace_module_get(void (%struct.module*, i64, i32)* %0) {
%2 = bitcast void (%struct.module*, i64, i32)* %0 to i8*
%3 = tail call i32 @tracepoint_probe_unregister(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_regs();
int /*<<< orphan*/ strcmp(char *, char *);
int show_regs(char *buf) {
  if (!strcmp(buf, "showregs\n")) {
    print_regs();
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<show_regs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1158 <show_regs+0x38>
mov    $0x0,%al
call   1040 <print_regs@plt>
movl   $0x1,-0x4(%rbp)
jmp    115f <show_regs+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_regs>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1137 <show_regs+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <print_regs@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"showregs\0A\00"
define i32 @show_regs(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @print_regs()
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int ones(int n) {
  int b = 0;
  for (; n > 0; n >>= 1)
    b += n & 1;
  return b;
}


x86 assembly (clang, -O0):
<ones>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1132 <ones+0x32>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <ones+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ones>:
xor    %eax,%eax
test   %edi,%edi
jle    1120 <ones+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <ones+0x10>
ret

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

LLVM IR (-O2):
define i32 @ones(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
int /*<<< orphan*/ reverse_memcpy(void *, void *, int);
void double_float_to_bytes(double source, unsigned char bytes[8],
                           int switch_endian) {
  void *dest_ptr = (void *)bytes;
  void *source_ptr = (void *)&source;
  if (switch_endian) {
    reverse_memcpy(dest_ptr, source_ptr, 8);
  } else {
    memcpy(dest_ptr, source_ptr, 8);
  }
}


x86 assembly (clang, -O0):
<double_float_to_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1165 <double_float_to_bytes+0x45>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   1030 <reverse_memcpy@plt>
jmp    1177 <double_float_to_bytes+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_float_to_bytes>:
push   %rax
movsd  %xmm0,(%rsp)
test   %esi,%esi
je     1139 <double_float_to_bytes+0x19>
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <reverse_memcpy@plt>
pop    %rax
ret
mov    %rsp,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @double_float_to_bytes(double %0, i8* %1, i32 %2) {
%4 = alloca double
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store double %0, double* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i8*, i8** %5
store i8* %9, i8** %7
%10 = bitcast double* %4 to i8*
store i8* %10, i8** %8
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = call i32 @reverse_memcpy(i8* %14, i8* %15, i32 8)
br label %21
17: ; preds = %3
%18 = load i8*, i8** %7
%19 = load i8*, i8** %8
%20 = call i32 @memcpy(i8* %18, i8* %19, i32 8)
br label %21
21: ; preds = %17, %13
ret void
}

LLVM IR (-O2):
define void @double_float_to_bytes(double %0, i8* %1, i32 %2) {
%4 = alloca double
store double %0, double* %4
%5 = bitcast double* %4 to i8*
%6 = icmp eq i32 %2, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = call i32 @reverse_memcpy(i8* %1, i8* %5, i32 8)
br label %11
9: ; preds = %3
%10 = call i32 @memcpy(i8* %1, i8* %5, i32 8)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
short DDSBigShort(short src) {
  return ((src & 0xFF00) >> 8) | ((src & 0x00FF) << 8);
}


x86 assembly (clang, -O0):
<DDSBigShort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movswl -0x2(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<DDSBigShort>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define signext i16 @DDSBigShort(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 65280
%6 = ashr i32 %5, 8
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @DDSBigShort(i16 signext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ PORTD_DriverIRQHandler();
__attribute__((weak, section(".after_vectors"))) void PORTD_IRQHandler(void) {
  PORTD_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @PORTD_IRQHandler() section ".after_vectors" {
%1 = call i32 (...) @PORTD_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @PORTD_IRQHandler() section ".after_vectors" {
%1 = tail call i32 (...) @PORTD_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void dalibc_helix_deinitialize() {
  fclose(stdin);
  fclose(stdout);
  fclose(stderr);
}


x86 assembly (clang, -O0):
<dalibc_helix_deinitialize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dalibc_helix_deinitialize>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
@stderr = global i32 0
define void @dalibc_helix_deinitialize() {
%1 = load i32, i32* @stdin
%2 = call i32 @fclose(i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @fclose(i32 %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fclose(i32 %5)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
@stderr = global i32 0
define void @dalibc_helix_deinitialize() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @fclose(i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fclose(i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fclose(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void esch_integer_verify(const char *begin, const char *end) {
  const char *iter = begin;
  for (; iter != end; ++iter) {
    assert((*iter) >= '0' && (*iter) <= '9');
  }
}


x86 assembly (clang, -O0):
<esch_integer_verify>:
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    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1179 <esch_integer_verify+0x69>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x19(%rbp)
jl     115b <esch_integer_verify+0x4b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <esch_integer_verify+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esch_integer_verify>:
push   %r14
push   %rbx
push   %rax
cmp    %rsi,%rdi
je     113b <esch_integer_verify+0x2b>
mov    %rsi,%r14
mov    %rdi,%rbx
nop
movzbl (%rbx),%eax
add    $0xd0,%al
xor    %edi,%edi
cmp    $0xa,%al
setb   %dil
call   1030 <assert@plt>
add    $0x1,%rbx
cmp    %r14,%rbx
jne    1120 <esch_integer_verify+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @esch_integer_verify(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %25, %2
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = icmp ne i8* %8, %9
br i1 %10, label %11, label %28
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 48
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = load i8*, i8** %5
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp sle i32 %19, 57
br label %21
21: ; preds = %16, %11
%22 = phi i1 [ false, %11 ], [ %20, %16 ]
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
br label %25
25: ; preds = %21
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %5
br label %7
28: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @esch_integer_verify(i8* %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %11, %4 ], [ %0, %2 ]
%6 = load i8, i8* %5
%7 = add i8 %6, -48
%8 = icmp ult i8 %7, 10
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8* %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
int iclamp(int a, int min, int max) {
  if (a < min)
    return min;
  if (a > max)
    return max;
  return a;
}


x86 assembly (clang, -O0):
<iclamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <iclamp+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <iclamp+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <iclamp+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <iclamp+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @iclamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __dtors();
void __fini() { __dtors(); }


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

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

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

LLVM IR (-O2):
define void @__fini() {
%1 = tail call i32 (...) @__dtors()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aes_cbc(unsigned char *, unsigned char *, unsigned char *,
                           size_t, unsigned char *, int, int /*<<< orphan*/);
void openssl_AES_dec256_CBC(unsigned char *in, unsigned char *out,
                            unsigned char *key, size_t num_blocks,
                            unsigned char *iv) {
  aes_cbc(in, out, key, num_blocks, iv, 256, 0);
}


x86 assembly (clang, -O0):
<openssl_AES_dec256_CBC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x100,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <aes_cbc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openssl_AES_dec256_CBC>:
push   %rax
movl   $0x0,(%rsp)
mov    $0x100,%r9d
call   1030 <aes_cbc@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @openssl_AES_dec256_CBC(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i64, i64* %9
%15 = load i8*, i8** %10
%16 = call i32 @aes_cbc(i8* %11, i8* %12, i8* %13, i64 %14, i8* %15, i32 256, i32 0)
ret void
}

LLVM IR (-O2):
define void @openssl_AES_dec256_CBC(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4) {
%6 = tail call i32 @aes_cbc(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4, i32 256, i32 0)
ret void
}
void enableLCDPower(void) {
  (*(volatile unsigned int *)(0x7F008084)) |= 1;
  return;
}


x86 assembly (clang, -O0):
<enableLCDPower>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008084,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x7f008084,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<enableLCDPower>:
orl    $0x1,0x7f008084
01
ret

LLVM IR (-O0):
define void @enableLCDPower() {
%1 = load volatile i32, i32* inttoptr (i64 2130739332 to i32*)
%2 = or i32 %1, 1
store volatile i32 %2, i32* inttoptr (i64 2130739332 to i32*)
ret void
}

LLVM IR (-O2):
define void @enableLCDPower() {
%1 = load volatile i32, i32* inttoptr (i64 2130739332 to i32*)
%2 = or i32 %1, 1
store volatile i32 %2, i32* inttoptr (i64 2130739332 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ api1(int, int);
void timer_free(int tid) { api1(101, tid); }


x86 assembly (clang, -O0):
<timer_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x65,%edi
call   1030 <api1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_free>:
mov    %edi,%esi
mov    $0x65,%edi
jmp    1030 <api1@plt>

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

LLVM IR (-O2):
define void @timer_free(i32 %0) {
%2 = tail call i32 @api1(i32 101, i32 %0)
ret void
}
void X509_PURPOSE_get0_sname(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_PURPOSE_get0_sname() {
ret void
}
void ENG_start_user_ql(w) register struct worker *w;
{ context_switch(); }


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

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

LLVM IR (-O0):
%struct.worker = type opaque
define void @ENG_start_user_ql(%struct.worker* %0) {
%2 = alloca %struct.worker*
store %struct.worker* %0, %struct.worker** %2
%3 = call i32 (...) @context_switch()
ret void
}

LLVM IR (-O2):
%struct.worker = type opaque
define void @ENG_start_user_ql(%struct.worker* nocapture readnone %0) {
%2 = tail call i32 (...) @context_switch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
void uninitvar_scanf(void) {
  char *format;
  char str[42];
  (void)scanf(format, str);
  int i;
  sscanf("0", "%d", &i);
}


x86 assembly (clang, -O0):
<uninitvar_scanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    -0x44(%rbp),%rdx
call   1030 <sscanf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_scanf>:
sub    $0x48,%rsp
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xecb(%rip),%rdi
lea    0xec6(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1030 <sscanf@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [3 x i8] c"%d\00"
define void @uninitvar_scanf() {
%1 = alloca i8*
%2 = alloca [42 x i8]
%3 = alloca i32
%4 = load i8*, i8** %1
%5 = getelementptr inbounds [42 x i8], [42 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* %4, i8* %5)
%7 = call i32 @sscanf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [3 x i8] c"%d\00"
define void @uninitvar_scanf() {
%1 = alloca [42 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [42 x i8], [42 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* undef, i8* %3)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @sscanf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
ret void
}
/* Variables and functions */
int Arith_div(int, int);
int Arith_floor(int x, int y) { return Arith_div(x, y); }


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

x86 assembly (clang, -O2):
<Arith_floor>:
jmp    1030 <Arith_div@plt>

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

LLVM IR (-O2):
define i32 @Arith_floor(i32 %0, i32 %1) {
%3 = tail call i32 @Arith_div(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

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


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

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

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

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [24 x i8] c"Usage: %s <sleep-time>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
void gendmult() {}


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

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

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

LLVM IR (-O2):
define void @gendmult() {
ret void
}
/* Variables and functions */
int f402(int *);
int f403(int *p) { return f402(p); }


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

x86 assembly (clang, -O2):
<f403>:
jmp    1030 <f402@plt>

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

LLVM IR (-O2):
define i32 @f403(i32* %0) {
%2 = tail call i32 @f402(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *itoa(int n) {
  char *s = "";
  sprintf(s, "%d", n);
  return s;
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xee0(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xecc(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbx
mov    %edi,%edx
lea    0xee8(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
void tegra_hdmi_update_vrr_mode(const struct tegra_dc *dc,
                                struct fb_videomode *mode) {
  return;
}


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

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

LLVM IR (-O0):
%struct.tegra_dc = type opaque
%struct.fb_videomode = type opaque
define void @tegra_hdmi_update_vrr_mode(%struct.tegra_dc* %0, %struct.fb_videomode* %1) {
%3 = alloca %struct.tegra_dc*
%4 = alloca %struct.fb_videomode*
store %struct.tegra_dc* %0, %struct.tegra_dc** %3
store %struct.fb_videomode* %1, %struct.fb_videomode** %4
ret void
}

LLVM IR (-O2):
%struct.tegra_dc = type opaque
%struct.fb_videomode = type opaque
define void @tegra_hdmi_update_vrr_mode(%struct.tegra_dc* nocapture %0, %struct.fb_videomode* nocapture %1) {
ret void
}