	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vbva_write                     ## -- Begin function vbva_write
	.p2align	4, 0x90
_vbva_write:                            ## @vbva_write
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r14
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	jne	LBB0_17
## %bb.2:
	movq	%rdx, %r15
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.3:
	movq	%rcx, %r12
	movq	_VBVA_F_RECORD_PARTIAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdx)
	je	LBB0_17
## %bb.4:
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_vbva_buffer_available
	movq	%rax, %r13
	movl	$1, %eax
	testq	%r12, %r12
	jle	LBB0_17
## %bb.5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r14), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_vbva_buffer_place_data_at
	movq	8(%r14), %rax
	addq	%rbx, %rax
	movq	16(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	cqto
	idivq	%rcx
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rdx, 8(%r14)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ebx, (%rax)
	subq	%rbx, %r13
	addq	%rbx, %r15
	subq	%rbx, %r12
	jle	LBB0_16
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, %r12
	jl	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_vbva_buffer_flush
	movq	%r14, %rdi
	callq	_vbva_buffer_available
	movq	%rax, %r13
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rbx
	cmpq	%r13, %r12
	jl	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edi, %edi
	cmpq	(%r14), %r13
	setle	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rbx
	subq	(%r14), %rbx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_15
LBB0_16:
	movl	$1, %eax
	jmp	LBB0_17
LBB0_10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_write                     ; -- Begin function vbva_write
	.p2align	2
_vbva_write:                            ; @vbva_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x23, [x0, #16]
	cbz	x23, LBB0_11
; %bb.1:
	mov	x20, x0
	ldr	x26, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #0
	ccmp	x26, #0, #4, eq
	b.eq	LBB0_11
; %bb.2:
	ldr	w8, [x26]
Lloh0:
	adrp	x9, _VBVA_F_RECORD_PARTIAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VBVA_F_RECORD_PARTIAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.3:
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x0, x23
	bl	_vbva_buffer_available
	cmp	x19, #1
	b.lt	LBB0_13
; %bb.4:
	mov	x24, x0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x3, [x23, #8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x25
	bl	_vbva_buffer_place_data_at
	ldp	x8, x9, [x23, #8]
	add	x8, x8, x25
	sdiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x23, #8]
	ldr	w8, [x26]
	add	w8, w8, w25
	str	w8, [x26]
	sub	x24, x24, x25
	sub	x19, x19, x25
	add	x21, x21, x25
	cmp	x19, #0
	b.le	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x19, x24
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_vbva_buffer_flush
	mov	x0, x23
	bl	_vbva_buffer_available
	mov	x24, x0
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, x19
	cmp	x19, x24
	b.lt	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	cmp	x24, x8
	cset	w0, le
	bl	_WARN_ON
	cbnz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	sub	x25, x24, x8
	b	LBB0_5
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w0, #1
	b	LBB0_12
LBB0_14:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VBVA_F_RECORD_PARTIAL,4,2      ; @VBVA_F_RECORD_PARTIAL
.subsections_via_symbols
