	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ws_get_frm_header
_ws_get_frm_header:                     ## @ws_get_frm_header
	.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, %r15
	movl	$0, -44(%rbp)
	movq	(%rdi), %rsi
	testq	%rsi, %rsi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_new_wsframe
	movq	%rax, %rsi
	movq	%rax, (%r15)
LBB0_2:
	movl	(%rsi), %edx
	xorl	%ebx, %ebx
	cmpl	$1, %edx
	jg	LBB0_5
## %bb.3:
	movl	$2, %ebx
	subl	%edx, %ebx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_ws_read_header
	testl	%eax, %eax
	jle	LBB0_22
## %bb.4:
	cmpl	%ebx, %eax
	jne	LBB0_23
LBB0_5:
	movq	%r15, %rdi
	callq	_ws_set_front_header_fields
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	jmp	LBB0_22
LBB0_7:
	movq	(%r15), %rax
	movl	32(%rax), %edi
	leaq	-44(%rbp), %rsi
	callq	_ws_set_extended_header_size
	movq	(%r15), %rsi
	movl	(%rsi), %edx
	movl	-44(%rbp), %r13d
	movl	%r13d, %r12d
	subl	%edx, %r12d
	addl	$2, %r12d
	testl	%r12d, %r12d
	jle	LBB0_8
## %bb.9:
	movq	%r15, %rdi
	movl	%r12d, %ecx
	callq	_ws_read_header
	testl	%eax, %eax
	jle	LBB0_22
## %bb.10:
	cmpl	%r12d, %eax
	jne	LBB0_24
## %bb.11:
	movl	-44(%rbp), %r13d
	movq	(%r15), %rsi
	movl	(%rsi), %edx
	jmp	LBB0_12
LBB0_23:
	movq	_WS_READING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ws_set_status                  ## TAILCALL
LBB0_8:
	movl	%ebx, %r12d
LBB0_12:
	addl	$6, %r13d
	movl	%r13d, %r14d
	subl	%edx, %r14d
	jle	LBB0_13
## %bb.14:
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_ws_read_header
	testl	%eax, %eax
	jle	LBB0_22
## %bb.15:
	cmpl	%r14d, %eax
	jne	LBB0_24
## %bb.16:
	movq	(%r15), %rsi
	jmp	LBB0_17
LBB0_24:
	movq	_WS_READING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	jmp	LBB0_21
LBB0_13:
	movl	%r12d, %r14d
LBB0_17:
	movl	32(%rsi), %eax
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_ws_set_payloadlen
	movq	(%r15), %rdi
	movl	32(%rdi), %esi
	callq	_ws_set_masking_key
	movq	(%r15), %rax
	movq	8(%rax), %rcx
	movq	_wsconfig@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jle	LBB0_19
## %bb.18:
	movq	_WS_CLOSE_TOO_LARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_ws_error
	movq	_WS_ERR@GOTPCREL(%rip), %rax
	movq	_WS_CLOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	jmp	LBB0_20
LBB0_19:
	movl	$0, (%rax)
	movq	$0, 24(%rax)
	movl	%r13d, 16(%rax)
	movq	_WS_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_20:
	movq	%r15, %rdi
	movl	%r14d, %edx
LBB0_21:
	callq	_ws_set_status
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WS_READING,4,2                 ## @WS_READING
	.comm	_wsconfig,8,3                   ## @wsconfig
	.comm	_WS_CLOSE_TOO_LARGE,4,2         ## @WS_CLOSE_TOO_LARGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Frame is too big"

	.comm	_WS_ERR,4,2                     ## @WS_ERR
	.comm	_WS_CLOSE,4,2                   ## @WS_CLOSE
	.comm	_WS_OK,4,2                      ## @WS_OK
	.no_dead_strip	_ws_get_frm_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ws_get_frm_header
_ws_get_frm_header:                     ; @ws_get_frm_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	x1, [x0]
	cbnz	x1, LBB0_2
; %bb.1:
	bl	_new_wsframe
	mov	x1, x0
	str	x0, [x19]
LBB0_2:
	ldr	w2, [x1]
	cmp	w2, #1
	b.gt	LBB0_6
; %bb.3:
	mov	w8, #2
	sub	w21, w8, w2
	mov	x0, x19
	mov	x3, x21
	bl	_ws_read_header
	mov	x2, x0
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.4:
	cmp	w2, w21
	b.eq	LBB0_7
; %bb.5:
Lloh0:
	adrp	x8, _WS_READING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WS_READING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	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
	add	sp, sp, #64
	b	_ws_set_status
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x19
	bl	_ws_set_front_header_fields
	cbz	x0, LBB0_9
; %bb.8:
	mov	x2, x21
	b	LBB0_24
LBB0_9:
	ldr	x8, [x19]
	ldr	w0, [x8, #32]
	add	x1, sp, #12
	bl	_ws_set_extended_header_size
	ldr	x1, [x19]
	ldr	w2, [x1]
	ldr	w8, [sp, #12]
	sub	w9, w8, w2
	add	w20, w9, #2
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x0, x19
	mov	x3, x20
	bl	_ws_read_header
	mov	x2, x0
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.11:
	cmp	w2, w20
	b.ne	LBB0_17
; %bb.12:
	ldr	w8, [sp, #12]
	ldr	x1, [x19]
	ldr	w2, [x1]
	mov	x21, x20
LBB0_13:
	add	w22, w8, #6
	sub	w20, w22, w2
	cmp	w20, #1
	b.lt	LBB0_18
; %bb.14:
	mov	x0, x19
	mov	x3, x20
	bl	_ws_read_header
	mov	x2, x0
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.15:
	cmp	w2, w20
	b.ne	LBB0_17
; %bb.16:
	ldr	x1, [x19]
	b	LBB0_19
LBB0_17:
Lloh3:
	adrp	x8, _WS_READING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WS_READING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	b	LBB0_23
LBB0_18:
	mov	x20, x21
LBB0_19:
	ldr	w8, [x1, #32]
	mov	x0, x1
	mov	x1, x8
	bl	_ws_set_payloadlen
	ldr	x0, [x19]
	ldr	w1, [x0, #32]
	bl	_ws_set_masking_key
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
Lloh6:
	adrp	x10, _wsconfig@GOTPAGE
Lloh7:
	ldr	x10, [x10, _wsconfig@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.le	LBB0_21
; %bb.20:
Lloh9:
	adrp	x8, _WS_CLOSE_TOO_LARGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WS_CLOSE_TOO_LARGE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ws_error
Lloh14:
	adrp	x8, _WS_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WS_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _WS_CLOSE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WS_CLOSE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w9, w8
	b	LBB0_22
LBB0_21:
	str	wzr, [x8]
	str	xzr, [x8, #24]
	str	w22, [x8, #16]
Lloh20:
	adrp	x8, _WS_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WS_OK@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
LBB0_22:
	mov	x0, x19
	mov	x2, x20
LBB0_23:
	bl	_ws_set_status
	mov	x2, x0
LBB0_24:
	mov	x0, x2
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_WS_READING,4,2                 ; @WS_READING
	.comm	_wsconfig,8,3                   ; @wsconfig
	.comm	_WS_CLOSE_TOO_LARGE,4,2         ; @WS_CLOSE_TOO_LARGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Frame is too big"

	.comm	_WS_ERR,4,2                     ; @WS_ERR
	.comm	_WS_CLOSE,4,2                   ; @WS_CLOSE
	.comm	_WS_OK,4,2                      ; @WS_OK
	.no_dead_strip	_ws_get_frm_header
.subsections_via_symbols
