	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_8012_port_initialize
_ql_8012_port_initialize:               ## @ql_8012_port_initialize
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	4(%rdi), %esi
	callq	_ql_sem_trylock
	movq	_link@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	8(%r14), %edx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_info
	movq	_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_ql_wait_reg_rdy
	testl	%eax, %eax
	je	LBB0_14
## %bb.2:
	movl	%eax, %ebx
	movl	(%r12), %esi
	movl	8(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_crit
	movl	%ebx, %r15d
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_info
	movq	_GLOBAL_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ql_read_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	_GLOBAL_CFG_RESET@GOTPCREL(%rip), %r12
	movl	-36(%rbp), %edx
	orl	(%r12), %edx
	movl	%edx, -36(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ql_write_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movl	(%r12), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_GLOBAL_CFG_JUMBO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_GLOBAL_CFG_TX_STAT_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_GLOBAL_CFG_RX_STAT_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ql_write_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movq	_TX_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ql_read_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	_TX_CFG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_TX_CFG_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ql_write_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	_RX_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ql_read_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	_RX_CFG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_RX_CFG_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ql_write_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	_MAC_TX_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAC_TX_PARAMS_JUMBO@GOTPCREL(%rip), %rax
	movl	$629145600, %edx                ## imm = 0x25800000
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ql_write_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	_MAC_RX_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$9600, %edx                     ## imm = 0x2580
	callq	_ql_write_xgmac_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %eax
	movl	%eax, %edx
	shll	$16, %edx
	orl	%eax, %edx
	movq	%r14, %rdi
	callq	_ql_write32
	xorl	%r15d, %r15d
LBB0_13:
	movl	4(%r14), %esi
	movq	%r14, %rdi
	callq	_ql_sem_unlock
LBB0_14:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Another function has the semaphore, so wait for the port init bit to come ready.\n"

	.comm	_STS,4,2                        ## @STS
L_.str.1:                               ## @.str.1
	.asciz	"Port initialize timed out.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Got xgmac semaphore!.\n"

	.comm	_GLOBAL_CFG,4,2                 ## @GLOBAL_CFG
	.comm	_GLOBAL_CFG_RESET,4,2           ## @GLOBAL_CFG_RESET
	.comm	_GLOBAL_CFG_JUMBO,4,2           ## @GLOBAL_CFG_JUMBO
	.comm	_GLOBAL_CFG_TX_STAT_EN,4,2      ## @GLOBAL_CFG_TX_STAT_EN
	.comm	_GLOBAL_CFG_RX_STAT_EN,4,2      ## @GLOBAL_CFG_RX_STAT_EN
	.comm	_TX_CFG,4,2                     ## @TX_CFG
	.comm	_TX_CFG_RESET,4,2               ## @TX_CFG_RESET
	.comm	_TX_CFG_EN,4,2                  ## @TX_CFG_EN
	.comm	_RX_CFG,4,2                     ## @RX_CFG
	.comm	_RX_CFG_RESET,4,2               ## @RX_CFG_RESET
	.comm	_RX_CFG_EN,4,2                  ## @RX_CFG_EN
	.comm	_MAC_TX_PARAMS,4,2              ## @MAC_TX_PARAMS
	.comm	_MAC_TX_PARAMS_JUMBO,4,2        ## @MAC_TX_PARAMS_JUMBO
	.comm	_MAC_RX_PARAMS,4,2              ## @MAC_RX_PARAMS
	.no_dead_strip	_ql_8012_port_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_8012_port_initialize
_ql_8012_port_initialize:               ; @ql_8012_port_initialize
	.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, x0
	ldr	w1, [x0, #4]
	bl	_ql_sem_trylock
Lloh0:
	adrp	x21, _link@GOTPAGE
Lloh1:
	ldr	x21, [x21, _link@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	w2, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_info
Lloh4:
	adrp	x8, _STS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _STS@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	mov	w3, #0
	bl	_ql_wait_reg_rdy
	mov	x20, x0
	cbz	w0, LBB0_14
; %bb.2:
	ldr	w1, [x21]
	ldr	w2, [x19, #8]
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_crit
	b	LBB0_14
LBB0_3:
Lloh9:
	adrp	x3, l_.str.2@PAGE
Lloh10:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_info
Lloh11:
	adrp	x21, _GLOBAL_CFG@GOTPAGE
Lloh12:
	ldr	x21, [x21, _GLOBAL_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ql_read_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.4:
Lloh13:
	adrp	x22, _GLOBAL_CFG_RESET@GOTPAGE
Lloh14:
	ldr	x22, [x22, _GLOBAL_CFG_RESET@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ql_write_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.5:
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh15:
	adrp	x9, _GLOBAL_CFG_JUMBO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _GLOBAL_CFG_JUMBO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _GLOBAL_CFG_TX_STAT_EN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GLOBAL_CFG_TX_STAT_EN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _GLOBAL_CFG_RX_STAT_EN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GLOBAL_CFG_RX_STAT_EN@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ql_write_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.6:
Lloh24:
	adrp	x21, _TX_CFG@GOTPAGE
Lloh25:
	ldr	x21, [x21, _TX_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ql_read_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.7:
Lloh26:
	adrp	x8, _TX_CFG_RESET@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TX_CFG_RESET@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh29:
	adrp	x9, _TX_CFG_EN@GOTPAGE
Lloh30:
	ldr	x9, [x9, _TX_CFG_EN@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ql_write_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.8:
Lloh32:
	adrp	x21, _RX_CFG@GOTPAGE
Lloh33:
	ldr	x21, [x21, _RX_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ql_read_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.9:
Lloh34:
	adrp	x8, _RX_CFG_RESET@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RX_CFG_RESET@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh37:
	adrp	x9, _RX_CFG_EN@GOTPAGE
Lloh38:
	ldr	x9, [x9, _RX_CFG_EN@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ql_write_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.10:
Lloh40:
	adrp	x8, _MAC_TX_PARAMS@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MAC_TX_PARAMS@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _MAC_TX_PARAMS_JUMBO@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MAC_TX_PARAMS_JUMBO@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	mov	w9, #629145600
	orr	w2, w8, w9
	mov	x0, x19
	bl	_ql_write_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.11:
Lloh46:
	adrp	x8, _MAC_RX_PARAMS@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MAC_RX_PARAMS@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #9600
	bl	_ql_write_xgmac_reg
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.12:
Lloh49:
	adrp	x8, _STS@GOTPAGE
Lloh50:
	ldr	x8, [x8, _STS@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	ldr	w8, [x19]
	orr	w2, w8, w8, lsl #16
	mov	x0, x19
	bl	_ql_write32
LBB0_13:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_ql_sem_unlock
LBB0_14:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Another function has the semaphore, so wait for the port init bit to come ready.\n"

	.comm	_STS,4,2                        ; @STS
l_.str.1:                               ; @.str.1
	.asciz	"Port initialize timed out.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Got xgmac semaphore!.\n"

	.comm	_GLOBAL_CFG,4,2                 ; @GLOBAL_CFG
	.comm	_GLOBAL_CFG_RESET,4,2           ; @GLOBAL_CFG_RESET
	.comm	_GLOBAL_CFG_JUMBO,4,2           ; @GLOBAL_CFG_JUMBO
	.comm	_GLOBAL_CFG_TX_STAT_EN,4,2      ; @GLOBAL_CFG_TX_STAT_EN
	.comm	_GLOBAL_CFG_RX_STAT_EN,4,2      ; @GLOBAL_CFG_RX_STAT_EN
	.comm	_TX_CFG,4,2                     ; @TX_CFG
	.comm	_TX_CFG_RESET,4,2               ; @TX_CFG_RESET
	.comm	_TX_CFG_EN,4,2                  ; @TX_CFG_EN
	.comm	_RX_CFG,4,2                     ; @RX_CFG
	.comm	_RX_CFG_RESET,4,2               ; @RX_CFG_RESET
	.comm	_RX_CFG_EN,4,2                  ; @RX_CFG_EN
	.comm	_MAC_TX_PARAMS,4,2              ; @MAC_TX_PARAMS
	.comm	_MAC_TX_PARAMS_JUMBO,4,2        ; @MAC_TX_PARAMS_JUMBO
	.comm	_MAC_RX_PARAMS,4,2              ; @MAC_RX_PARAMS
	.no_dead_strip	_ql_8012_port_initialize
.subsections_via_symbols
