// File: /workspace/github_c_makefile_star2_O3/moefh[P]hed/src/screen.c
// Function: hed_scr_box_draw
void hed_scr_box_draw(const char *str)
{
  if (screen->utf8_box_draw) {
    for (const char *p = str; *p != '\0'; p++) {
      switch (*p) {
      case '|': hed_scr_out("\u2502"); break;
      case '-': hed_scr_out("\u2500"); break;
      case '7': hed_scr_out("\u250c"); break;
      case '9': hed_scr_out("\u2510"); break;
      case '1': hed_scr_out("\u2514"); break;
      case '3': hed_scr_out("\u2518"); break;
      default: hed_scr_out("%c", *p); break;
      }
    }
  } else if (screen->vt100_box_draw) {
    hed_scr_out("\x1b(0");
    for (const char *p = str; *p != '\0'; p++) {
      switch (*p) {
      case '|': hed_scr_out("\x78"); break;
      case '-': hed_scr_out("\x71"); break;
      case '7': hed_scr_out("\x6c"); break;
      case '9': hed_scr_out("\x6b"); break;
      case '1': hed_scr_out("\x6d"); break;
      case '3': hed_scr_out("\x6a"); break;
      default: hed_scr_out("%c", *p); break;
      }
    }
    hed_scr_out("\x1b(B");
  } else {
    for (const char *p = str; *p != '\0'; p++) {
      switch (*p) {
      case '7': hed_scr_out("+"); break;
      case '9': hed_scr_out("+"); break;
      case '1': hed_scr_out("+"); break;
      case '3': hed_scr_out("+"); break;
      default: hed_scr_out("%c", *p); break;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x7254(%rip), %rax      # 0xa1c0
cmpb $0x1, 0xe(%rax)
jne 0x3008
leaq 0x43fb(%rip), %r15      # 0x7378
leaq 0x43b8(%rip), %r13      # 0x733c
leaq 0x43e9(%rip), %rbp      # 0x7374
leaq 0x43d6(%rip), %r12      # 0x7368
leaq 0x43d3(%rip), %r14      # 0x736c
movzbl (%rbx), %eax
cmpl $0x30, %eax
jle 0x2fbc
leal -0x31(%rax), %ecx
cmpl $0x8, %ecx
ja 0x2fca
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
leaq 0x43b6(%rip), %rdi      # 0x7370
jmp 0x2fe5
cmpl $0x2d, %eax
jne 0x2ff1
leaq 0x439c(%rip), %rdi      # 0x7364
jmp 0x2fe5
cmpl $0x7c, %eax
jne 0x2ff9
leaq 0x438a(%rip), %rdi      # 0x7360
jmp 0x2fe5
movq %rbp, %rdi
jmp 0x2fe5
movq %r14, %rdi
jmp 0x2fe5
movq %r12, %rdi
xorl %eax, %eax
callq 0x2e58
incq %rbx
jmp 0x2f99
testl %eax, %eax
je 0x30f9
movsbl %al, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e58
jmp 0x2fec
cmpb $0x0, 0xf(%rax)
je 0x30ae
leaq 0x4362(%rip), %rdi      # 0x737b
xorl %eax, %eax
callq 0x2e58
leaq 0x4351(%rip), %r15      # 0x7378
leaq 0x42ea(%rip), %r13      # 0x7318
leaq 0x434e(%rip), %rbp      # 0x7383
leaq 0x4389(%rip), %r12      # 0x73c5
leaq 0x4e69(%rip), %r14      # 0x7eac
movzbl (%rbx), %eax
cmpl $0x30, %eax
jle 0x3066
leal -0x31(%rax), %ecx
cmpl $0x8, %ecx
ja 0x3074
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
leaq 0x4346(%rip), %rdi      # 0x73aa
jmp 0x308f
cmpl $0x2d, %eax
jne 0x309b
leaq 0x430f(%rip), %rdi      # 0x7381
jmp 0x308f
cmpl $0x7c, %eax
jne 0x309f
leaq 0x42ff(%rip), %rdi      # 0x737f
jmp 0x308f
movq %rbp, %rdi
jmp 0x308f
movq %r14, %rdi
jmp 0x308f
movq %r12, %rdi
xorl %eax, %eax
callq 0x2e58
incq %rbx
jmp 0x3043
testl %eax, %eax
je 0x3108
movsbl %al, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e58
jmp 0x3096
leaq 0x42c3(%rip), %r14      # 0x7378
leaq 0x4238(%rip), %r12      # 0x72f4
leaq 0x42c6(%rip), %r15      # 0x7389
movzbl (%rbx), %eax
leal -0x31(%rax), %ecx
cmpl $0x8, %ecx
ja 0x30e3
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e58
jmp 0x30f4
testl %eax, %eax
je 0x30f9
movsbl %al, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e58
incq %rbx
jmp 0x30c3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4276(%rip), %rdi      # 0x7385
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e58