	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_init_xif_xmac
_niu_init_xif_xmac:                     ## @niu_init_xif_xmac
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_NIU_FLAGS_XCVR_SERDES@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_MIF_CONFIG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_nr64
	movq	_MIF_CONFIG_ATCA_GE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_nw64
LBB0_2:
	movq	_XMAC_CONFIG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_nr64_mac
	movq	_XMAC_CONFIG_SEL_POR_CLK_SRC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movq	_XMAC_CONFIG_TX_OUTPUT_EN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movq	8(%rbx), %rdx
	movq	_LOOPBACK_MAC@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_4
## %bb.3:
	andl	%ecx, %eax
	movq	_XMAC_CONFIG_LOOPBACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movq	_XMAC_CONFIG_LOOPBACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
LBB0_5:
	movl	(%rbx), %edx
	movq	_NIU_FLAGS_10G@GOTPCREL(%rip), %r12
	movq	_XMAC_CONFIG_LFS_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%edx, (%r12)
	je	LBB0_7
## %bb.6:
	notl	%ecx
	jmp	LBB0_11
LBB0_7:
	orl	%eax, %ecx
	movq	_NIU_FLAGS_FIBER@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_10
## %bb.8:
	testl	%edx, (%r15)
	je	LBB0_9
LBB0_10:
	movq	_XMAC_CONFIG_1G_PCS_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
LBB0_11:
	andl	%eax, %ecx
LBB0_12:
	movq	_XMAC_CONFIG_10G_XPCS_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movq	16(%rbx), %rcx
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	movq	_XMAC_CONFIG_SEL_CLK_25MHZ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %edi
	orl	%eax, %edi
	notl	%esi
	andl	%eax, %esi
	cmpq	(%rdx), %rcx
	cmovel	%edi, %esi
	movl	(%r14), %edi
	callq	_nw64_mac
	movl	(%r14), %edi
	callq	_nr64_mac
	movq	_XMAC_CONFIG_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%r12), %edx
	testl	%edx, (%rbx)
	je	LBB0_14
## %bb.13:
	movq	_XMAC_CONFIG_MODE_XGMII@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_14:
	movq	16(%rbx), %rdx
	movq	_SPEED_1000@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_15
## %bb.16:
	movq	_XMAC_CONFIG_MODE_GMII@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_15:
	movq	_XMAC_CONFIG_MODE_MII@GOTPCREL(%rip), %rdx
LBB0_17:
	notl	%ecx
	andl	%ecx, %eax
	orl	(%rdx), %eax
	movl	(%r14), %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nw64_mac                       ## TAILCALL
LBB0_9:
	movq	_XMAC_CONFIG_1G_PCS_BYPASS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_NIU_FLAGS_XCVR_SERDES,4,2      ## @NIU_FLAGS_XCVR_SERDES
	.comm	_MIF_CONFIG,4,2                 ## @MIF_CONFIG
	.comm	_MIF_CONFIG_ATCA_GE,4,2         ## @MIF_CONFIG_ATCA_GE
	.comm	_XMAC_CONFIG,4,2                ## @XMAC_CONFIG
	.comm	_XMAC_CONFIG_SEL_POR_CLK_SRC,4,2 ## @XMAC_CONFIG_SEL_POR_CLK_SRC
	.comm	_XMAC_CONFIG_TX_OUTPUT_EN,4,2   ## @XMAC_CONFIG_TX_OUTPUT_EN
	.comm	_LOOPBACK_MAC,8,3               ## @LOOPBACK_MAC
	.comm	_XMAC_CONFIG_LOOPBACK,4,2       ## @XMAC_CONFIG_LOOPBACK
	.comm	_NIU_FLAGS_10G,4,2              ## @NIU_FLAGS_10G
	.comm	_XMAC_CONFIG_LFS_DISABLE,4,2    ## @XMAC_CONFIG_LFS_DISABLE
	.comm	_NIU_FLAGS_FIBER,4,2            ## @NIU_FLAGS_FIBER
	.comm	_XMAC_CONFIG_1G_PCS_BYPASS,4,2  ## @XMAC_CONFIG_1G_PCS_BYPASS
	.comm	_XMAC_CONFIG_10G_XPCS_BYPASS,4,2 ## @XMAC_CONFIG_10G_XPCS_BYPASS
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_XMAC_CONFIG_SEL_CLK_25MHZ,4,2  ## @XMAC_CONFIG_SEL_CLK_25MHZ
	.comm	_XMAC_CONFIG_MODE_MASK,4,2      ## @XMAC_CONFIG_MODE_MASK
	.comm	_XMAC_CONFIG_MODE_XGMII,4,2     ## @XMAC_CONFIG_MODE_XGMII
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_XMAC_CONFIG_MODE_GMII,4,2      ## @XMAC_CONFIG_MODE_GMII
	.comm	_XMAC_CONFIG_MODE_MII,4,2       ## @XMAC_CONFIG_MODE_MII
	.no_dead_strip	_niu_init_xif_xmac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_init_xif_xmac
