// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x22
popq %rdi
callq 0x4da7
testl %eax, %eax
je 0x6d3f
testl %ebx, %ebx
je 0x6d7d
leaq 0xd924(%rip), %rax      # 0x14608
movslq 0x4(%rax), %rcx
testq %rcx, %rcx
js 0x6d5c
movl 0x10(%rax), %r8d
testl %r8d, %r8d
je 0x6d7d
leaq 0xd8f7(%rip), %rdx      # 0x145f8
movq (%rdx), %rdi
imulq $0x204, %rcx, %rcx      # imm = 0x204
leaq 0xdace(%rip), %rsi      # 0x147e0
leaq (%rsi,%rcx), %rdx
addq $0x4, %rdx
movl (%rax), %ecx
movslq 0x14(%rax), %rax
imulq $0x204, %rax, %rax      # imm = 0x204
leaq (%rsi,%rax), %r9
addq $0x4, %r9
leaq 0x5537(%rip), %rsi      # 0xc26d
xorl %eax, %eax
callq 0x3130
jmp 0x6d7d
leaq 0x5520(%rip), %rsi      # 0xc266
pushq $0x12
popq %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x96cc
leaq 0xd895(%rip), %rcx      # 0x145f8
movq (%rcx), %rdi
movl (%rax), %ecx
leaq 0x551f(%rip), %rsi      # 0xc28e
leaq 0x521c(%rip), %rdx      # 0xbf92
xorl %eax, %eax
callq 0x3130
movl %ebx, 0x4(%rsp)
leaq 0x161a8(%rip), %rbx     # 0x1cf30
leaq 0x161a9(%rip), %rbp     # 0x1cf38
leaq 0x8(%rsp), %r14
movq %rsp, %r15
leaq 0xd85a(%rip), %r12      # 0x145f8
movl (%rbx), %edi
cmpl $0x22, %edi
je 0x6e3a
cmpl $0x25, %edi
jne 0x6e14
cmpl $0x25, (%rbp)
je 0x6e14
callq 0x4d44
movl (%rbx), %eax
leal -0x48(%rax), %r13d
roll $0x1c, %r13d
movl $0xdead, %ecx           # imm = 0xDEAD
cmpl $0x4, %r13d
jb 0x6ddf
andl $-0x21, %eax
movl $0xbc614e, %ecx         # imm = 0xBC614E
cmpl $0x44, %eax
jne 0x6e61
movl %ecx, (%rsp)
callq 0x4d44
movq %r14, %rdi
callq 0x4fa0
testl %eax, %eax
jne 0x6e58
movq %r14, %rdi
movq %r15, %rsi
callq 0x59a0
movq (%r12), %rdi
movl (%rsp), %edx
cmpl $0x3, %r13d
ja 0x6e27
leaq 0x548b(%rip), %rsi      # 0xc29d
jmp 0x6e2e
movq (%r12), %rsi
callq 0x30e0
callq 0x4d44
jmp 0x6d9e
leaq 0x52b0(%rip), %rsi      # 0xc0de
xorl %eax, %eax
callq 0x3130
jmp 0x6d9e
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x30e0
cmpl $0x0, 0x4(%rsp)
je 0x6e5d
leaq 0x513e(%rip), %rsi      # 0xbf92
pushq $0x20
jmp 0x6e6a
pushq $0x1
popq %rax
jmp 0x6e70
xorl %eax, %eax
jmp 0x6e70
leaq 0x53fe(%rip), %rsi      # 0xc266
pushq $0x12
popq %rdi
callq 0x96cc
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq