#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*/ df_s390_dump_init();
int /*<<< orphan*/ dt_device_enable();
int /*<<< orphan*/ dt_device_parm_setup();
int /*<<< orphan*/ dt_dump_mem();
int /*<<< orphan*/ dump_exit(int /*<<< orphan*/);
int /*<<< orphan*/ init_early();
int /*<<< orphan*/ mem_and_cpu_init();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sclp_setup(int);
int /*<<< orphan*/ store_status();
void start(void) {
  init_early();
  dt_device_parm_setup();
  sclp_setup(0x0);
  dt_device_enable();
  df_s390_dump_init();
  printf("zIPL v%s dump tool (64 bit)", "S390_TOOLS_RELEASE");
  printf("Dumping 64 bit OS");
  mem_and_cpu_init();
  store_status();
  dt_dump_mem();
  printf("Dump successful");
  dump_exit(0);
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10c0 <init_early@plt>
mov    $0x0,%al
call   1080 <dt_device_parm_setup@plt>
xor    %edi,%edi
call   1090 <sclp_setup@plt>
mov    $0x0,%al
call   1050 <dt_device_enable@plt>
mov    $0x0,%al
call   1070 <df_s390_dump_init@plt>
lea    0xe32(%rip),%rdi
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   10a0 <mem_and_cpu_init@plt>
mov    $0x0,%al
call   10b0 <store_status@plt>
mov    $0x0,%al
call   1030 <dt_dump_mem@plt>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <dump_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
push   %rax
xor    %eax,%eax
call   10c0 <init_early@plt>
xor    %eax,%eax
call   1080 <dt_device_parm_setup@plt>
xor    %edi,%edi
call   1090 <sclp_setup@plt>
xor    %eax,%eax
call   1050 <dt_device_enable@plt>
xor    %eax,%eax
call   1070 <df_s390_dump_init@plt>
lea    0xe35(%rip),%rdi
lea    0xe4a(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   10a0 <mem_and_cpu_init@plt>
xor    %eax,%eax
call   10b0 <store_status@plt>
xor    %eax,%eax
call   1030 <dt_dump_mem@plt>
lea    0xe3e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1060 <dump_exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"zIPL v%s dump tool (64 bit)\00"
@.str.1 = [19 x i8] c"S390_TOOLS_RELEASE\00"
@.str.2 = [18 x i8] c"Dumping 64 bit OS\00"
@.str.3 = [16 x i8] c"Dump successful\00"
define void @start() {
%1 = call i32 (...) @init_early()
%2 = call i32 (...) @dt_device_parm_setup()
%3 = call i32 @sclp_setup(i32 0)
%4 = call i32 (...) @dt_device_enable()
%5 = call i32 (...) @df_s390_dump_init()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (...) @mem_and_cpu_init()
%9 = call i32 (...) @store_status()
%10 = call i32 (...) @dt_dump_mem()
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @dump_exit(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"zIPL v%s dump tool (64 bit)\00"
@.str.1 = [19 x i8] c"S390_TOOLS_RELEASE\00"
@.str.2 = [18 x i8] c"Dumping 64 bit OS\00"
@.str.3 = [16 x i8] c"Dump successful\00"
define void @start() {
%1 = tail call i32 (...) @init_early()
%2 = tail call i32 (...) @dt_device_parm_setup()
%3 = tail call i32 @sclp_setup(i32 0)
%4 = tail call i32 (...) @dt_device_enable()
%5 = tail call i32 (...) @df_s390_dump_init()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 (...) @mem_and_cpu_init()
%9 = tail call i32 (...) @store_status()
%10 = tail call i32 (...) @dt_dump_mem()
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @dump_exit(i32 0)
ret void
}