.file "shell.c" .text .section .rodata .LC0: .string "smid_sh# " .text .globl print_shell .type print_shell, @function print_shell: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC0(%rip), %rax movq %rax, %rdi movl $0, %eax call printf@PLT nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE0: .size print_shell, .-print_shell .section .rodata .LC1: .string "Shell input successful\n\007" .text .globl test .type test, @function test: .LFB1: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC1(%rip), %rax movq %rax, %rdi movl $0, %eax call printf@PLT nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE1: .size test, .-test .section .rodata .LC2: .string "Exiting" .text .globl do_exit .type do_exit, @function do_exit: .LFB2: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC2(%rip), %rax movq %rax, %rdi call puts@PLT movl $0, state(%rip) nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE2: .size do_exit, .-do_exit .section .rodata .LC3: .string "\n" .text .globl get_input .type get_input, @function get_input: .LFB3: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movq stdin(%rip), %rax movq %rax, %rdx movl $100, %esi leaq input(%rip), %rax movq %rax, %rdi call fgets@PLT testq %rax, %rax jne .L5 movb $0, input(%rip) jmp .L4 .L5: leaq .LC3(%rip), %rax movq %rax, %rsi leaq input(%rip), %rax movq %rax, %rdi call strcspn@PLT leaq input(%rip), %rdx movb $0, (%rax,%rdx) .L4: popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE3: .size get_input, .-get_input .section .rodata .LC4: .string "\033[H\033[2J\033[3J" .text .globl clear_screen .type clear_screen, @function clear_screen: .LFB4: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC4(%rip), %rax movq %rax, %rdi movl $0, %eax call printf@PLT nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE4: .size clear_screen, .-clear_screen .ident "GCC: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0" .section .note.GNU-stack,"",@progbits .section .note.gnu.property,"a" .align 8 .long 1f - 0f .long 4f - 1f .long 5 0: .string "GNU" 1: .align 8 .long 0xc0000002 .long 3f - 2f 2: .long 0x3 3: .align 8 4: