// File: /workspace/github_c_makefile_star2_O0/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetArgNumber
bool pkGetArgNumber(PKVM* vm, int arg, double* value) {
  CHECK_GET_ARG_API_ERRORS();

  Var val = ARG(arg);
  if (IS_NUM(val)) {
    *value = AS_NUM(val);

  } else if (IS_BOOL(val)) {
    *value = AS_BOOL(val) ? 1 : 0;

  } else {
    ERR_INVALID_ARG_TYPE("number");
    return false;
  }

  return true;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
jmp 0x1b5c4
movq 0x28(%rsp), %rax
cmpq $0x0, 0x5f0(%rax)
jne 0x1b60d
movq 0x17a1e(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xeb6c(%rip), %rsi      # 0x2a150
leaq 0xf0d1(%rip), %rdx      # 0x2a6bc
leaq 0x105b4(%rip), %rcx     # 0x2bba6
leaq 0x1049d(%rip), %r8      # 0x2ba96
movl $0xb9, %r9d
movb $0x0, %al
callq 0x2240
ud2
callq 0x2040
jmp 0x1b60f
cmpl $0x0, 0x24(%rsp)
je 0x1b68f
jmp 0x1b618
cmpl $0x0, 0x24(%rsp)
jle 0x1b651
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x5f0(%rcx), %rcx
movq 0x30(%rcx), %rcx
movq 0x28(%rsp), %rdx
movq 0x5f0(%rdx), %rdx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
sarq $0x3, %rcx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x1b68b
movq 0x179a0(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xeaee(%rip), %rsi      # 0x2a150
leaq 0x104fd(%rip), %rdx     # 0x2bb66
leaq 0x10536(%rip), %rcx     # 0x2bba6
leaq 0x1041f(%rip), %r8      # 0x2ba96
movl $0xb9, %r9d
movb $0x0, %al
callq 0x2240
ud2
callq 0x2040
jmp 0x1b68d
jmp 0x1b68f
jmp 0x1b691
cmpq $0x0, 0x18(%rsp)
jne 0x1b6d3
movq 0x17958(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xeaa6(%rip), %rsi      # 0x2a150
leaq 0x104da(%rip), %rdx     # 0x2bb8b
leaq 0x104ee(%rip), %rcx     # 0x2bba6
leaq 0x103d7(%rip), %r8      # 0x2ba96
movl $0xb9, %r9d
movb $0x0, %al
callq 0x2240
ud2
callq 0x2040
jmp 0x1b6d5
jmp 0x1b6d7
movq 0x28(%rsp), %rax
movq 0x5f0(%rax), %rax
movq 0x38(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movabsq $0x7ffc000000000000, %rax # imm = 0x7FFC000000000000
andq 0x10(%rsp), %rax
movabsq $0x7ffc000000000000, %rcx # imm = 0x7FFC000000000000
cmpq %rcx, %rax
je 0x1b72b
movq 0x10(%rsp), %rdi
callq 0x45d0
movq 0x18(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x1b8b4
movabsq $0x7ffd000000000003, %rax # imm = 0x7FFD000000000003
cmpq %rax, 0x10(%rsp)
je 0x1b74d
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
cmpq %rax, 0x10(%rsp)
jne 0x1b77b
movq 0x10(%rsp), %rdx
movabsq $0x7ffd000000000003, %rsi # imm = 0x7FFD000000000003
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
cvtsi2sd %eax, %xmm0
movq 0x18(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x1b8b2
jmp 0x1b77d
cmpl $0x0, 0x24(%rsp)
je 0x1b827
leaq 0x4(%rsp), %rdi
movl 0x24(%rsp), %edx
leaq 0x123d9(%rip), %rsi     # 0x2db71
movb $0x0, %al
callq 0x2350
jmp 0x1b7a1
movq 0x28(%rsp), %rax
movq 0x5f0(%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0x1b7ee
movq 0x1783d(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xe98b(%rip), %rsi      # 0x2a150
leaq 0xea98(%rip), %rdx      # 0x2a264
leaq 0x103d3(%rip), %rcx     # 0x2bba6
leaq 0x102bc(%rip), %r8      # 0x2ba96
movl $0xc3, %r9d
movb $0x0, %al
callq 0x2240
ud2
callq 0x2040
jmp 0x1b7f0
movq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rcx
leaq 0x103b4(%rip), %rsi     # 0x2bbb5
leaq 0x103cb(%rip), %rdx     # 0x2bbd3
movb $0x0, %al
callq 0x4ed0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq 0x5f0(%rax), %rax
movq %rcx, 0x58(%rax)
jmp 0x1b8a9
jmp 0x1b829
jmp 0x1b82b
movq 0x28(%rsp), %rax
movq 0x5f0(%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0x1b878
movq 0x177b3(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xe901(%rip), %rsi      # 0x2a150
leaq 0xea0e(%rip), %rdx      # 0x2a264
leaq 0x10349(%rip), %rcx     # 0x2bba6
leaq 0x10232(%rip), %r8      # 0x2ba96
movl $0xc3, %r9d
movb $0x0, %al
callq 0x2240
ud2
callq 0x2040
jmp 0x1b87a
movq 0x28(%rsp), %rdi
leaq 0x10354(%rip), %rsi     # 0x2bbda
leaq 0x10346(%rip), %rdx     # 0x2bbd3
movb $0x0, %al
callq 0x4ed0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq 0x5f0(%rax), %rax
movq %rcx, 0x58(%rax)
jmp 0x1b8a9
jmp 0x1b8ab
movb $0x0, 0x37(%rsp)
jmp 0x1b8b9
jmp 0x1b8b4
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)