	.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, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_nc_register_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	(%r14), %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_nc_dump_status
	movq	_REG_USBCTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_nc_register_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_nc_dump_usbctl
	movl	(%r13), %esi
	movq	_USBCTL_FLUSH_THIS@GOTPCREL(%rip), %rax
	movq	_USBCTL_FLUSH_OTHER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_nc_register_write
	movq	_REG_TTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_nc_register_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	(%r14), %edi
	movl	(%r13), %r13d
	movq	_NC_READ_TTL_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_TTL_OTHER
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_MK_TTL
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_nc_register_write
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	_NC_READ_TTL_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dbg
	movq	%r15, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_STATUS_PORT_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	movq	_STATUS_CONN_OTHER@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r12d
	leaq	L_.str.6(%rip), %rdx
	leaq	L_.str.5(%rip), %rcx
	cmoveq	%rdx, %rcx
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	movl	$0, %edx
	adcl	$65, %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_devinfo
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_3:
	movl	%eax, %ebx
	movq	8(%r15), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dbg
	jmp	LBB0_11
LBB0_5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
LBB0_6:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dbg
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't read %s-%s status: %d"

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

	.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"

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

L_.str.4:                               ## @.str.4
	.asciz	"port %c, peer %sconnected"

	.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, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _REG_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_nc_register_read
	tbnz	w0, #31, LBB0_8
; %bb.2:
	ldr	w21, [x19]
	mov	x0, x20
	mov	x1, x21
	bl	_nc_dump_status
Lloh6:
	adrp	x23, _REG_USBCTL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _REG_USBCTL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x19
	bl	_nc_register_read
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_nc_dump_usbctl
Lloh8:
	adrp	x8, _USBCTL_FLUSH_THIS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _USBCTL_FLUSH_THIS@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _USBCTL_FLUSH_OTHER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _USBCTL_FLUSH_OTHER@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_nc_register_write
Lloh14:
	adrp	x23, _REG_TTL@GOTPAGE
Lloh15:
	ldr	x23, [x23, _REG_TTL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x19
	bl	_nc_register_read
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	w0, [x19]
	ldr	w22, [x23]
Lloh16:
	adrp	x24, _NC_READ_TTL_MS@GOTPAGE
Lloh17:
	ldr	x24, [x24, _NC_READ_TTL_MS@GOTPAGEOFF]
	ldr	w23, [x24]
	bl	_TTL_OTHER
	mov	x1, x0
	mov	x0, x23
	bl	_MK_TTL
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_nc_register_write
	ldr	x8, [x20]
	ldr	w1, [x8]
	ldr	w8, [x24]
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg
	mov	x0, x20
	bl	_netif_msg_link
	cbz	x0, LBB0_6
; %bb.5:
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, w21
	csel	x3, x11, x10, eq
	tst	w8, w21
	mov	w8, #65
	cinc	w2, w8, eq
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_devinfo
LBB0_6:
	mov	w22, #0
	b	LBB0_13
LBB0_7:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_8:
	mov	x22, x0
	ldr	x8, [x20, #8]
	ldr	x9, [x8, #8]
	ldr	w1, [x9]
	ldr	w8, [x8]
	stp	x8, x22, [sp]
Lloh35:
	adrp	x0, l_.str@PAGE
Lloh36:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_9:
	mov	x22, x0
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x22, x0
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	mov	x1, x22
LBB0_12:
	bl	_dbg
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh29
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't read %s-%s status: %d"

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

	.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"

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

l_.str.4:                               ; @.str.4
	.asciz	"port %c, peer %sconnected"

	.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
