	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtls1_buffer_record            ## -- Begin function dtls1_buffer_record
	.p2align	4, 0x90
_dtls1_buffer_record:                   ## @dtls1_buffer_record
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rsi), %edi
	callq	_pqueue_size
	xorl	%ebx, %ebx
	cmpl	$99, %eax
	jg	LBB0_13
## %bb.1:
	movl	$40, %edi
	callq	_OPENSSL_malloc
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_pitem_new
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_10
## %bb.2:
	testq	%r14, %r14
	je	LBB0_10
## %bb.3:
	movq	16(%r13), %rax
	movq	%rax, 32(%r15)
	leaq	8(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	%rax, 24(%r15)
	leaq	4(%r13), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_memcpy
	leaq	16(%r15), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%r15, (%r14)
	movq	%r13, %rdi
	callq	_SSL_get_rbio
	movl	%eax, %edi
	callq	_BIO_dgram_is_sctp
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%r13, %rdi
	callq	_SSL_get_state
	movq	_TLS_ST_SR_FINISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_SSL_get_state
	movq	_TLS_ST_CR_FINISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_6:
	movq	%r13, %rdi
	callq	_SSL_get_rbio
	movq	_BIO_CTRL_DGRAM_SCTP_GET_RCVINFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rcx
	addq	$8, %rcx
	movl	%eax, %edi
	movl	$4, %edx
	callq	_BIO_ctrl
LBB0_7:
	xorps	%xmm0, %xmm0
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movups	%xmm0, (%rax)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r13, %rdi
	callq	_ssl3_setup_buffers
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_pqueue_insert
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.9:
	movq	(%r15), %rdi
	callq	_OPENSSL_free
	movq	%r15, %rdi
	callq	_OPENSSL_free
	movq	%r14, %rdi
	callq	_pitem_free
	jmp	LBB0_13
LBB0_10:
	movq	%r15, %rdi
	callq	_OPENSSL_free
	movq	%r14, %rdi
	callq	_pitem_free
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_DTLS1_BUFFER_RECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_SSLfatal
	jmp	LBB0_12
LBB0_11:
	movq	(%r15), %rdi
	callq	_OPENSSL_free
	movq	%r15, %rdi
	callq	_OPENSSL_free
	movq	%r14, %rdi
	callq	_pitem_free
LBB0_12:
	movl	$-1, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_DTLS1_BUFFER_RECORD,4,2  ## @SSL_F_DTLS1_BUFFER_RECORD
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.comm	_TLS_ST_SR_FINISHED,8,3         ## @TLS_ST_SR_FINISHED
	.comm	_TLS_ST_CR_FINISHED,8,3         ## @TLS_ST_CR_FINISHED
	.comm	_BIO_CTRL_DGRAM_SCTP_GET_RCVINFO,4,2 ## @BIO_CTRL_DGRAM_SCTP_GET_RCVINFO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtls1_buffer_record            ; -- Begin function dtls1_buffer_record
	.p2align	2
_dtls1_buffer_record:                   ; @dtls1_buffer_record
	.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, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x1]
	bl	_pqueue_size
	cmp	w0, #99
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_15
LBB0_2:
	mov	w0, #40
	bl	_OPENSSL_malloc
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_pitem_new
	mov	x19, x0
	cbz	x20, LBB0_12
; %bb.3:
	cbz	x19, LBB0_12
; %bb.4:
	ldr	x8, [x21, #16]
	mov	x24, x21
	ldr	x9, [x24, #8]!
	stp	x9, x8, [x20, #24]
	add	x23, x21, #4
	mov	x0, x20
	mov	x1, x23
	mov	w2, #4
	bl	_memcpy
	add	x0, x20, #16
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	str	x20, [x19]
	mov	x0, x21
	bl	_SSL_get_rbio
	bl	_BIO_dgram_is_sctp
	cbz	x0, LBB0_8
; %bb.5:
	mov	x0, x21
	bl	_SSL_get_state
Lloh0:
	adrp	x8, _TLS_ST_SR_FINISHED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_ST_SR_FINISHED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_SSL_get_state
Lloh3:
	adrp	x8, _TLS_ST_CR_FINISHED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TLS_ST_CR_FINISHED@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
LBB0_7:
	mov	x0, x21
	bl	_SSL_get_rbio
Lloh6:
	adrp	x8, _BIO_CTRL_DGRAM_SCTP_GET_RCVINFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BIO_CTRL_DGRAM_SCTP_GET_RCVINFO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, x20, #8
	mov	w2, #4
	bl	_BIO_ctrl
LBB0_8:
	stp	xzr, xzr, [x24]
	mov	x0, x23
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x21
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x21
	bl	_ssl3_setup_buffers
	cbz	w0, LBB0_13
; %bb.9:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_pqueue_insert
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	x0, [x20]
	bl	_OPENSSL_free
	mov	x0, x20
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_pitem_free
LBB0_11:
	mov	w0, #1
	b	LBB0_15
LBB0_12:
	mov	x0, x20
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_pitem_free
Lloh9:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SSL_F_DTLS1_BUFFER_RECORD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSL_F_DTLS1_BUFFER_RECORD@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_SSLfatal
	b	LBB0_14
LBB0_13:
	ldr	x0, [x20]
	bl	_OPENSSL_free
	mov	x0, x20
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_pitem_free
LBB0_14:
	mov	w0, #-1
LBB0_15:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_DTLS1_BUFFER_RECORD,4,2  ; @SSL_F_DTLS1_BUFFER_RECORD
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.comm	_TLS_ST_SR_FINISHED,8,3         ; @TLS_ST_SR_FINISHED
	.comm	_TLS_ST_CR_FINISHED,8,3         ; @TLS_ST_CR_FINISHED
	.comm	_BIO_CTRL_DGRAM_SCTP_GET_RCVINFO,4,2 ; @BIO_CTRL_DGRAM_SCTP_GET_RCVINFO
.subsections_via_symbols
