	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function url_encode
_url_encode:                            ## @url_encode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movb	(%rdi), %cl
	testb	%cl, %cl
	je	LBB0_1
## %bb.2:
	leaq	1(%rbx), %rax
	xorl	%edi, %edi
	movl	$3, %r8d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	-127(%rcx), %esi
	xorl	%edx, %edx
	cmpb	$-94, %sil
	setb	%dl
	cmpb	$37, %cl
	leal	1(%rdx,%rdx), %edx
	cmovel	%r8d, %edx
	cmpb	$61, %cl
	cmovel	%r8d, %edx
	addl	%edx, %edi
	movzbl	(%rax), %ecx
	incq	%rax
	testb	%cl, %cl
	jne	LBB0_3
## %bb.4:
	incl	%edi
	jmp	LBB0_5
LBB0_1:
	movl	$1, %edi
LBB0_5:
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movb	(%rbx), %dl
	testb	%dl, %dl
	je	LBB0_8
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rcx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movb	$37, (%rcx)
	movzbl	(%rbx), %edx
	shrq	$4, %rdx
	movzbl	(%rdx,%rsi), %edx
	movb	%dl, 1(%rcx)
	movzbl	(%rbx), %edx
	andl	$15, %edx
	movzbl	(%rdx,%rsi), %edx
	movb	%dl, 2(%rcx)
	addq	$3, %rcx
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movzbl	1(%rbx), %edx
	incq	%rbx
	testb	%dl, %dl
	je	LBB0_17
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$33, %dl
	jl	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpb	$37, %dl
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpb	$127, %dl
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpb	$61, %dl
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movb	%dl, (%rcx)
	incq	%rcx
	jmp	LBB0_16
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_8:
	movq	%rax, %rcx
LBB0_17:
	movb	$0, (%rcx)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0123456789ABCDEF"

	.no_dead_strip	_url_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function url_encode
_url_encode:                            ; @url_encode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldrb	w10, [x0]
	cbz	w10, LBB0_4
; %bb.1:
	mov	w8, #0
	add	x9, x19, #1
	mov	w11, #37
	mov	w12, #61
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w13, w10, #127
	cmn	w13, #94
	ccmp	w10, w11, #4, hs
	ccmp	w10, w12, #4, ne
	add	w10, w8, #3
	csinc	w8, w10, w8, eq
	ldrb	w10, [x9], #1
	cbnz	w10, LBB0_2
; %bb.3:
	add	w0, w8, #1
	bl	_malloc
	cbnz	x0, LBB0_5
	b	LBB0_15
LBB0_4:
	mov	w0, #1
	bl	_malloc
	cbz	x0, LBB0_15
LBB0_5:
	ldrb	w12, [x19]
	cbz	w12, LBB0_13
; %bb.6:
	mov	w8, #37
Lloh0:
	adrp	x9, l_.str@PAGE
Lloh1:
	add	x9, x9, l_.str@PAGEOFF
	mov	x10, x0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	strb	w8, [x10]
	ldrb	w11, [x19]
	lsr	x11, x11, #4
	ldrb	w11, [x9, x11]
	strb	w11, [x10, #1]
	ldrb	w11, [x19]
	and	x11, x11, #0xf
	ldrb	w12, [x9, x11]
	add	x11, x10, #3
	strb	w12, [x10, #2]
	mov	x10, x11
	ldrb	w12, [x19, #1]!
	cbz	w12, LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w11, w12
	cmp	w11, #33
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	w11, #37
	b.eq	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	and	w12, w11, #0xff
	cmp	w12, #127
	b.eq	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w12, #61
	b.eq	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	strb	w11, [x10], #1
	mov	x11, x10
	ldrb	w12, [x19, #1]!
	cbnz	w12, LBB0_8
	b	LBB0_14
LBB0_13:
	mov	x11, x0
LBB0_14:
	strb	wzr, [x11]
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0123456789ABCDEF"

	.no_dead_strip	_url_encode
.subsections_via_symbols
