#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*/ printf(char *, ...);
int CmdHelp(char *arg) {
  printf("\n%s\n", "MONIX Ver.0.2 ("
                   "Mar 18 2022"
                   ", "
                   "21:02:33"
                   ")");
  printf(
      "------------------------------------------------------------------------"
      "----\n"
      "ld                                       load program via serial I/F\n"
      "go [<ad>]                                execute program\n"
      "dw [<ad> [<ln>]]                         dump word\n"
      "db [<ad> [<ln>]]                         dump byte\n"
      "ew [<ad>]                                enter word\n"
      "fw [<ad>]                                fill word (without read)\n"
      "fb [<ad> [<ln> [<in> [<ic> [<rp>]]]]]    fill byte\n"
      "help                                     show this message\n"
      "?                                        show this message\n"
      "------------------------------------------------------------------------"
      "----\n");
  return 0;
}


x86 assembly (clang, -O0):
<CmdHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdHelp>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [38 x i8] c"MONIX Ver.0.2 (Mar 18 2022, 21:02:33)\00"
@.str.2 = [670 x i8] c"----------------------------------------------------------------------------\0Ald load program via serial I/F\0Ago [<ad>] execute program\0Adw [<ad> [<ln>]] dump word\0Adb [<ad> [<ln>]] dump byte\0Aew [<ad>] enter word\0Afw [<ad>] fill word (without read)\0Afb [<ad> [<ln> [<in> [<ic> [<rp>]]]]] fill byte\0Ahelp show this message\0A? show this message\0A----------------------------------------------------------------------------\0A\00"
define i32 @CmdHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([670 x i8], [670 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [38 x i8] c"MONIX Ver.0.2 (Mar 18 2022, 21:02:33)\00"
@str = [669 x i8] c"----------------------------------------------------------------------------\0Ald load program via serial I/F\0Ago [<ad>] execute program\0Adw [<ad> [<ln>]] dump word\0Adb [<ad> [<ln>]] dump byte\0Aew [<ad>] enter word\0Afw [<ad>] fill word (without read)\0Afb [<ad> [<ln> [<in> [<ic> [<rp>]]]]] fill byte\0Ahelp show this message\0A? show this message\0A----------------------------------------------------------------------------\00"
define i32 @CmdHelp(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([669 x i8], [669 x i8]* @str, i64 0, i64 0))
ret i32 0
}