	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_config_set_TL             ## -- Begin function ocxl_config_set_TL
	.p2align	4, 0x90
_ocxl_config_set_TL:                    ## @ocxl_config_set_TL
	.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	%esi, %r15d
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_PCI_FUNC
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.1:
	movq	_PNV_OCXL_TL_RATE_BUF_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movl	(%r12), %ecx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rdx
	callq	_pnv_ocxl_get_tl_cap
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	cmpl	$0, (%r12)
	movslq	%r15d, %r15
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%rbx), %r12
	movq	_OCXL_DVSEC_TL_SEND_RATE@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movl	(%r14,%rbx), %edi
	callq	_be32_to_cpu
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_pci_write_config_dword
	addq	$4, %rbx
	movq	_PNV_OCXL_TL_RATE_BUF_SIZE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jg	LBB0_6
LBB0_7:
	movslq	-44(%rbp), %rdx
	movq	_OCXL_DVSEC_TL_SEND_CAP@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r15, %rsi
	movq	%r13, %rdi
	callq	_pci_write_config_dword
	movq	-48(%rbp), %rbx
	movl	$31, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andq	%rax, %rbx
	movq	%rbx, -56(%rbp)
	leaq	4(%r15), %rax
	movq	(%r12), %rsi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	%rax, %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_pci_write_config_dword
	movq	_PNV_OCXL_TL_RATE_BUF_SIZE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.8:
	xorl	%r12d, %r12d
	leaq	-56(%rbp), %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r12), %rsi
	movq	_OCXL_DVSEC_TL_RECV_RATE@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movq	-56(%rbp), %rdi
	callq	_cpu_to_be32
	movl	%eax, (%r14,%r12)
	addq	$4, %r12
	movq	_PNV_OCXL_TL_RATE_BUF_SIZE@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jg	LBB0_9
LBB0_10:
	movq	_OCXL_DVSEC_TL_RECV_CAP@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r15, %rsi
	leaq	-56(%rbp), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movq	-56(%rbp), %rax
	shlq	$32, %rax
	movq	%rax, -48(%rbp)
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	(%r12), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movq	-48(%rbp), %rbx
	orq	-56(%rbp), %rbx
	movq	%rbx, -48(%rbp)
	movq	%r14, %rdi
	callq	___pa
	movq	_PNV_OCXL_TL_RATE_BUF_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_pnv_ocxl_set_tl_conf
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_OCXL_DVSEC_TL_BACKOFF_TIMERS@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$32, %edx
	callq	_pci_write_config_byte
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_13
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNV_OCXL_TL_RATE_BUF_SIZE,4,2  ## @PNV_OCXL_TL_RATE_BUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCXL_DVSEC_TL_SEND_RATE,8,3    ## @OCXL_DVSEC_TL_SEND_RATE
	.comm	_OCXL_DVSEC_TL_SEND_CAP,8,3     ## @OCXL_DVSEC_TL_SEND_CAP
	.comm	_OCXL_DVSEC_TL_RECV_RATE,8,3    ## @OCXL_DVSEC_TL_RECV_RATE
	.comm	_OCXL_DVSEC_TL_RECV_CAP,8,3     ## @OCXL_DVSEC_TL_RECV_CAP
	.comm	_OCXL_DVSEC_TL_BACKOFF_TIMERS,8,3 ## @OCXL_DVSEC_TL_BACKOFF_TIMERS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_config_set_TL             ; -- Begin function ocxl_config_set_TL
	.p2align	2
_ocxl_config_set_TL:                    ; @ocxl_config_set_TL
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_PCI_FUNC
	cbz	x0, LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_14
LBB0_2:
Lloh0:
	adrp	x23, _PNV_OCXL_TL_RATE_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PNV_OCXL_TL_RATE_BUF_SIZE@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.3:
	mov	x20, x0
	ldr	w3, [x23]
	mov	x1, sp
	mov	x0, x19
	mov	x2, x20
	bl	_pnv_ocxl_get_tl_cap
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.4:
	ldr	w8, [x23]
	sxtw	x24, w21
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x22, #0
Lloh5:
	adrp	x25, _OCXL_DVSEC_TL_SEND_RATE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _OCXL_DVSEC_TL_SEND_RATE@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x9, x24, x22
	add	x21, x9, x8
	ldr	w0, [x20, x22]
	bl	_be32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_pci_write_config_dword
	add	x22, x22, #4
	ldr	w8, [x23]
	cmp	w8, w22
	b.gt	LBB0_6
LBB0_7:
	ldrsw	x2, [sp, #4]
Lloh7:
	adrp	x21, _OCXL_DVSEC_TL_SEND_CAP@GOTPAGE
Lloh8:
	ldr	x21, [x21, _OCXL_DVSEC_TL_SEND_CAP@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x24
	mov	x0, x19
	bl	_pci_write_config_dword
	ldr	x22, [sp]
	mov	w0, #31
	mov	w1, #0
	bl	_GENMASK
	and	x2, x0, x22
	str	x2, [sp, #8]
	ldr	x8, [x21]
	add	x21, x24, #4
	add	x1, x21, x8
	mov	x0, x19
	bl	_pci_write_config_dword
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x22, #0
Lloh9:
	adrp	x25, _OCXL_DVSEC_TL_RECV_RATE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _OCXL_DVSEC_TL_RECV_RATE@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x9, x24, x22
	add	x1, x9, x8
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x0, [sp, #8]
	bl	_cpu_to_be32
	str	w0, [x20, x22]
	add	x22, x22, #4
	ldr	w8, [x23]
	cmp	w8, w22
	b.gt	LBB0_9
LBB0_10:
Lloh11:
	adrp	x22, _OCXL_DVSEC_TL_RECV_CAP@GOTPAGE
Lloh12:
	ldr	x22, [x22, _OCXL_DVSEC_TL_RECV_CAP@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x1, x8, x24
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [sp, #8]
	lsl	x8, x8, #32
	str	x8, [sp]
	ldr	x8, [x22]
	add	x1, x21, x8
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	ldp	x9, x8, [sp]
	orr	x21, x9, x8
	str	x21, [sp]
	mov	x0, x20
	bl	___pa
	mov	x2, x0
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_pnv_ocxl_set_tl_conf
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.11:
Lloh13:
	adrp	x8, _OCXL_DVSEC_TL_BACKOFF_TIMERS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OCXL_DVSEC_TL_BACKOFF_TIMERS@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	add	x1, x8, x24
	mov	x0, x19
	mov	w2, #32
	bl	_pci_write_config_byte
LBB0_12:
	mov	x0, x20
	bl	_kfree
	b	LBB0_14
LBB0_13:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_14:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PNV_OCXL_TL_RATE_BUF_SIZE,4,2  ; @PNV_OCXL_TL_RATE_BUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCXL_DVSEC_TL_SEND_RATE,8,3    ; @OCXL_DVSEC_TL_SEND_RATE
	.comm	_OCXL_DVSEC_TL_SEND_CAP,8,3     ; @OCXL_DVSEC_TL_SEND_CAP
	.comm	_OCXL_DVSEC_TL_RECV_RATE,8,3    ; @OCXL_DVSEC_TL_RECV_RATE
	.comm	_OCXL_DVSEC_TL_RECV_CAP,8,3     ; @OCXL_DVSEC_TL_RECV_CAP
	.comm	_OCXL_DVSEC_TL_BACKOFF_TIMERS,8,3 ; @OCXL_DVSEC_TL_BACKOFF_TIMERS
.subsections_via_symbols
