// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: conv_search_bytes
static size_t conv_search_bytes(uint8_t *bytes, size_t max_len, const char *search_str)
{
  size_t len = 0;
  const char *src = search_str;
  while (*src != '\0' && len < 2*max_len) {
    uint8_t nibble = 0;
    while (*src != '\0') {
      if (*src >= '0' && *src <= '9') {
        nibble = *src - '0';
        src++;
        break;
      } else if (*src >= 'a' && *src <= 'f') {
        nibble = *src - 'a' + 10;
        src++;
        break;
      } else if (*src >= 'A' && *src <= 'F') {
        nibble = *src - 'A' + 10;
        src++;
        break;
      } else if (*src == ' ' || *src == ',') {
        src++;
      } else
        return 0;
    }

    if (len % 2 == 0)
      bytes[len/2] = nibble << 4;
    else
      bytes[len/2] |= nibble;
    len++;
  }
  if (len % 2 != 0)
    return 0;
  return len/2;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq $0x0, -0x28(%rsp)
movq -0x20(%rsp), %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32(%rsp)
je 0x98dc
movq -0x28(%rsp), %rax
movq -0x18(%rsp), %rcx
shlq %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x32(%rsp)
movb -0x32(%rsp), %al
testb $0x1, %al
jne 0x98e9
jmp 0x9a4f
movb $0x0, -0x31(%rsp)
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x99f6
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x993b
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x993b
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movb %al, -0x31(%rsp)
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x99f6
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jl 0x9977
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jg 0x9977
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x31(%rsp)
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x99f6
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x41, %eax
jl 0x99b3
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x46, %eax
jg 0x99b3
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x31(%rsp)
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x99f6
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x99cd
movq -0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x99dd
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x99eb
movq $0x0, -0x8(%rsp)
jmp 0x9a76
jmp 0x99ed
jmp 0x99ef
jmp 0x99f1
jmp 0x98ee
movq -0x28(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x9a21
movzbl -0x31(%rsp), %eax
shll $0x4, %eax
movb %al, %dl
movq -0x10(%rsp), %rax
movq -0x28(%rsp), %rcx
shrq %rcx
movb %dl, (%rax,%rcx)
jmp 0x9a3c
movzbl -0x31(%rsp), %esi
movq -0x10(%rsp), %rax
movq -0x28(%rsp), %rcx
shrq %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rsp)
jmp 0x98b2
movq -0x28(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x9a69
movq $0x0, -0x8(%rsp)
jmp 0x9a76
movq -0x28(%rsp), %rax
shrq %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)