	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function awg_update_link_locked
_awg_update_link_locked:                ## @awg_update_link_locked
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_AWG_ASSERT_LOCKED
	movl	8(%r15), %edi
	callq	_if_getdrvflags
	movq	_IFF_DRV_RUNNING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movl	4(%r15), %edi
	callq	_device_get_softc
	movq	%rax, %r14
	movl	(%rax), %eax
	movq	_IFM_ACTIVE@GOTPCREL(%rip), %rcx
	movq	_IFM_AVALID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%eax
	testl	%eax, %edx
	jne	LBB0_3
## %bb.2:
	movl	4(%r14), %edi
	callq	_IFM_SUBTYPE
	andl	$-4, %eax
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.5:
	movl	$1, (%r15)
	movq	_EMAC_BASIC_CTL_0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_RD4
	movq	_BASIC_CTL_SPEED@GOTPCREL(%rip), %rcx
	movq	_BASIC_CTL_DUPLEX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r13d
	orl	(%rcx), %r13d
	notl	%r13d
	andl	%eax, %r13d
	movl	4(%r14), %edi
	callq	_IFM_SUBTYPE
	movq	_BASIC_CTL_SPEED_1000@GOTPCREL(%rip), %rbx
	cmpl	$130, %eax
	je	LBB0_10
## %bb.6:
	movl	4(%r14), %edi
	callq	_IFM_SUBTYPE
	cmpl	$131, %eax
	je	LBB0_10
## %bb.7:
	movl	4(%r14), %edi
	callq	_IFM_SUBTYPE
	cmpl	$129, %eax
	jne	LBB0_8
## %bb.9:
	movq	_BASIC_CTL_SPEED_100@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_3:
	movl	$0, (%r15)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_BASIC_CTL_SPEED_10@GOTPCREL(%rip), %rbx
LBB0_10:
	movl	(%rbx), %ebx
	movq	_BASIC_CTL_SPEED_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r13d, %ebx
	movl	4(%r14), %edi
	callq	_IFM_OPTIONS
	movq	_IFM_FDX@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_12
## %bb.11:
	movq	_BASIC_CTL_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	orl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_WR4
	movq	_EMAC_RX_CTL_0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_RD4
	movq	_RX_FLOW_CTL_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_IFM_OPTIONS
	movq	_IFM_ETH_RXPAUSE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_14
## %bb.13:
	movl	(%r13), %eax
LBB0_14:
	orl	%ebx, %eax
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_WR4
	movq	_EMAC_TX_FLOW_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_RD4
	movq	_PAUSE_TIME@GOTPCREL(%rip), %rcx
	movq	_TX_FLOW_CTL_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_IFM_OPTIONS
	movl	%eax, %r12d
	movq	_IFM_ETH_TXPAUSE@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	je	LBB0_16
## %bb.15:
	movl	(%r13), %r12d
