#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*/ dfi_exit();
int /*<<< orphan*/ dfi_info_print();
scalar_t__ dfi_init();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ kdump_select_check();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ zg_exit(int);
int do_dump_info(void) {
  if (dfi_init() != 0) {
    dfi_info_print();
    do {
      fprintf(stderr, "\nERROR: Dump is not complete\n");
      fflush(stderr);
    } while (0);
    zg_exit(1);
  }
  kdump_select_check();
  dfi_info_print();
  dfi_exit();
  return 0;
}


x86 assembly (clang, -O0):
<do_dump_info>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <dfi_init@plt>
cmp    $0x0,%rax
je     11b9 <do_dump_info+0x49>
mov    $0x0,%al
call   1030 <dfi_info_print@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
lea    0xe64(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    $0x1,%edi
call   1090 <zg_exit@plt>
mov    $0x0,%al
call   1060 <kdump_select_check@plt>
mov    $0x0,%al
call   1030 <dfi_info_print@plt>
mov    $0x0,%al
call   1040 <dfi_exit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_dump_info>:
push   %rbx
xor    %eax,%eax
call   1050 <dfi_init@plt>
test   %rax,%rax
je     11aa <do_dump_info+0x3a>
xor    %eax,%eax
call   1030 <dfi_info_print@plt>
mov    0x2e55(%rip),%rbx
mov    (%rbx),%edi
lea    0xe6c(%rip),%rsi
call   1070 <fprintf@plt>
mov    (%rbx),%edi
call   1080 <fflush@plt>
mov    $0x1,%edi
call   1090 <zg_exit@plt>
xor    %eax,%eax
call   1060 <kdump_select_check@plt>
xor    %eax,%eax
call   1030 <dfi_info_print@plt>
xor    %eax,%eax
call   1040 <dfi_exit@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"\0AERROR: Dump is not complete\0A\00"
define i32 @do_dump_info() {
%1 = call i64 (...) @dfi_init()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %12
3: ; preds = %0
%4 = call i32 (...) @dfi_info_print()
br label %5
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fflush(i32 %8)
br label %10
10: ; preds = %5
%11 = call i32 @zg_exit(i32 1)
br label %12
12: ; preds = %10, %0
%13 = call i32 (...) @kdump_select_check()
%14 = call i32 (...) @dfi_info_print()
%15 = call i32 (...) @dfi_exit()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"\0AERROR: Dump is not complete\0A\00"
define i32 @do_dump_info() {
%1 = tail call i64 (...) @dfi_init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 (...) @dfi_info_print()
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 @zg_exit(i32 1)
br label %10
10: ; preds = %3, %0
%11 = tail call i32 (...) @kdump_select_check()
%12 = tail call i32 (...) @dfi_info_print()
%13 = tail call i32 (...) @dfi_exit()
ret i32 0
}