// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: GetFileName
int GetFileName()
{
  int save;
  char help[80];
  int i;

  KillSpace();
  if ( atom != '"' && atom != '<' && atom != '\'') return Error(SYNTAX_ERR,"");
  if ( atom == '<' )
    save = '>';
  else
    save = atom;

  GetAtom();

  if ( !GetString( help, save ) ) return  Error(SYNTAX_ERR,"");

  memset(filename,0,512);

  if ( save == '>' && bll_root && sourceMode == LYNX){
    strcpy(filename,bll_root);
  } else if ( save == '>' && bjl_root && (sourceMode == JAGUAR_GPU || sourceMode == JAGUAR_DSP) ){
    strcpy(filename,bjl_root);
  } else {
    strcpy(filename,Global.Path);
  }

  i = (int)strlen(filename);
  if ( i && filename[i-1] != '/' && filename[i-1] != '\\'){
    filename[i] = '/';
  }
  if ( save == '\'' ) {
    char *ptr = help;
    char c;
    while ( (c = *ptr) ){
      *ptr++ = toupper(c);
    }
  }

  strcat(filename,help);

  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x58, %rsp
movl 0x17d47(%rip), %eax     # 0x1cf30
cmpl $0x20, %eax
jne 0x522e
movq 0x17d2b(%rip), %rcx     # 0x1cf20
movl %eax, 0x17d39(%rip)     # 0x1cf34
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17d1a(%rip)     # 0x1cf20
movsbl (%rcx), %eax
movl %eax, 0x17d21(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %esi
movl %esi, 0x17d1f(%rip)     # 0x1cf38
testl %eax, %eax
jne 0x5227
movq %rcx, 0x17cfc(%rip)     # 0x1cf20
movq %rcx, %rdx
movq %rdx, %rcx
cmpb $0x20, %al
je 0x51f5
movl 0x17cfc(%rip), %eax     # 0x1cf30
cmpl $0x22, %eax
je 0x524d
cmpl $0x27, %eax
je 0x524d
movl $0x3e, %ebp
cmpl $0x3c, %eax
je 0x524f
jmp 0x5392
movl %eax, %ebp
movl %eax, 0x17cdf(%rip)     # 0x1cf34
movq 0x17cc4(%rip), %rax     # 0x1cf20
leaq 0x1(%rax), %rcx
movq %rcx, 0x17cb9(%rip)     # 0x1cf20
movsbl (%rax), %ecx
movl %ecx, 0x17cc0(%rip)     # 0x1cf30
movsbl 0x1(%rax), %edx
movl %edx, 0x17cbe(%rip)     # 0x1cf38
testl %ecx, %ecx
jne 0x5285
movq %rax, 0x17c9b(%rip)     # 0x1cf20
movsbl %bpl, %esi
movq %rsp, %rdi
callq 0x5125
testl %eax, %eax
je 0x5392
leaq 0x17850(%rip), %rdi     # 0x1caf0
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x30d0
movl %ebp, %ecx
xorl $0x3e, %ecx
leaq 0xf510(%rip), %rax      # 0x147c8
movq (%rax), %rsi
testq %rsi, %rsi
setne %dl
leaq 0xf328(%rip), %rax      # 0x145f0
movl (%rax), %eax
movl %eax, %edi
xorl $0x1, %edi
orl %ecx, %edi
sete %cl
testb %dl, %cl
jne 0x5308
leaq 0xf4f1(%rip), %rcx      # 0x147d0
movq (%rcx), %rcx
andl $-0x2, %eax
leaq 0xf0c4(%rip), %rdx      # 0x143b0
addq $0x20, %rdx
cmpl $0x2, %eax
movq %rdx, %rsi
cmoveq %rcx, %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
cmpl $0x3e, %ebp
cmovneq %rdx, %rsi
leaq 0x177e1(%rip), %rbx     # 0x1caf0
movq %rbx, %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
je 0x534e
shlq $0x20, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rax, %rcx
sarq $0x20, %rcx
movzbl (%rbx,%rcx), %ecx
cmpl $0x2f, %ecx
je 0x534e
cmpl $0x5c, %ecx
je 0x534e
sarq $0x20, %rax
movb $0x2f, (%rbx,%rax)
cmpl $0x27, %ebp
jne 0x537a
movb (%rsp), %bl
testb %bl, %bl
je 0x537a
callq 0x3030
movq (%rax), %rax
leaq 0x1(%rsp), %rcx
movsbq %bl, %rdx
movb (%rax,%rdx,4), %dl
movb %dl, -0x1(%rcx)
movb (%rcx), %bl
incq %rcx
testb %bl, %bl
jne 0x5367
leaq 0x1776f(%rip), %rdi     # 0x1caf0
movq %rsp, %rsi
callq 0x31a0
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
leaq 0x7bf9(%rip), %rsi      # 0xcf92
movl $0x12, %edi
addq $0x58, %rsp
popq %rbx
popq %rbp
jmp 0xa2c8