// File: /workspace/github_c_makefile_star2_O0/neovim[P]libvterm/src/unicode.c
// Function: mk_wcwidth
static int mk_wcwidth(uint32_t ucs)
{
  /* test for 8-bit control characters */
  if (ucs == 0)
    return 0;
  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
    return -1;

  /* binary search in table of non-spacing characters */
  if (bisearch(ucs, combining,
               sizeof(combining) / sizeof(struct interval) - 1))
    return 0;

  /* if we arrive here, ucs is not a combining or C0/C1 control character */

  return 1 + 
    (ucs >= 0x1100 &&
     (ucs <= 0x115f ||                    /* Hangul Jamo init. consonants */
      ucs == 0x2329 || ucs == 0x232a ||
      (ucs >= 0x2e80 && ucs <= 0xa4cf &&
       ucs != 0x303f) ||                  /* CJK ... Yi */
      (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */
      (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
      (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */
      (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
      (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */
      (ucs >= 0xffe0 && ucs <= 0xffe6) ||
      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
      (ucs >= 0x30000 && ucs <= 0x3fffd)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x1160d
movl $0x0, -0x4(%rbp)
jmp 0x1179d
cmpl $0x20, -0x8(%rbp)
jb 0x11622
cmpl $0x7f, -0x8(%rbp)
jb 0x1162e
cmpl $0xa0, -0x8(%rbp)
jae 0x1162e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1179d
movl -0x8(%rbp), %edi
leaq 0x26a8(%rip), %rsi      # 0x13ce0
movl $0x8d, %edx
callq 0x11540
cmpl $0x0, %eax
je 0x11653
movl $0x0, -0x4(%rbp)
jmp 0x1179d
xorl %eax, %eax
cmpl $0x1100, -0x8(%rbp)     # imm = 0x1100
movb %al, -0x9(%rbp)
jb 0x1178f
movb $0x1, %al
cmpl $0x115f, -0x8(%rbp)     # imm = 0x115F
movb %al, -0xa(%rbp)
jbe 0x11789
movb $0x1, %al
cmpl $0x2329, -0x8(%rbp)     # imm = 0x2329
movb %al, -0xa(%rbp)
je 0x11789
movb $0x1, %al
cmpl $0x232a, -0x8(%rbp)     # imm = 0x232A
movb %al, -0xa(%rbp)
je 0x11789
cmpl $0x2e80, -0x8(%rbp)     # imm = 0x2E80
jb 0x116bf
cmpl $0xa4cf, -0x8(%rbp)     # imm = 0xA4CF
ja 0x116bf
movb $0x1, %al
cmpl $0x303f, -0x8(%rbp)     # imm = 0x303F
movb %al, -0xa(%rbp)
jne 0x11789
cmpl $0xac00, -0x8(%rbp)     # imm = 0xAC00
jb 0x116da
movb $0x1, %al
cmpl $0xd7a3, -0x8(%rbp)     # imm = 0xD7A3
movb %al, -0xa(%rbp)
jbe 0x11789
cmpl $0xf900, -0x8(%rbp)     # imm = 0xF900
jb 0x116f5
movb $0x1, %al
cmpl $0xfaff, -0x8(%rbp)     # imm = 0xFAFF
movb %al, -0xa(%rbp)
jbe 0x11789
cmpl $0xfe10, -0x8(%rbp)     # imm = 0xFE10
jb 0x1170c
movb $0x1, %al
cmpl $0xfe19, -0x8(%rbp)     # imm = 0xFE19
movb %al, -0xa(%rbp)
jbe 0x11789
cmpl $0xfe30, -0x8(%rbp)     # imm = 0xFE30
jb 0x11723
movb $0x1, %al
cmpl $0xfe6f, -0x8(%rbp)     # imm = 0xFE6F
movb %al, -0xa(%rbp)
jbe 0x11789
cmpl $0xff00, -0x8(%rbp)     # imm = 0xFF00
jb 0x1173a
movb $0x1, %al
cmpl $0xff60, -0x8(%rbp)     # imm = 0xFF60
movb %al, -0xa(%rbp)
jbe 0x11789
cmpl $0xffe0, -0x8(%rbp)     # imm = 0xFFE0
jb 0x11751
movb $0x1, %al
cmpl $0xffe6, -0x8(%rbp)     # imm = 0xFFE6
movb %al, -0xa(%rbp)
jbe 0x11789
cmpl $0x20000, -0x8(%rbp)    # imm = 0x20000
jb 0x11768
movb $0x1, %al
cmpl $0x2fffd, -0x8(%rbp)    # imm = 0x2FFFD
movb %al, -0xa(%rbp)
jbe 0x11789
xorl %eax, %eax
cmpl $0x30000, -0x8(%rbp)    # imm = 0x30000
movb %al, -0xb(%rbp)
jb 0x11783
cmpl $0x3fffd, -0x8(%rbp)    # imm = 0x3FFFD
setbe %al
movb %al, -0xb(%rbp)
movb -0xb(%rbp), %al
movb %al, -0xa(%rbp)
movb -0xa(%rbp), %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)