#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*/ count_mem();
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*/ printf(char *, ...);
int /*<<< orphan*/ progress_init();
int /*<<< orphan*/ sclp_setup(int);
int /*<<< orphan*/ store_status();
void start(void) {
  init_early();
  store_status();
  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");
  count_mem();
  progress_init();
  dt_dump_mem();
  printf("Dump successful");
  dump_exit(0);
}


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

x86 assembly (clang, -O2):
<start>:
push   %rax
xor    %eax,%eax
call   10d0 <init_early@plt>
xor    %eax,%eax
call   10c0 <store_status@plt>
xor    %eax,%eax
call   10a0 <dt_device_parm_setup@plt>
xor    %edi,%edi
call   10b0 <sclp_setup@plt>
xor    %eax,%eax
call   1070 <dt_device_enable@plt>
xor    %eax,%eax
call   1090 <df_s390_dump_init@plt>
lea    0xe1e(%rip),%rdi
lea    0xe33(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe38(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count_mem@plt>
xor    %eax,%eax
call   1060 <progress_init@plt>
xor    %eax,%eax
call   1040 <dt_dump_mem@plt>
lea    0xe27(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1080 <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 (...) @store_status()
%3 = call i32 (...) @dt_device_parm_setup()
%4 = call i32 @sclp_setup(i32 0)
%5 = call i32 (...) @dt_device_enable()
%6 = call i32 (...) @df_s390_dump_init()
%7 = 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))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (...) @count_mem()
%10 = call i32 (...) @progress_init()
%11 = call i32 (...) @dt_dump_mem()
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%13 = 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 (...) @store_status()
%3 = tail call i32 (...) @dt_device_parm_setup()
%4 = tail call i32 @sclp_setup(i32 0)
%5 = tail call i32 (...) @dt_device_enable()
%6 = tail call i32 (...) @df_s390_dump_init()
%7 = 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))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 (...) @count_mem()
%10 = tail call i32 (...) @progress_init()
%11 = tail call i32 (...) @dt_dump_mem()
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 @dump_exit(i32 0)
ret void
}