#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*/ get_bpc();
int /*<<< orphan*/ get_bpsw();
int /*<<< orphan*/ get_fintv();
int /*<<< orphan*/ get_fpsw();
int /*<<< orphan*/ get_intb();
int /*<<< orphan*/ get_isp();
int /*<<< orphan*/ get_pc();
int /*<<< orphan*/ get_psw();
int /*<<< orphan*/ get_usp();
int /*<<< orphan*/ kprintf(char *, int /*<<< orphan*/);
void command_regdump(void) {
  kprintf("ISP   = %08x\n", get_isp());
  kprintf("USP   = %08x\n", get_usp());
  kprintf("INTB  = %08x\n", get_intb());
  kprintf("PC    = %08x\n", get_pc());
  kprintf("PSW   = %08x\n", get_psw());
  kprintf("BPC   = %08x\n", get_bpc());
  kprintf("BPSW  = %08x\n", get_bpsw());
  kprintf("FINTV = %08x\n", get_fintv());
  kprintf("FPWS  = %08x\n", get_fpsw());
}


x86 assembly (clang, -O0):
<command_regdump>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <get_isp@plt>
mov    %eax,%esi
lea    0xe4c(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   1050 <get_usp@plt>
mov    %eax,%esi
lea    0xe45(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   1090 <get_intb@plt>
mov    %eax,%esi
lea    0xe3e(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   1080 <get_pc@plt>
mov    %eax,%esi
lea    0xe37(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   1040 <get_psw@plt>
mov    %eax,%esi
lea    0xe30(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   10a0 <get_bpc@plt>
mov    %eax,%esi
lea    0xe29(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   1070 <get_bpsw@plt>
mov    %eax,%esi
lea    0xe22(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   10b0 <get_fintv@plt>
mov    %eax,%esi
lea    0xe1b(%rip),%rdi
call   10c0 <kprintf@plt>
mov    $0x0,%al
call   1030 <get_fpsw@plt>
mov    %eax,%esi
lea    0xe14(%rip),%rdi
call   10c0 <kprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_regdump>:
push   %rax
xor    %eax,%eax
call   1060 <get_isp@plt>
lea    0xe51(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   1050 <get_usp@plt>
lea    0xe4a(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   1090 <get_intb@plt>
lea    0xe43(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   1080 <get_pc@plt>
lea    0xe3c(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   1040 <get_psw@plt>
lea    0xe35(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   10a0 <get_bpc@plt>
lea    0xe2e(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   1070 <get_bpsw@plt>
lea    0xe27(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   10b0 <get_fintv@plt>
lea    0xe20(%rip),%rdi
mov    %eax,%esi
call   10c0 <kprintf@plt>
xor    %eax,%eax
call   1030 <get_fpsw@plt>
lea    0xe19(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    10c0 <kprintf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ISP = %08x\0A\00"
@.str.1 = [14 x i8] c"USP = %08x\0A\00"
@.str.2 = [14 x i8] c"INTB = %08x\0A\00"
@.str.3 = [14 x i8] c"PC = %08x\0A\00"
@.str.4 = [14 x i8] c"PSW = %08x\0A\00"
@.str.5 = [14 x i8] c"BPC = %08x\0A\00"
@.str.6 = [14 x i8] c"BPSW = %08x\0A\00"
@.str.7 = [14 x i8] c"FINTV = %08x\0A\00"
@.str.8 = [14 x i8] c"FPWS = %08x\0A\00"
define void @command_regdump() {
%1 = call i32 (...) @get_isp()
%2 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @get_usp()
%4 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @get_intb()
%6 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @get_pc()
%8 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @get_psw()
%10 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @get_bpc()
%12 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @get_bpsw()
%14 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @get_fintv()
%16 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @get_fpsw()
%18 = call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"ISP = %08x\0A\00"
@.str.1 = [14 x i8] c"USP = %08x\0A\00"
@.str.2 = [14 x i8] c"INTB = %08x\0A\00"
@.str.3 = [14 x i8] c"PC = %08x\0A\00"
@.str.4 = [14 x i8] c"PSW = %08x\0A\00"
@.str.5 = [14 x i8] c"BPC = %08x\0A\00"
@.str.6 = [14 x i8] c"BPSW = %08x\0A\00"
@.str.7 = [14 x i8] c"FINTV = %08x\0A\00"
@.str.8 = [14 x i8] c"FPWS = %08x\0A\00"
define void @command_regdump() {
%1 = tail call i32 (...) @get_isp()
%2 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @get_usp()
%4 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @get_intb()
%6 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @get_pc()
%8 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @get_psw()
%10 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 (...) @get_bpc()
%12 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 (...) @get_bpsw()
%14 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 (...) @get_fintv()
%16 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = tail call i32 (...) @get_fpsw()
%18 = tail call i32 @kprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %17)
ret void
}