	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_url
_parse_url:                             ## @parse_url
	.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	%r8, %rbx
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	$1, (%r8)
	movq	_AUTH_HTTPS_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %rsi
	movl	$7, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	$8, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movl	$47, %esi
	callq	_strchr
	cmpq	%rbx, %rax
	jbe	LBB0_7
## %bb.4:
	movq	%r13, %rdi
	movl	$58, %esi
	callq	_strchr
	cmpq	%rbx, %rax
	jb	LBB0_7
## %bb.5:
	subq	%r13, %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_dup_prefix
	movq	%rax, %r14
	testq	%rax, %rax
	leaq	L_.str.4(%rip), %rsi
	cmovneq	%rax, %rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_log_err
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_26
LBB0_6:
	addq	$7, %r13
	movl	$0, (%rbx)
	movq	_AUTH_HTTP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
LBB0_7:
	cmpb	$91, (%r13)
	jne	LBB0_12
LBB0_8:
	movq	%r13, %rdi
	movl	$93, %esi
	callq	_strchr
	incq	%r13
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	movq	%rax, %rbx
	movq	%rax, %rsi
	subq	%r13, %rsi
	movq	%r13, %rdi
	callq	_dup_prefix
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_21
## %bb.10:
	incq	%rbx
	jmp	LBB0_14
LBB0_11:
	addq	$8, %r13
	cmpb	$91, (%r13)
	je	LBB0_8
LBB0_12:
	movq	%r13, %rdi
	movl	$58, %esi
	movl	$47, %edx
	callq	_str_find_first_of_chars
	testq	%rax, %rax
	je	LBB0_20
## %bb.13:
	movq	%rax, %rbx
	movq	%rax, %rsi
	subq	%r13, %rsi
	movq	%r13, %rdi
	callq	_dup_prefix
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_21
LBB0_14:
	cmpb	$58, (%rbx)
	jne	LBB0_17
## %bb.15:
	movq	$0, -48(%rbp)
	incq	%rbx
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	movl	%eax, (%r15)
	movq	-48(%rbp), %rbx
	testq	%rbx, %rbx
	jne	LBB0_17
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$47, %al
	je	LBB0_16
## %bb.18:
	testb	%al, %al
	je	LBB0_23
## %bb.19:
	movq	%rbx, %rdi
	jmp	LBB0_24
LBB0_20:
	movq	%r13, %rdi
	callq	_dup_all
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_21
LBB0_23:
	leaq	L_.str.5(%rip), %rdi
LBB0_24:
	callq	_strdup
	movq	%rax, (%r14)
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_26
## %bb.25:
	leaq	L_.str.6(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_log_err
	jmp	LBB0_26
LBB0_21:
	xorl	%ebx, %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTH_HTTPS_PORT,4,2            ## @AUTH_HTTPS_PORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"http://"

	.comm	_AUTH_HTTP_PORT,4,2             ## @AUTH_HTTP_PORT
L_.str.1:                               ## @.str.1
	.asciz	"https://"

L_.str.2:                               ## @.str.2
	.asciz	"://"

L_.str.3:                               ## @.str.3
	.asciz	"protocol %s:// not supported (for url %s)"

L_.str.4:                               ## @.str.4
	.space	1

L_.str.5:                               ## @.str.5
	.asciz	"index.html"

L_.str.6:                               ## @.str.6
	.asciz	"malloc failure"

	.no_dead_strip	_parse_url
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_url
_parse_url:                             ; @parse_url
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x4
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	w8, #1
	str	w8, [x4]
Lloh0:
	adrp	x8, _AUTH_HTTPS_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AUTH_HTTPS_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x3]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #7
	bl	_strncmp
	cbz	x0, LBB0_6
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w2, #8
	bl	_strncmp
	cbz	x0, LBB0_7
; %bb.2:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_strstr
	cbz	x0, LBB0_8
; %bb.3:
	mov	x23, x0
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	cmp	x0, x23
	b.ls	LBB0_8
; %bb.4:
	mov	x0, x22
	mov	w1, #58
	bl	_strchr
	cmp	x0, x23
	b.lo	LBB0_8
; %bb.5:
	sub	x1, x23, x22
	mov	x0, x22
	bl	_dup_prefix
	mov	x19, x0
Lloh9:
	adrp	x8, l_.str.4@PAGE
Lloh10:
	add	x8, x8, l_.str.4@PAGEOFF
	cmp	x0, #0
	csel	x8, x8, x0, eq
	stp	x8, x22, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_log_err
	mov	x0, x19
	bl	_free
	b	LBB0_26
LBB0_6:
	add	x22, x22, #7
	str	wzr, [x23]
Lloh13:
	adrp	x8, _AUTH_HTTP_PORT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AUTH_HTTP_PORT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_8
LBB0_7:
	add	x22, x22, #8
LBB0_8:
	ldrb	w8, [x22]
	mov	x0, x22
	cmp	w8, #91
	b.ne	LBB0_12
; %bb.9:
	mov	w1, #93
	bl	_strchr
	mov	x23, x0
	add	x0, x22, #1
	cbz	x23, LBB0_21
; %bb.10:
	sub	x1, x23, x0
	bl	_dup_prefix
	str	x0, [x21]
	cbz	x0, LBB0_27
; %bb.11:
	add	x23, x23, #1
	b	LBB0_14
LBB0_12:
	mov	w1, #58
	mov	w2, #47
	bl	_str_find_first_of_chars
	cbz	x0, LBB0_20
; %bb.13:
	mov	x23, x0
	sub	x1, x0, x22
	mov	x0, x22
	bl	_dup_prefix
	str	x0, [x21]
	cbz	x0, LBB0_27
LBB0_14:
	ldrb	w8, [x23]
	cmp	w8, #58
	b.ne	LBB0_17
; %bb.15:
	str	xzr, [sp, #24]
	add	x0, x23, #1
	add	x1, sp, #24
	mov	w2, #10
	bl	_strtol
	str	w0, [x20]
	ldr	x23, [sp, #24]
	cbnz	x23, LBB0_17
	b	LBB0_22
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x23, x23, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x23]
	cmp	w8, #47
	b.eq	LBB0_16
; %bb.18:
	cbz	w8, LBB0_22
; %bb.19:
	mov	x0, x23
	b	LBB0_23
LBB0_20:
	mov	x0, x22
LBB0_21:
	bl	_dup_all
	str	x0, [x21]
	cbz	x0, LBB0_27
LBB0_22:
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_23:
	bl	_strdup
	str	x0, [x19]
	cbz	x0, LBB0_25
; %bb.24:
	mov	w0, #1
	b	LBB0_27
LBB0_25:
Lloh18:
	adrp	x0, l_.str.6@PAGE
Lloh19:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_log_err
LBB0_26:
	mov	w0, #0
LBB0_27:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTH_HTTPS_PORT,4,2            ; @AUTH_HTTPS_PORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"http://"

	.comm	_AUTH_HTTP_PORT,4,2             ; @AUTH_HTTP_PORT
l_.str.1:                               ; @.str.1
	.asciz	"https://"

l_.str.2:                               ; @.str.2
	.asciz	"://"

l_.str.3:                               ; @.str.3
	.asciz	"protocol %s:// not supported (for url %s)"

l_.str.4:                               ; @.str.4
	.space	1

l_.str.5:                               ; @.str.5
	.asciz	"index.html"

l_.str.6:                               ; @.str.6
	.asciz	"malloc failure"

	.no_dead_strip	_parse_url
.subsections_via_symbols
