// File: /workspace/github_c_makefile_star2_O0/42Bastian[P]lyxass/mnemonics.c
// Function: op5
int op5(int op)
{
  int err;
  int32_t l;
   int brace;

  KillSpace();
  brace = atom == '(';

  if ( (err = Expression( &l )) == EXPR_ERROR ) return 1;
  if ( brace && last_atom == ')' ){
    Warning("STZ (n) translates to STZ n\n");
  }

  if ( l < 0 || l > 65535 ) return Error(WORD_ERR,"");

  if ( TestAtom(',') ) {

    if ( !TestAtomOR('x','X') ) Error(SYNTAX_ERR,"");

    if (l > 255 || err == EXPR_UNSOLVED || Current.pass2 ){
      writeConstByte( op | 0x9a );
      writeWordLittle((short)l);
      CYCLES += 5;
    } else {
      writeConstByte( op | 0x70 );
      writeByte((char)l);
      CYCLES += 4;
    }
    if ( err == EXPR_UNSOLVED ) saveCurrentLine();
    return 0;
  }

  if (l > 255 || err == EXPR_UNSOLVED || Current.pass2 ){
    writeConstByte( op | 0x98 );
    writeWordLittle((short)l);
    CYCLES += 4;
  } else {
    writeConstByte( op | 0x60 );
    writeByte((char)l);
    CYCLES += 3;
  }
  if ( err == EXPR_UNSOLVED ) saveCurrentLine();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movb $0x0, %al
callq 0x5ad0
leaq 0x15837(%rip), %rax     # 0x20f20
cmpl $0x28, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xc920
movl %eax, -0xc(%rbp)
cmpl $0x1, %eax
jne 0xb714
movl $0x1, -0x4(%rbp)
jmp 0xb8ad
cmpl $0x0, -0x14(%rbp)
je 0xb732
leaq 0x15803(%rip), %rax     # 0x20f24
cmpl $0x29, (%rax)
jne 0xb732
leaq 0x5d5c(%rip), %rdi      # 0x11489
callq 0xd910
cmpl $0x0, -0x10(%rbp)
jl 0xb741
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jle 0xb75a
movl $0x1b, %edi
leaq 0x5910(%rip), %rsi      # 0x1105d
callq 0xd130
movl %eax, -0x4(%rbp)
jmp 0xb8ad
movl $0x2c, %edi
callq 0x5a90
cmpl $0x0, %eax
je 0xb822
movl $0x78, %edi
movl $0x58, %esi
callq 0x5af0
cmpl $0x0, %eax
jne 0xb792
movl $0x12, %edi
leaq 0x58d0(%rip), %rsi      # 0x1105d
callq 0xd130
cmpl $0xff, -0x10(%rbp)
jg 0xb7b1
cmpl $0x2, -0xc(%rbp)
je 0xb7b1
leaq 0xce50(%rip), %rax      # 0x185f8
cmpl $0x0, 0xe4(%rax)
je 0xb7df
movl -0x8(%rbp), %eax
orl $0x9a, %eax
movsbl %al, %edi
callq 0x3340
movl -0x10(%rbp), %eax
movswl %ax, %edi
callq 0x3670
leaq 0xcff5(%rip), %rax      # 0x187c8
movq (%rax), %rax
movl (%rax), %ecx
addl $0x5, %ecx
movl %ecx, (%rax)
jmp 0xb809
movl -0x8(%rbp), %eax
orl $0x70, %eax
movsbl %al, %edi
callq 0x3340
movl -0x10(%rbp), %eax
movsbl %al, %edi
callq 0x3470
leaq 0xcfc9(%rip), %rax      # 0x187c8
movq (%rax), %rax
movl (%rax), %ecx
addl $0x4, %ecx
movl %ecx, (%rax)
cmpl $0x2, -0xc(%rbp)
jne 0xb816
movb $0x0, %al
callq 0xcfe0
movl $0x0, -0x4(%rbp)
jmp 0xb8ad
cmpl $0xff, -0x10(%rbp)
jg 0xb841
cmpl $0x2, -0xc(%rbp)
je 0xb841
leaq 0xcdc0(%rip), %rax      # 0x185f8
cmpl $0x0, 0xe4(%rax)
je 0xb86f
movl -0x8(%rbp), %eax
orl $0x98, %eax
movsbl %al, %edi
callq 0x3340
movl -0x10(%rbp), %eax
movswl %ax, %edi
callq 0x3670
leaq 0xcf65(%rip), %rax      # 0x187c8
movq (%rax), %rax
movl (%rax), %ecx
addl $0x4, %ecx
movl %ecx, (%rax)
jmp 0xb899
movl -0x8(%rbp), %eax
orl $0x60, %eax
movsbl %al, %edi
callq 0x3340
movl -0x10(%rbp), %eax
movsbl %al, %edi
callq 0x3470
leaq 0xcf39(%rip), %rax      # 0x187c8
movq (%rax), %rax
movl (%rax), %ecx
addl $0x3, %ecx
movl %ecx, (%rax)
cmpl $0x2, -0xc(%rbp)
jne 0xb8a6
movb $0x0, %al
callq 0xcfe0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)