LBB0_16:
	movl	4(%r14), %edi
	callq	_IFM_OPTIONS
	movq	_IFM_FDX@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_awg_pause_time@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_PAUSE_TIME_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	testl	%eax, %eax
	cmovel	%eax, %edx
	orl	%edx, %ebx
	orl	%r12d, %ebx
	movq	_EMAC_TX_FLOW_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WR4                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IFF_DRV_RUNNING,4,2            ## @IFF_DRV_RUNNING
	.comm	_IFM_ACTIVE,4,2                 ## @IFM_ACTIVE
	.comm	_IFM_AVALID,4,2                 ## @IFM_AVALID
	.comm	_EMAC_BASIC_CTL_0,4,2           ## @EMAC_BASIC_CTL_0
	.comm	_BASIC_CTL_SPEED,4,2            ## @BASIC_CTL_SPEED
	.comm	_BASIC_CTL_DUPLEX,4,2           ## @BASIC_CTL_DUPLEX
	.comm	_BASIC_CTL_SPEED_1000,4,2       ## @BASIC_CTL_SPEED_1000
	.comm	_BASIC_CTL_SPEED_SHIFT,4,2      ## @BASIC_CTL_SPEED_SHIFT
	.comm	_BASIC_CTL_SPEED_100,4,2        ## @BASIC_CTL_SPEED_100
	.comm	_BASIC_CTL_SPEED_10,4,2         ## @BASIC_CTL_SPEED_10
	.comm	_IFM_FDX,4,2                    ## @IFM_FDX
	.comm	_EMAC_RX_CTL_0,4,2              ## @EMAC_RX_CTL_0
	.comm	_RX_FLOW_CTL_EN,4,2             ## @RX_FLOW_CTL_EN
	.comm	_IFM_ETH_RXPAUSE,4,2            ## @IFM_ETH_RXPAUSE
	.comm	_EMAC_TX_FLOW_CTL,4,2           ## @EMAC_TX_FLOW_CTL
	.comm	_PAUSE_TIME,4,2                 ## @PAUSE_TIME
	.comm	_TX_FLOW_CTL_EN,4,2             ## @TX_FLOW_CTL_EN
	.comm	_IFM_ETH_TXPAUSE,4,2            ## @IFM_ETH_TXPAUSE
	.comm	_awg_pause_time,4,2             ## @awg_pause_time
	.comm	_PAUSE_TIME_SHIFT,4,2           ## @PAUSE_TIME_SHIFT
	.no_dead_strip	_awg_update_link_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function awg_update_link_locked
