// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/pseudo.c
// Function: p_echo
int p_echo(int d)
{
  label_t label;
  int32_t l;

  if ( !TestAtom('"') ) return Error(SYNTAX_ERR, __FUNCTION__);

  if ( d ) {
    if (Current.File >= 0){
      if ( Current.Macro.Line ){
        fprintf(my_stderr,"FAIL: %s:%d:Macro-Line %5d:<%s>:",
                file_list[Current.File].name,Current.Line,
                Current.Macro.Line,file_list[Current.Macro.File].name);
      }
    } else {
      fprintf(my_stderr,"FAIL: %s:%5d :",
              Current.File >= 0 ? file_list[Current.File].name:"",Current.Line);
    }
  }

  while ( atom != '"' ){
    if ( atom == '%' && next_atom != '%'){
      int mode = 0;

      GetAtom();
      if ( atom == 'H' || atom == 'h' || atom == 'X' || atom == 'x'){
        mode = 1;
        l = 0xdead;
      }
      else if ( atom == 'D' || atom == 'd' ){
        mode = 2;
        l = 12345678;
      }
      else {
        return Error(SYNTAX_ERR, __FUNCTION__ );
      }
      GetAtom();

      if ( GetLabel( &label) ) return 1;

      FindLabel( &label, &l );

      if ( mode == 1  ){
        fprintf(my_stderr,"$%x",l);
      }
      else if ( mode == 2 ){
        fprintf(my_stderr,"%d",l);
      }
    }
    else {
      fputc(atom,my_stderr);
      GetAtom();
    }
  }
  fputc('\n',my_stderr);

  if ( d ) return Error(FAIL_ERR,"");

  return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebx
movl $0x22, %edi
callq 0x4fa3
testl %eax, %eax
je 0x75c6
testl %ebx, %ebx
je 0x7606
leaq 0xd0a5(%rip), %rax      # 0x14608
movslq 0x4(%rax), %rcx
testq %rcx, %rcx
js 0x75e5
movl 0x10(%rax), %r8d
testl %r8d, %r8d
je 0x7606
leaq 0xd078(%rip), %rdx      # 0x145f8
movq (%rdx), %rdi
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,4), %rcx
leaq 0xd24b(%rip), %rsi      # 0x147e0
leaq (%rsi,%rcx), %rdx
addq $0x4, %rdx
movl (%rax), %ecx
movslq 0x14(%rax), %rax
movq %rax, %r9
shlq $0x9, %r9
leaq (%r9,%rax,4), %rax
leaq (%rsi,%rax), %r9
addq $0x4, %r9
leaq 0x5cb0(%rip), %rsi      # 0xd26d
xorl %eax, %eax
callq 0x3130
jmp 0x7606
leaq 0x5c99(%rip), %rsi      # 0xd266
movl $0x12, %edi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2c8
leaq 0xd00c(%rip), %rcx      # 0x145f8
movq (%rcx), %rdi
movl (%rax), %ecx
leaq 0x5c96(%rip), %rsi      # 0xd28e
leaq 0x5993(%rip), %rdx      # 0xcf92
xorl %eax, %eax
callq 0x3130
movl %ebx, 0x4(%rsp)
leaq 0x1591f(%rip), %r13     # 0x1cf30
movl (%r13), %edi
cmpl $0x22, %edi
je 0x76e5
leaq 0x15913(%rip), %rbp     # 0x1cf38
leaq 0x8(%rsp), %r14
leaq 0xcfc7(%rip), %r15      # 0x145f8
cmpl $0x25, %edi
jne 0x767e
cmpl $0x25, (%rbp)
je 0x767e
callq 0x4f15
movl (%r13), %eax
leal -0x48(%rax), %ebx
roll $0x1c, %ebx
movl $0xdead, %ecx           # imm = 0xDEAD
cmpl $0x4, %ebx
jb 0x7662
andl $-0x21, %eax
movl $0xbc614e, %ecx         # imm = 0xBC614E
cmpl $0x44, %eax
jne 0x76ac
movl %ecx, (%rsp)
callq 0x4f15
movq %r14, %rdi
callq 0x53a9
testl %eax, %eax
je 0x768d
movl $0x1, %r12d
jmp 0x76c0
movq (%r15), %rsi
callq 0x30e0
callq 0x4f15
jmp 0x76d8
movq %r14, %rdi
movq %rsp, %rsi
callq 0x6140
movq (%r15), %rdi
movl (%rsp), %edx
cmpl $0x3, %ebx
ja 0x76c4
leaq 0x5bf3(%rip), %rsi      # 0xd29d
jmp 0x76cb
movl $0x12, %edi
leaq 0x5bae(%rip), %rsi      # 0xd266
callq 0xa2c8
movl %eax, %r12d
xorl %eax, %eax
jmp 0x76d4
leaq 0x5a13(%rip), %rsi      # 0xd0de
xorl %eax, %eax
callq 0x3130
movb $0x1, %al
testb %al, %al
je 0x7719
movl (%r13), %edi
cmpl $0x22, %edi
jne 0x7631
leaq 0xcf0c(%rip), %rax      # 0x145f8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x30e0
cmpl $0x0, 0x4(%rsp)
je 0x7716
leaq 0x588b(%rip), %rsi      # 0xcf92
movl $0x20, %edi
callq 0xa2c8
movl %eax, %r12d
jmp 0x7719
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq