// File: /workspace/github_c_makefile_star2_O0/42Bastian[P]lyxass/macro.c
// Function: CheckMacro
int CheckMacro(char * s)
{
  int err = 0;

  if ( Current.ifFlag && Current.switchFlag ){
    int OpCnt = 0;
    int save_atom = atom;
    struct current_s save_Current = Current;
    label_t *macro;

    if ( FindMacro( s , &macro) ) return -1;

//->    printf("Macro: (%s)\n",macro->name);

    Current.Macro.Line = Current.Line;
    Current.Macro.File = Current.File;
    Current.Line = macro->line;
    Current.File = macro->file;
    Current.Macro.Name = macro->name;
    Current.Macro.invoked = ++macro->count;
    Current.SrcPtr = ((char *)macro->macro);

    memset((char *)macrovars[Current.Macro.Processing],0,16*80);

    do {
      if ( GetOperand(macrovars[Current.Macro.Processing][OpCnt]) ||
	   atom == ',' ) OpCnt++;
    }while ( TestAtom(',') && OpCnt <= 16);

    //    printf("%d macro-paras\n",OpCnt);

    Current.Macro.NPara = OpCnt;
    Current.Macro.Processing++;

    undefAllMacroLocals();

    ++cntMacroExpand;
    err = mainloop(0);

    Current = save_Current;
    atom = save_atom;
  }
  return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
leaq 0xb84b(%rip), %rax      # 0x185f8
cmpl $0x0, 0xf8(%rax)
je 0xcfbf
leaq 0xb837(%rip), %rax      # 0x185f8
cmpl $0x0, 0x188(%rax)
je 0xcfbf
movl $0x0, -0x18(%rbp)
leaq 0x14144(%rip), %rax     # 0x20f20
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq 0xb809(%rip), %rsi      # 0x185f8
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x3140
movq -0x10(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x7020
cmpl $0x0, %eax
je 0xce1a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcfc5
leaq 0xb7d7(%rip), %rax      # 0x185f8
movl (%rax), %ecx
leaq 0xb7ce(%rip), %rax      # 0x185f8
movl %ecx, 0x10(%rax)
leaq 0xb7c4(%rip), %rax      # 0x185f8
movl 0x4(%rax), %ecx
leaq 0xb7ba(%rip), %rax      # 0x185f8
movl %ecx, 0x14(%rax)
movq -0x1e8(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0xb7a6(%rip), %rax      # 0x185f8
movl %ecx, (%rax)
movq -0x1e8(%rbp), %rax
movl 0x14(%rax), %ecx
leaq 0xb793(%rip), %rax      # 0x185f8
movl %ecx, 0x4(%rax)
movq -0x1e8(%rbp), %rcx
addq $0x38, %rcx
leaq 0xb77e(%rip), %rax      # 0x185f8
movq %rcx, 0x18(%rax)
movq -0x1e8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
leaq 0xb763(%rip), %rax      # 0x185f8
movl %ecx, 0x24(%rax)
movq -0x1e8(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0xb74e(%rip), %rax      # 0x185f8
movq %rcx, 0x198(%rax)
leaq 0xb740(%rip), %rax      # 0x185f8
movslq 0x8(%rax), %rax
leaq 0x14ecd(%rip), %rdi     # 0x21d90
imulq $0x500, %rax, %rax      # imm = 0x500
addq %rax, %rdi
xorl %esi, %esi
movl $0x500, %edx            # imm = 0x500
callq 0x30c0
leaq 0xb718(%rip), %rax      # 0x185f8
movslq 0x8(%rax), %rax
leaq 0x14ea5(%rip), %rdi     # 0x21d90
imulq $0x500, %rax, %rax      # imm = 0x500
addq %rax, %rdi
movslq -0x18(%rbp), %rax
imulq $0x50, %rax, %rax
addq %rax, %rdi
callq 0xcbb0
cmpl $0x0, %eax
jne 0xcf16
leaq 0x1400f(%rip), %rax     # 0x20f20
cmpl $0x2c, (%rax)
jne 0xcf1f
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xcf21
movl $0x2c, %edi
callq 0x5a90
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1e9(%rbp)
je 0xcf47
cmpl $0x10, -0x18(%rbp)
setle %al
movb %al, -0x1e9(%rbp)
movb -0x1e9(%rbp), %al
testb $0x1, %al
jne 0xced9
movl -0x18(%rbp), %ecx
leaq 0xb69d(%rip), %rax      # 0x185f8
movl %ecx, 0x20(%rax)
leaq 0xb693(%rip), %rax      # 0x185f8
movl 0x8(%rax), %ecx
addl $0x1, %ecx
leaq 0xb686(%rip), %rax      # 0x185f8
movl %ecx, 0x8(%rax)
movb $0x0, %al
callq 0x70a0
leaq 0xb405(%rip), %rax      # 0x18388
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xb3f9(%rip), %rax      # 0x18388
movl %ecx, (%rax)
xorl %edi, %edi
callq 0x48f0
movl %eax, -0x14(%rbp)
leaq 0xb656(%rip), %rdi      # 0x185f8
leaq -0x1e0(%rbp), %rsi
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x3140
movl -0x1c(%rbp), %ecx
leaq 0x13f63(%rip), %rax     # 0x20f20
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)