	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BUF_MEM_grow                   ## -- Begin function BUF_MEM_grow
	.p2align	4, 0x90
_BUF_MEM_grow:                          ## @BUF_MEM_grow
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	cmpq	%rsi, %rax
	jae	LBB0_12
## %bb.1:
	cmpq	%rbx, 8(%r14)
	jae	LBB0_2
## %bb.4:
	movq	_LIMIT_BEFORE_EXPANSION@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jb	LBB0_5
## %bb.6:
	leaq	3(%rbx), %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	movq	%rdx, %r15
	addq	%rdx, %r15
	andq	$-4, %r15
	movq	_BUF_MEM_FLAG_SECURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r14)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sec_alloc_realloc
	testq	%rax, %rax
	je	LBB0_5
LBB0_10:
	movq	%rax, 16(%r14)
	movq	%r15, 8(%r14)
	movq	(%r14), %rcx
	addq	%rcx, %rax
	movq	%rbx, %rdx
	subq	%rcx, %rdx
	movq	%rax, %rdi
	jmp	LBB0_11
LBB0_2:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.3:
	addq	%rax, %rdi
	movq	%rbx, %rdx
	subq	%rax, %rdx
LBB0_11:
	xorl	%esi, %esi
	callq	_memset
LBB0_12:
	movq	%rbx, (%r14)
LBB0_13:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	16(%r14), %rdi
	movq	%r15, %rsi
	callq	_OPENSSL_realloc
	testq	%rax, %rax
	jne	LBB0_10
LBB0_5:
	movq	_BUF_F_BUF_MEM_GROW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BUFerr
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_LIMIT_BEFORE_EXPANSION,8,3     ## @LIMIT_BEFORE_EXPANSION
	.comm	_BUF_F_BUF_MEM_GROW,4,2         ## @BUF_F_BUF_MEM_GROW
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_BUF_MEM_FLAG_SECURE,4,2        ## @BUF_MEM_FLAG_SECURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BUF_MEM_grow                   ; -- Begin function BUF_MEM_grow
	.p2align	2
_BUF_MEM_grow:                          ; @BUF_MEM_grow
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
	cmp	x8, x1
	b.hs	LBB0_9
; %bb.1:
	ldr	x9, [x20, #8]
	cmp	x9, x19
	b.hs	LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _LIMIT_BEFORE_EXPANSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIMIT_BEFORE_EXPANSION@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.lo	LBB0_12
; %bb.3:
	add	x8, x19, #3
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsl	x8, x8, #1
	and	x21, x8, #0xfffffffffffffffc
	ldr	w8, [x20, #24]
Lloh3:
	adrp	x9, _BUF_MEM_FLAG_SECURE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BUF_MEM_FLAG_SECURE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	bl	_sec_alloc_realloc
	cbz	x0, LBB0_12
LBB0_5:
	stp	x21, x0, [x20, #8]
	ldr	x8, [x20]
	add	x0, x0, x8
	b	LBB0_8
LBB0_6:
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_9
; %bb.7:
	add	x0, x9, x8
LBB0_8:
	sub	x2, x19, x8
	mov	w1, #0
	bl	_memset
LBB0_9:
	str	x19, [x20]
LBB0_10:
	mov	x0, x19
	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
LBB0_11:
	ldr	x0, [x20, #16]
	mov	x1, x21
	bl	_OPENSSL_realloc
	cbnz	x0, LBB0_5
LBB0_12:
Lloh6:
	adrp	x8, _BUF_F_BUF_MEM_GROW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BUF_F_BUF_MEM_GROW@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_BUFerr
	mov	x19, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LIMIT_BEFORE_EXPANSION,8,3     ; @LIMIT_BEFORE_EXPANSION
	.comm	_BUF_F_BUF_MEM_GROW,4,2         ; @BUF_F_BUF_MEM_GROW
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_BUF_MEM_FLAG_SECURE,4,2        ; @BUF_MEM_FLAG_SECURE
.subsections_via_symbols
