	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sr9700_bind
_sr9700_bind:                           ## @sr9700_bind
	.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
	callq	_usbnet_get_endpoints
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	56(%rbx), %r14
	movq	_sr9700_netdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r14)
	movq	_sr9700_ethtool_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	movq	_SR_TX_OVERHEAD@GOTPCREL(%rip), %rax
	movq	8(%r14), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%r14)
	addq	16(%r14), %rcx
	movq	%rcx, 48(%rbx)
	movl	$3072, (%rbx)                   ## imm = 0xC00
	movq	%r14, 40(%rbx)
	movq	_sr_mdio_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_sr_mdio_write@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movabsq	$133143986207, %rax             ## imm = 0x1F0000001F
	movq	%rax, 8(%rbx)
	movq	_SR_NCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NCR_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sr_write_reg
	movl	$20, %edi
	callq	_udelay
	movq	_SR_PAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movq	%rbx, %rdi
	callq	_sr_read
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	leaq	8(%rbx), %r15
	movq	_SR_PRR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_PRR_PHY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sr_write_reg
	movl	$20, %edi
	callq	_msleep
	movl	(%r12), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_sr_write_reg
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_udelay
	movq	%r14, %rdi
	callq	_sr9700_set_multicast
	movl	16(%rbx), %esi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMCR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_sr_mdio_write
	movl	16(%rbx), %esi
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rax
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rdx
	movq	_ADVERTISE_CSMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movl	(%rax), %edx
	movq	_ADVERTISE_PAUSE_CAP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_sr_mdio_write
	movq	%r15, %rdi
	callq	_mii_nway_restart
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_4:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sr9700_netdev_ops,4,2          ## @sr9700_netdev_ops
	.comm	_sr9700_ethtool_ops,4,2         ## @sr9700_ethtool_ops
	.comm	_SR_TX_OVERHEAD,8,3             ## @SR_TX_OVERHEAD
	.comm	_sr_mdio_read,4,2               ## @sr_mdio_read
	.comm	_SR_NCR,4,2                     ## @SR_NCR
	.comm	_NCR_RST,4,2                    ## @NCR_RST
	.comm	_SR_PAR,4,2                     ## @SR_PAR
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading MAC address\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SR_PRR,4,2                     ## @SR_PRR
	.comm	_PRR_PHY_RST,4,2                ## @PRR_PHY_RST
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ## @BMCR_RESET
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_CSMA,4,2             ## @ADVERTISE_CSMA
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ## @ADVERTISE_PAUSE_CAP
	.no_dead_strip	_sr9700_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sr9700_bind
_sr9700_bind:                           ; @sr9700_bind
	.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
	bl	_usbnet_get_endpoints
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x19, [x20, #56]
Lloh0:
	adrp	x8, _sr9700_netdev_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sr9700_netdev_ops@GOTPAGEOFF]
Lloh2:
	adrp	x9, _sr9700_ethtool_ops@GOTPAGE
Lloh3:
	ldr	x9, [x9, _sr9700_ethtool_ops@GOTPAGEOFF]
	stp	x9, x8, [x19, #24]
Lloh4:
	adrp	x8, _SR_TX_OVERHEAD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SR_TX_OVERHEAD@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldp	x9, x10, [x19, #8]
	add	x8, x9, x8
	add	x9, x10, x8
	str	x8, [x19, #8]
	mov	w8, #3072
	str	w8, [x20]
	movi.2s	v0, #31
	mov	x21, x20
	str	d0, [x21, #8]!
Lloh7:
	adrp	x8, _sr_mdio_read@GOTPAGE
Lloh8:
	ldr	x8, [x8, _sr_mdio_read@GOTPAGEOFF]
	stp	x19, x9, [x20, #40]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x20, #32]
Lloh10:
	adrp	x8, _sr_mdio_write@GOTPAGE
Lloh11:
	ldr	x8, [x8, _sr_mdio_write@GOTPAGEOFF]
	str	x8, [x20, #24]
Lloh12:
	adrp	x8, _SR_NCR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SR_NCR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _NCR_RST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NCR_RST@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sr_write_reg
	mov	w0, #20
	bl	_udelay
Lloh18:
	adrp	x8, _SR_PAR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SR_PAR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	ldr	w3, [x19]
	mov	x0, x20
	bl	_sr_read
	tbnz	x0, #63, LBB0_3
; %bb.2:
Lloh24:
	adrp	x22, _SR_PRR@GOTPAGE
Lloh25:
	ldr	x22, [x22, _SR_PRR@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh26:
	adrp	x8, _PRR_PHY_RST@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PRR_PHY_RST@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sr_write_reg
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_sr_write_reg
	mov	w0, #2000
	bl	_udelay
	mov	x0, x19
	bl	_sr9700_set_multicast
	ldr	w1, [x20, #16]
Lloh29:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
Lloh32:
	adrp	x8, _BMCR_RESET@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BMCR_RESET@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_sr_mdio_write
	ldr	w1, [x20, #16]
Lloh35:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
Lloh38:
	adrp	x8, _ADVERTISE_ALL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _ADVERTISE_CSMA@GOTPAGE
Lloh42:
	ldr	x9, [x9, _ADVERTISE_CSMA@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh44:
	adrp	x9, _ADVERTISE_PAUSE_CAP@GOTPAGE
Lloh45:
	ldr	x9, [x9, _ADVERTISE_PAUSE_CAP@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x19
	bl	_sr_mdio_write
	mov	x0, x21
	bl	_mii_nway_restart
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh47:
	adrp	x1, l_.str@PAGE
Lloh48:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh49:
	adrp	x8, _ENODEV@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_sr9700_netdev_ops,4,2          ; @sr9700_netdev_ops
	.comm	_sr9700_ethtool_ops,4,2         ; @sr9700_ethtool_ops
	.comm	_SR_TX_OVERHEAD,8,3             ; @SR_TX_OVERHEAD
	.comm	_sr_mdio_read,4,2               ; @sr_mdio_read
	.comm	_SR_NCR,4,2                     ; @SR_NCR
	.comm	_NCR_RST,4,2                    ; @NCR_RST
	.comm	_SR_PAR,4,2                     ; @SR_PAR
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading MAC address\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SR_PRR,4,2                     ; @SR_PRR
	.comm	_PRR_PHY_RST,4,2                ; @PRR_PHY_RST
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ; @BMCR_RESET
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_CSMA,4,2             ; @ADVERTISE_CSMA
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ; @ADVERTISE_PAUSE_CAP
	.no_dead_strip	_sr9700_bind
.subsections_via_symbols
