	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl3_read_n                    ## -- Begin function ssl3_read_n
	.p2align	4, 0x90
_ssl3_read_n:                           ## @ssl3_read_n
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	testq	%rsi, %rsi
	je	LBB0_36
## %bb.1:
	movq	%r9, %r14
	movl	%r8d, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	cmpq	$0, 32(%rdi)
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	jne	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	callq	_ssl3_setup_read_buffer
	testl	%eax, %eax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_3
LBB0_4:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	40(%r15), %r14
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.5:
	movq	8(%r15), %rsi
	movq	16(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$1, %r12d
	je	LBB0_11
	jmp	LBB0_13
LBB0_6:
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	48(%r15), %rsi
	jmp	LBB0_9
LBB0_3:
	movl	$-1, %r13d
	jmp	LBB0_36
LBB0_8:
	movq	$0, 48(%r15)
	xorl	%esi, %esi
LBB0_9:
	movq	32(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	%rax, %rsi
	movq	%rsi, 8(%r15)
	movq	$0, 16(%r15)
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$1, %r12d
	jne	LBB0_13
LBB0_11:
	cmpq	-48(%rbp), %rsi                 ## 8-byte Folded Reload
	je	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rdx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_memmove
	movq	%r12, 8(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 48(%r15)
LBB0_13:
	movq	%r15, %rdi
	callq	_SSL_IS_DTLS
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	testq	%r14, %r14
	je	LBB0_36
LBB0_16:
	cmpq	%rbx, %r14
	movq	%rbx, %rax
	cmovbq	%r14, %rax
	testq	%r14, %r14
	cmovneq	%rax, %rbx
LBB0_17:
	movq	%r14, %rax
	subq	%rbx, %rax
	jae	LBB0_18
## %bb.19:
	movq	56(%r15), %rax
	subq	48(%r15), %rax
	cmpq	%rax, %rbx
	jbe	LBB0_21
## %bb.20:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL3_READ_N@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_SSLfatal
	movl	$-1, %r13d
	jmp	LBB0_36
LBB0_18:
	addq	%rbx, 16(%r15)
	movq	%rax, 40(%r15)
	addq	%rbx, 48(%r15)
LBB0_35:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movl	$1, %r13d
LBB0_36:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	64(%r15), %rdi
	callq	_BIO_get_ktls_recv
	testl	%eax, %eax
	jne	LBB0_24
## %bb.22:
	cmpl	$0, 24(%r15)
	jne	LBB0_24
## %bb.23:
	movq	%r15, %rdi
	callq	_SSL_IS_DTLS
	movq	%rbx, %r12
	testq	%rax, %rax
	je	LBB0_25
LBB0_24:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rbx
	cmovaq	%rbx, %rax
	movq	56(%r15), %r12
	subq	48(%r15), %r12
	cmpq	%r12, %rax
	cmovbq	%rax, %r12
LBB0_25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_clear_sys_error
	movq	64(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	_SSL_READING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rsi
	movq	%r12, %rdx
	subq	%r14, %rdx
	callq	_BIO_read
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_29
## %bb.33:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	%r13d, %eax
	addq	%rax, %r14
	movq	%r15, %rdi
	callq	_SSL_IS_DTLS
	cmpq	%r14, %rbx
	movq	%rbx, %rcx
	cmovaq	%r14, %rcx
	testq	%rax, %rax
	cmovneq	%rcx, %rbx
	movq	%r14, %rax
	subq	%rbx, %rax
	jb	LBB0_26
## %bb.34:
	addq	%rbx, 48(%r15)
	movq	%rax, 40(%r15)
	addq	%rbx, 16(%r15)
	movq	_SSL_NOTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	jmp	LBB0_35
LBB0_27:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL3_READ_N@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SSL_R_READ_BIO_NOT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_SSLfatal
	movl	$-1, %r13d
LBB0_29:
	movq	%r14, 40(%r15)
	movq	_SSL_MODE_RELEASE_BUFFERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_36
## %bb.30:
	movq	%r15, %rdi
	callq	_SSL_IS_DTLS
	testq	%rax, %rax
	jne	LBB0_36
## %bb.31:
	negq	%r14
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_36
## %bb.32:
	movq	%r15, %rdi
	callq	_ssl3_release_read_buffer
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL3_RT_HEADER_LENGTH,8,3      ## @SSL3_RT_HEADER_LENGTH
	.comm	_SSL3_RT_APPLICATION_DATA,1,0   ## @SSL3_RT_APPLICATION_DATA
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_SSL3_READ_N,4,2          ## @SSL_F_SSL3_READ_N
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.comm	_SSL_READING,4,2                ## @SSL_READING
	.comm	_SSL_R_READ_BIO_NOT_SET,4,2     ## @SSL_R_READ_BIO_NOT_SET
	.comm	_SSL_MODE_RELEASE_BUFFERS,4,2   ## @SSL_MODE_RELEASE_BUFFERS
	.comm	_SSL_NOTHING,4,2                ## @SSL_NOTHING
	.comm	_SSL3_ALIGN_PAYLOAD,4,2         ## @SSL3_ALIGN_PAYLOAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl3_read_n                    ; -- Begin function ssl3_read_n
	.p2align	2
_ssl3_read_n:                           ; @ssl3_read_n
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x1, LBB0_15
; %bb.1:
	mov	x20, x5
	mov	x25, x4
	mov	x24, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #32]
	cbnz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ssl3_setup_read_buffer
	cbz	w0, LBB0_7
LBB0_3:
	ldr	x26, [x19, #40]
	cbz	w24, LBB0_5
; %bb.4:
	ldr	x23, [x19, #32]
	ldp	x1, x27, [x19, #8]
	cmp	w25, #1
	b.eq	LBB0_10
	b	LBB0_12
LBB0_5:
	cbz	x26, LBB0_8
; %bb.6:
	ldr	x8, [x19, #48]
	b	LBB0_9
LBB0_7:
	mov	w22, #-1
	b	LBB0_22
LBB0_8:
	mov	x8, #0
	str	xzr, [x19, #48]
LBB0_9:
	mov	x27, #0
	ldr	x23, [x19, #32]
	add	x1, x23, x8
	stp	x1, xzr, [x19, #8]
	cmp	w25, #1
	b.ne	LBB0_12
LBB0_10:
	cmp	x1, x23
	b.eq	LBB0_12
; %bb.11:
	add	x2, x27, x26
	mov	x0, x23
	bl	_memmove
	str	x23, [x19, #8]
	str	x27, [x19, #48]
LBB0_12:
	mov	x0, x19
	bl	_SSL_IS_DTLS
	cbz	x0, LBB0_17
; %bb.13:
	cbz	w24, LBB0_16
; %bb.14:
	cbnz	x26, LBB0_16
LBB0_15:
	mov	w22, #0
	b	LBB0_22
LBB0_16:
	cmp	x26, x21
	ccmp	x26, #0, #4, lo
	csel	x21, x26, x21, ne
LBB0_17:
	subs	x8, x26, x21
	b.hs	LBB0_20
; %bb.18:
	ldp	x9, x8, [x19, #48]
	sub	x8, x8, x9
	cmp	x21, x8
	b.ls	LBB0_23
; %bb.19:
Lloh0:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SSL_F_SSL3_READ_N@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSL_F_SSL3_READ_N@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
	mov	w22, #-1
	b	LBB0_22
LBB0_20:
	ldr	x9, [x19, #16]
	add	x9, x9, x21
	str	x9, [x19, #16]
	ldr	x9, [x19, #48]
	add	x9, x9, x21
	stp	x8, x9, [x19, #40]
LBB0_21:
	str	x21, [x20]
	mov	w22, #1
LBB0_22:
	mov	x0, x22
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_23:
	ldr	x0, [x19, #64]
	bl	_BIO_get_ktls_recv
	cbnz	w0, LBB0_26
; %bb.24:
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_26
; %bb.25:
	mov	x0, x19
	bl	_SSL_IS_DTLS
	mov	x24, x21
	cbz	x0, LBB0_27
LBB0_26:
	cmp	x21, x22
	csel	x8, x21, x22, hi
	ldp	x10, x9, [x19, #48]
	sub	x9, x9, x10
	cmp	x8, x9
	csel	x24, x8, x9, lo
LBB0_27:
	add	x23, x23, x27
Lloh9:
	adrp	x25, _SSL_READING@GOTPAGE
Lloh10:
	ldr	x25, [x25, _SSL_READING@GOTPAGEOFF]
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	bl	_clear_sys_error
	ldr	x0, [x19, #64]
	cbz	x0, LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x25]
	str	w8, [x19, #4]
	add	x1, x23, x26
	sub	x2, x24, x26
	bl	_BIO_read
	mov	x22, x0
	cmp	w0, #0
	b.le	LBB0_33
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=1
	add	x26, x26, w22, uxtw
	mov	x0, x19
	bl	_SSL_IS_DTLS
	cmp	x21, x26
	ccmp	x0, #0, #4, hi
	csel	x21, x26, x21, ne
	subs	x8, x26, x21
	b.lo	LBB0_28
; %bb.31:
	ldr	x9, [x19, #48]
	add	x9, x9, x21
	stp	x8, x9, [x19, #40]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	str	x8, [x19, #16]
Lloh11:
	adrp	x8, _SSL_NOTHING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSL_NOTHING@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_21
LBB0_32:
Lloh14:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _SSL_F_SSL3_READ_N@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSL_F_SSL3_READ_N@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x8, _SSL_R_READ_BIO_NOT_SET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SSL_R_READ_BIO_NOT_SET@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
	mov	w22, #-1
LBB0_33:
	str	x26, [x19, #40]
	ldr	w8, [x19]
Lloh23:
	adrp	x9, _SSL_MODE_RELEASE_BUFFERS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SSL_MODE_RELEASE_BUFFERS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.34:
	mov	x0, x19
	bl	_SSL_IS_DTLS
	cbnz	x0, LBB0_22
; %bb.35:
	neg	x8, x26
	cmp	x27, x8
	b.ne	LBB0_22
; %bb.36:
	mov	x0, x19
	bl	_ssl3_release_read_buffer
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL3_RT_HEADER_LENGTH,8,3      ; @SSL3_RT_HEADER_LENGTH
	.comm	_SSL3_RT_APPLICATION_DATA,1,0   ; @SSL3_RT_APPLICATION_DATA
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_SSL3_READ_N,4,2          ; @SSL_F_SSL3_READ_N
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.comm	_SSL_READING,4,2                ; @SSL_READING
	.comm	_SSL_R_READ_BIO_NOT_SET,4,2     ; @SSL_R_READ_BIO_NOT_SET
	.comm	_SSL_MODE_RELEASE_BUFFERS,4,2   ; @SSL_MODE_RELEASE_BUFFERS
	.comm	_SSL_NOTHING,4,2                ; @SSL_NOTHING
	.comm	_SSL3_ALIGN_PAYLOAD,4,2         ; @SSL3_ALIGN_PAYLOAD
.subsections_via_symbols
