	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getdigit
_getdigit:                              ## @getdigit
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	testl	%edx, %edx
	jle	LBB0_5
## %bb.1:
	movl	%edx, %ebx
	movl	%esi, %r15d
	xorl	%r14d, %r14d
	leaq	_getdigit.xdigits(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r13), %edi
	callq	_tolower
	movl	$17, %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	subl	%r12d, %eax
	cmpl	%r15d, %eax
	jge	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	imull	%r15d, %r14d
	addl	%r14d, %eax
	incq	%r13
	movl	%eax, %r14d
	decl	%ebx
	jne	LBB0_2
	jmp	LBB0_8
LBB0_7:
	movl	%r14d, %eax
	jmp	LBB0_8
LBB0_5:
	xorl	%eax, %eax
LBB0_8:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, (%rcx)
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @getdigit.xdigits
_getdigit.xdigits:
	.asciz	"0123456789abcdef"

	.no_dead_strip	_getdigit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getdigit
_getdigit:                              ; @getdigit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x24, [x0]
	cmp	w2, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	w20, #0
Lloh0:
	adrp	x23, _getdigit.xdigits@PAGE
Lloh1:
	add	x23, x23, _getdigit.xdigits@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x24]
	bl	_tolower
	mov	x1, x0
	mov	x0, x23
	mov	w2, #17
	bl	_memchr
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w8, w0, w23
	cmp	w8, w22
	b.ge	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	madd	w20, w20, w22, w8
	add	x24, x24, #1
	subs	w21, w21, #1
	b.ne	LBB0_2
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	str	x24, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_getdigit.xdigits:                      ; @getdigit.xdigits
	.asciz	"0123456789abcdef"

	.no_dead_strip	_getdigit
.subsections_via_symbols
