void fsh_loop(void) {
  char *line;
  char **args;
  int status;
  printf("+---------------------------------------------+----------------------"
         "---------------+\n");
  printf("| \033[31m##########   ######   #########  ####  ####\033[0m | F0RX "
         "1.0 GNU/Linux Operating System |\n");
  printf("| \033[31m ##      #  ##    ##   ##     ##  ##    ## \033[0m "
         "+-------------------------------------+\n");
  printf("| \033[31m ##   #    ##    # ##  ##     ##   ##  ##  \033[0m | "
         "Welcome to F0RX GNU/Linux !         |\n");
  printf("| \033[31m ######    ##   #  ##  ########     ####   \033[0m |       "
         "                              |\n");
  printf("| \033[31m ##   #    ##  #   ##  ##   ##     ##  ##  \033[0m | Type "
         "intro for an overview of the   |\n");
  printf("| \033[31m ##         ###   ##   ##    ##   ##    ## \033[0m | base "
         "commands and type man for info |\n");
  printf("| \033[31m####         ######   ####  #### ####  ####\033[0m | on a "
         "specific command.              |\n");
  printf("|                                             |                      "
         "               |\n");
  printf("| \033[31m###########################################\033[0m | Enjoy "
         "!                             |\n");
  printf("+---------------------------------------------+----------------------"
         "---------------+\n");
  do {
    printf("? ");
    line = fsh_read_line();
    args = fsh_split_line(line);
    status = fsh_execute(args);
    free(line);
    free(args);
  } while (status);
}


x86 assembly (clang, -O0):
<fsh_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf3c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf8e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xfe0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x1032(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x1084(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x10d6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x1128(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x1171(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x11b5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <fsh_read_line@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <fsh_split_line@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <fsh_execute@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x14(%rbp)
jne    11f2 <fsh_loop+0xa2>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsh_loop>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0x11e3(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe86(%rip),%rdi
call   1040 <puts@plt>
lea    0xed9(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd2(%rip),%rdi
call   1040 <puts@plt>
lea    0x1025(%rip),%rdi
call   1040 <puts@plt>
lea    0x1078(%rip),%rdi
call   1040 <puts@plt>
lea    0x10cb(%rip),%rdi
call   1040 <puts@plt>
lea    0x1115(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe0f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <fsh_read_line@plt>
movslq %eax,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <fsh_split_line@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <fsh_execute@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
test   %ebp,%ebp
jne    1200 <fsh_loop+0xa0>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [87 x i8] c"+---------------------------------------------+-------------------------------------+\0A\00"
@.str.1 = [96 x i8] c"| \1B[31m########## ###### ######### #### ####\1B[0m | F0RX 1.0 GNU/Linux Operating System |\0A\00"
@.str.2 = [96 x i8] c"| \1B[31m ## # ## ## ## ## ## ## \1B[0m +-------------------------------------+\0A\00"
@.str.3 = [96 x i8] c"| \1B[31m ## # ## # ## ## ## ## ## \1B[0m | Welcome to F0RX GNU/Linux ! |\0A\00"
@.str.4 = [96 x i8] c"| \1B[31m ###### ## # ## ######## #### \1B[0m | |\0A\00"
@.str.5 = [96 x i8] c"| \1B[31m ## # ## # ## ## ## ## ## \1B[0m | Type intro for an overview of the |\0A\00"
@.str.6 = [96 x i8] c"| \1B[31m ## ### ## ## ## ## ## \1B[0m | base commands and type man for info |\0A\00"
@.str.7 = [96 x i8] c"| \1B[31m#### ###### #### #### #### ####\1B[0m | on a specific command. |\0A\00"
@.str.8 = [87 x i8] c"| | |\0A\00"
@.str.9 = [96 x i8] c"| \1B[31m###########################################\1B[0m | Enjoy ! |\0A\00"
@.str.10 = [3 x i8] c"? \00"
define void @fsh_loop() {
%1 = alloca i8*
%2 = alloca i8**
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %29, %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 (...) @fsh_read_line()
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
store i8* %19, i8** %1
%20 = load i8*, i8** %1
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @fsh_split_line to i32 (i8*, ...)*)(i8* %20)
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8**
store i8** %23, i8*** %2
%24 = load i8**, i8*** %2
%25 = call i32 (i8**, ...) bitcast (i32 (...)* @fsh_execute to i32 (i8**, ...)*)(i8** %24)
store i32 %25, i32* %3
%26 = load i8*, i8** %1
%27 = load i8**, i8*** %2
%28 = bitcast i8** %27 to i8*
br label %29
29: ; preds = %15
%30 = load i32, i32* %3
%31 = icmp ne i32 %30, 0
br i1 %31, label %15, label %32
32: ; preds = %29
ret void
}

LLVM IR (-O2):
@.str.10 = [3 x i8] c"? \00"
@str.11 = [95 x i8] c"| \1B[31m########## ###### ######### #### ####\1B[0m | F0RX 1.0 GNU/Linux Operating System |\00"
@str.12 = [95 x i8] c"| \1B[31m ## # ## ## ## ## ## ## \1B[0m +-------------------------------------+\00"
@str.13 = [95 x i8] c"| \1B[31m ## # ## # ## ## ## ## ## \1B[0m | Welcome to F0RX GNU/Linux ! |\00"
@str.14 = [95 x i8] c"| \1B[31m ###### ## # ## ######## #### \1B[0m | |\00"
@str.15 = [95 x i8] c"| \1B[31m ## # ## # ## ## ## ## ## \1B[0m | Type intro for an overview of the |\00"
@str.16 = [95 x i8] c"| \1B[31m ## ### ## ## ## ## ## \1B[0m | base commands and type man for info |\00"
@str.17 = [95 x i8] c"| \1B[31m#### ###### #### #### #### ####\1B[0m | on a specific command. |\00"
@str.18 = [86 x i8] c"| | |\00"
@str.19 = [95 x i8] c"| \1B[31m###########################################\1B[0m | Enjoy ! |\00"
@str.20 = [86 x i8] c"+---------------------------------------------+-------------------------------------+\00"
define void @fsh_loop() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.20, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.11, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.12, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.20, i64 0, i64 0))
br label %12
12: ; preds = %12, %0
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 (...) @fsh_read_line()
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fsh_split_line to i32 (i8*, ...)*)(i8* %16)
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8**
%20 = tail call i32 (i8**, ...) bitcast (i32 (...)* @fsh_execute to i32 (i8**, ...)*)(i8** %19)
tail call void @free(i8* %16)
%21 = inttoptr i64 %18 to i8*
tail call void @free(i8* %21)
%22 = icmp eq i32 %20, 0
br i1 %22, label %23, label %12
23: ; preds = %12
ret void
}