	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_config_terminate_pasid    ## -- Begin function ocxl_config_terminate_pasid
	.p2align	4, 0x90
_ocxl_config_terminate_pasid:           ## @ocxl_config_terminate_pasid
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r15
	movslq	%esi, %r12
	movq	_OCXL_DVSEC_AFU_CTRL_TERM_PASID@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	%r12, %rsi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_dword
	movl	-44(%rbp), %edi
	movl	$20, %esi
	callq	_EXTRACT_BIT
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_OCXL_DVSEC_PASID_MASK@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx
	movl	%r14d, %edx
	xorl	%ecx, %edx
	andl	(%rax), %edx
	xorl	%ecx, %edx
	movl	%edx, -44(%rbp)
	movl	$20, %edi
	callq	_BIT
	orl	-44(%rbp), %eax
	movl	%eax, -44(%rbp)
	movq	(%r13), %rsi
	addq	%r12, %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_pci_write_config_dword
	movq	_jiffies@GOTPCREL(%rip), %rdx
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	_OCXL_CFG_TIMEOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	imulq	(%rax), %rbx
	addq	(%rdx), %rbx
	movq	(%r13), %rsi
	addq	%r12, %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movl	-44(%rbp), %edi
	movl	$20, %esi
	callq	_EXTRACT_BIT
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	leaq	-44(%rbp), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	_OCXL_DVSEC_AFU_CTRL_TERM_PASID@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_pci_read_config_dword
	movl	-44(%rbp), %edi
	movl	$20, %esi
	callq	_EXTRACT_BIT
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_8
LBB0_3:
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_6:
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_OCXL_DVSEC_AFU_CTRL_TERM_PASID,8,3 ## @OCXL_DVSEC_AFU_CTRL_TERM_PASID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't terminate PASID %#x, previous termination didn't complete\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_OCXL_DVSEC_PASID_MASK,4,2      ## @OCXL_DVSEC_PASID_MASK
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_OCXL_CFG_TIMEOUT,8,3           ## @OCXL_CFG_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"Timeout while waiting for AFU to terminate PASID %#x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_config_terminate_pasid    ; -- Begin function ocxl_config_terminate_pasid
	.p2align	2
_ocxl_config_terminate_pasid:           ; @ocxl_config_terminate_pasid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x20, x0
	sxtw	x23, w1
Lloh0:
	adrp	x24, _OCXL_DVSEC_AFU_CTRL_TERM_PASID@GOTPAGE
Lloh1:
	ldr	x24, [x24, _OCXL_DVSEC_AFU_CTRL_TERM_PASID@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x1, x8, x23
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #20
	bl	_EXTRACT_BIT
	cbz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
Lloh7:
	adrp	x8, _OCXL_DVSEC_PASID_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OCXL_DVSEC_PASID_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w9, w9, w8
	and	w8, w8, w19
	orr	w8, w9, w8
	str	w8, [sp, #12]
	mov	w0, #20
	bl	_BIT
	ldr	w8, [sp, #12]
	orr	w2, w8, w0
	str	w2, [sp, #12]
	ldr	x8, [x24]
	add	x1, x8, x23
	mov	x0, x20
	bl	_pci_write_config_dword
Lloh10:
	adrp	x25, _jiffies@GOTPAGE
Lloh11:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x21, [x25]
Lloh12:
	adrp	x8, _HZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh14:
	ldr	x22, [x8]
Lloh15:
	adrp	x8, _OCXL_CFG_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OCXL_CFG_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	x26, [x8]
	ldr	x8, [x24]
	add	x1, x8, x23
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #20
	bl	_EXTRACT_BIT
	cbz	x0, LBB0_3
; %bb.5:
	madd	x22, x26, x22, x21
Lloh18:
	adrp	x21, l_.str.1@PAGE
Lloh19:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	mov	x1, x22
	bl	_time_after_eq
	cbnz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_cpu_relax
	ldr	x8, [x24]
	add	x1, x8, x23
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #20
	bl	_EXTRACT_BIT
	cbnz	x0, LBB0_6
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_OCXL_DVSEC_AFU_CTRL_TERM_PASID,8,3 ; @OCXL_DVSEC_AFU_CTRL_TERM_PASID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't terminate PASID %#x, previous termination didn't complete\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_OCXL_DVSEC_PASID_MASK,4,2      ; @OCXL_DVSEC_PASID_MASK
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_OCXL_CFG_TIMEOUT,8,3           ; @OCXL_CFG_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"Timeout while waiting for AFU to terminate PASID %#x\n"

.subsections_via_symbols
