#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 info_cmd(char *argv[], int argc) {
  (void)(argv);
  (void)(argc);
  ushell_printf("ushellell version %d.%d"
                "\r\n",
                0, 2);
  ushell_printf("ushell is small and simple shell for constrainted"
                "\r\n");
  ushell_printf("microcontrollers and processors. ushell can be used"
                "\r\n");
  ushell_printf("with 8, 16, 32 and 64bit architectures. It requieres"
                "\r\n");
  ushell_printf("to implement only three functions: putc, getc and printf."
                "\r\n");
  ushell_printf("\r\n");
  ushell_printf("For license constrainted see LICENSE file."
                "\r\n");
  ushell_printf("\r\n");
  ushell_printf("Repository is available at: http://github.com/kl-cruz/ushell"
                "\r\n");
  ushell_printf("\r\n");
  ushell_printf("Karol {cruz} Lasonczyk 2015"
                "\r\n");
}


x86 assembly (clang, -O0):
<info_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf2d(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf92(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
lea    0xfaa(%rip),%rdi
mov    $0x0,%al
call   1030 <ushell_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<info_cmd>:
push   %rbx
lea    0xee8(%rip),%rdi
xor    %esi,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xeed(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf13(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf3b(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf64(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xfbc(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf81(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xf96(%rip),%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <ushell_printf@plt>
lea    0xfbd(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <ushell_printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"ushellell version %d.%d\0D\0A\00"
@.str.1 = [52 x i8] c"ushell is small and simple shell for constrainted\0D\0A\00"
@.str.2 = [54 x i8] c"microcontrollers and processors. ushell can be used\0D\0A\00"
@.str.3 = [55 x i8] c"with 8, 16, 32 and 64bit architectures. It requieres\0D\0A\00"
@.str.4 = [60 x i8] c"to implement only three functions: putc, getc and printf.\0D\0A\00"
@.str.5 = [3 x i8] c"\0D\0A\00"
@.str.6 = [45 x i8] c"For license constrainted see LICENSE file.\0D\0A\00"
@.str.7 = [63 x i8] c"Repository is available at: http://github.com/kl-cruz/ushell\0D\0A\00"
@.str.8 = [30 x i8] c"Karol {cruz} Lasonczyk 2015\0D\0A\00"
define void @info_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 ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 0, i32 2)
%8 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"ushellell version %d.%d\0D\0A\00"
@.str.1 = [52 x i8] c"ushell is small and simple shell for constrainted\0D\0A\00"
@.str.2 = [54 x i8] c"microcontrollers and processors. ushell can be used\0D\0A\00"
@.str.3 = [55 x i8] c"with 8, 16, 32 and 64bit architectures. It requieres\0D\0A\00"
@.str.4 = [60 x i8] c"to implement only three functions: putc, getc and printf.\0D\0A\00"
@.str.5 = [3 x i8] c"\0D\0A\00"
@.str.6 = [45 x i8] c"For license constrainted see LICENSE file.\0D\0A\00"
@.str.7 = [63 x i8] c"Repository is available at: http://github.com/kl-cruz/ushell\0D\0A\00"
@.str.8 = [30 x i8] c"Karol {cruz} Lasonczyk 2015\0D\0A\00"
define void @info_cmd(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 0, i32 2)
%4 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @ushell_printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
ret void
}