	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_read_http_request           ## -- Begin function ws_read_http_request
	.p2align	4, 0x90
_ws_read_http_request:                  ## @ws_read_http_request
	.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, %rbx
	movq	8(%rdi), %r14
	movq	24(%r14), %rax
	movq	(%rax), %r15
	movq	8(%rax), %rdx
	subq	%r15, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strnstr
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	cmpq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jae	LBB0_8
## %bb.4:
	movq	%r12, %rax
	subq	%r15, %rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$32, (%r15)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	decq	%rax
	jne	LBB0_5
## %bb.7:
	movq	%r12, %r15
LBB0_8:
	movq	%r15, %rbx
	cmpq	%r12, %r15
	jae	LBB0_13
## %bb.9:
	leaq	(%r15,%r12), %rax
	subq	%r15, %rax
	movq	%r12, %rcx
	subq	%r15, %rcx
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$32, (%rbx)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	decq	%rcx
	jne	LBB0_10
## %bb.12:
	movq	%rax, %rbx
LBB0_13:
	cmpq	%rbx, %r15
	jae	LBB0_14
## %bb.15:
	movl	%ebx, %esi
	subl	%r15d, %esi
	movq	%r15, %rdi
	callq	_strndup
	movq	%rax, %r15
	cmpq	%r12, %rbx
	jb	LBB0_17
	jmp	LBB0_21
LBB0_1:
	movq	(%rbx), %rax
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	jmp	LBB0_2
LBB0_14:
	xorl	%r15d, %r15d
	cmpq	%r12, %rbx
	jae	LBB0_21
LBB0_17:
	movq	%r12, %rax
	subq	%rbx, %rax
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$32, (%rbx)
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	decq	%rax
	jne	LBB0_18
## %bb.20:
	movq	%r12, %rbx
LBB0_21:
	movq	%rbx, %r13
	cmpq	%r12, %rbx
	jae	LBB0_26
## %bb.22:
	leaq	(%rbx,%r12), %rax
	subq	%rbx, %rax
	movq	%r12, %rcx
	subq	%rbx, %rcx
	movq	%rbx, %r13
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$32, (%r13)
	je	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	incq	%r13
	decq	%rcx
	jne	LBB0_23
## %bb.25:
	movq	%rax, %r13
LBB0_26:
	cmpq	%r13, %rbx
	jae	LBB0_27
## %bb.28:
	movl	%r13d, %esi
	subl	%ebx, %esi
	movq	%rbx, %rdi
	callq	_strndup
	movq	%rax, %rbx
	cmpq	%r12, %r13
	jb	LBB0_30
	jmp	LBB0_34
LBB0_27:
	xorl	%ebx, %ebx
	cmpq	%r12, %r13
	jae	LBB0_34
LBB0_30:
	movq	%r12, %rax
	subq	%r13, %rax
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$32, (%r13)
	jne	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	incq	%r13
	decq	%rax
	jne	LBB0_31
## %bb.33:
	movq	%r12, %r13
LBB0_34:
	movq	%r13, %rsi
	cmpq	%r12, %r13
	jae	LBB0_39
## %bb.35:
	leaq	(%r12,%r13), %rax
	subq	%r13, %rax
	movq	%r12, %rcx
	subq	%r13, %rcx
	movq	%r13, %rsi
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$32, (%rsi)
	je	LBB0_39
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	incq	%rsi
	decq	%rcx
	jne	LBB0_36
## %bb.38:
	movq	%rax, %rsi
LBB0_39:
	cmpq	%rsi, %r13
	jae	LBB0_40
## %bb.41:
	subl	%r13d, %esi
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_strndup
	movq	%r15, (%r14)
	movq	%rbx, 8(%r14)
	movq	%rax, 16(%r14)
	movq	24(%r14), %rcx
	movq	%r12, (%rcx)
	testq	%rax, %rax
	je	LBB0_42
## %bb.43:
	movq	_WS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	movq	%r15, (%r14)
	movq	%rbx, 8(%r14)
	movq	$0, 16(%r14)
	movq	24(%r14), %rax
	movq	%r12, (%rax)
LBB0_42:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\r\n"

