	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_completion_wait
_iommu_completion_wait:                 ## @iommu_completion_wait
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	leaq	-32(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_build_completion_wait
	movq	%rbx, %rdi
	callq	_raw_spin_lock_irqsave
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	___iommu_queue_command_sync
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_wait_on_sem
	movl	%eax, %r15d
LBB0_4:
	movq	%rbx, %rdi
	callq	_raw_spin_unlock_irqrestore
	jmp	LBB0_5
LBB0_1:
	xorl	%r15d, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_iommu_completion_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_completion_wait
_iommu_completion_wait:                 ; @iommu_completion_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	add	x20, x0, #8
	add	x0, sp, #8
	mov	x1, x20
	bl	_build_completion_wait
	mov	x0, x19
	bl	_raw_spin_lock_irqsave
	str	xzr, [x19, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	___iommu_queue_command_sync
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_wait_on_sem
	mov	x21, x0
LBB0_3:
	mov	x0, x19
	bl	_raw_spin_unlock_irqrestore
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_iommu_completion_wait
.subsections_via_symbols
