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

   if (Labels > MAXLAB -2)
   {
      ++ErrNum;
      ErrorMsg("Too many labels (> %d)\n",MAXLAB);
      exit(1);
   }
   l = strlen(p);

   // test for mnemonic

   for (i=0 ; i < DimOp ; ++i)
   {
      if (!StrCaseCmp(p,Mat[i].Mne))
      {
         ErrorMsg("Use of reserved mnemonic <%s> as label or operand\n",p);
         exit(1);
      }
   }

   // test for pseudos

   for (i=0 ; i < PSEUDOS ; ++i)
   {
      if (!StrCaseCmp(p,PseudoTab[i].keyword))
      {
         ErrorMsg("Use of reserved keyword <%s> as label or operand\n",p);
         exit(1);
      }
   }

   lab[Labels].Address = UNDEF;
   lab[Labels].Name = (char *)StrNDup(p,l);
   lab[Labels].Ref = (int *)MallocOrDie(sizeof(int));
   lab[Labels].Att = (int *)MallocOrDie(sizeof(int));
   lab[Labels].Ref[0] = LiNo;
   lab[Labels].Att[0] = 0;
   Labels++;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
cmpl $0x1f3e, 0x23c31(%rip)  # imm = 0x1F3E
jle 0x4e11
movl 0x23c21(%rip), %eax     # 0x28a0c
addl $0x1, %eax
movl %eax, 0x23c18(%rip)     # 0x28a0c
leaq 0xb41d(%rip), %rdi      # 0x10218
movl $0x1f40, %esi           # imm = 0x1F40
movb $0x0, %al
callq 0x3150
movl $0x1, %edi
callq 0x22b0
movq 0x10(%rsp), %rdi
callq 0x20f0
movl %eax, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1275f(%rip), %eax     # 0x17590
jge 0x4e81
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rax
leaq 0x1035c(%rip), %rsi     # 0x151a0
imulq $0x28, %rax, %rax
addq %rax, %rsi
callq 0x2c70
cmpl $0x0, %eax
jne 0x4e72
movq 0x10(%rsp), %rsi
leaq 0xbd70(%rip), %rdi      # 0x10bd1
movb $0x0, %al
callq 0x3150
movl $0x1, %edi
callq 0x22b0
jmp 0x4e74
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4e27
movl $0x0, 0xc(%rsp)
cmpl $0x22, 0xc(%rsp)
jge 0x4ee1
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rcx
leaq 0x12b4f(%rip), %rax     # 0x179f0
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x2c70
cmpl $0x0, %eax
jne 0x4ed2
movq 0x10(%rsp), %rsi
leaq 0xbd43(%rip), %rdi      # 0x10c04
movb $0x0, %al
callq 0x3150
movl $0x1, %edi
callq 0x22b0
jmp 0x4ed4
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4e89
movslq 0x23b2c(%rip), %rcx     # 0x28a14
leaq 0x23b31(%rip), %rax     # 0x28a20
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0xff0000, 0xc(%rax)    # imm = 0xFF0000
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x26b0
movq %rax, %rcx
movslq 0x23aff(%rip), %rdx     # 0x28a14
leaq 0x23b04(%rip), %rax     # 0x28a20
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl $0x4, %edi
callq 0x2620
movq %rax, %rcx
movslq 0x23ada(%rip), %rdx     # 0x28a14
leaq 0x23adf(%rip), %rax     # 0x28a20
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movl $0x4, %edi
callq 0x2620
movq %rax, %rcx
movslq 0x23ab4(%rip), %rdx     # 0x28a14
leaq 0x23ab9(%rip), %rax     # 0x28a20
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x28(%rax)
movl 0x22dc0(%rip), %ecx     # 0x27d38
movslq 0x23a95(%rip), %rdx     # 0x28a14
leaq 0x23a9a(%rip), %rax     # 0x28a20
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq 0x20(%rax), %rax
movl %ecx, (%rax)
movslq 0x23a7a(%rip), %rcx     # 0x28a14
leaq 0x23a7f(%rip), %rax     # 0x28a20
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
movl $0x0, (%rax)
movl 0x23a5c(%rip), %eax     # 0x28a14
addl $0x1, %eax
movl %eax, 0x23a53(%rip)     # 0x28a14
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)