	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WPACKET_reserve_bytes          ## -- Begin function WPACKET_reserve_bytes
	.p2align	4, 0x90
_WPACKET_reserve_bytes:                 ## @WPACKET_reserve_bytes
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	cmpq	$0, 32(%rdi)
	setne	%al
	testq	%rsi, %rsi
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_ossl_assert
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %rcx
	movq	8(%rbx), %rax
	subq	%rax, %rcx
	cmpq	%r12, %rcx
	jb	LBB0_7
## %bb.2:
	cmpq	$0, 24(%rbx)
	jne	LBB0_5
## %bb.3:
	movq	16(%rbx), %rdi
	movq	(%rdi), %rcx
	movq	%rcx, %rdx
	subq	%rax, %rdx
	cmpq	%r12, %rdx
	jae	LBB0_5
## %bb.4:
	cmpq	%r12, %rcx
	cmovaq	%rcx, %r12
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rcx
	leaq	(%r12,%r12), %rdx
	movq	_DEFAULT_BUF_SIZE@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %rdx
	cmovaq	%rdx, %rsi
	cmpq	%rcx, %r12
	cmovaq	%rax, %rsi
	callq	_BUF_MEM_grow
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:
	movl	$1, %r15d
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_WPACKET_get_curr
	movq	%rax, (%r14)
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.comm	_DEFAULT_BUF_SIZE,8,3           ## @DEFAULT_BUF_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WPACKET_reserve_bytes          ; -- Begin function WPACKET_reserve_bytes
	.p2align	2
_WPACKET_reserve_bytes:                 ; @WPACKET_reserve_bytes
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0, #32]
	cmp	x1, #0
	ccmp	x8, #0, #4, ne
	cset	w0, ne
	bl	_ossl_assert
	cbz	w0, LBB0_9
; %bb.1:
	ldp	x9, x8, [x20]
	sub	x9, x9, x8
	cmp	x9, x21
	b.hs	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
	ldr	x9, [x20, #24]
	cbnz	x9, LBB0_6
; %bb.4:
	ldr	x0, [x20, #16]
	ldr	x9, [x0]
	sub	x8, x9, x8
	cmp	x8, x21
	b.hs	LBB0_6
; %bb.5:
	cmp	x9, x21
	csel	x8, x9, x21, hi
Lloh0:
	adrp	x9, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	cmp	w9, #0
	cinc	w10, w9, lt
	asr	w10, w10, #1
Lloh3:
	adrp	x11, _DEFAULT_BUF_SIZE@GOTPAGE
Lloh4:
	ldr	x11, [x11, _DEFAULT_BUF_SIZE@GOTPAGEOFF]
	lsl	x12, x8, #1
Lloh5:
	ldr	x11, [x11]
	cmp	x12, x11
	csel	x11, x12, x11, hi
	cmp	x8, w10, sxtw
	csel	x1, x9, x11, hi
	bl	_BUF_MEM_grow
	cbz	x0, LBB0_9
LBB0_6:
	cbz	x19, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_WPACKET_get_curr
	str	x0, [x19]
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.comm	_DEFAULT_BUF_SIZE,8,3           ; @DEFAULT_BUF_SIZE
.subsections_via_symbols
