	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_get_tp_ch_map               ## -- Begin function t4_get_tp_ch_map
	.p2align	4, 0x90
_t4_get_tp_ch_map:                      ## @t4_get_tp_ch_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_CHELSIO_CHIP_VERSION
	movl	%eax, %r15d
	movq	_MPS_CMN_CTL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_t4_read_reg
	movl	%eax, %edi
	callq	_NUMPORTS_G
	movl	%eax, %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%r14d, %eax
	jbe	LBB0_1
## %bb.2:
	leal	-129(%r15), %edx
	cmpl	$2, %edx
	jae	LBB0_3
## %bb.7:
	cmpl	$1, %eax
	je	LBB0_8
## %bb.9:
	cmpl	$4, %eax
	je	LBB0_12
## %bb.10:
	cmpl	$2, %eax
	jne	LBB0_5
## %bb.11:
	addl	%r14d, %r14d
	movl	$3, %eax
	jmp	LBB0_13
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_warn
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_3:
	cmpl	$128, %r15d
	jne	LBB0_5
## %bb.4:
	cmpl	$1, %ecx
	jbe	LBB0_12
LBB0_5:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_12:
	movl	$1, %eax
LBB0_13:
	movl	%r14d, %ecx
	shll	%cl, %eax
	jmp	LBB0_14
LBB0_8:
	movl	$15, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPS_CMN_CTL_A,4,2              ## @MPS_CMN_CTL_A
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TP Port Index %d >= Nports %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Need TP Channel Map for Chip %0x, Nports %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_get_tp_ch_map               ; -- Begin function t4_get_tp_ch_map
	.p2align	2
_t4_get_tp_ch_map:                      ; @t4_get_tp_ch_map
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_CHELSIO_CHIP_VERSION
	mov	x21, x0
Lloh0:
	adrp	x8, _MPS_CMN_CTL_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPS_CMN_CTL_A@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_t4_read_reg
	bl	_NUMPORTS_G
	mov	w8, #1
	lsl	w3, w8, w0
	cmp	w3, w19
	b.ls	LBB0_6
; %bb.1:
	sub	w8, w21, #129
	cmp	w8, #2
	b.hs	LBB0_7
; %bb.2:
	cmp	w3, #1
	b.eq	LBB0_12
; %bb.3:
	cmp	w3, #4
	b.eq	LBB0_11
; %bb.4:
	cmp	w3, #2
	b.ne	LBB0_8
; %bb.5:
	lsl	w8, w19, #1
	mov	w9, #3
	lsl	w0, w9, w8
	b	LBB0_10
LBB0_6:
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_warn
	b	LBB0_9
LBB0_7:
	cmp	w21, #128
	ccmp	w0, #1, #2, eq
	b.ls	LBB0_11
LBB0_8:
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
LBB0_11:
	mov	w8, #1
	lsl	w0, w8, w19
	b	LBB0_10
LBB0_12:
	mov	w0, #15
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MPS_CMN_CTL_A,4,2              ; @MPS_CMN_CTL_A
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TP Port Index %d >= Nports %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Need TP Channel Map for Chip %0x, Nports %d\n"

.subsections_via_symbols
