	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vbva_buffer_begin_update       ## -- Begin function vbva_buffer_begin_update
	.p2align	4, 0x90
_vbva_buffer_begin_update:              ## @vbva_buffer_begin_update
	.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	8(%rdi), %rax
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	_VBVA_F_MODE_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rax)
	je	LBB0_8
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	$1, %edi
	cmpq	$0, 16(%rbx)
	jne	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setne	%dil
LBB0_4:
	callq	_WARN_ON
	movq	8(%rbx), %rcx
	movl	(%rcx), %eax
	movl	4(%rcx), %esi
	incl	%eax
	movq	_VBVA_MAX_RECORDS@GOTPCREL(%rip), %rdi
	cltd
	idivl	(%rdi)
	movl	%edx, %r12d
	cmpl	%esi, %edx
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_vbva_buffer_flush
	movq	8(%rbx), %rcx
	movl	4(%rcx), %esi
LBB0_6:
	cmpl	%esi, %r12d
	je	LBB0_8
## %bb.7:
	movq	8(%rcx), %rax
	movslq	(%rcx), %rdx
	leaq	(%rax,%rdx,4), %rsi
	movq	_VBVA_F_RECORD_PARTIAL@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	movl	%edi, (%rax,%rdx,4)
	movl	%r12d, (%rcx)
	movq	%rsi, (%rbx)
	movl	$1, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VBVA_F_MODE_ENABLED,4,2        ## @VBVA_F_MODE_ENABLED
	.comm	_VBVA_MAX_RECORDS,4,2           ## @VBVA_MAX_RECORDS
	.comm	_VBVA_F_RECORD_PARTIAL,4,2      ## @VBVA_F_RECORD_PARTIAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vbva_buffer_begin_update       ; -- Begin function vbva_buffer_begin_update
	.p2align	2
_vbva_buffer_begin_update:              ; @vbva_buffer_begin_update
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	w8, [x8, #16]
Lloh0:
	adrp	x9, _VBVA_F_MODE_ENABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VBVA_F_MODE_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.2:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, ne
LBB0_5:
	bl	_WARN_ON
	ldr	x8, [x19, #8]
	ldp	w10, w9, [x8]
	add	w10, w10, #1
Lloh3:
	adrp	x11, _VBVA_MAX_RECORDS@GOTPAGE
Lloh4:
	ldr	x11, [x11, _VBVA_MAX_RECORDS@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	sdiv	w12, w10, w11
	msub	w21, w12, w11, w10
	cmp	w21, w9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_vbva_buffer_flush
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #4]
LBB0_7:
	cmp	w21, w9
	b.ne	LBB0_10
LBB0_8:
	mov	w0, #0
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
LBB0_10:
	ldr	x9, [x8, #8]
	ldrsw	x10, [x8]
Lloh6:
	adrp	x11, _VBVA_F_RECORD_PARTIAL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _VBVA_F_RECORD_PARTIAL@GOTPAGEOFF]
	add	x9, x9, x10, lsl #2
Lloh8:
	ldr	w10, [x11]
	str	w10, [x9]
	str	w21, [x8]
	str	x9, [x19]
	mov	w0, #1
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VBVA_F_MODE_ENABLED,4,2        ; @VBVA_F_MODE_ENABLED
	.comm	_VBVA_MAX_RECORDS,4,2           ; @VBVA_MAX_RECORDS
	.comm	_VBVA_F_RECORD_PARTIAL,4,2      ; @VBVA_F_RECORD_PARTIAL
.subsections_via_symbols