L_.str.1:                               ## @.str.1
	.asciz	"Missing \\r\\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid HTTP header"

	.comm	_WS_SUCCESS,4,2                 ## @WS_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_read_http_request           ; -- Begin function ws_read_http_request
	.p2align	2
_ws_read_http_request:                  ; @ws_read_http_request
	.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
	ldr	x24, [x0, #8]
	ldr	x8, [x24, #24]
	ldp	x21, x8, [x8]
	sub	x2, x8, x21
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strnstr
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	cmp	x21, x0
	b.hs	LBB0_6
; %bb.2:
	sub	x8, x20, x21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x21]
	cmp	w9, #32
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	subs	x8, x8, #1
	b.ne	LBB0_3
; %bb.5:
	mov	x21, x20
LBB0_6:
	mov	x23, x21
	cmp	x21, x20
	b.hs	LBB0_11
; %bb.7:
	add	x8, x21, x20
	sub	x8, x8, x21
	sub	x9, x20, x21
	mov	x23, x21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x23]
	cmp	w10, #32
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	subs	x9, x9, #1
	b.ne	LBB0_8
; %bb.10:
	mov	x23, x8
LBB0_11:
	cmp	x21, x23
	b.hs	LBB0_14
; %bb.12:
	sub	w1, w23, w21
	mov	x0, x21
	bl	_strndup
	mov	x21, x0
	cmp	x23, x20
	b.lo	LBB0_15
	b	LBB0_19
LBB0_13:
	ldr	x2, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_41
LBB0_14:
	mov	x21, #0
	cmp	x23, x20
	b.hs	LBB0_19
LBB0_15:
	sub	x8, x20, x23
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x23]
	cmp	w9, #32
	b.ne	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x23, x23, #1
	subs	x8, x8, #1
	b.ne	LBB0_16
; %bb.18:
	mov	x23, x20
LBB0_19:
	mov	x22, x23
	cmp	x23, x20
	b.hs	LBB0_24
; %bb.20:
	add	x8, x23, x20
	sub	x8, x8, x23
	sub	x9, x20, x23
	mov	x22, x23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x22]
	cmp	w10, #32
	b.eq	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	add	x22, x22, #1
	subs	x9, x9, #1
	b.ne	LBB0_21
; %bb.23:
	mov	x22, x8
LBB0_24:
	cmp	x23, x22
	b.hs	LBB0_26
; %bb.25:
	sub	w1, w22, w23
	mov	x0, x23
	bl	_strndup
	mov	x23, x0
	cmp	x22, x20
	b.lo	LBB0_27
	b	LBB0_31
LBB0_26:
	mov	x23, #0
	cmp	x22, x20
	b.hs	LBB0_31
LBB0_27:
	sub	x8, x20, x22
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x22]
	cmp	w9, #32
	b.ne	LBB0_31
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	add	x22, x22, #1
	subs	x8, x8, #1
	b.ne	LBB0_28
; %bb.30:
	mov	x22, x20
LBB0_31:
	mov	x8, x22
	cmp	x22, x20
	b.hs	LBB0_36
; %bb.32:
	add	x8, x22, x20
	sub	x9, x8, x22
	sub	x10, x20, x22
	mov	x8, x22
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x8]
	cmp	w11, #32
	b.eq	LBB0_36
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	add	x8, x8, #1
	subs	x10, x10, #1
	b.ne	LBB0_33
; %bb.35:
	mov	x8, x9
LBB0_36:
	cmp	x22, x8
	b.hs	LBB0_39
; %bb.37:
	sub	w1, w8, w22
	mov	x0, x22
	bl	_strndup
	stp	x21, x23, [x24]
	str	x0, [x24, #16]
	ldr	x8, [x24, #24]
	str	x20, [x8]
	cbz	x0, LBB0_40
; %bb.38:
Lloh4:
	adrp	x8, _WS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WS_SUCCESS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	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
LBB0_39:
	stp	x21, x23, [x24]
	str	xzr, [x24, #16]
	ldr	x8, [x24, #24]
	str	x20, [x8]
LBB0_40:
	ldr	x2, [x19]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_41:
	mov	x0, x19
	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
	br	x2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"Missing \\r\\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid HTTP header"

	.comm	_WS_SUCCESS,4,2                 ; @WS_SUCCESS
.subsections_via_symbols
