#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void Howto() {
  printf("lld [-dlLNaoqs] input-files...\n");
  printf("  linker for objectcode created by 'luna' 6502/10 assembler\n");
  printf("  this is version 0.08\n");
  printf("  -d file = dump list of all global addresses in file\n");
  printf("  -l library-file\n");
  printf("  -L = create library instead of executable\n");
  printf("  -N generate LNG binary\n");
  printf(
      "  -a apple II mode - output raw binary (no 2-byte start adr header)\n");
  printf("  -o output-file (default is c64.out or c64.lib)\n");
  printf("  -q quiet operation\n");
  printf("  -s address (start address in decimals, default 4096)\n");
  printf(" environment\n");
  printf("  LLD_LIBRARIES '%c' separated list of standard libraries\n", ':');
  printf("  LUNIX_LIBRARIES same list but used in LUnix-mode\n");
  printf("  LNG_LIBRARIES same list but used in LNG-mode\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Howto>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1006(%rip),%rdi
mov    $0x3a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x102e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1054(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Howto>:
push   %rax
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xfae(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe6(%rip),%rdi
call   1030 <puts@plt>
lea    0x100b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1014(%rip),%rdi
call   1030 <puts@plt>
lea    0x103f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe38(%rip),%rdi
mov    $0x3a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x102d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1054(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"lld [-dlLNaoqs] input-files...\0A\00"
@.str.1 = [61 x i8] c" linker for objectcode created by 'luna' 6502/10 assembler\0A\00"
@.str.2 = [24 x i8] c" this is version 0.08\0A\00"
@.str.3 = [55 x i8] c" -d file = dump list of all global addresses in file\0A\00"
@.str.4 = [19 x i8] c" -l library-file\0A\00"
@.str.5 = [45 x i8] c" -L = create library instead of executable\0A\00"
@.str.6 = [26 x i8] c" -N generate LNG binary\0A\00"
@.str.7 = [69 x i8] c" -a apple II mode - output raw binary (no 2-byte start adr header)\0A\00"
@.str.8 = [50 x i8] c" -o output-file (default is c64.out or c64.lib)\0A\00"
@.str.9 = [22 x i8] c" -q quiet operation\0A\00"
@.str.10 = [56 x i8] c" -s address (start address in decimals, default 4096)\0A\00"
@.str.11 = [14 x i8] c" environment\0A\00"
@.str.12 = [59 x i8] c" LLD_LIBRARIES '%c' separated list of standard libraries\0A\00"
@.str.13 = [52 x i8] c" LUNIX_LIBRARIES same list but used in LUnix-mode\0A\00"
@.str.14 = [48 x i8] c" LNG_LIBRARIES same list but used in LNG-mode\0A\00"
define void @Howto() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0), i32 58)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.12 = [59 x i8] c" LLD_LIBRARIES '%c' separated list of standard libraries\0A\00"
@str = [31 x i8] c"lld [-dlLNaoqs] input-files...\00"
@str.15 = [60 x i8] c" linker for objectcode created by 'luna' 6502/10 assembler\00"
@str.16 = [23 x i8] c" this is version 0.08\00"
@str.17 = [54 x i8] c" -d file = dump list of all global addresses in file\00"
@str.18 = [18 x i8] c" -l library-file\00"
@str.19 = [44 x i8] c" -L = create library instead of executable\00"
@str.20 = [25 x i8] c" -N generate LNG binary\00"
@str.21 = [68 x i8] c" -a apple II mode - output raw binary (no 2-byte start adr header)\00"
@str.22 = [49 x i8] c" -o output-file (default is c64.out or c64.lib)\00"
@str.23 = [21 x i8] c" -q quiet operation\00"
@str.24 = [55 x i8] c" -s address (start address in decimals, default 4096)\00"
@str.25 = [13 x i8] c" environment\00"
@str.26 = [51 x i8] c" LUNIX_LIBRARIES same list but used in LUnix-mode\00"
@str.27 = [47 x i8] c" LNG_LIBRARIES same list but used in LNG-mode\00"
define void @Howto() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.15, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.16, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0), i32 58)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @exit(i32 1)
unreachable
}