	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nc_ensure_sync
_nc_ensure_sync:                        ## @nc_ensure_sync
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdi)
	cmpl	$5, %eax
	jl	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_REQUEST_REGISTER@GOTPCREL(%rip), %rax
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_USBCTL_FLUSH_THIS@GOTPCREL(%rip), %rax
	movq	_USBCTL_FLUSH_OTHER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_REG_USBCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	xorl	%r9d, %r9d
	callq	_usbnet_write_cmd_async
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_rx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_dbg
	movl	$0, (%rbx)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REQUEST_REGISTER,4,2           ## @REQUEST_REGISTER
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_USBCTL_FLUSH_THIS,4,2          ## @USBCTL_FLUSH_THIS
	.comm	_USBCTL_FLUSH_OTHER,4,2         ## @USBCTL_FLUSH_OTHER
	.comm	_REG_USBCTL,4,2                 ## @REG_USBCTL
	.comm	_rx_err,4,2                     ## @rx_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flush net1080; too many framing errors\n"

	.no_dead_strip	_nc_ensure_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nc_ensure_sync
_nc_ensure_sync:                        ; @nc_ensure_sync
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	add	w9, w8, #1
	str	w9, [x0]
	cmp	w8, #5
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _REQUEST_REGISTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REQUEST_REGISTER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh12:
	adrp	x8, _USBCTL_FLUSH_THIS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USBCTL_FLUSH_THIS@GOTPAGEOFF]
Lloh14:
	adrp	x9, _USBCTL_FLUSH_OTHER@GOTPAGE
Lloh15:
	ldr	x9, [x9, _USBCTL_FLUSH_OTHER@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh18:
	adrp	x8, _REG_USBCTL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_USBCTL@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	mov	x5, #0
	mov	w6, #0
	bl	_usbnet_write_cmd_async
	cbnz	x0, LBB0_3
; %bb.2:
Lloh21:
	adrp	x8, _rx_err@GOTPAGE
Lloh22:
	ldr	x8, [x8, _rx_err@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
Lloh24:
	adrp	x3, l_.str@PAGE
Lloh25:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
	str	wzr, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_REQUEST_REGISTER,4,2           ; @REQUEST_REGISTER
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_USBCTL_FLUSH_THIS,4,2          ; @USBCTL_FLUSH_THIS
	.comm	_USBCTL_FLUSH_OTHER,4,2         ; @USBCTL_FLUSH_OTHER
	.comm	_REG_USBCTL,4,2                 ; @REG_USBCTL
	.comm	_rx_err,4,2                     ; @rx_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flush net1080; too many framing errors\n"

	.no_dead_strip	_nc_ensure_sync
.subsections_via_symbols
