	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function afu_control
_afu_control:                           ## @afu_control
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	_CXL_TIMEOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	imulq	(%rax), %r15
	movq	_jiffies@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	addq	$4, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_devel
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_trace_cxl_afu_ctrl
	movq	_CXL_AFU_Cntl_An@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_cxl_p2n_read
	movl	(%r12), %esi
	notl	%r13d
	andl	%eax, %r13d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	orl	%r14d, %r13d
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_cxl_p2n_write
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_cxl_p2n_read
	movl	%eax, %r13d
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %r12d
	andl	%ecx, %eax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	je	LBB0_8
## %bb.1:
	movl	%ecx, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_cxl_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rbx), %edi
	movq	%rbx, %rsi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	callq	_pr_devel_ratelimited
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	_CXL_AFU_Cntl_An@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cxl_p2n_read
	movl	%eax, %r13d
	andl	%r12d, %eax
	cmpl	%r14d, %eax
	jne	LBB0_2
LBB0_8:
	movq	_CXL_AFU_Cntl_An_RA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r13d, %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_10
## %bb.9:
	movq	_CXL_AFU_Cntl_An@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%eax
	andl	%eax, %r13d
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_cxl_p2n_write
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_pr_devel
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_3:
	leaq	12(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_11:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_trace_cxl_afu_ctrl_done
	movq	%r12, %rdi
	callq	_spin_unlock
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_CXL_TIMEOUT,8,3                ## @CXL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AFU command starting: %llx\n"

	.comm	_CXL_AFU_Cntl_An,4,2            ## @CXL_AFU_Cntl_An
L_.str.1:                               ## @.str.1
	.asciz	"WARNING: AFU control timed out!\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_cxl_ops,8,3                    ## @cxl_ops
	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"AFU control... (0x%016llx)\n"

	.comm	_CXL_AFU_Cntl_An_RA,4,2         ## @CXL_AFU_Cntl_An_RA
L_.str.3:                               ## @.str.3
	.asciz	"AFU command complete: %llx\n"

	.no_dead_strip	_afu_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function afu_control
_afu_control:                           ; @afu_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w5, [sp, #4]                    ; 4-byte Folded Spill
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x28, _jiffies@GOTPAGE
Lloh1:
	ldr	x28, [x28, _jiffies@GOTPAGEOFF]
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
	ldr	x21, [x28]
Lloh4:
	ldr	x26, [x8]
Lloh5:
	adrp	x8, _CXL_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CXL_TIMEOUT@GOTPAGEOFF]
Lloh7:
	ldr	x27, [x8]
	add	x0, x0, #4
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_devel
	mov	x0, x20
	mov	x1, x19
	bl	_trace_cxl_afu_ctrl
Lloh10:
	adrp	x22, _CXL_AFU_Cntl_An@GOTPAGE
Lloh11:
	ldr	x22, [x22, _CXL_AFU_Cntl_An@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cxl_p2n_read
	ldr	w1, [x22]
	bic	w8, w0, w25
	orr	w2, w8, w19
	mov	x0, x20
	bl	_cxl_p2n_write
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cxl_p2n_read
	mov	x25, x0
	and	w8, w0, w23
	cmp	w8, w24
	b.eq	LBB0_5
; %bb.1:
	madd	x26, x27, x26, x21
Lloh12:
	adrp	x21, _cxl_ops@GOTPAGE
Lloh13:
	ldr	x21, [x21, _cxl_ops@GOTPAGEOFF]
Lloh14:
	adrp	x27, l_.str.2@PAGE
Lloh15:
	add	x27, x27, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x28]
	mov	x1, x26
	bl	_time_after_eq
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x20, #8]
	mov	x1, x20
	blr	x8
	cbz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	orr	w1, w25, w19
	mov	x0, x27
	bl	_pr_devel_ratelimited
	bl	_cpu_relax
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cxl_p2n_read
	mov	x25, x0
	and	w8, w0, w23
	cmp	w8, w24
	b.ne	LBB0_2
LBB0_5:
Lloh16:
	adrp	x8, _CXL_AFU_Cntl_An_RA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CXL_AFU_Cntl_An_RA@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w25
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b.eq	LBB0_7
; %bb.6:
	ldr	w1, [x22]
	bic	w2, w25, w8
	mov	x0, x20
	bl	_cxl_p2n_write
LBB0_7:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_pr_devel
	mov	w23, #0
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	str	w8, [x20]
	b	LBB0_11
LBB0_8:
	add	x0, x20, #12
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
Lloh23:
	adrp	x8, _EBUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	str	w8, [x20]
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_trace_cxl_afu_ctrl_done
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_CXL_TIMEOUT,8,3                ; @CXL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AFU command starting: %llx\n"

	.comm	_CXL_AFU_Cntl_An,4,2            ; @CXL_AFU_Cntl_An
l_.str.1:                               ; @.str.1
	.asciz	"WARNING: AFU control timed out!\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_cxl_ops,8,3                    ; @cxl_ops
	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"AFU control... (0x%016llx)\n"

	.comm	_CXL_AFU_Cntl_An_RA,4,2         ; @CXL_AFU_Cntl_An_RA
l_.str.3:                               ; @.str.3
	.asciz	"AFU command complete: %llx\n"

	.no_dead_strip	_afu_control
.subsections_via_symbols
