#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void display_usage(void) {
  fprintf(stderr,
          "sld - simple dcpu-16 linker for SOF object files; version %.2f\n",
          0.2);
  fprintf(stderr, "usage: sld [options] [objfiles]\n");
  fprintf(stderr, "options:\n");
  fprintf(stderr, "  -o outfile		write binary to outfile, default name "
                  "is a.bin\n");
  fprintf(stderr,
          "  --org <address>	binary expects to be loaded at <address>\n");
  fprintf(stderr, "  --relocation		generates relocation tables\n");
  fprintf(stderr, "  --version		display version number and exit\n");
  fprintf(stderr, "  -h, --help		display this help and exit\n");
}


x86 assembly (clang, -O0):
<display_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xee4(%rip),%rsi
movsd  0xed4(%rip),%xmm0
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xf05(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xf02(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
lea    0xf29(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
lea    0xf4e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
lea    0xf64(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
lea    0xf7b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xee7(%rip),%rsi
movsd  0xed7(%rip),%xmm0
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0f(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf20(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1a(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf48(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf74(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf91(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfaf(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"sld - simple dcpu-16 linker for SOF object files; version %.2f\0A\00"
@.str.1 = [33 x i8] c"usage: sld [options] [objfiles]\0A\00"
@.str.2 = [10 x i8] c"options:\0A\00"
@.str.3 = [62 x i8] c" -o outfile\09\09write binary to outfile, default name is a.bin\0A\00"
@.str.4 = [60 x i8] c" --org <address>\09binary expects to be loaded at <address>\0A\00"
@.str.5 = [45 x i8] c" --relocation\09\09generates relocation tables\0A\00"
@.str.6 = [46 x i8] c" --version\09\09display version number and exit\0A\00"
@.str.7 = [42 x i8] c" -h, --help\09\09display this help and exit\0A\00"
define void @display_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), double 2.000000e-01)
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"sld - simple dcpu-16 linker for SOF object files; version %.2f\0A\00"
@.str.1 = [33 x i8] c"usage: sld [options] [objfiles]\0A\00"
@.str.2 = [10 x i8] c"options:\0A\00"
@.str.3 = [62 x i8] c" -o outfile\09\09write binary to outfile, default name is a.bin\0A\00"
@.str.4 = [60 x i8] c" --org <address>\09binary expects to be loaded at <address>\0A\00"
@.str.5 = [45 x i8] c" --relocation\09\09generates relocation tables\0A\00"
@.str.6 = [46 x i8] c" --version\09\09display version number and exit\0A\00"
@.str.7 = [42 x i8] c" -h, --help\09\09display this help and exit\0A\00"
define void @display_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), double 2.000000e-01)
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
ret void
}