	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx82310_bind
_cx82310_bind:                          ## @cx82310_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	32(%rdi), %r14
	movl	4(%r14), %esi
	leaq	-63(%rbp), %rdx
	movq	%r14, %rdi
	movl	$15, %ecx
	callq	_usb_string
	testq	%rax, %rax
	jle	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	leaq	-63(%rbp), %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_3:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_usbnet_get_endpoints
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.4:
	movq	16(%r12), %rax
	movq	$0, 8(%rax)
	movq	_CX82310_MTU@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$2, %rdi
	movq	%rdi, 24(%r12)
	movl	$4096, (%r12)                   ## imm = 0x1000
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movl	$-49, %ebx
	movq	_CMD_GET_LINK_STATUS@GOTPCREL(%rip), %r13
	leaq	-76(%rbp), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	incl	%ebx
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movl	$12, (%rsp)
	movq	%r12, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_cx82310_cmd
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, -76(%rbp)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, -68(%rbp)
	jne	LBB0_9
## %bb.13:
	movq	_CMD_ETHERNET_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$0, (%rsp)
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movl	$1, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_cx82310_cmd
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_15
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_16:
	movq	_CMD_GET_MAC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r12), %rax
	movq	(%rax), %r9
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_cx82310_cmd
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
LBB0_15:
	movq	%r14, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_19:
	movq	8(%r12), %rdi
	callq	_kfree
	movl	%r15d, %ebx
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_CMD_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$0, (%rsp)
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_cx82310_cmd
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_19
	jmp	LBB0_20
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"USB NET CARD"

L_.str.1:                               ## @.str.1
	.asciz	"ignoring: probably an ADSL modem\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CX82310_MTU,8,3                ## @CX82310_MTU
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMD_GET_LINK_STATUS,4,2        ## @CMD_GET_LINK_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"firmware not ready in time\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CMD_ETHERNET_MODE,4,2          ## @CMD_ETHERNET_MODE
L_.str.3:                               ## @.str.3
	.asciz	"\001"

L_.str.4:                               ## @.str.4
	.asciz	"unable to enable ethernet mode: %d\n"

	.comm	_CMD_GET_MAC_ADDR,4,2           ## @CMD_GET_MAC_ADDR
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
L_.str.5:                               ## @.str.5
	.asciz	"unable to read MAC address: %d\n"

	.comm	_CMD_START,4,2                  ## @CMD_START
	.no_dead_strip	_cx82310_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx82310_bind
_cx82310_bind:                          ; @cx82310_bind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x20, [x0, #32]
	ldr	w1, [x20, #4]
	add	x2, sp, #25
	mov	x0, x20
	mov	w3, #15
	bl	_usb_string
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #25
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	bl	_usbnet_get_endpoints
	mov	x21, x0
	cbnz	w0, LBB0_17
; %bb.5:
	ldr	x8, [x19, #16]
	str	xzr, [x8, #8]
Lloh9:
	adrp	x8, _CX82310_MTU@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX82310_MTU@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x0, x8, #2
	str	x0, [x19, #24]
	mov	w8, #4096
	str	w8, [x19]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.6:
	mov	w21, #-49
Lloh15:
	adrp	x22, _CMD_GET_LINK_STATUS@GOTPAGE
Lloh16:
	ldr	x22, [x22, _CMD_GET_LINK_STATUS@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x5, sp, #12
	mov	x0, x19
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	w6, #12
	bl	_cx82310_cmd
	ldr	w8, [sp, #12]
	ldr	w9, [sp, #20]
	cmp	w0, #0
	ccmp	w8, #1, #0, eq
	ccmp	w9, #1, #0, eq
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #500
	bl	_msleep
	adds	w21, w21, #1
	b.lo	LBB0_7
; %bb.9:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh19:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_10:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
Lloh24:
	adrp	x8, _CMD_ETHERNET_MODE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CMD_ETHERNET_MODE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x3, l_.str.3@PAGE
Lloh28:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	mov	w4, #1
	mov	x5, #0
	mov	w6, #0
	bl	_cx82310_cmd
	cbz	w0, LBB0_13
; %bb.12:
	mov	x21, x0
	str	x21, [sp]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_16
LBB0_13:
Lloh31:
	adrp	x8, _CMD_GET_MAC_ADDR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CMD_GET_MAC_ADDR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	x5, [x8]
Lloh34:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh36:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	bl	_cx82310_cmd
	cbz	w0, LBB0_15
; %bb.14:
	mov	x21, x0
	str	x21, [sp]
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_16
LBB0_15:
Lloh39:
	adrp	x8, _CMD_START@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CMD_START@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	mov	w6, #0
	bl	_cx82310_cmd
	mov	x21, x0
	cbz	w0, LBB0_17
LBB0_16:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_17:
	ldr	x8, [sp, #40]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"USB NET CARD"

l_.str.1:                               ; @.str.1
	.asciz	"ignoring: probably an ADSL modem\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CX82310_MTU,8,3                ; @CX82310_MTU
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMD_GET_LINK_STATUS,4,2        ; @CMD_GET_LINK_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"firmware not ready in time\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CMD_ETHERNET_MODE,4,2          ; @CMD_ETHERNET_MODE
l_.str.3:                               ; @.str.3
	.asciz	"\001"

l_.str.4:                               ; @.str.4
	.asciz	"unable to enable ethernet mode: %d\n"

	.comm	_CMD_GET_MAC_ADDR,4,2           ; @CMD_GET_MAC_ADDR
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
l_.str.5:                               ; @.str.5
	.asciz	"unable to read MAC address: %d\n"

	.comm	_CMD_START,4,2                  ; @CMD_START
	.no_dead_strip	_cx82310_bind
.subsections_via_symbols
