	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_get_mps_bg_map              ## -- Begin function t4_get_mps_bg_map
	.p2align	4, 0x90
_t4_get_mps_bg_map:                     ## @t4_get_mps_bg_map
	.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, %r14d
	movq	%rdi, %rbx
	movq	_MPS_CMN_CTL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_t4_read_reg
	movl	%eax, %edi
	callq	_NUMPORTS_G
	movl	%eax, %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	%r14d, %eax
	jbe	LBB0_1
## %bb.2:
	movq	16(%rbx), %r12
	movslq	%r14d, %r13
	movl	(%r12,%r13,4), %eax
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	_CXGB4_FW_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.4:
	movq	_FW_PARAMS_MNEM_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_MNEM_V
	movl	%eax, %r15d
	movq	_FW_PARAMS_PARAM_DEV_MPSBGMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_PARAM_X_V
	orl	%r15d, %eax
	movl	%eax, -48(%rbp)
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-48(%rbp), %r9
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_t4_query_params_ns
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_compute_mps_bg_map
	movl	%eax, (%r12,%r13,4)
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_CH_WARN
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_MAX_NPORTS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.6:
	movzbl	-44(%rbp), %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%dl, %edx
	movl	%edx, (%r12,%rcx,4)
	incq	%rcx
	movl	-44(%rbp), %edx
	sarl	$8, %edx
	movl	%edx, -44(%rbp)
	movslq	(%rax), %rsi
	cmpq	%rsi, %rcx
	jl	LBB0_7
LBB0_8:
	movl	(%r12,%r13,4), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MPS_CMN_CTL_A,4,2              ## @MPS_CMN_CTL_A
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MPS Port Index %d >= Nports %d\n"

	.comm	_CXGB4_FW_OK,4,2                ## @CXGB4_FW_OK
	.comm	_FW_PARAMS_MNEM_DEV,4,2         ## @FW_PARAMS_MNEM_DEV
	.comm	_FW_PARAMS_PARAM_DEV_MPSBGMAP,4,2 ## @FW_PARAMS_PARAM_DEV_MPSBGMAP
	.comm	_MAX_NPORTS,4,2                 ## @MAX_NPORTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_get_mps_bg_map              ; -- Begin function t4_get_mps_bg_map
	.p2align	2
_t4_get_mps_bg_map:                     ; @t4_get_mps_bg_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MPS_CMN_CTL_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPS_CMN_CTL_A@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_t4_read_reg
	bl	_NUMPORTS_G
	mov	w8, #1
	lsl	w3, w8, w0
	cmp	w3, w19
	b.ls	LBB0_5
; %bb.1:
	ldr	x22, [x20, #16]
	ldr	w0, [x22, w19, sxtw #2]
	cbnz	w0, LBB0_6
; %bb.2:
	sxtw	x23, w19
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _CXGB4_FW_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXGB4_FW_OK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _FW_PARAMS_MNEM_DEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FW_PARAMS_MNEM_DEV@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_FW_PARAMS_MNEM_V
	mov	x21, x0
Lloh9:
	adrp	x8, _FW_PARAMS_PARAM_DEV_MPSBGMAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FW_PARAMS_PARAM_DEV_MPSBGMAP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_FW_PARAMS_PARAM_X_V
	orr	w8, w0, w21
	str	w8, [sp, #12]
	ldp	w2, w1, [x20, #4]
	add	x5, sp, #12
	add	x6, sp, #8
	mov	x0, x20
	mov	w3, #0
	mov	w4, #1
	bl	_t4_query_params_ns
	cbz	w0, LBB0_7
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_compute_mps_bg_map
	str	w0, [x22, x23, lsl #2]
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_CH_WARN
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
Lloh14:
	adrp	x8, _MAX_NPORTS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_NPORTS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x9, #0
	ldrb	w10, [sp, #8]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	and	w10, w10, #0xff
	str	w10, [x22, x9, lsl #2]
	add	x9, x9, #1
	ldr	w10, [sp, #8]
	asr	w10, w10, #8
	str	w10, [sp, #8]
	ldrsw	x11, [x8]
	cmp	x9, x11
	b.lt	LBB0_9
LBB0_10:
	ldr	w0, [x22, x23, lsl #2]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MPS_CMN_CTL_A,4,2              ; @MPS_CMN_CTL_A
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MPS Port Index %d >= Nports %d\n"

	.comm	_CXGB4_FW_OK,4,2                ; @CXGB4_FW_OK
	.comm	_FW_PARAMS_MNEM_DEV,4,2         ; @FW_PARAMS_MNEM_DEV
	.comm	_FW_PARAMS_PARAM_DEV_MPSBGMAP,4,2 ; @FW_PARAMS_PARAM_DEV_MPSBGMAP
	.comm	_MAX_NPORTS,4,2                 ; @MAX_NPORTS
.subsections_via_symbols
