// File: /workspace/github_c_makefile_star2_O1/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 0x71f4(%rip), %rax      # 0xa1c0
cmpb $0x1, 0xe(%rax)
jne 0x3068
leaq 0x4373(%rip), %r15      # 0x7350
leaq 0x4330(%rip), %r13      # 0x7314
leaq 0x4361(%rip), %rbp      # 0x734c
leaq 0x434e(%rip), %r12      # 0x7340
leaq 0x434b(%rip), %r14      # 0x7344
movzbl (%rbx), %eax
cmpl $0x30, %eax
jle 0x301c
leal -0x31(%rax), %ecx
cmpl $0x8, %ecx
ja 0x302a
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
leaq 0x432e(%rip), %rdi      # 0x7348
jmp 0x3045
cmpl $0x2d, %eax
jne 0x3051
leaq 0x4314(%rip), %rdi      # 0x733c
jmp 0x3045
cmpl $0x7c, %eax
jne 0x3059
leaq 0x4302(%rip), %rdi      # 0x7338
jmp 0x3045
movq %rbp, %rdi
jmp 0x3045
movq %r14, %rdi
jmp 0x3045
movq %r12, %rdi
xorl %eax, %eax
callq 0x2ebb
incq %rbx
jmp 0x2ff9
testl %eax, %eax
je 0x3159
movsbl %al, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2ebb
jmp 0x304c
cmpb $0x0, 0xf(%rax)
je 0x310e
leaq 0x42da(%rip), %rdi      # 0x7353
xorl %eax, %eax
callq 0x2ebb
leaq 0x42c9(%rip), %r15      # 0x7350
leaq 0x4262(%rip), %r13      # 0x72f0
leaq 0x42c6(%rip), %rbp      # 0x735b
leaq 0x4301(%rip), %r12      # 0x739d
leaq 0x4de9(%rip), %r14      # 0x7e8c
movzbl (%rbx), %eax
cmpl $0x30, %eax
jle 0x30c6
leal -0x31(%rax), %ecx
cmpl $0x8, %ecx
ja 0x30d4
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
leaq 0x42be(%rip), %rdi      # 0x7382
jmp 0x30ef
cmpl $0x2d, %eax
jne 0x30fb
leaq 0x4287(%rip), %rdi      # 0x7359
jmp 0x30ef
cmpl $0x7c, %eax
jne 0x30ff
leaq 0x4277(%rip), %rdi      # 0x7357
jmp 0x30ef
movq %rbp, %rdi
jmp 0x30ef
movq %r14, %rdi
jmp 0x30ef
movq %r12, %rdi
xorl %eax, %eax
callq 0x2ebb
incq %rbx
jmp 0x30a3
testl %eax, %eax
je 0x3168
movsbl %al, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2ebb
jmp 0x30f6
leaq 0x423b(%rip), %r14      # 0x7350
leaq 0x41b0(%rip), %r12      # 0x72cc
leaq 0x423e(%rip), %r15      # 0x7361
movzbl (%rbx), %eax
leal -0x31(%rax), %ecx
cmpl $0x8, %ecx
ja 0x3143
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2ebb
jmp 0x3154
testl %eax, %eax
je 0x3159
movsbl %al, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2ebb
incq %rbx
jmp 0x3123
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41ee(%rip), %rdi      # 0x735d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ebb