	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ppt_detach
_ppt_detach:                            ## @ppt_detach
	.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
	movl	%edi, %ebx
	callq	_device_get_softc
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	_num_pptdevs@GOTPCREL(%rip), %rcx
	decl	(%rcx)
	movq	_next@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_pptdev_list@GOTPCREL(%rip), %rdi
	movq	%rax, %rsi
	callq	_TAILQ_REMOVE
	movl	%ebx, %edi
	callq	_pci_disable_busmaster
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_iommu_host_domain
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_pci_get_rid
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_iommu_add_device
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_num_pptdevs,4,2                ## @num_pptdevs
	.comm	_pptdev_list,4,2                ## @pptdev_list
	.comm	_next,4,2                       ## @next
	.no_dead_strip	_ppt_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ppt_detach
_ppt_detach:                            ; @ppt_detach
	.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
	bl	_device_get_softc
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_3
LBB0_2:
	mov	x1, x0
Lloh3:
	adrp	x8, _num_pptdevs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _num_pptdevs@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
Lloh5:
	adrp	x8, _next@GOTPAGE
Lloh6:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x0, _pptdev_list@GOTPAGE
Lloh9:
	ldr	x0, [x0, _pptdev_list@GOTPAGEOFF]
	bl	_TAILQ_REMOVE
	mov	x0, x19
	bl	_pci_disable_busmaster
	bl	_iommu_host_domain
	mov	x20, x0
	mov	x0, x19
	bl	_pci_get_rid
	mov	x1, x0
	mov	x0, x20
	bl	_iommu_add_device
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_num_pptdevs,4,2                ; @num_pptdevs
	.comm	_pptdev_list,4,2                ; @pptdev_list
	.comm	_next,4,2                       ; @next
	.no_dead_strip	_ppt_detach
.subsections_via_symbols
