	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_host_arg
_parse_host_arg:                        ## @parse_host_arg
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	testl	%edx, %edx
	jle	LBB0_11
## %bb.1:
	cmpb	$0, (%rbx)
	je	LBB0_11
## %bb.2:
	movq	%rdi, %r14
	movslq	%edx, %r13
	addq	%rbx, %r13
	movl	$1, (%rdi)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	$5, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	cmpq	%r13, %rbx
	jb	LBB0_9
	jmp	LBB0_11
LBB0_3:
	leaq	5(%rbx), %r15
	movq	%r15, %rdi
	callq	_strlen
	movl	%eax, %r12d
	incl	%r12d
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_loginfo
	cmpb	$0, 5(%rbx)
	je	LBB0_7
## %bb.4:
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_parse_host_and_port
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	leaq	20(%r14), %rdi
	callq	_sanitize_client
LBB0_6:
	leaq	16(%r14), %rdi
	movq	-56(%rbp), %rsi
	callq	_canonicalize_client
	movq	$0, 8(%r14)
LBB0_7:
	movslq	%r12d, %rax
	addq	%rax, %r15
	movq	%r15, %rbx
	cmpq	%r13, %rbx
	jae	LBB0_11
LBB0_9:
	cmpb	$0, (%rbx)
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	callq	_die
LBB0_11:
	movq	%rbx, %rax
	addq	$24, %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	"host="

L_.str.1:                               ## @.str.1
	.asciz	"Extended attribute \"host\": %s"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid request"

	.no_dead_strip	_parse_host_arg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_host_arg
_parse_host_arg:                        ; @parse_host_arg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	cmp	w2, #1
	b.lt	LBB0_11
; %bb.1:
	ldrb	w8, [x19]
	cbz	w8, LBB0_11
; %bb.2:
	mov	x20, x0
	add	x22, x19, w2, sxtw
	mov	w8, #1
	str	w8, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	w2, #5
	bl	_strncasecmp
	cbz	x0, LBB0_4
; %bb.3:
	cmp	x19, x22
	b.lo	LBB0_9
	b	LBB0_11
LBB0_4:
	add	x21, x19, #5
	mov	x0, x21
	bl	_strlen
	add	w23, w0, #1
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_loginfo
	ldrb	w8, [x19, #5]
	cbz	w8, LBB0_8
; %bb.5:
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x21
	bl	_parse_host_and_port
	ldr	x1, [sp]
	cbz	x1, LBB0_7
; %bb.6:
	add	x0, x20, #20
	bl	_sanitize_client
LBB0_7:
	add	x0, x20, #16
	ldr	x1, [sp, #8]
	bl	_canonicalize_client
	str	xzr, [x20, #8]
LBB0_8:
	add	x19, x21, w23, sxtw
	cmp	x19, x22
	b.hs	LBB0_11
LBB0_9:
	ldrb	w8, [x19]
	cbz	w8, LBB0_11
; %bb.10:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_11:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"host="

l_.str.1:                               ; @.str.1
	.asciz	"Extended attribute \"host\": %s"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid request"

	.no_dead_strip	_parse_host_arg
.subsections_via_symbols
