	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_misc_reg
_set_misc_reg:                          ## @set_misc_reg
	.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
	movl	(%rdi), %r14d
	callq	_PRIV
	movq	%rax, %r15
	movl	(%rax), %eax
	movq	_HAS_MISC_REG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_PCNET_MISC@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	%r14, %rdi
	callq	_inb_p
                                        ## kill: def $eax killed $eax def $rax
	andl	$-4, %eax
	xorl	%ecx, %ecx
	cmpl	$2, 4(%rbx)
	sete	%cl
	leal	(%rax,%rcx), %edx
	movl	(%r15), %esi
	movq	_USE_BIG_BUF@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%esi, %edi
	leal	2(%rax,%rcx), %eax
	cmovel	%edx, %eax
	movq	_HAS_IBM_MISC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	movl	%eax, %edi
	orl	$8, %edi
	testl	%esi, %esi
	cmovel	%eax, %edi
	movq	(%r12), %rsi
	addq	%r14, %rsi
	callq	_outb_p
	movl	(%r15), %eax
LBB0_2:
	movq	_IS_DL10022@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.3:
	movq	_HAS_MII@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_DLINK_GPIO@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	movl	4(%r15), %esi
	movl	$4, %edx
	movl	$481, %ecx                      ## imm = 0x1E1
	callq	_mdio_write
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	movl	4(%r15), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mdio_write
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	movl	4(%r15), %esi
	xorl	%edx, %edx
	movl	$4608, %ecx                     ## imm = 0x1200
	callq	_mdio_write
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_7
LBB0_6:
	movq	_IS_DL10019@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.8:
	movq	_DLINK_GPIO@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	movl	4(%r15), %esi
	movl	$4, %edx
	movl	$481, %ecx                      ## imm = 0x1E1
	callq	_mdio_write
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	movl	4(%r15), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mdio_write
	addq	(%rbx), %r14
	movl	4(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$4608, %ecx                     ## imm = 0x1200
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdio_write                     ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_full_duplex@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
	shll	$2, %edi
	movq	_DLINK_DIAG@GOTPCREL(%rip), %rax
	addq	(%rax), %r14
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_outb                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HAS_MISC_REG,4,2               ## @HAS_MISC_REG
	.comm	_PCNET_MISC,8,3                 ## @PCNET_MISC
	.comm	_USE_BIG_BUF,4,2                ## @USE_BIG_BUF
	.comm	_HAS_IBM_MISC,4,2               ## @HAS_IBM_MISC
	.comm	_IS_DL10022,4,2                 ## @IS_DL10022
	.comm	_HAS_MII,4,2                    ## @HAS_MII
	.comm	_DLINK_GPIO,8,3                 ## @DLINK_GPIO
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_full_duplex,8,3                ## @full_duplex
	.comm	_DLINK_DIAG,8,3                 ## @DLINK_DIAG
	.comm	_IS_DL10019,4,2                 ## @IS_DL10019
	.no_dead_strip	_set_misc_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_misc_reg
_set_misc_reg:                          ; @set_misc_reg
	.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	x20, x0
	ldr	w21, [x0]
	bl	_PRIV
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _HAS_MISC_REG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HAS_MISC_REG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x22, _PCNET_MISC@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PCNET_MISC@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x0, x8, x21
	bl	_inb_p
	and	w8, w0, #0xfffffffc
	ldr	w9, [x20, #4]
	cmp	w9, #2
	cset	w9, eq
	orr	w8, w8, w9
	ldr	w9, [x19]
Lloh5:
	adrp	x10, _USE_BIG_BUF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _USE_BIG_BUF@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w11, w8, #0x2
	tst	w10, w9
	csel	w8, w8, w11, eq
Lloh8:
	adrp	x10, _HAS_IBM_MISC@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HAS_IBM_MISC@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w11, w8, #0x8
	tst	w10, w9
	csel	w0, w8, w11, eq
	ldr	x8, [x22]
	add	x1, x8, x21
	bl	_outb_p
	ldr	w8, [x19]
LBB0_2:
Lloh11:
	adrp	x9, _IS_DL10022@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IS_DL10022@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
Lloh14:
	adrp	x9, _HAS_MII@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HAS_MII@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.4:
Lloh17:
	adrp	x20, _DLINK_GPIO@GOTPAGE
Lloh18:
	ldr	x20, [x20, _DLINK_GPIO@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, x21
	ldr	w1, [x19, #4]
	mov	w2, #4
	mov	w3, #481
	bl	_mdio_write
	ldr	x8, [x20]
	add	x0, x8, x21
	ldr	w1, [x19, #4]
	mov	w2, #0
	mov	w3, #0
	bl	_mdio_write
	ldr	x8, [x20]
	add	x0, x8, x21
	ldr	w1, [x19, #4]
	mov	w2, #0
	mov	w3, #4608
	bl	_mdio_write
Lloh19:
	adrp	x8, _jiffies@GOTPAGE
Lloh20:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_7
LBB0_5:
Lloh22:
	adrp	x9, _IS_DL10019@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IS_DL10019@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh25:
	adrp	x20, _DLINK_GPIO@GOTPAGE
Lloh26:
	ldr	x20, [x20, _DLINK_GPIO@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, x21
	ldr	w1, [x19, #4]
	mov	w2, #4
	mov	w3, #481
	bl	_mdio_write
	ldr	x8, [x20]
	add	x0, x8, x21
	ldr	w1, [x19, #4]
	mov	w2, #0
	mov	w3, #0
	bl	_mdio_write
	ldr	x8, [x20]
	add	x0, x8, x21
	ldr	w1, [x19, #4]
	mov	w2, #0
	mov	w3, #4608
	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	_mdio_write
LBB0_7:
	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
	ret
LBB0_8:
Lloh27:
	adrp	x8, _full_duplex@GOTPAGE
Lloh28:
	ldr	x8, [x8, _full_duplex@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w8, ne
	lsl	w0, w8, #2
Lloh30:
	adrp	x8, _DLINK_DIAG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DLINK_DIAG@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	add	x1, x8, x21
	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	_outb
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_HAS_MISC_REG,4,2               ; @HAS_MISC_REG
	.comm	_PCNET_MISC,8,3                 ; @PCNET_MISC
	.comm	_USE_BIG_BUF,4,2                ; @USE_BIG_BUF
	.comm	_HAS_IBM_MISC,4,2               ; @HAS_IBM_MISC
	.comm	_IS_DL10022,4,2                 ; @IS_DL10022
	.comm	_HAS_MII,4,2                    ; @HAS_MII
	.comm	_DLINK_GPIO,8,3                 ; @DLINK_GPIO
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_full_duplex,8,3                ; @full_duplex
	.comm	_DLINK_DIAG,8,3                 ; @DLINK_DIAG
	.comm	_IS_DL10019,4,2                 ; @IS_DL10019
	.no_dead_strip	_set_misc_reg
.subsections_via_symbols
