	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function viommu_fill_evtq
_viommu_fill_evtq:                      ## @viommu_fill_evtq
	.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
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	_VIOMMU_EVENT_VQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r14
	movq	(%r14), %r12
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_devm_kmalloc_array
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	testq	%r12, %r12
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	leaq	-48(%rbp), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_sg_init_one
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_virtqueue_add_inbuf
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %rbx
	decq	%r12
	jne	LBB0_5
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIOMMU_EVENT_VQ,8,3            ## @VIOMMU_EVENT_VQ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_viommu_fill_evtq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function viommu_fill_evtq
_viommu_fill_evtq:                      ; @viommu_fill_evtq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _VIOMMU_EVENT_VQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VIOMMU_EVENT_VQ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x19, [x8, x9, lsl #3]
	ldr	x20, [x19]
	ldr	w0, [x0]
Lloh3:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x1, x20
	mov	w2, #4
	bl	_devm_kmalloc_array
	str	x0, [x22, #8]
	cbz	x0, LBB0_6
; %bb.1:
	cbz	x20, LBB0_5
; %bb.2:
	mov	x21, x0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #4
	bl	_sg_init_one
	ldr	w4, [x23]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	mov	x3, x21
	bl	_virtqueue_add_inbuf
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #4
	subs	x20, x20, #1
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VIOMMU_EVENT_VQ,8,3            ; @VIOMMU_EVENT_VQ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_viommu_fill_evtq
.subsections_via_symbols