_awg_update_link_locked:                ; @awg_update_link_locked
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_AWG_ASSERT_LOCKED
	ldr	w0, [x19, #8]
	bl	_if_getdrvflags
Lloh0:
	adrp	x8, _IFF_DRV_RUNNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IFF_DRV_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_device_get_softc
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _IFM_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFM_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IFM_AVALID@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IFM_AVALID@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bics	wzr, w9, w8
	b.ne	LBB0_6
; %bb.2:
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_IFM_SUBTYPE
	and	w8, w0, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
Lloh9:
	adrp	x21, _EMAC_BASIC_CTL_0@GOTPAGE
Lloh10:
	ldr	x21, [x21, _EMAC_BASIC_CTL_0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_RD4
Lloh11:
	adrp	x8, _BASIC_CTL_SPEED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BASIC_CTL_SPEED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x23, _BASIC_CTL_DUPLEX@GOTPAGE
Lloh15:
	ldr	x23, [x23, _BASIC_CTL_DUPLEX@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	bic	w22, w0, w8
	ldr	w0, [x20, #4]
	bl	_IFM_SUBTYPE
	cmp	w0, #130
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x20, #4]
	bl	_IFM_SUBTYPE
	cmp	w0, #131
	b.ne	LBB0_8
LBB0_5:
Lloh16:
	adrp	x8, _BASIC_CTL_SPEED_1000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BASIC_CTL_SPEED_1000@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	str	wzr, [x19]
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x20, #4]
	bl	_IFM_SUBTYPE
Lloh18:
	adrp	x8, _BASIC_CTL_SPEED_10@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BASIC_CTL_SPEED_10@GOTPAGEOFF]
Lloh20:
	adrp	x9, _BASIC_CTL_SPEED_100@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BASIC_CTL_SPEED_100@GOTPAGEOFF]
	cmp	w0, #129
	csel	x8, x9, x8, eq
LBB0_9:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _BASIC_CTL_SPEED_SHIFT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BASIC_CTL_SPEED_SHIFT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w24, w8, w22
	ldr	w0, [x20, #4]
	bl	_IFM_OPTIONS
Lloh25:
	adrp	x22, _IFM_FDX@GOTPAGE
Lloh26:
	ldr	x22, [x22, _IFM_FDX@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x23]
	tst	w8, w0
	csel	w8, wzr, w9, eq
	orr	w2, w24, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_WR4
Lloh27:
	adrp	x21, _EMAC_RX_CTL_0@GOTPAGE
Lloh28:
	ldr	x21, [x21, _EMAC_RX_CTL_0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_RD4
Lloh29:
	adrp	x23, _RX_FLOW_CTL_EN@GOTPAGE
Lloh30:
	ldr	x23, [x23, _RX_FLOW_CTL_EN@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w24, w0, w8
	ldr	w0, [x20, #4]
	bl	_IFM_OPTIONS
Lloh31:
	adrp	x8, _IFM_ETH_RXPAUSE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IFM_ETH_RXPAUSE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	ldr	w9, [x23]
	tst	w8, w0
	csel	w8, wzr, w9, eq
	orr	w2, w8, w24
	ldr	w1, [x21]
	mov	x0, x19
	bl	_WR4
Lloh34:
	adrp	x21, _EMAC_TX_FLOW_CTL@GOTPAGE
Lloh35:
	ldr	x21, [x21, _EMAC_TX_FLOW_CTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_RD4
Lloh36:
	adrp	x8, _PAUSE_TIME@GOTPAGE
Lloh37:
	ldr	x8, [x8, _PAUSE_TIME@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x23, _TX_FLOW_CTL_EN@GOTPAGE
Lloh40:
	ldr	x23, [x23, _TX_FLOW_CTL_EN@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	bic	w24, w0, w8
	ldr	w0, [x20, #4]
	bl	_IFM_OPTIONS
Lloh41:
	adrp	x8, _IFM_ETH_TXPAUSE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IFM_ETH_TXPAUSE@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	ldr	w9, [x23]
	tst	w8, w0
	csel	w8, wzr, w9, eq
	orr	w23, w8, w24
	ldr	w0, [x20, #4]
	bl	_IFM_OPTIONS
	ldr	w8, [x22]
Lloh44:
	adrp	x9, _awg_pause_time@GOTPAGE
Lloh45:
	ldr	x9, [x9, _awg_pause_time@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
Lloh47:
	adrp	x10, _PAUSE_TIME_SHIFT@GOTPAGE
Lloh48:
	ldr	x10, [x10, _PAUSE_TIME_SHIFT@GOTPAGEOFF]
Lloh49:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	tst	w8, w0
	csel	w8, wzr, w9, eq
	orr	w2, w23, w8
	ldr	w1, [x21]
	mov	x0, 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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_WR4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IFF_DRV_RUNNING,4,2            ; @IFF_DRV_RUNNING
	.comm	_IFM_ACTIVE,4,2                 ; @IFM_ACTIVE
	.comm	_IFM_AVALID,4,2                 ; @IFM_AVALID
	.comm	_EMAC_BASIC_CTL_0,4,2           ; @EMAC_BASIC_CTL_0
	.comm	_BASIC_CTL_SPEED,4,2            ; @BASIC_CTL_SPEED
	.comm	_BASIC_CTL_DUPLEX,4,2           ; @BASIC_CTL_DUPLEX
	.comm	_BASIC_CTL_SPEED_1000,4,2       ; @BASIC_CTL_SPEED_1000
	.comm	_BASIC_CTL_SPEED_SHIFT,4,2      ; @BASIC_CTL_SPEED_SHIFT
	.comm	_BASIC_CTL_SPEED_100,4,2        ; @BASIC_CTL_SPEED_100
	.comm	_BASIC_CTL_SPEED_10,4,2         ; @BASIC_CTL_SPEED_10
	.comm	_IFM_FDX,4,2                    ; @IFM_FDX
	.comm	_EMAC_RX_CTL_0,4,2              ; @EMAC_RX_CTL_0
	.comm	_RX_FLOW_CTL_EN,4,2             ; @RX_FLOW_CTL_EN
	.comm	_IFM_ETH_RXPAUSE,4,2            ; @IFM_ETH_RXPAUSE
	.comm	_EMAC_TX_FLOW_CTL,4,2           ; @EMAC_TX_FLOW_CTL
	.comm	_PAUSE_TIME,4,2                 ; @PAUSE_TIME
	.comm	_TX_FLOW_CTL_EN,4,2             ; @TX_FLOW_CTL_EN
	.comm	_IFM_ETH_TXPAUSE,4,2            ; @IFM_ETH_TXPAUSE
	.comm	_awg_pause_time,4,2             ; @awg_pause_time
	.comm	_PAUSE_TIME_SHIFT,4,2           ; @PAUSE_TIME_SHIFT
	.no_dead_strip	_awg_update_link_locked
.subsections_via_symbols
