	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_iommu_resume               ## -- Begin function kfd_iommu_resume
	.p2align	4, 0x90
_kfd_iommu_resume:                      ## @kfd_iommu_resume
	.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
	movq	8(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_kfd_get_pasid_limit
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_amd_iommu_init_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_4:
	movl	(%rbx), %edi
	movq	_iommu_pasid_shutdown_callback@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_amd_iommu_set_invalidate_ctx_cb
	movl	(%rbx), %edi
	movq	_iommu_invalid_ppr_cb@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_amd_iommu_set_invalid_ppr_cb
	movq	%rbx, %rdi
	callq	_kfd_bind_processes_to_device
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_amd_iommu_set_invalidate_ctx_cb
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_amd_iommu_set_invalid_ppr_cb
	movl	(%rbx), %edi
	callq	_amd_iommu_free_device
	movl	%r15d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_iommu_pasid_shutdown_callback,8,3 ## @iommu_pasid_shutdown_callback
	.comm	_iommu_invalid_ppr_cb,8,3       ## @iommu_invalid_ppr_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_iommu_resume               ; -- Begin function kfd_iommu_resume
	.p2align	2
_kfd_iommu_resume:                      ; @kfd_iommu_resume
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_kfd_get_pasid_limit
	mov	x1, x0
	ldr	w0, [x19]
	bl	_amd_iommu_init_device
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_3:
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _iommu_pasid_shutdown_callback@GOTPAGE
Lloh4:
	ldr	x8, [x8, _iommu_pasid_shutdown_callback@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	bl	_amd_iommu_set_invalidate_ctx_cb
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _iommu_invalid_ppr_cb@GOTPAGE
Lloh7:
	ldr	x8, [x8, _iommu_invalid_ppr_cb@GOTPAGEOFF]
Lloh8:
	ldr	x1, [x8]
	bl	_amd_iommu_set_invalid_ppr_cb
	mov	x0, x19
	bl	_kfd_bind_processes_to_device
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x19]
	mov	x1, #0
	bl	_amd_iommu_set_invalidate_ctx_cb
	ldr	w0, [x19]
	mov	x1, #0
	bl	_amd_iommu_set_invalid_ppr_cb
	ldr	w0, [x19]
	bl	_amd_iommu_free_device
LBB0_6:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_iommu_pasid_shutdown_callback,8,3 ; @iommu_pasid_shutdown_callback
	.comm	_iommu_invalid_ppr_cb,8,3       ; @iommu_invalid_ppr_cb
.subsections_via_symbols
