	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcnet32_check_media
_pcnet32_check_media:                   ## @pcnet32_check_media
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_netif_carrier_ok
	movq	%rax, %r12
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	leaq	24(%rbx), %rdi
	callq	_mii_link_ok
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_7
LBB0_2:
	movq	(%rbx), %rax
	movq	_PCNET32_79C970A@GOTPCREL(%rip), %rcx
	movl	(%r14), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	cmpl	$0, 48(%rbx)
	jne	LBB0_12
## %bb.4:
	cmpq	$0, 40(%rbx)
	je	LBB0_12
LBB0_5:
	movq	16(%rbx), %rax
	movl	$4, %esi
	callq	*(%rax)
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$192, %ecx
	setne	%al
	testl	%eax, %eax
	je	LBB0_7
LBB0_12:
	testl	%r15d, %r15d
	jne	LBB0_14
## %bb.13:
	testq	%r12, %r12
	jne	LBB0_19
LBB0_14:
	movq	%r14, %rdi
	callq	_netif_carrier_on
	cmpq	$0, 32(%rbx)
	je	LBB0_20
## %bb.15:
	movq	%rbx, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	$0, -48(%rbp)
	movq	_ETHTOOL_GSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	%rbx, %rdi
	addq	$24, %rdi
	leaq	-48(%rbp), %r15
	movq	%r15, %rsi
	callq	_mii_ethtool_gset
	movq	%r15, %rdi
	callq	_ethtool_cmd_speed
	movq	-48(%rbp), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rdx, %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_netdev_info
LBB0_17:
	movq	16(%rbx), %rax
	movl	(%r14), %edi
	movl	$9, %esi
	callq	*(%rax)
	movl	%eax, %edx
	andl	$1, %edx
	movl	24(%rbx), %ecx
	cmpl	%ecx, %edx
	je	LBB0_19
## %bb.18:
	xorl	%edx, %edx
	testl	%ecx, %ecx
	setne	%dl
	andl	$-2, %eax
	orl	%eax, %edx
	movq	16(%rbx), %rax
	movl	(%r14), %edi
	movl	$9, %esi
	callq	*8(%rax)
	jmp	LBB0_19
LBB0_7:
	testl	%r15d, %r15d
	jne	LBB0_9
## %bb.8:
	testq	%r12, %r12
	jne	LBB0_9
## %bb.10:
	cmpl	$2, 8(%rbx)
	jl	LBB0_19
LBB0_11:
	movq	%r14, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pcnet32_check_otherphy         ## TAILCALL
LBB0_9:
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_netif_info
	cmpl	$2, 8(%rbx)
	jge	LBB0_11
LBB0_19:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_info                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCNET32_79C970A,8,3            ## @PCNET32_79C970A
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"link down\n"

	.comm	_ETHTOOL_GSET,4,2               ## @ETHTOOL_GSET
L_.str.1:                               ## @.str.1
	.asciz	"link up, %uMbps, %s-duplex\n"

	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
L_.str.2:                               ## @.str.2
	.asciz	"full"

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

L_.str.4:                               ## @.str.4
	.asciz	"link up\n"

	.no_dead_strip	_pcnet32_check_media
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcnet32_check_media
_pcnet32_check_media:                   ; @pcnet32_check_media
	.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	x21, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_netif_carrier_ok
	mov	x22, x0
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x20, #24
	bl	_mii_link_ok
	cbnz	w0, LBB0_6
	b	LBB0_13
LBB0_2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _PCNET32_79C970A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCNET32_79C970A@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w0, [x19]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x20, #48]
	cbnz	w8, LBB0_6
; %bb.4:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_6
LBB0_5:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	w1, #4
	blr	x8
	cmp	w0, #192
	cset	w0, ne
	cbz	w0, LBB0_13
LBB0_6:
	cbnz	w21, LBB0_8
; %bb.7:
	cbnz	x22, LBB0_18
LBB0_8:
	mov	x0, x19
	bl	_netif_carrier_on
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_19
; %bb.9:
	mov	x0, x20
	bl	_netif_msg_link
	cbz	x0, LBB0_11
; %bb.10:
	str	xzr, [sp]
Lloh3:
	adrp	x8, _ETHTOOL_GSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETHTOOL_GSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x0, x20, #24
	mov	x1, sp
	bl	_mii_ethtool_gset
	mov	x0, sp
	bl	_ethtool_cmd_speed
	mov	x2, x0
	ldr	x8, [sp]
Lloh6:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, l_.str.3@PAGE
Lloh10:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh11:
	adrp	x11, l_.str.2@PAGE
Lloh12:
	add	x11, x11, l_.str.2@PAGEOFF
	cmp	x8, x9
	csel	x3, x11, x10, eq
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_info
LBB0_11:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	w0, [x19]
	mov	w1, #9
	blr	x8
	and	w9, w0, #0x1
	ldr	w8, [x20, #24]
	cmp	w9, w8
	b.eq	LBB0_18
; %bb.12:
	cmp	w8, #0
	cset	w8, ne
	and	w9, w0, #0xfffffffe
	orr	w2, w9, w8
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #8]
	ldr	w0, [x19]
	mov	w1, #9
	blr	x8
	b	LBB0_18
LBB0_13:
	cbnz	w21, LBB0_15
; %bb.14:
	cbz	x22, LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_netif_carrier_off
Lloh15:
	adrp	x8, _link@GOTPAGE
Lloh16:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_info
LBB0_16:
	ldr	w8, [x20, #8]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.17:
	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
	add	sp, sp, #64
	b	_pcnet32_check_otherphy
LBB0_18:
	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
LBB0_19:
Lloh20:
	adrp	x8, _link@GOTPAGE
Lloh21:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x3, l_.str.4@PAGE
Lloh24:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, 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
	b	_netif_info
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PCNET32_79C970A,8,3            ; @PCNET32_79C970A
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"link down\n"

	.comm	_ETHTOOL_GSET,4,2               ; @ETHTOOL_GSET
l_.str.1:                               ; @.str.1
	.asciz	"link up, %uMbps, %s-duplex\n"

	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
l_.str.2:                               ; @.str.2
	.asciz	"full"

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

l_.str.4:                               ; @.str.4
	.asciz	"link up\n"

	.no_dead_strip	_pcnet32_check_media
.subsections_via_symbols
