	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hv_ringbuffer_init             ## -- Begin function hv_ringbuffer_init
	.p2align	4, 0x90
_hv_ringbuffer_init:                    ## @hv_ringbuffer_init
	.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
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$24, (%rax)
	setne	%dil
	callq	_BUILD_BUG_ON
	leal	(%r14,%r14), %r12d
	decl	%r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r13, (%rax)
	cmpl	$2, %r14d
	jl	LBB0_9
## %bb.3:
	leal	-1(%r14), %esi
	leal	(%rsi,%rsi), %eax
	movl	$1, %r8d
	cmpl	$2, %eax
	cmovgel	%eax, %r8d
	jge	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_5:
	movl	%r8d, %edi
	andl	$2147483646, %edi               ## imm = 0x7FFFFFFE
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	cltd
	idivl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	leaq	4(,%rdx,4), %rax
	addq	%r13, %rax
	movq	%rax, 8(%rbx,%rcx,8)
	leal	1(%rcx), %eax
	cltd
	idivl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	leaq	4(,%rdx,4), %rax
	addq	%r13, %rax
	movq	%rax, 16(%rbx,%rcx,8)
	addq	$2, %rcx
	cmpq	%rdi, %rcx
	jne	LBB0_6
LBB0_7:
	testb	$1, %r8b
	je	LBB0_9
## %bb.8:
	movl	%ecx, %eax
	cltd
	idivl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	leaq	4(,%rdx,4), %rax
	addq	%r13, %rax
	movq	%rax, 8(%rbx,%rcx,8)
LBB0_9:
	movq	_VM_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_vmap
	movq	%rax, 32(%r15)
	movq	%rbx, %rdi
	callq	_kfree
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movl	$1, (%rax)
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movl	%r14d, (%r15)
	movslq	%r14d, %rax
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_reciprocal_value
	movl	%eax, 24(%r15)
	movl	(%r15), %eax
	addl	$-24, %eax
	movl	%eax, 4(%r15)
	movq	$0, 16(%r15)
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_spin_lock_init
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VM_MAP,4,2                     ## @VM_MAP
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hv_ringbuffer_init             ; -- Begin function hv_ringbuffer_init
	.p2align	2
_hv_ringbuffer_init:                    ; @hv_ringbuffer_init
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #24
	cset	w0, ne
	bl	_BUILD_BUG_ON
	lsl	w8, w20, #1
	sub	w22, w8, #1
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x23, x0
	str	x21, [x0]
	cmp	w20, #2
	b.lt	LBB0_9
; %bb.2:
	sub	w8, w20, #1
	lsl	w9, w8, #1
	cmp	w9, #1
	csinc	w9, w9, wzr, gt
	cmp	w9, #4
	b.hs	LBB0_4
; %bb.3:
	mov	x10, #0
	b	LBB0_7
LBB0_4:
	mov	x11, #0
	and	x10, x9, #0x7ffffffc
	add	x12, x23, #16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w13, w11, #1
	add	w14, w11, #2
	add	w15, w11, #3
	sdiv	w16, w11, w8
	msub	w16, w16, w8, w11
	sdiv	w17, w13, w8
	msub	w13, w17, w8, w13
	sdiv	w17, w14, w8
	msub	w14, w17, w8, w14
	sdiv	w17, w15, w8
	msub	w15, w17, w8, w15
	add	w16, w16, #1
	add	w13, w13, #1
	add	w14, w14, #1
	add	x16, x21, w16, uxtw #2
	add	w15, w15, #1
	add	x13, x21, w13, uxtw #2
	add	x14, x21, w14, uxtw #2
	add	x15, x21, w15, uxtw #2
	stp	x16, x13, [x12, #-8]
	stp	x14, x15, [x12, #8]
	add	x11, x11, #4
	add	x12, x12, #32
	cmp	x10, x11
	b.ne	LBB0_5
; %bb.6:
	cmp	x10, x9
	b.eq	LBB0_9
LBB0_7:
	add	x11, x23, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w12, w10, w8
	msub	w12, w12, w8, w10
	add	w12, w12, #1
	add	x12, x21, w12, uxtw #2
	str	x12, [x11, x10, lsl #3]
	add	x12, x10, #1
	mov	x10, x12
	cmp	x9, x12
	b.ne	LBB0_8
LBB0_9:
Lloh6:
	adrp	x8, _VM_MAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VM_MAP@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x1, x22
	bl	_vmap
	str	x0, [x19, #32]
	mov	x0, x23
	bl	_kfree
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_11
; %bb.10:
	stp	xzr, xzr, [x8, #8]
	mov	w9, #1
	str	w9, [x8]
Lloh12:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w8, w20, w8
	str	w8, [x19]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_reciprocal_value
	str	w0, [x19, #24]
	ldr	w8, [x19]
	sub	w8, w8, #24
	str	w8, [x19, #4]
	str	xzr, [x19, #16]
	add	x0, x19, #8
	bl	_spin_lock_init
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VM_MAP,4,2                     ; @VM_MAP
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
.subsections_via_symbols
