	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_khttp_parse_url                ## -- Begin function khttp_parse_url
	.p2align	4, 0x90
_khttp_parse_url:                       ## @khttp_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	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$7, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_20
LBB0_2:
	leaq	7(%r14), %r15
	movl	$1, %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15), %eax
	testb	%al, %al
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$47, %al
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	incl	%ebx
	jmp	LBB0_3
LBB0_6:
	leal	-1(%rbx), %r13d
	movl	$1, %edi
	movl	$56, %esi
	callq	_calloc
	movq	%rax, %r12
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, (%r12)
	movq	%rax, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_strncpy
	movq	(%r12), %rax
	movslq	%r13d, %rcx
	movb	$0, (%rax,%rcx)
	movq	(%r12), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	testb	%al, %al
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpb	$58, %al
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	jmp	LBB0_7
LBB0_10:
	movb	$0, (%rbx)
	incq	%rbx
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r13
	leaq	L_.str(%rip), %rsi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_strncmp
	leaq	7(%r13), %rdi
	testl	%eax, %eax
	cmovneq	%r13, %rdi
	callq	_strdup
	movq	%rax, 8(%r12)
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	incq	%rax
	movzbl	-1(%rax), %ecx
	testb	%cl, %cl
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpb	$58, %cl
	jne	LBB0_14
## %bb.16:
	movb	$0, -1(%rax)
	cmpb	$0, (%rax)
	leaq	L_.str.2(%rip), %rdi
	cmovneq	%rax, %rdi
	jmp	LBB0_18
LBB0_12:
	movq	(%r12), %rdi
	callq	_strdup
	movq	%rax, 8(%r12)
	cmpb	$0, (%rbx)
	leaq	L_.str.2(%rip), %rdi
	cmovneq	%rbx, %rdi
	callq	_strdup
	movq	%rax, 48(%r12)
	cmpb	$0, (%r15)
	leaq	L_.str.3(%rip), %r14
	cmovneq	%r15, %r14
	jmp	LBB0_19
LBB0_17:
	leaq	L_.str.2(%rip), %rdi
LBB0_18:
	callq	_strdup
	movq	%rax, 48(%r12)
LBB0_19:
	movq	%r14, %rdi
	callq	_strdup
	movq	%rax, 40(%r12)
	movq	_KNF_TYPE_HTTP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	$-1, 16(%r12)
	movq	$0, 24(%r12)
LBB0_20:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"http://"

L_.str.1:                               ## @.str.1
	.asciz	"http_proxy"

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

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

	.comm	_KNF_TYPE_HTTP,4,2              ## @KNF_TYPE_HTTP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_khttp_parse_url                ; -- Begin function khttp_parse_url
	.p2align	2
_khttp_parse_url:                       ; @khttp_parse_url
	.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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #7
	bl	_strncmp
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, #0
	b	LBB0_18
LBB0_2:
	add	x21, x19, #7
	mov	w23, #7
	ldrb	w8, [x19, x23]
	cbz	w8, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #47
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrb	w8, [x19, x23]
	cbnz	w8, LBB0_3
LBB0_5:
	sub	x22, x23, #7
	mov	w0, #1
	mov	w1, #56
	bl	_calloc
	mov	x20, x0
	sub	w0, w23, #6
	mov	w1, #1
	bl	_calloc
	str	x0, [x20]
	mov	x1, x21
	mov	x2, x22
	bl	_strncpy
	ldr	x8, [x20]
	strb	wzr, [x8, w22, sxtw]
	ldr	x24, [x20]
	add	x22, x19, x23
	ldrb	w8, [x24]
	cbz	w8, LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #58
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	ldrb	w8, [x24]
	cbnz	w8, LBB0_6
	b	LBB0_9
LBB0_8:
	strb	wzr, [x24], #1
LBB0_9:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_14
; %bb.10:
	mov	x21, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w22, #7
	mov	w2, #7
	bl	_strncmp
	cmp	w0, #0
	csel	x8, x22, xzr, eq
	add	x0, x21, x8
	bl	_strdup
	str	x0, [x20, #8]
	add	x8, x0, #1
	ldurb	w9, [x8, #-1]
	cbz	w9, LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	w9, #58
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, #1
	ldurb	w9, [x8, #-1]
	cbnz	w9, LBB0_11
LBB0_13:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_14:
	ldr	x0, [x20]
	bl	_strdup
	str	x0, [x20, #8]
	ldrb	w8, [x24]
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x0, x9, x24, eq
	bl	_strdup
	str	x0, [x20, #48]
	ldrb	w8, [x22]
Lloh10:
	adrp	x9, l_.str.3@PAGE
Lloh11:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w8, #0
	csel	x19, x9, x22, eq
	b	LBB0_17
LBB0_15:
	sturb	wzr, [x8, #-1]
	ldrb	w9, [x8]
Lloh12:
	adrp	x10, l_.str.2@PAGE
Lloh13:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w9, #0
	csel	x0, x10, x8, eq
LBB0_16:
	bl	_strdup
	str	x0, [x20, #48]
LBB0_17:
	mov	x0, x19
	bl	_strdup
Lloh14:
	adrp	x8, _KNF_TYPE_HTTP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KNF_TYPE_HTTP@GOTPAGEOFF]
	str	x0, [x20, #40]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x20, #16]
	str	xzr, [x20, #24]
LBB0_18:
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"http://"

l_.str.1:                               ; @.str.1
	.asciz	"http_proxy"

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

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

	.comm	_KNF_TYPE_HTTP,4,2              ; @KNF_TYPE_HTTP
.subsections_via_symbols
