	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adm6996_get_port_link
_adm6996_get_port_link:                 ## @adm6996_get_port_link
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_to_adm
	movq	_ADM_NUM_PORTS@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jle	LBB0_1
## %bb.2:
	cmpl	$5, %ebx
	ja	LBB0_1
## %bb.3:
	movl	%ebx, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_4:
	movq	_ADM_PS0@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_17
LBB0_6:
	movq	_ADM_PS0@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_8:
	movq	_ADM_PS1@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_r16
	jmp	LBB0_12
LBB0_9:
	movq	_ADM_PS1@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_r16
	sarl	$8, %eax
	jmp	LBB0_12
LBB0_11:
	movq	_ADM_PS1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_r16
	sarl	$12, %eax
	jmp	LBB0_12
LBB0_10:
	movq	_ADM_PS2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_r16
	movl	%eax, %ecx
	andl	$3, %ecx
	shrl	%eax
	andl	$12, %eax
	orl	%ecx, %eax
LBB0_12:
	movq	_ADM_PS_LS@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	movl	(%rdx), %edx
	andl	%eax, %edx
	movl	%edx, (%r14)
	je	LBB0_17
## %bb.13:
	movl	$1, 4(%r14)
	movq	_ADM_PS_DS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	movl	%edx, 8(%r14)
	movq	_ADM_PS_FCS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	movl	%edx, 12(%r14)
	movl	%edx, 16(%r14)
	movq	_ADM_PS_SS@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_15
## %bb.14:
	movq	_SWITCH_PORT_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_SWITCH_PORT_SPEED_10@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
LBB0_17:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_ADM_NUM_PORTS,4,2              ## @ADM_NUM_PORTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADM_PS0,4,2                    ## @ADM_PS0
	.comm	_ADM_PS1,4,2                    ## @ADM_PS1
	.comm	_ADM_PS2,4,2                    ## @ADM_PS2
	.comm	_ADM_PS_LS,4,2                  ## @ADM_PS_LS
	.comm	_ADM_PS_DS,4,2                  ## @ADM_PS_DS
	.comm	_ADM_PS_FCS,4,2                 ## @ADM_PS_FCS
	.comm	_ADM_PS_SS,4,2                  ## @ADM_PS_SS
	.comm	_SWITCH_PORT_SPEED_100,4,2      ## @SWITCH_PORT_SPEED_100
	.comm	_SWITCH_PORT_SPEED_10,4,2       ## @SWITCH_PORT_SPEED_10
	.no_dead_strip	_adm6996_get_port_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adm6996_get_port_link
_adm6996_get_port_link:                 ; @adm6996_get_port_link
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	bl	_to_adm
Lloh0:
	adrp	x8, _ADM_NUM_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADM_NUM_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.le	LBB0_4
; %bb.1:
	cmp	w20, #5
	b.hi	LBB0_4
; %bb.2:
	mov	w8, w20
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
Lloh5:
	adrp	x8, _ADM_PS0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADM_PS0@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_5:
Lloh10:
	adrp	x8, _ADM_PS0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ADM_PS0@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _ADM_PS1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADM_PS1@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
	bl	_r16
	b	LBB0_12
LBB0_8:
Lloh14:
	adrp	x8, _ADM_PS1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ADM_PS1@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	bl	_r16
	asr	w0, w0, #8
	b	LBB0_12
LBB0_10:
Lloh16:
	adrp	x8, _ADM_PS1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ADM_PS1@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_r16
	asr	w0, w0, #12
	b	LBB0_12
LBB0_11:
Lloh19:
	adrp	x8, _ADM_PS2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ADM_PS2@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_r16
	mov	x8, x0
	lsr	w9, w0, #1
	and	w0, w9, #0xc
	bfxil	w0, w8, #0, #2
LBB0_12:
Lloh22:
	adrp	x8, _ADM_PS_LS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ADM_PS_LS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ands	w8, w8, w0
	str	w8, [x19]
	b.eq	LBB0_15
; %bb.13:
	mov	w8, #1
Lloh25:
	adrp	x9, _ADM_PS_DS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ADM_PS_DS@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	and	w9, w9, w0
	stp	w8, w9, [x19, #4]
Lloh28:
	adrp	x8, _ADM_PS_FCS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ADM_PS_FCS@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	and	w8, w8, w0
	stp	w8, w8, [x19, #12]
Lloh31:
	adrp	x8, _ADM_PS_SS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ADM_PS_SS@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.14:
	mov	w0, #0
Lloh34:
	adrp	x8, _SWITCH_PORT_SPEED_100@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SWITCH_PORT_SPEED_100@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
	mov	w0, #0
	b	LBB0_18
LBB0_16:
	mov	w0, #0
Lloh36:
	adrp	x8, _SWITCH_PORT_SPEED_10@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SWITCH_PORT_SPEED_10@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	str	w8, [x19, #20]
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
                                        ; -- End function
	.comm	_ADM_NUM_PORTS,4,2              ; @ADM_NUM_PORTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADM_PS0,4,2                    ; @ADM_PS0
	.comm	_ADM_PS1,4,2                    ; @ADM_PS1
	.comm	_ADM_PS2,4,2                    ; @ADM_PS2
	.comm	_ADM_PS_LS,4,2                  ; @ADM_PS_LS
	.comm	_ADM_PS_DS,4,2                  ; @ADM_PS_DS
	.comm	_ADM_PS_FCS,4,2                 ; @ADM_PS_FCS
	.comm	_ADM_PS_SS,4,2                  ; @ADM_PS_SS
	.comm	_SWITCH_PORT_SPEED_100,4,2      ; @SWITCH_PORT_SPEED_100
	.comm	_SWITCH_PORT_SPEED_10,4,2       ; @SWITCH_PORT_SPEED_10
	.no_dead_strip	_adm6996_get_port_link
.subsections_via_symbols
