	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_strtoull                  ## -- Begin function grub_strtoull
	.p2align	4, 0x90
_grub_strtoull:                         ## @grub_strtoull
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movb	(%rdi), %al
	testb	%al, %al
	je	LBB0_17
## %bb.1:
	movl	%edx, %r15d
	movq	%rdi, %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edi
	callq	_grub_isspace
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_2
	jmp	LBB0_17
LBB0_4:
	movb	(%rbx), %al
	cmpb	$48, %al
	jne	LBB0_10
## %bb.5:
	movb	1(%rbx), %al
	cmpb	$120, %al
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	testl	$-17, %r15d
	sete	%al
	leaq	(%rbx,%rax,2), %rbx
	movl	$16, %eax
	cmovel	%eax, %r15d
	jmp	LBB0_9
LBB0_7:
	testl	%r15d, %r15d
	jne	LBB0_9
## %bb.8:
	andb	$-8, %al
	xorl	%r15d, %r15d
	cmpb	$48, %al
	sete	%r15b
	shll	$3, %r15d
LBB0_9:
	movb	(%rbx), %al
LBB0_10:
	testl	%r15d, %r15d
	movl	$10, %ecx
	cmovnel	%r15d, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testb	%al, %al
	je	LBB0_17
## %bb.11:
	movslq	-44(%rbp), %r13                 ## 4-byte Folded Reload
	movb	$1, %r14b
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edi
	callq	_grub_tolower
	leaq	-48(%rax), %r12
	cmpq	$10, %r12
	jb	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	$-87, %rax
	movq	%rax, %r12
	cmpq	%r13, %rax
	jae	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rdi
	notq	%rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_grub_divmod64
	cmpq	%rax, %r15
	ja	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	imulq	%r13, %r15
	addq	%r12, %r15
	movzbl	1(%rbx), %eax
	incq	%rbx
	xorl	%r14d, %r14d
	testb	%al, %al
	jne	LBB0_12
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%rbx, (%rax)
	jmp	LBB0_21
LBB0_15:
	movq	_GRUB_ERR_OUT_OF_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	movq	$-1, %r15
	jmp	LBB0_21
LBB0_16:
	testb	$1, %r14b
	je	LBB0_19
LBB0_17:
	movq	_GRUB_ERR_BAD_NUMBER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_grub_error
	xorl	%r15d, %r15d
LBB0_21:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_ERR_OUT_OF_RANGE,4,2      ## @GRUB_ERR_OUT_OF_RANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"overflow is detected"

	.comm	_GRUB_ERR_BAD_NUMBER,4,2        ## @GRUB_ERR_BAD_NUMBER
L_.str.1:                               ## @.str.1
	.asciz	"unrecognized number"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_strtoull                  ; -- Begin function grub_strtoull
	.p2align	2
_grub_strtoull:                         ; @grub_strtoull
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldrb	w8, [x0]
	cbz	w8, LBB0_14
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_grub_isspace
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x20, #1]!
	cbnz	w8, LBB0_2
	b	LBB0_14
LBB0_4:
	ldrb	w8, [x20]
	cmp	w8, #48
	b.ne	LBB0_6
; %bb.5:
	ldrb	w8, [x20, #1]
	and	w9, w8, #0xf8
	cmp	w9, #48
	cset	w9, eq
	lsl	w9, w9, #3
	cmp	w21, #0
	csel	w9, w21, w9, ne
	tst	w21, #0xffffffef
	cset	w10, eq
	add	x10, x20, w10, uxtw #1
	mov	w11, #16
	csel	w11, w11, w21, eq
	cmp	w8, #120
	csel	w21, w9, w11, ne
	csel	x20, x20, x10, ne
	ldrb	w8, [x20]
LBB0_6:
	mov	w9, #10
	cmp	w21, #0
	csel	w22, w9, w21, eq
	cbz	w8, LBB0_14
; %bb.7:
	mov	x21, #0
	sxtw	x23, w22
	mov	w24, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_grub_tolower
	sub	x25, x0, #48
	cmp	x25, #10
	b.lo	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x25, x0, #87
	cmp	x25, x23
	b.hs	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	mvn	x0, x25
	mov	x1, x22
	mov	w2, #0
	bl	_grub_divmod64
	cmp	x21, x0
	b.hi	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w24, #0
	madd	x21, x21, x23, x25
	ldrb	w8, [x20, #1]!
	cbnz	w8, LBB0_8
	b	LBB0_16
LBB0_12:
Lloh0:
	adrp	x8, _GRUB_ERR_OUT_OF_RANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRUB_ERR_OUT_OF_RANGE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	mov	x21, #-1
	b	LBB0_15
LBB0_13:
	tbz	w24, #0, LBB0_16
LBB0_14:
Lloh5:
	adrp	x8, _GRUB_ERR_BAD_NUMBER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GRUB_ERR_BAD_NUMBER@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_grub_error
	mov	x21, #0
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	cbz	x19, LBB0_15
; %bb.17:
	str	x20, [x19]
	b	LBB0_15
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_ERR_OUT_OF_RANGE,4,2      ; @GRUB_ERR_OUT_OF_RANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"overflow is detected"

	.comm	_GRUB_ERR_BAD_NUMBER,4,2        ; @GRUB_ERR_BAD_NUMBER
l_.str.1:                               ; @.str.1
	.asciz	"unrecognized number"

.subsections_via_symbols
