	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ppt_assign_device              ## -- Begin function ppt_assign_device
	.p2align	4, 0x90
_ppt_assign_device:                     ## @ppt_assign_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	%esi, %edi
	movl	%edx, %esi
	movl	%ecx, %edx
	callq	_ppt_find
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpq	%r14, %rax
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_4:
	movl	(%rbx), %edi
	callq	_pci_save_state
	movl	(%rbx), %edi
	callq	_ppt_pci_reset
	movl	(%rbx), %edi
	callq	_pci_restore_state
	movq	%r14, 8(%rbx)
	movq	%r14, %rdi
	callq	_vm_iommu_domain
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_pci_get_rid
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_iommu_add_device
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ppt_assign_device              ; -- Begin function ppt_assign_device
	.p2align	2
_ppt_assign_device:                     ; @ppt_assign_device
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x0, x1
	mov	x1, x2
	mov	x2, x3
	bl	_ppt_find
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cmp	x8, #0
	ccmp	x8, x19, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x20]
	bl	_pci_save_state
	ldr	w0, [x20]
	bl	_ppt_pci_reset
	ldr	w0, [x20]
	bl	_pci_restore_state
	str	x19, [x20, #8]
	mov	x0, x19
	bl	_vm_iommu_domain
	mov	x19, x0
	ldr	w0, [x20]
	bl	_pci_get_rid
	mov	x1, x0
	mov	x0, x19
	bl	_iommu_add_device
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
