	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function media_check
_media_check:                           ## @media_check
	.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	_media@GOTPCREL(%rip), %rax
	movzwl	(%rax), %edx
	movq	%rdi, %rsi
	callq	_from_timer
	movq	%rax, %rbx
	movq	32(%rax), %rax
	movq	(%rax), %r14
	movl	(%r14), %r15d
	movq	%r14, %rdi
	callq	_netif_device_present
	testl	%eax, %eax
	je	LBB0_25
## %bb.1:
	movq	_EL3_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_inw
	movq	_IntLatch@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.2:
	movq	_Timer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_inb
	cmpl	$255, %eax
	jne	LBB0_6
## %bb.3:
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
LBB0_5:
	callq	_local_irq_save
	movl	8(%r14), %edi
	movq	%r14, %rsi
	callq	_el3_interrupt
	callq	_local_irq_restore
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_6:
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	decl	%eax
	movl	%eax, (%rbx)
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$36, %rax
	addl	%ecx, %eax
	jmp	LBB0_26
LBB0_8:
	leaq	24(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movl	$4, %edi
	callq	_EL3WINDOW
	movl	28(%rbx), %esi
	movl	%r15d, %edi
	movl	$1, %edx
	callq	_mdio_read
	movl	%eax, %r12d
	movl	28(%rbx), %esi
	movl	%r15d, %edi
	movl	$5, %edx
	callq	_mdio_read
	movl	%eax, %r13d
	movl	$1, %edi
	callq	_EL3WINDOW
	movzwl	4(%rbx), %eax
	cmpw	%ax, %r12w
	je	LBB0_24
## %bb.9:
	movl	%eax, %ecx
	xorl	%r12d, %ecx
	testb	$4, %cl
	je	LBB0_11
## %bb.10:
	testb	$4, %al
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
	movl	4(%rbx), %eax
	movl	%r12d, %ecx
	xorl	%eax, %ecx
LBB0_11:
	movzwl	%r12w, %r12d
	testb	$32, %cl
	jne	LBB0_12
## %bb.19:
	testb	$16, %r12b
	jne	LBB0_20
LBB0_21:
	testb	$2, %r12b
	je	LBB0_23
LBB0_22:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
LBB0_23:
	movw	%r12w, 4(%rbx)
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
LBB0_25:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_26:
	movq	_jiffies@GOTPCREL(%rip), %rcx
	cltq
	addq	(%rcx), %rax
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	%rax, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_add_timer                      ## TAILCALL
LBB0_12:
	movw	$0, 6(%rbx)
	testb	$32, %al
	jne	LBB0_13
## %bb.14:
	testw	%r13w, %r13w
	je	LBB0_16
## %bb.15:
	movzwl	8(%rbx), %ecx
	andw	%r13w, %cx
	movzwl	%cx, %eax
	movl	%ecx, %r13d
	movw	%ax, 6(%rbx)
	testl	$384, %eax                      ## imm = 0x180
	movl	$10, %ecx
	movl	$100, %edx
	cmovel	%ecx, %edx
	xorl	%ecx, %ecx
	testl	$320, %eax                      ## imm = 0x140
	sete	%cl
	addl	%ecx, %ecx
	addl	$70, %ecx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
                                        ## kill: def $r13w killed $r13w def $r13d
	jmp	LBB0_18
LBB0_13:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_17
LBB0_16:
	leaq	L_.str.6(%rip), %rsi
	xorl	%r13d, %r13d
LBB0_17:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
LBB0_18:
	movl	$3, %edi
	callq	_EL3WINDOW
	xorl	%eax, %eax
	testl	$320, %r13d                     ## imm = 0x140
	setne	%al
	shll	$5, %eax
	xorl	%edi, %edi
	cmpl	$1501, 4(%r14)                  ## imm = 0x5DD
	setge	%dil
	shll	$6, %edi
	orl	%eax, %edi
	movq	_Wn3_MAC_Ctrl@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rsi
	callq	_outb
	movl	$1, %edi
	callq	_EL3WINDOW
	testb	$16, %r12b
	je	LBB0_21
LBB0_20:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
	testb	$2, %r12b
	jne	LBB0_22
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_media,2,1                      ## @media
	.comm	_EL3_STATUS,8,3                 ## @EL3_STATUS
	.comm	_IntLatch,4,2                   ## @IntLatch
	.comm	_Timer,8,3                      ## @Timer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"interrupt(s) dropped!\n"

	.comm	_HZ,4,2                         ## @HZ
	.comm	_jiffies,8,3                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"%s link beat\n"

L_.str.2:                               ## @.str.2
	.asciz	"lost"

L_.str.3:                               ## @.str.3
	.asciz	"found"

L_.str.4:                               ## @.str.4
	.asciz	"autonegotiation restarted\n"

L_.str.5:                               ## @.str.5
	.asciz	"autonegotiation complete: %dbaseT-%cD selected\n"

L_.str.6:                               ## @.str.6
	.asciz	"link partner did not autonegotiate\n"

	.comm	_Wn3_MAC_Ctrl,8,3               ## @Wn3_MAC_Ctrl
L_.str.7:                               ## @.str.7
	.asciz	"remote fault detected\n"

L_.str.8:                               ## @.str.8
	.asciz	"jabber detected\n"

	.comm	_lp,8,3                         ## @lp
	.no_dead_strip	_media_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function media_check
_media_check:                           ; @media_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _media@GOTPAGE
Lloh1:
	ldr	x8, [x8, _media@GOTPAGEOFF]
	ldrh	w2, [x8]
	mov	x1, x0
	bl	_from_timer
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x20, [x8]
	ldr	w21, [x20]
	mov	x0, x20
	bl	_netif_device_present
	cbz	w0, LBB0_16
; %bb.1:
Lloh2:
	adrp	x8, _EL3_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EL3_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x0, x8, x21
	bl	_inw
Lloh5:
	adrp	x8, _IntLatch@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IntLatch@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.2:
Lloh8:
	adrp	x8, _Timer@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Timer@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x0, x8, x21
	bl	_inb
	cmp	w0, #255
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cbnz	w8, LBB0_5
; %bb.4:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_info
LBB0_5:
	bl	_local_irq_save
	ldr	w0, [x20, #8]
	mov	x1, x20
	bl	_el3_interrupt
	bl	_local_irq_restore
Lloh13:
	adrp	x8, _HZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_6:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.7:
	sub	w8, w8, #1
	str	w8, [x19]
Lloh16:
	adrp	x8, _HZ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh18:
	ldrsw	x8, [x8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #36
	add	w8, w8, w9
	b	LBB0_17
LBB0_8:
	add	x22, x19, #24
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	w0, #4
	bl	_EL3WINDOW
	ldr	w1, [x19, #28]
	mov	x0, x21
	mov	w2, #1
	bl	_mdio_read
	mov	x23, x0
	ldr	w1, [x19, #28]
	mov	x0, x21
	mov	w2, #5
	bl	_mdio_read
	mov	x24, x0
	mov	w0, #1
	bl	_EL3WINDOW
	ldrh	w8, [x19, #4]
	cmp	w23, w8
	b.eq	LBB0_15
; %bb.9:
	eor	w9, w8, w23
	tbnz	w9, #2, LBB0_18
; %bb.10:
	tbnz	w9, #5, LBB0_19
LBB0_11:
	tbnz	w23, #4, LBB0_25
LBB0_12:
	tbz	w23, #1, LBB0_14
LBB0_13:
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_netdev_info
LBB0_14:
	strh	w23, [x19, #4]
LBB0_15:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
LBB0_16:
Lloh21:
	adrp	x8, _HZ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
LBB0_17:
Lloh24:
	adrp	x9, _jiffies@GOTPAGE
Lloh25:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x8, x9, w8, sxtw
	str	x8, [x19, #16]!
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_add_timer
LBB0_18:
Lloh27:
	adrp	x9, l_.str.2@PAGE
Lloh28:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh29:
	adrp	x10, l_.str.3@PAGE
Lloh30:
	add	x10, x10, l_.str.3@PAGEOFF
	tst	w8, #0x4
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_info
	ldrh	w8, [x19, #4]
	eor	w9, w8, w23
	tbz	w9, #5, LBB0_11
LBB0_19:
	strh	wzr, [x19, #6]
	tbnz	w8, #5, LBB0_22
; %bb.20:
	cbz	w24, LBB0_23
; %bb.21:
	ldrh	w8, [x19, #8]
	and	w24, w8, w24
	strh	w24, [x19, #6]
	mov	w8, #320
	tst	w24, w8
	mov	w8, #70
	mov	w9, #72
	csel	x8, x9, x8, eq
	tst	w24, #0x180
	mov	w9, #100
	mov	w10, #10
	csel	x9, x10, x9, eq
	stp	x9, x8, [sp]
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_24
LBB0_22:
Lloh35:
	adrp	x1, l_.str.4@PAGE
Lloh36:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_24
LBB0_23:
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_24:
	mov	x0, x20
	bl	_netdev_info
	mov	w0, #3
	bl	_EL3WINDOW
	mov	w8, #320
	tst	w24, w8
	cset	w8, ne
	lsl	w0, w8, #5
	ldr	w8, [x20, #4]
	cmp	w8, #1500
	cset	w8, gt
	bfi	w0, w8, #6, #1
Lloh39:
	adrp	x8, _Wn3_MAC_Ctrl@GOTPAGE
Lloh40:
	ldr	x8, [x8, _Wn3_MAC_Ctrl@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	add	x1, x8, x21
	bl	_outb
	mov	w0, #1
	bl	_EL3WINDOW
	tbz	w23, #4, LBB0_12
LBB0_25:
Lloh42:
	adrp	x1, l_.str.7@PAGE
Lloh43:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_netdev_info
	tbnz	w23, #1, LBB0_13
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_media,2,1                      ; @media
	.comm	_EL3_STATUS,8,3                 ; @EL3_STATUS
	.comm	_IntLatch,4,2                   ; @IntLatch
	.comm	_Timer,8,3                      ; @Timer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"interrupt(s) dropped!\n"

	.comm	_HZ,4,2                         ; @HZ
	.comm	_jiffies,8,3                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"%s link beat\n"

l_.str.2:                               ; @.str.2
	.asciz	"lost"

l_.str.3:                               ; @.str.3
	.asciz	"found"

l_.str.4:                               ; @.str.4
	.asciz	"autonegotiation restarted\n"

l_.str.5:                               ; @.str.5
	.asciz	"autonegotiation complete: %dbaseT-%cD selected\n"

l_.str.6:                               ; @.str.6
	.asciz	"link partner did not autonegotiate\n"

	.comm	_Wn3_MAC_Ctrl,8,3               ; @Wn3_MAC_Ctrl
l_.str.7:                               ; @.str.7
	.asciz	"remote fault detected\n"

l_.str.8:                               ; @.str.8
	.asciz	"jabber detected\n"

	.comm	_lp,8,3                         ; @lp
	.no_dead_strip	_media_check
.subsections_via_symbols
