	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_iommu_bind_process_to_device ## -- Begin function kfd_iommu_bind_process_to_device
	.p2align	4, 0x90
_kfd_iommu_bind_process_to_device:      ## @kfd_iommu_bind_process_to_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r15
	movq	8(%r15), %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	_PDD_BOUND@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rcx
	je	LBB0_6
## %bb.2:
	movq	8(%rbx), %r12
	movq	_PDD_BOUND_SUSPENDED@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rcx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	movl	(%r15), %edi
	movl	(%r12), %edx
	movl	4(%r12), %esi
	callq	_amd_iommu_bind_pasid
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PDD_BOUND,8,3                  ## @PDD_BOUND
	.comm	_PDD_BOUND_SUSPENDED,8,3        ## @PDD_BOUND_SUSPENDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Binding PDD_BOUND_SUSPENDED pdd is unexpected!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_iommu_bind_process_to_device ; -- Begin function kfd_iommu_bind_process_to_device
	.p2align	2
_kfd_iommu_bind_process_to_device:      ; @kfd_iommu_bind_process_to_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, [x0, #16]
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _PDD_BOUND@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PDD_BOUND@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_7
LBB0_3:
	ldr	x22, [x19, #8]
Lloh2:
	adrp	x9, _PDD_BOUND_SUSPENDED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PDD_BOUND_SUSPENDED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	ldr	w0, [x21]
	ldp	w2, w1, [x22]
	bl	_amd_iommu_bind_pasid
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	x8, [x20]
	str	x8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PDD_BOUND,8,3                  ; @PDD_BOUND
	.comm	_PDD_BOUND_SUSPENDED,8,3        ; @PDD_BOUND_SUSPENDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Binding PDD_BOUND_SUSPENDED pdd is unexpected!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
