	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lv2set_page
_lv2set_page:                           ## @lv2set_page
	.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	%r8, %r14
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_SPAGE_SIZE@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_lv2ent_fault
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movl	%r12d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mk_lv2ent_spage
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_update_pte
	decw	(%r14)
	jmp	LBB0_11
LBB0_3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_virt_to_phys
	movq	_dma_dev@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_SPAGES_PER_LPAGE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	shll	$2, %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	callq	_dma_sync_single_for_cpu
	movl	(%r14), %edx
	testl	%edx, %edx
	jle	LBB0_10
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r14), %r13
	movq	%r13, %rdi
	callq	_lv2ent_fault
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mk_lv2ent_lpage
	movl	%eax, (%r13)
	movq	_SPAGES_PER_LPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addq	$4, %r14
	incq	%r15
	cmpl	%edx, %r15d
	jl	LBB0_5
LBB0_10:
	movq	_dma_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$2, %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_sync_single_for_device
	movq	_SPAGES_PER_LPAGE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subw	%ax, (%rcx)
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.7:
	shlq	$2, %r15
	subq	%r15, %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
LBB0_8:
	movq	_EADDRINUSE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPAGE_SIZE,8,3                 ## @SPAGE_SIZE
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
	.comm	_dma_dev,4,2                    ## @dma_dev
	.comm	_SPAGES_PER_LPAGE,4,2           ## @SPAGES_PER_LPAGE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_lv2set_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lv2set_page
_lv2set_page:                           ; @lv2set_page
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _SPAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ne	LBB0_3
; %bb.1:
	bl	_lv2ent_fault
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_12
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	bl	_mk_lv2ent_spage
	mov	x1, x0
	mov	x0, x20
	bl	_update_pte
	mov	w0, #0
	ldrh	w8, [x19]
	sub	w8, w8, #1
	b	LBB0_9
LBB0_3:
	bl	_virt_to_phys
	mov	x23, x0
Lloh3:
	adrp	x24, _dma_dev@GOTPAGE
Lloh4:
	ldr	x24, [x24, _dma_dev@GOTPAGEOFF]
Lloh5:
	adrp	x26, _SPAGES_PER_LPAGE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _SPAGES_PER_LPAGE@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w8, [x26]
	lsl	w2, w8, #2
Lloh7:
	adrp	x28, _DMA_TO_DEVICE@GOTPAGE
Lloh8:
	ldr	x28, [x28, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x28]
	mov	x1, x23
	bl	_dma_sync_single_for_cpu
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x27, #0
	mov	x24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x25, x20, x24
	mov	x0, x25
	bl	_lv2ent_fault
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_mk_lv2ent_lpage
	str	w0, [x25]
	ldr	w8, [x26]
	add	x24, x24, #4
	add	x27, x27, #1
	cmp	w27, w8
	b.lt	LBB0_5
; %bb.7:
Lloh9:
	adrp	x24, _dma_dev@GOTPAGE
Lloh10:
	ldr	x24, [x24, _dma_dev@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x24]
	lsl	w2, w8, #2
	ldr	w3, [x28]
	mov	x1, x23
	bl	_dma_sync_single_for_device
	mov	w0, #0
	ldrh	w8, [x26]
	ldrh	w9, [x19]
	sub	w8, w9, w8
LBB0_9:
	strh	w8, [x19]
	b	LBB0_13
LBB0_10:
	cbz	w27, LBB0_12
; %bb.11:
	sub	x0, x25, x27, lsl #2
	mov	w1, #0
	mov	x2, x24
	bl	_memset
LBB0_12:
Lloh11:
	adrp	x8, _EADDRINUSE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EADDRINUSE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SPAGE_SIZE,8,3                 ; @SPAGE_SIZE
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
	.comm	_dma_dev,4,2                    ; @dma_dev
	.comm	_SPAGES_PER_LPAGE,4,2           ; @SPAGES_PER_LPAGE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_lv2set_page
.subsections_via_symbols
