// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_parse_2number
af_bool_t af_parse_2number(af_global_t* global, af_cell_t base,
			   af_byte_t* text, size_t length,
			   af_sign_2cell_t* result) {
  af_sign_2cell_t value = 0;
  af_bool_t success = FALSE;
  af_bool_t negative = FALSE;
  if(length > 0) {
    if(*text == '%') {
      base = 2;
      text++;
      length--;
    } else if(*text == '/') {
      base = 8;
      text++;
      length--;
    } else if(*text == '#') {
      base = 10;
      text++;
      length--;
    } else if(*text == '$') {
      base = 16;
      text++;
      length--;
    }
    if(length > 0 && base >= 2 && base <= 36) {
      if(*text == '-') {
	negative = TRUE;
	text++;
	length--;
      }
      if(length > 0) {
	while(length--) {
	  if(*text == '.' && length == 0) {
	    success = TRUE;
	    break;
	  }
	  value *= base;
	  if(*text >= '0' && *text <= '9') {
	    if(*text - '0' < base) {
	      value += *text++ - '0';
	    } else {
	      value = 0;
	      success = FALSE;
	      break;
	    }
	  } else if(*text >= 'a' && *text <= 'z') {
	    if(*text - 'a' < base - 10) {
	      value += (*text++ - 'a') + 10;
	    } else {
	      value = 0;
	      success = FALSE;
	      break;
	    }
	  } else if(*text >= 'A' && *text <= 'Z') {
	    if(*text - 'A' < base - 10) {
	      value += (*text++ - 'A') + 10;
	    } else {
	      value = 0;
	      success = FALSE;
	      break;
	    }
	  } else {
	    value = 0;
	    success = FALSE;
	    break;
	  }
	}
	if(success && negative) {
	  value = -value;
	}
      } else {
	value = 0;
	success = FALSE;
      }
    } else {
      value = 0;
      success = FALSE;
    }
  } else {
    value = 0;
    success = FALSE;
  }
  *result = value;
  return success;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x5259
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x25, %eax
jne 0x4f14
movq $0x2, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4fa2
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x4f42
movq $0x8, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4fa0
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
jne 0x4f70
movq $0xa, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4f9e
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x24, %eax
jne 0x4f9c
movq $0x10, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4f9e
jmp 0x4fa0
jmp 0x4fa2
cmpq $0x0, -0x20(%rbp)
jbe 0x523f
cmpq $0x2, -0x10(%rbp)
jb 0x523f
cmpq $0x24, -0x10(%rbp)
ja 0x523f
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x4fef
movq $-0x1, -0x50(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x5225
jmp 0x4ffc
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0x5204
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x5035
cmpq $0x0, -0x20(%rbp)
jne 0x5035
movq $-0x1, -0x48(%rbp)
jmp 0x5204
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
imulq %rdx, %rcx
mulq %rdx
addq %rcx, %rdx
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x30, %eax
jl 0x50d5
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x39, %eax
jg 0x50d5
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
subl $0x30, %eax
cltq
cmpq -0x10(%rbp), %rax
jae 0x50b3
movq -0x18(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
addl $-0x30, %eax
movslq %eax, %rsi
movq %rsi, %rdx
sarq $0x3f, %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
addq %rsi, %rcx
adcq %rdx, %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
jmp 0x50d0
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x5204
jmp 0x51ff
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x61, %eax
jl 0x515e
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7a, %eax
jg 0x515e
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
subl $0x61, %eax
cltq
movq -0x10(%rbp), %rcx
subq $0xa, %rcx
cmpq %rcx, %rax
jae 0x513c
movq -0x18(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
addl $-0x57, %eax
movslq %eax, %rsi
movq %rsi, %rdx
sarq $0x3f, %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
addq %rsi, %rcx
adcq %rdx, %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
jmp 0x5159
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x5204
jmp 0x51fd
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x41, %eax
jl 0x51e1
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5a, %eax
jg 0x51e1
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
subl $0x41, %eax
cltq
movq -0x10(%rbp), %rcx
subq $0xa, %rcx
cmpq %rcx, %rax
jae 0x51c5
movq -0x18(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
addl $-0x37, %eax
movslq %eax, %rsi
movq %rsi, %rdx
sarq $0x3f, %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
addq %rsi, %rcx
adcq %rdx, %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
jmp 0x51df
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x5204
jmp 0x51fb
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x5204
jmp 0x51fd
jmp 0x51ff
jmp 0x4ffc
cmpq $0x0, -0x48(%rbp)
je 0x5223
cmpq $0x0, -0x50(%rbp)
je 0x5223
movq -0x38(%rbp), %rcx
xorl %eax, %eax
negq -0x40(%rbp)
sbbq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x523d
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x5257
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x5271
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rax
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)