// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/program_entrance.c
// Function: ShowPreamble
static void ShowPreamble(Control *control)
{
    ShowInfo("Session");
    ShowInfo("*                         ArtraCFD                         *\n");
    ShowInfo("*                     <By Huangrui Mo>                     *\n");
    ShowInfo("*    Copyright (C) Huangrui Mo <huangrui.mo@gmail.com>     *\n");
    ShowInfo("Session");
    ShowInfo("Enter 'help' for more information\n");
    ShowInfo("Session");
    String str = {'\0'}; /* store the current read line */
    while (1) {
        ShowInfo("\nArtraCFD << ");
        ParseCommand(fgets(str, sizeof str, stdin));
        ShowInfo("\n");
        if (0 == strncmp(str, "help", sizeof str)) {
            ShowInfo("Options in gui environment:\n");
            ShowInfo("[help]    show this information\n");
            ShowInfo("[init]    generate files for a sample case\n");
            ShowInfo("[solve]   solve current case in serial mode\n");
            ShowInfo("[calc]    access expression calculator\n");
            ShowInfo("[manual]  show user manual\n");
            ShowInfo("[exit]    exit program\n");
            continue;
        }
        if (0 == strncmp(str, "init", sizeof str)) {
            GenerateCaseFiles();
            ShowInfo("a sample case generated successfully\n");
            continue;
        }
        if (0 == strncmp(str, "calc", sizeof str)) {
            RunCalculator();
            continue;
        }
        if (0 == strncmp(str, "manual", sizeof str)) {
            ShowManual();
            continue;
        }
        if ('\0' == str[0]) {
            continue;
        }
        if (0 == strncmp(str, "solve", sizeof str)) {
            control->runMode = 's';
            ShowInfo("Session");
            return;
        }
        if (0 == strncmp(str, "exit", sizeof str)) {
            ShowInfo("Session");
            exit(EXIT_SUCCESS);
        }
        /* if non of above is true, then unknow commands */
        ShowWarning("unknown command: %s\n", str);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x4b1a(%rip), %rdi      # 0x24580
movb $0x0, %al
callq 0xbcf0
leaq 0xb036(%rip), %rdi      # 0x2aaaa
movb $0x0, %al
callq 0xbcf0
leaq 0x4b44(%rip), %rdi      # 0x245c6
movb $0x0, %al
callq 0xbcf0
leaq 0x4b74(%rip), %rdi      # 0x24604
movb $0x0, %al
callq 0xbcf0
leaq 0x4ae2(%rip), %rdi      # 0x24580
movb $0x0, %al
callq 0xbcf0
leaq 0x4b96(%rip), %rdi      # 0x24642
movb $0x0, %al
callq 0xbcf0
leaq 0x4ac6(%rip), %rdi      # 0x24580
movb $0x0, %al
callq 0xbcf0
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
movl $0xc8, %edx
callq 0x20d0
leaq 0xb00d(%rip), %rdi      # 0x2aae8
movb $0x0, %al
callq 0xbcf0
leaq -0xd0(%rbp), %rdi
movq 0xf4e8(%rip), %rax      # 0x2efd8
movq (%rax), %rdx
movl $0xc8, %esi
callq 0x2110
movq %rax, %rdi
callq 0xb940
leaq 0x9257(%rip), %rdi      # 0x28d63
movb $0x0, %al
callq 0xbcf0
leaq -0xd0(%rbp), %rdi
leaq 0x4b4e(%rip), %rsi      # 0x2466f
movl $0xc8, %edx
callq 0x2050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fb9a
leaq 0xafbc(%rip), %rdi      # 0x2aaf6
movb $0x0, %al
callq 0xbcf0
leaq 0xafcb(%rip), %rdi      # 0x2ab13
movb $0x0, %al
callq 0xbcf0
leaq 0xafde(%rip), %rdi      # 0x2ab34
movb $0x0, %al
callq 0xbcf0
leaq 0xaffc(%rip), %rdi      # 0x2ab60
movb $0x0, %al
callq 0xbcf0
leaq 0xb01b(%rip), %rdi      # 0x2ab8d
movb $0x0, %al
callq 0xbcf0
leaq 0xb035(%rip), %rdi      # 0x2abb5
movb $0x0, %al
callq 0xbcf0
leaq 0xb043(%rip), %rdi      # 0x2abd1
movb $0x0, %al
callq 0xbcf0
jmp 0x1fad4
leaq -0xd0(%rbp), %rdi
leaq 0xb041(%rip), %rsi      # 0x2abe9
movl $0xc8, %edx
callq 0x2050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fbd2
callq 0x49b0
leaq 0xb028(%rip), %rdi      # 0x2abee
movb $0x0, %al
callq 0xbcf0
jmp 0x1fad4
leaq -0xd0(%rbp), %rdi
leaq 0xb034(%rip), %rsi      # 0x2ac14
movl $0xc8, %edx
callq 0x2050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fbfc
callq 0x2f60
jmp 0x1fad4
leaq -0xd0(%rbp), %rdi
leaq 0x4b18(%rip), %rsi      # 0x24722
movl $0xc8, %edx
callq 0x2050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fc26
callq 0x1fcd0
jmp 0x1fad4
movsbl -0xd0(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fc38
jmp 0x1fad4
leaq -0xd0(%rbp), %rdi
leaq 0xafd3(%rip), %rsi      # 0x2ac19
movl $0xc8, %edx
callq 0x2050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fc76
movq -0x8(%rbp), %rax
movb $0x73, (%rax)
leaq 0x491a(%rip), %rdi      # 0x24580
movb $0x0, %al
callq 0xbcf0
addq $0xd0, %rsp
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
leaq 0x4aa5(%rip), %rsi      # 0x24729
movl $0xc8, %edx
callq 0x2050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1fcab
leaq 0x48e3(%rip), %rdi      # 0x24580
movb $0x0, %al
callq 0xbcf0
xorl %edi, %edi
callq 0x21e0
leaq -0xd0(%rbp), %rsi
leaq 0xaf66(%rip), %rdi      # 0x2ac1f
movb $0x0, %al
callq 0xbb20
jmp 0x1fad4
nopw %cs:(%rax,%rax)