	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bxt_port_to_phy_channel        ## -- Begin function bxt_port_to_phy_channel
	.p2align	4, 0x90
_bxt_port_to_phy_channel:               ## @bxt_port_to_phy_channel
	.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
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %ebx
	leaq	-28(%rbp), %rsi
	callq	_bxt_get_phy_list
	movl	-28(%rbp), %esi
	testl	%esi, %esi
	jle	LBB0_7
## %bb.1:
	movq	_DPIO_CH0@GOTPCREL(%rip), %r9
	movq	(%r9), %rdi
	movq	_DPIO_CH1@GOTPCREL(%rip), %r8
	movq	(%r8), %r10
	addq	$8, %rax
	xorl	%edx, %edx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$16, %rax
	cmpq	%rdx, %rsi
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%rax), %rcx
	cmpl	%ebx, (%rcx,%rdi,4)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, (%rcx,%r10,4)
	jne	LBB0_6
## %bb.5:
	movq	%r8, %r9
	jmp	LBB0_8
LBB0_7:
	movl	%ebx, %edi
	callq	_port_name
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_WARN
	movq	_DPIO_PHY0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DPIO_CH0@GOTPCREL(%rip), %r9
LBB0_8:
	movl	%edx, (%r15)
	movl	(%r9), %eax
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPIO_CH0,8,3                   ## @DPIO_CH0
	.comm	_DPIO_CH1,8,3                   ## @DPIO_CH1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY not found for PORT %c"

	.comm	_DPIO_PHY0,4,2                  ## @DPIO_PHY0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bxt_port_to_phy_channel        ; -- Begin function bxt_port_to_phy_channel
	.p2align	2
_bxt_port_to_phy_channel:               ; @bxt_port_to_phy_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x3
	mov	x20, x2
	mov	x21, x1
	add	x1, sp, #12
	bl	_bxt_get_phy_list
	ldr	w9, [sp, #12]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x8, #0
Lloh0:
	adrp	x10, _DPIO_CH0@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DPIO_CH0@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _DPIO_CH1@GOTPAGE
Lloh4:
	ldr	x11, [x11, _DPIO_CH1@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	add	x12, x0, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x12, x12, #16
	cmp	x9, x8
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x13, [x12, #-8]
	ldr	w14, [x13, x10, lsl #2]
	cmp	w14, w21
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x14, [x12]
	cbz	x14, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w13, [x13, x11, lsl #2]
	cmp	w13, w21
	b.ne	LBB0_2
; %bb.6:
Lloh6:
	adrp	x9, _DPIO_CH1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DPIO_CH1@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_port_name
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
Lloh10:
	adrp	x8, _DPIO_PHY0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DPIO_PHY0@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
LBB0_8:
Lloh13:
	adrp	x9, _DPIO_CH0@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DPIO_CH0@GOTPAGEOFF]
LBB0_9:
	str	w8, [x20]
	ldr	x8, [x9]
	str	w8, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DPIO_CH0,8,3                   ; @DPIO_CH0
	.comm	_DPIO_CH1,8,3                   ; @DPIO_CH1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY not found for PORT %c"

	.comm	_DPIO_PHY0,4,2                  ; @DPIO_PHY0
.subsections_via_symbols
