#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*/ ushell_printf(char *, ...);
void help_cmd(char *argv[], int argc) {
  (void)(argv);
  (void)(argc);
  ushell_printf("ushell is small and simple shell for your constrainted"
                "\r\n");
  ushell_printf("devices. Be careful. In this application your command is"
                "\r\n");
  ushell_printf("limited to %d chars and arguments to %d."
                "\r\n",
                64, 3);
  ushell_printf("It is simple help:"
                "\r\n");
  ushell_printf(" - Type command and args with space key: cmd arg1 arg2"
                "\r\n");
  ushell_printf(" - Double pressed tab key can show you commands hint"
                "\r\n");
  ushell_printf(" - Type lscmd and press enter to list all command"
                "\r\n");
}


x86 assembly (clang, -O0):
<help_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf32(%rip),%rdi
mov    $0x40,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf77(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xfa0(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_cmd>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf13(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf40(%rip),%rdi
mov    $0x40,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf53(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf5a(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf85(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xfae(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <ushell_printf@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"ushell is small and simple shell for your constrainted\0D\0A\00"
@.str.1 = [59 x i8] c"devices. Be careful. In this application your command is\0D\0A\00"
@.str.2 = [43 x i8] c"limited to %d chars and arguments to %d.\0D\0A\00"
@.str.3 = [21 x i8] c"It is simple help:\0D\0A\00"
@.str.4 = [57 x i8] c" - Type command and args with space key: cmd arg1 arg2\0D\0A\00"
@.str.5 = [55 x i8] c" - Double pressed tab key can show you commands hint\0D\0A\00"
@.str.6 = [52 x i8] c" - Type lscmd and press enter to list all command\0D\0A\00"
define void @help_cmd(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i8**, i8*** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 64, i32 3)
%10 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"ushell is small and simple shell for your constrainted\0D\0A\00"
@.str.1 = [59 x i8] c"devices. Be careful. In this application your command is\0D\0A\00"
@.str.2 = [43 x i8] c"limited to %d chars and arguments to %d.\0D\0A\00"
@.str.3 = [21 x i8] c"It is simple help:\0D\0A\00"
@.str.4 = [57 x i8] c" - Type command and args with space key: cmd arg1 arg2\0D\0A\00"
@.str.5 = [55 x i8] c" - Double pressed tab key can show you commands hint\0D\0A\00"
@.str.6 = [52 x i8] c" - Type lscmd and press enter to list all command\0D\0A\00"
define void @help_cmd(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 64, i32 3)
%6 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
ret void
}