	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hex_decode
_hex_decode:                            ## @hex_decode
	.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	%rdx, %r14
	movq	%rdx, %r15
	testl	%esi, %esi
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movl	%esi, %r13d
	addq	%rdi, %r13
	movabsq	$4294977024, %r12               ## imm = 0x100002600
	movq	%r14, %r15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	incq	%rbx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	-1(%rbx), %eax
	cmpq	$32, %rax
	ja	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	btq	%rax, %r12
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	leaq	1(%rbx), %rax
	cmpq	%r13, %rbx
	movq	%rax, %rbx
	jb	LBB0_3
	jmp	LBB0_9
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movsbl	%al, %edi
	callq	_get_hex
	cmpq	%r13, %rbx
	jae	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	shll	$4, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movsbl	(%rbx), %edi
	incq	%rbx
	callq	_get_hex
	orl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movb	%al, (%r15)
	incq	%r15
	cmpq	%r13, %rbx
	jb	LBB0_2
LBB0_9:
	subl	%r14d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$-1, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hex_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hex_decode
_hex_decode:                            ; @hex_decode
	.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
	mov	x19, x2
	mov	x22, x2
	cbz	w1, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	w23, #1
	mov	x24, #9728
	movk	x24, #1, lsl #32
	mov	x22, x19
	add	x25, x0, w1, uxtw
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	add	x20, x20, #1
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldurb	w8, [x20, #-1]
	cmp	w8, #32
	lsl	x9, x23, x8
	and	x9, x9, x24
	ccmp	x9, #0, #4, ls
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	add	x8, x20, #1
	cmp	x20, x25
	mov	x20, x8
	b.lo	LBB0_3
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	sxtb	w0, w8
	bl	_get_hex
	cmp	x20, x25
	b.hs	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	ldrsb	w0, [x20], #1
	bl	_get_hex
	orr	w8, w0, w21, lsl #4
	strb	w8, [x22], #1
	cmp	x20, x25
	b.lo	LBB0_2
LBB0_7:
	sub	w0, w22, w19
LBB0_8:
	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_9:
	mov	w0, #-1
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hex_decode
.subsections_via_symbols
