	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ch9200_bind
_ch9200_bind:                           ## @ch9200_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_usbnet_get_endpoints
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	leaq	16(%rbx), %rdi
	movq	%rax, 32(%rbx)
	movq	_ch9200_mdio_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rbx)
	movq	_ch9200_mdio_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rbx)
	movabsq	$133143986207, %rcx             ## imm = 0x1F0000001F
	movq	%rcx, 16(%rbx)
	movq	8(%rax), %rcx
	addq	16(%rax), %rcx
	movq	%rcx, 40(%rbx)
	movl	$1552, (%rbx)                   ## imm = 0x610
	callq	_mii_nway_restart
	movw	$3841, -34(%rbp)                ## imm = 0xF01
	movq	_REQUEST_WRITE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_MAC_REG_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_CONTROL_TIMEOUT_MS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, (%rsp)
	leaq	-34(%rbp), %r14
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %r8
	movl	$2, %r9d
	callq	_control_write
	movw	$-28512, -34(%rbp)              ## imm = 0x90A0
	movl	(%r15), %esi
	movq	_MAC_REG_FIFO_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %r8
	movl	$2, %r9d
	callq	_control_write
	movw	$48, -34(%rbp)
	movl	(%r15), %esi
	movq	_MAC_REG_PAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %r8
	movl	$2, %r9d
	callq	_control_write
	movw	$-10217, -34(%rbp)              ## imm = 0xD817
	movl	(%r15), %esi
	movq	_MAC_REG_FLOW_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %r8
	movl	$2, %r9d
	callq	_control_write
	movw	$1, -34(%rbp)
	movl	(%r15), %esi
	movl	(%r12), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$254, %ecx
	movq	%r14, %r8
	movl	$2, %r9d
	callq	_control_write
	movw	$3423, -34(%rbp)                ## imm = 0xD5F
	movl	(%r15), %esi
	movq	_MAC_REG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %r8
	movl	$2, %r9d
	callq	_control_write
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_get_mac_address
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ch9200_mdio_read,4,2           ## @ch9200_mdio_read
	.comm	_ch9200_mdio_write,4,2          ## @ch9200_mdio_write
	.comm	_REQUEST_WRITE,4,2              ## @REQUEST_WRITE
	.comm	_MAC_REG_THRESHOLD,4,2          ## @MAC_REG_THRESHOLD
	.comm	_CONTROL_TIMEOUT_MS,4,2         ## @CONTROL_TIMEOUT_MS
	.comm	_MAC_REG_FIFO_DEPTH,4,2         ## @MAC_REG_FIFO_DEPTH
	.comm	_MAC_REG_PAUSE,4,2              ## @MAC_REG_PAUSE
	.comm	_MAC_REG_FLOW_CONTROL,4,2       ## @MAC_REG_FLOW_CONTROL
	.comm	_MAC_REG_CTRL,4,2               ## @MAC_REG_CTRL
	.no_dead_strip	_ch9200_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ch9200_bind
_ch9200_bind:                           ; @ch9200_bind
	.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	x19, x0
	bl	_usbnet_get_endpoints
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ch9200_mdio_read@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ch9200_mdio_read@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x10, _ch9200_mdio_write@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ch9200_mdio_write@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w8, [x19, #24]
	movi.2s	v0, #31
	ldp	x10, x8, [x9, #8]
	add	x8, x10, x8
	mov	x0, x19
	str	d0, [x0, #16]!
	stp	x9, x8, [x19, #32]
	mov	w8, #1552
	str	w8, [x19]
	bl	_mii_nway_restart
	mov	w8, #3841
	strh	w8, [sp, #14]
Lloh6:
	adrp	x20, _REQUEST_WRITE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _REQUEST_WRITE@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _MAC_REG_THRESHOLD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAC_REG_THRESHOLD@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x21, _CONTROL_TIMEOUT_MS@GOTPAGE
Lloh12:
	ldr	x21, [x21, _CONTROL_TIMEOUT_MS@GOTPAGEOFF]
	ldr	w6, [x21]
	add	x4, sp, #14
	mov	x0, x19
	mov	w2, #0
	mov	w5, #2
	bl	_control_write
	mov	w8, #37024
	strh	w8, [sp, #14]
	ldr	w1, [x20]
Lloh13:
	adrp	x8, _MAC_REG_FIFO_DEPTH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAC_REG_FIFO_DEPTH@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	ldr	w6, [x21]
	add	x4, sp, #14
	mov	x0, x19
	mov	w2, #0
	mov	w5, #2
	bl	_control_write
	mov	w8, #48
	strh	w8, [sp, #14]
	ldr	w1, [x20]
Lloh16:
	adrp	x8, _MAC_REG_PAUSE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAC_REG_PAUSE@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	ldr	w6, [x21]
	add	x4, sp, #14
	mov	x0, x19
	mov	w2, #0
	mov	w5, #2
	bl	_control_write
	mov	w8, #55319
	strh	w8, [sp, #14]
	ldr	w1, [x20]
Lloh19:
	adrp	x8, _MAC_REG_FLOW_CONTROL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAC_REG_FLOW_CONTROL@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	ldr	w6, [x21]
	add	x4, sp, #14
	mov	x0, x19
	mov	w2, #0
	mov	w5, #2
	bl	_control_write
	mov	w8, #1
	strh	w8, [sp, #14]
	ldr	w1, [x20]
	ldr	w6, [x21]
	add	x4, sp, #14
	mov	x0, x19
	mov	w2, #0
	mov	w3, #254
	mov	w5, #2
	bl	_control_write
	mov	w8, #3423
	strh	w8, [sp, #14]
	ldr	w1, [x20]
Lloh22:
	adrp	x8, _MAC_REG_CTRL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MAC_REG_CTRL@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	ldr	w6, [x21]
	add	x4, sp, #14
	mov	x0, x19
	mov	w2, #0
	mov	w5, #2
	bl	_control_write
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_get_mac_address
LBB0_2:
	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
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ch9200_mdio_read,4,2           ; @ch9200_mdio_read
	.comm	_ch9200_mdio_write,4,2          ; @ch9200_mdio_write
	.comm	_REQUEST_WRITE,4,2              ; @REQUEST_WRITE
	.comm	_MAC_REG_THRESHOLD,4,2          ; @MAC_REG_THRESHOLD
	.comm	_CONTROL_TIMEOUT_MS,4,2         ; @CONTROL_TIMEOUT_MS
	.comm	_MAC_REG_FIFO_DEPTH,4,2         ; @MAC_REG_FIFO_DEPTH
	.comm	_MAC_REG_PAUSE,4,2              ; @MAC_REG_PAUSE
	.comm	_MAC_REG_FLOW_CONTROL,4,2       ; @MAC_REG_FLOW_CONTROL
	.comm	_MAC_REG_CTRL,4,2               ; @MAC_REG_CTRL
	.no_dead_strip	_ch9200_bind
.subsections_via_symbols
