	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function viommu_event_handler
_viommu_event_handler:                  ## @viommu_event_handler
	.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, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	leaq	-44(%rbp), %rsi
	callq	_virtqueue_get_buf
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	leaq	-48(%rbp), %r12
	leaq	-44(%rbp), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_virtqueue_get_buf
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %edx
	cmpl	$9, %edx
	jb	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	movl	$8, %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_VIOMMU_FAULT_RESV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	4(%r15), %rsi
	movq	%r14, %rdi
	callq	_viommu_fault_handler
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$8, %edx
	callq	_sg_init_one
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_virtqueue_add_inbuf
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_9:
	movq	%rbx, %rdi
	callq	_virtqueue_kick
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid event buffer (len %u != %zu)\n"

	.comm	_VIOMMU_FAULT_RESV_MASK,4,2     ## @VIOMMU_FAULT_RESV_MASK
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"could not add event buffer\n"

	.no_dead_strip	_viommu_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function viommu_event_handler
_viommu_event_handler:                  ; @viommu_event_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
	add	x1, sp, #28
	bl	_virtqueue_get_buf
	cbz	x0, LBB0_9
; %bb.1:
	mov	x23, x0
	mov	w24, #8
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
Lloh2:
	adrp	x25, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x25, [x25, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	adrp	x26, _VIOMMU_FAULT_RESV_MASK@GOTPAGE
Lloh5:
	ldr	x26, [x26, _VIOMMU_FAULT_RESV_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str.1@PAGE
Lloh7:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #28
	mov	x0, x19
	bl	_virtqueue_get_buf
	mov	x23, x0
	cbz	x0, LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #28]
	cmp	w8, #9
	b.lo	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20]
	stp	x8, x24, [sp]
	mov	x1, x21
	bl	_dev_err
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x23, #4
	mov	x0, x20
	bl	_viommu_fault_handler
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #24
	mov	x1, x23
	mov	w2, #8
	bl	_sg_init_one
	ldr	w4, [x25]
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #1
	mov	x3, x23
	bl	_virtqueue_add_inbuf
	cbz	w0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20]
	mov	x1, x22
	bl	_dev_err
	b	LBB0_2
LBB0_9:
	mov	x0, x19
	bl	_virtqueue_kick
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid event buffer (len %u != %zu)\n"

	.comm	_VIOMMU_FAULT_RESV_MASK,4,2     ; @VIOMMU_FAULT_RESV_MASK
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"could not add event buffer\n"

	.no_dead_strip	_viommu_event_handler
.subsections_via_symbols
