	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function net1080_reset
_net1080_reset:                         ## @net1080_reset
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_nc_register_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-44(%rbp), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_nc_dump_status
	movq	_REG_USBCTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_nc_register_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_nc_dump_usbctl
	movl	(%r12), %esi
	movq	_USBCTL_FLUSH_THIS@GOTPCREL(%rip), %rax
	movq	_USBCTL_FLUSH_OTHER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_nc_register_write
	movq	_REG_TTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_nc_register_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	-44(%rbp), %edi
	movl	(%r12), %r12d
	movq	_NC_READ_TTL_MS@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	callq	_TTL_OTHER
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_MK_TTL
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_nc_register_write
	movl	(%r14), %edi
	movl	(%r13), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_netdev_dbg
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	_STATUS_PORT_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	movq	_STATUS_CONN_OTHER@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r15d
	leaq	L_.str.6(%rip), %rcx
	leaq	L_.str.5(%rip), %r9
	cmoveq	%rcx, %r9
	cmpl	$1, %eax
	movl	$0, %r8d
	adcl	$65, %r8d
	leaq	L_.str.4(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_info
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movq	8(%r14), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_netdev_dbg
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_dbg
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't read %s-%s status: %d\n"

	.comm	_REG_USBCTL,4,2                 ## @REG_USBCTL
L_.str.1:                               ## @.str.1
	.asciz	"can't read USBCTL, %d\n"

	.comm	_USBCTL_FLUSH_THIS,4,2          ## @USBCTL_FLUSH_THIS
	.comm	_USBCTL_FLUSH_OTHER,4,2         ## @USBCTL_FLUSH_OTHER
	.comm	_REG_TTL,4,2                    ## @REG_TTL
L_.str.2:                               ## @.str.2
	.asciz	"can't read TTL, %d\n"

	.comm	_NC_READ_TTL_MS,4,2             ## @NC_READ_TTL_MS
L_.str.3:                               ## @.str.3
	.asciz	"assigned TTL, %d ms\n"

	.comm	_link,4,2                       ## @link
L_.str.4:                               ## @.str.4
	.asciz	"port %c, peer %sconnected\n"

	.comm	_STATUS_PORT_A,4,2              ## @STATUS_PORT_A
	.comm	_STATUS_CONN_OTHER,4,2          ## @STATUS_CONN_OTHER
L_.str.5:                               ## @.str.5
	.space	1

L_.str.6:                               ## @.str.6
	.asciz	"dis"

	.no_dead_strip	_net1080_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function net1080_reset
_net1080_reset:                         ; @net1080_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _REG_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_nc_register_read
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w20, [sp, #28]
	mov	x0, x19
	mov	x1, x20
	bl	_nc_dump_status
Lloh3:
	adrp	x22, _REG_USBCTL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _REG_USBCTL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #28
	mov	x0, x19
	bl	_nc_register_read
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w1, [sp, #28]
	mov	x0, x19
	bl	_nc_dump_usbctl
Lloh5:
	adrp	x8, _USBCTL_FLUSH_THIS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USBCTL_FLUSH_THIS@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _USBCTL_FLUSH_OTHER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USBCTL_FLUSH_OTHER@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_nc_register_write
Lloh11:
	adrp	x22, _REG_TTL@GOTPAGE
Lloh12:
	ldr	x22, [x22, _REG_TTL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #28
	mov	x0, x19
	bl	_nc_register_read
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w0, [sp, #28]
	ldr	w21, [x22]
Lloh13:
	adrp	x23, _NC_READ_TTL_MS@GOTPAGE
Lloh14:
	ldr	x23, [x23, _NC_READ_TTL_MS@GOTPAGEOFF]
	ldr	w22, [x23]
	bl	_TTL_OTHER
	mov	x1, x0
	mov	x0, x22
	bl	_MK_TTL
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_nc_register_write
	ldr	w0, [x19]
	ldr	w2, [x23]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_netdev_dbg
Lloh17:
	adrp	x8, _link@GOTPAGE
Lloh18:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh20:
	adrp	x8, _STATUS_PORT_A@GOTPAGE
Lloh21:
	ldr	x8, [x8, _STATUS_PORT_A@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _STATUS_CONN_OTHER@GOTPAGE
Lloh24:
	ldr	x9, [x9, _STATUS_CONN_OTHER@GOTPAGEOFF]
Lloh25:
	adrp	x10, l_.str.5@PAGE
Lloh26:
	add	x10, x10, l_.str.5@PAGEOFF
Lloh27:
	adrp	x11, l_.str.6@PAGE
Lloh28:
	add	x11, x11, l_.str.6@PAGEOFF
Lloh29:
	ldr	w9, [x9]
	tst	w9, w20
	csel	x5, x11, x10, eq
	tst	w8, w20
	mov	w8, #65
	cinc	w4, w8, eq
Lloh30:
	adrp	x3, l_.str.4@PAGE
Lloh31:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netif_info
	mov	w21, #0
	b	LBB0_9
LBB0_4:
	mov	x21, x0
	ldr	w0, [x19]
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	ldr	w2, [x9]
	ldr	w8, [x8]
	stp	x8, x21, [sp]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_5:
	mov	x21, x0
	ldr	w0, [x19]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x21, x0
	ldr	w0, [x19]
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x2, x21
LBB0_8:
	bl	_netdev_dbg
LBB0_9:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh29
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't read %s-%s status: %d\n"

	.comm	_REG_USBCTL,4,2                 ; @REG_USBCTL
l_.str.1:                               ; @.str.1
	.asciz	"can't read USBCTL, %d\n"

	.comm	_USBCTL_FLUSH_THIS,4,2          ; @USBCTL_FLUSH_THIS
	.comm	_USBCTL_FLUSH_OTHER,4,2         ; @USBCTL_FLUSH_OTHER
	.comm	_REG_TTL,4,2                    ; @REG_TTL
l_.str.2:                               ; @.str.2
	.asciz	"can't read TTL, %d\n"

	.comm	_NC_READ_TTL_MS,4,2             ; @NC_READ_TTL_MS
l_.str.3:                               ; @.str.3
	.asciz	"assigned TTL, %d ms\n"

	.comm	_link,4,2                       ; @link
l_.str.4:                               ; @.str.4
	.asciz	"port %c, peer %sconnected\n"

	.comm	_STATUS_PORT_A,4,2              ; @STATUS_PORT_A
	.comm	_STATUS_CONN_OTHER,4,2          ; @STATUS_CONN_OTHER
l_.str.5:                               ; @.str.5
	.space	1

l_.str.6:                               ; @.str.6
	.asciz	"dis"

	.no_dead_strip	_net1080_reset
.subsections_via_symbols
