// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_getnumber_radix
static int scriptfile_getnumber_radix(scriptfile *sf, int *num, int radix)
{
	skipoverws(sf);
	if (sf->textptr >= sf->eof)
	{
		buildprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
		return -1;
	}

	while ((sf->textptr[0] == '0') && (sf->textptr[1] >= '0') && (sf->textptr[1] <= '9'))
		sf->textptr++; //hack to treat octal numbers like decimal
	
	sf->ltextptr = sf->textptr;
	(*num) = (int)strtol((const char *)sf->textptr,&sf->textptr,radix);
	if (!ISWS(*sf->textptr) && *sf->textptr) {
		char *p = sf->textptr;
		skipovertoken(sf);
		buildprintf("Error on line %s:%d: expecting int, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
		return -2;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6f020
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jb 0x6f2bb
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x6f180
movq -0x30(%rbp), %rsi
movl %eax, %edx
leaq 0x44c68(%rip), %rdi     # 0xb3f10
movb $0x0, %al
callq 0x37c90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6f3fa
jmp 0x6f2bd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x31(%rbp)
jne 0x6f2fd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x31(%rbp)
jl 0x6f2fd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x6f306
jmp 0x6f318
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x6f2bd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl -0x1c(%rbp), %edx
callq 0x68a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x6f3f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x6f3f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
je 0x6f3f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x6f3f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x6f3f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6f060
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6f180
movq -0x40(%rbp), %rsi
movl %eax, %edx
movq -0x28(%rbp), %rcx
leaq 0x44bd7(%rip), %rdi     # 0xb3fba
movb $0x0, %al
callq 0x37c90
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6f3fa
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)