	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_simple_strtoul                 ## -- Begin function simple_strtoul
	.p2align	4, 0x90
_simple_strtoul:                        ## @simple_strtoul
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movl	%edx, %ebx
	jmp	LBB0_6
LBB0_2:
	movl	$10, %ebx
	cmpb	$48, (%r15)
	jne	LBB0_6
## %bb.3:
	leaq	1(%r15), %r12
	movl	$8, %ebx
	cmpb	$120, 1(%r15)
	jne	LBB0_4
## %bb.5:
	movsbl	2(%r15), %edi
	addq	$2, %r15
	callq	_isxdigit
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	leal	8(,%rcx,8), %ebx
	cmoveq	%r12, %r15
	jmp	LBB0_6
LBB0_4:
	movq	%r12, %r15
LBB0_6:
	movsbl	(%r15), %edi
	callq	_isxdigit
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r15), %edi
	callq	_isdigit
	movq	%rax, %rcx
	movzbl	(%r15), %eax
	movq	$-48, %rdx
	testq	%rcx, %rcx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movsbl	%al, %edi
	callq	_toupper
	movq	$-55, %rdx
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movsbq	%al, %rax
	addq	%rdx, %rax
	cmpq	%r12, %rax
	jae	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	imulq	%r12, %rbx
	addq	%rax, %rbx
	movsbl	1(%r15), %edi
	incq	%r15
	callq	_isxdigit
	testq	%rax, %rax
	jne	LBB0_9
LBB0_13:
	testq	%r14, %r14
	je	LBB0_15
LBB0_14:
	movq	%r15, (%r14)
LBB0_15:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	jne	LBB0_14
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_simple_strtoul                 ; -- Begin function simple_strtoul
	.p2align	2
_simple_strtoul:                        ; @simple_strtoul
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	cbz	w2, LBB0_2
; %bb.1:
	mov	x22, x2
	b	LBB0_7
LBB0_2:
	ldrb	w8, [x20]
	cmp	w8, #48
	b.ne	LBB0_5
; %bb.3:
	mov	x21, x20
	ldrb	w8, [x21, #1]!
	mov	w22, #8
	cmp	w8, #120
	b.ne	LBB0_6
; %bb.4:
	ldrsb	w0, [x20, #2]!
	bl	_isxdigit
	mov	w8, #16
	cmp	x0, #0
	csel	x20, x21, x20, eq
	csel	w22, w22, w8, eq
	b	LBB0_7
LBB0_5:
	mov	w22, #10
	b	LBB0_7
LBB0_6:
	mov	x20, x21
LBB0_7:
	ldrsb	w0, [x20]
	bl	_isxdigit
	mov	x21, #0
	cbz	x0, LBB0_14
; %bb.8:
	mov	w22, w22
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x20]
	bl	_isdigit
	mov	x8, x0
	ldrb	w0, [x20]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x8, #-48
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	sxtb	w0, w0
	bl	_toupper
                                        ; kill: def $w0 killed $w0 def $x0
	mov	x8, #-55
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, w0, sxtb
	cmp	x8, x22
	b.hs	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	madd	x21, x21, x22, x8
	ldrsb	w0, [x20, #1]!
	bl	_isxdigit
	cbnz	x0, LBB0_9
LBB0_14:
	cbz	x19, LBB0_16
; %bb.15:
	str	x20, [x19]
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