_niu_init_xif_xmac:                     ; @niu_init_xif_xmac
	.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, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _NIU_FLAGS_XCVR_SERDES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NIU_FLAGS_XCVR_SERDES@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x20, _MIF_CONFIG@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MIF_CONFIG@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_nr64
Lloh4:
	adrp	x8, _MIF_CONFIG_ATCA_GE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MIF_CONFIG_ATCA_GE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x20]
	bl	_nw64
LBB0_2:
Lloh7:
	adrp	x20, _XMAC_CONFIG@GOTPAGE
Lloh8:
	ldr	x20, [x20, _XMAC_CONFIG@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_nr64_mac
Lloh9:
	adrp	x8, _XMAC_CONFIG_SEL_POR_CLK_SRC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XMAC_CONFIG_SEL_POR_CLK_SRC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x8]
	bic	w8, w0, w9
Lloh12:
	adrp	x10, _XMAC_CONFIG_TX_OUTPUT_EN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _XMAC_CONFIG_TX_OUTPUT_EN@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w8, w8, w10
	ldr	x10, [x19, #8]
Lloh15:
	adrp	x11, _LOOPBACK_MAC@GOTPAGE
Lloh16:
	ldr	x11, [x11, _LOOPBACK_MAC@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_4
; %bb.3:
	mvn	w9, w9
	and	w8, w8, w9
Lloh18:
	adrp	x9, _XMAC_CONFIG_LOOPBACK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _XMAC_CONFIG_LOOPBACK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_5
LBB0_4:
Lloh21:
	adrp	x9, _XMAC_CONFIG_LOOPBACK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _XMAC_CONFIG_LOOPBACK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	bic	w8, w8, w9
LBB0_5:
Lloh24:
	adrp	x22, _NIU_FLAGS_10G@GOTPAGE
Lloh25:
	ldr	x22, [x22, _NIU_FLAGS_10G@GOTPAGEOFF]
	ldr	w9, [x19]
	ldr	w11, [x22]
Lloh26:
	adrp	x10, _XMAC_CONFIG_LFS_DISABLE@GOTPAGE
Lloh27:
	ldr	x10, [x10, _XMAC_CONFIG_LFS_DISABLE@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	tst	w11, w9
	b.eq	LBB0_7
; %bb.6:
	bic	w8, w8, w10
	b	LBB0_10
LBB0_7:
	orr	w8, w10, w8
Lloh29:
	adrp	x10, _NIU_FLAGS_FIBER@GOTPAGE
Lloh30:
	ldr	x10, [x10, _NIU_FLAGS_FIBER@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_9
; %bb.8:
	ldr	w10, [x21]
	tst	w10, w9
	b.eq	LBB0_14
LBB0_9:
Lloh32:
	adrp	x9, _XMAC_CONFIG_1G_PCS_BYPASS@GOTPAGE
Lloh33:
	ldr	x9, [x9, _XMAC_CONFIG_1G_PCS_BYPASS@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	bic	w8, w8, w9
LBB0_10:
Lloh35:
	adrp	x9, _XMAC_CONFIG_10G_XPCS_BYPASS@GOTPAGE
Lloh36:
	ldr	x9, [x9, _XMAC_CONFIG_10G_XPCS_BYPASS@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	bic	w8, w8, w9
	ldr	x9, [x19, #16]
Lloh38:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh39:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh40:
	ldr	x10, [x10]
Lloh41:
	adrp	x11, _XMAC_CONFIG_SEL_CLK_25MHZ@GOTPAGE
Lloh42:
	ldr	x11, [x11, _XMAC_CONFIG_SEL_CLK_25MHZ@GOTPAGEOFF]
Lloh43:
	ldr	w11, [x11]
	orr	w12, w11, w8
	bic	w8, w8, w11
	cmp	x9, x10
	csel	w1, w12, w8, eq
	ldr	w0, [x20]
	bl	_nw64_mac
	ldr	w0, [x20]
	bl	_nr64_mac
Lloh44:
	adrp	x8, _XMAC_CONFIG_MODE_MASK@GOTPAGE
Lloh45:
	ldr	x8, [x8, _XMAC_CONFIG_MODE_MASK@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	ldr	w9, [x19]
	ldr	w10, [x22]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.11:
Lloh47:
	adrp	x9, _XMAC_CONFIG_MODE_XGMII@GOTPAGE
Lloh48:
	ldr	x9, [x9, _XMAC_CONFIG_MODE_XGMII@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
	ldr	x9, [x19, #16]
Lloh49:
	adrp	x10, _SPEED_1000@GOTPAGE
Lloh50:
	ldr	x10, [x10, _SPEED_1000@GOTPAGEOFF]
Lloh51:
	ldr	x10, [x10]
Lloh52:
	adrp	x11, _XMAC_CONFIG_MODE_MII@GOTPAGE
Lloh53:
	ldr	x11, [x11, _XMAC_CONFIG_MODE_MII@GOTPAGEOFF]
Lloh54:
	adrp	x12, _XMAC_CONFIG_MODE_GMII@GOTPAGE
Lloh55:
	ldr	x12, [x12, _XMAC_CONFIG_MODE_GMII@GOTPAGEOFF]
	cmp	x9, x10
	csel	x9, x12, x11, eq
LBB0_13:
	bic	w8, w0, w8
	ldr	w9, [x9]
	orr	w1, w9, w8
	ldr	w0, [x20]
	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
	b	_nw64_mac
LBB0_14:
Lloh56:
	adrp	x9, _XMAC_CONFIG_1G_PCS_BYPASS@GOTPAGE
Lloh57:
	ldr	x9, [x9, _XMAC_CONFIG_1G_PCS_BYPASS@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_NIU_FLAGS_XCVR_SERDES,4,2      ; @NIU_FLAGS_XCVR_SERDES
	.comm	_MIF_CONFIG,4,2                 ; @MIF_CONFIG
	.comm	_MIF_CONFIG_ATCA_GE,4,2         ; @MIF_CONFIG_ATCA_GE
	.comm	_XMAC_CONFIG,4,2                ; @XMAC_CONFIG
	.comm	_XMAC_CONFIG_SEL_POR_CLK_SRC,4,2 ; @XMAC_CONFIG_SEL_POR_CLK_SRC
	.comm	_XMAC_CONFIG_TX_OUTPUT_EN,4,2   ; @XMAC_CONFIG_TX_OUTPUT_EN
	.comm	_LOOPBACK_MAC,8,3               ; @LOOPBACK_MAC
	.comm	_XMAC_CONFIG_LOOPBACK,4,2       ; @XMAC_CONFIG_LOOPBACK
	.comm	_NIU_FLAGS_10G,4,2              ; @NIU_FLAGS_10G
	.comm	_XMAC_CONFIG_LFS_DISABLE,4,2    ; @XMAC_CONFIG_LFS_DISABLE
	.comm	_NIU_FLAGS_FIBER,4,2            ; @NIU_FLAGS_FIBER
	.comm	_XMAC_CONFIG_1G_PCS_BYPASS,4,2  ; @XMAC_CONFIG_1G_PCS_BYPASS
	.comm	_XMAC_CONFIG_10G_XPCS_BYPASS,4,2 ; @XMAC_CONFIG_10G_XPCS_BYPASS
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_XMAC_CONFIG_SEL_CLK_25MHZ,4,2  ; @XMAC_CONFIG_SEL_CLK_25MHZ
	.comm	_XMAC_CONFIG_MODE_MASK,4,2      ; @XMAC_CONFIG_MODE_MASK
	.comm	_XMAC_CONFIG_MODE_XGMII,4,2     ; @XMAC_CONFIG_MODE_XGMII
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_XMAC_CONFIG_MODE_GMII,4,2      ; @XMAC_CONFIG_MODE_GMII
	.comm	_XMAC_CONFIG_MODE_MII,4,2       ; @XMAC_CONFIG_MODE_MII
	.no_dead_strip	_niu_init_xif_xmac
.subsections_via_symbols
