// File: /workspace/github_c_makefile_star2_O0/Edilbert[P]BS9/bs9.c
// Function: ExtractOpText
char *ExtractOpText(char *p)
{
   int l,inquo,inapo;

   l          = 0; // length of trimmed operand
   inquo      = 0; // inside quotes
   inapo      = 0; // inside apostrophes
   ForcedMode = 0; // forced direct page (-1) or extended (+1)
   OpText[0]  = 0; // empty operand text

   p = SkipSpace(p);  // text after mnemonic or pseudo op
   if (!*p) return p; // end of line

   if (*p == '<' || *p == '>')
   {
      ForcedMode = *p - 0x3d; // -1 for '<', +1 for '>'
      ++p;
   }

   // Extract operand

   if (CodeStyle == 1) // Thomson style
   {
      while (*p && *p != ' ' && l < ML) OpText[l++] = *p++;
   }
   else
   {
      while (*p && l < ML)
      {
         if (*p == '"'  && inapo == 0) inquo = !inquo;
         if (*p == '\'' && inquo == 0) inapo = !inapo;
         if (*p == ';'  && inquo == 0 && inapo == 0) break;
         OpText[l++] = *p++;
      }
      while (l && isspace(OpText[l-1])) OpText[--l] = 0;
   }
   OpText[l] = 0; // end marker
   // if (df) fprintf(df,"OpText = [%s]\n",OpText);
   return p;      // points to comment start or EOL
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x84395(%rip)     # 0x87f30
movb $0x0, 0x243de(%rip)     # 0x27f80
movq 0x18(%rsp), %rdi
callq 0x2830
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x3bca
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x3dd2
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
je 0x3be4
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
jne 0x3c03
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
subl $0x3d, %eax
movl %eax, 0x8433b(%rip)     # 0x87f30
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
cmpl $0x1, 0x8432a(%rip)     # 0x87f34
jne 0x3c81
jmp 0x3c0e
movq 0x18(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xb(%rsp)
je 0x3c43
movq 0x18(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, 0xb(%rsp)
je 0x3c43
cmpl $0x100, 0x14(%rsp)      # imm = 0x100
setl %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x3c4d
jmp 0x3c7c
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rsp)
movb (%rax), %dl
movl 0x14(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rsp)
movslq %eax, %rcx
leaq 0x24309(%rip), %rax     # 0x27f80
movb %dl, (%rax,%rcx)
jmp 0x3c0e
jmp 0x3db8
jmp 0x3c83
movq 0x18(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xa(%rsp)
je 0x3ca5
cmpl $0x100, 0x14(%rsp)      # imm = 0x100
setl %al
movb %al, 0xa(%rsp)
movb 0xa(%rsp), %al
testb $0x1, %al
jne 0x3cb2
jmp 0x3d4f
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x3cd9
cmpl $0x0, 0xc(%rsp)
jne 0x3cd9
cmpl $0x0, 0x10(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x3d00
cmpl $0x0, 0x10(%rsp)
jne 0x3d00
cmpl $0x0, 0xc(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x3d1d
cmpl $0x0, 0x10(%rsp)
jne 0x3d1d
cmpl $0x0, 0xc(%rsp)
jne 0x3d1d
jmp 0x3d4f
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rsp)
movb (%rax), %dl
movl 0x14(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rsp)
movslq %eax, %rcx
leaq 0x24239(%rip), %rax     # 0x27f80
movb %dl, (%rax,%rcx)
jmp 0x3c83
jmp 0x3d51
xorl %eax, %eax
cmpl $0x0, 0x14(%rsp)
movb %al, 0x9(%rsp)
je 0x3d91
callq 0x22e0
movq (%rax), %rax
movl 0x14(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rdx
leaq 0x24209(%rip), %rcx     # 0x27f80
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, 0x9(%rsp)
movb 0x9(%rsp), %al
testb $0x1, %al
jne 0x3d9b
jmp 0x3db6
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
movslq %eax, %rcx
leaq 0x241d0(%rip), %rax     # 0x27f80
movb $0x0, (%rax,%rcx)
jmp 0x3d51
jmp 0x3db8
movslq 0x14(%rsp), %rcx
leaq 0x241bc(%rip), %rax     # 0x27f80
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)