	.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	%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
	movl	(%rdi), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdi)
	cmpl	$5, %eax
	jl	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rax, %r14
	movl	(%r13), %esi
	movl	$40, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %r15
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r15)
	movq	_REQUEST_REGISTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	_USBCTL_FLUSH_THIS@GOTPCREL(%rip), %rax
	movq	_USBCTL_FLUSH_OTHER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 24(%r15)
	movq	_REG_USBCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%r15)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%r15)
	movl	4(%rbx), %r12d
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_nc_flush_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r15
	pushq	%r10
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_usb_submit_urb
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	callq	_kfree
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_free_urb                   ## TAILCALL
LBB0_6:
	movq	%rbx, %rdi
	callq	_netif_msg_rx_err
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devdbg
LBB0_8:
	movl	$0, (%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.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	_REQUEST_REGISTER,4,2           ## @REQUEST_REGISTER
	.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	_nc_flush_complete,4,2          ## @nc_flush_complete
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flush net1080; too many framing errors"

	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
	add	w9, w8, #1
	str	w9, [x0]
	cmp	w8, #5
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x23, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
	ldr	w1, [x23]
	mov	w0, #40
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x21, x0
Lloh2:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x0]
Lloh11:
	adrp	x8, _REQUEST_REGISTER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REQUEST_REGISTER@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _USBCTL_FLUSH_THIS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _USBCTL_FLUSH_THIS@GOTPAGEOFF]
	str	w8, [x0, #32]
Lloh16:
	ldr	w8, [x9]
Lloh17:
	adrp	x9, _USBCTL_FLUSH_OTHER@GOTPAGE
Lloh18:
	ldr	x9, [x9, _USBCTL_FLUSH_OTHER@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le16
	str	x0, [x21, #24]
Lloh20:
	adrp	x8, _REG_USBCTL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_USBCTL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [x21, #16]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [x21, #8]
	ldr	w22, [x19, #4]
	mov	x0, x22
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x2, x0
Lloh23:
	adrp	x8, _nc_flush_complete@GOTPAGE
Lloh24:
	ldr	x8, [x8, _nc_flush_complete@GOTPAGEOFF]
Lloh25:
	ldr	w6, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	mov	x4, #0
	mov	w5, #0
	mov	x7, x21
	bl	_usb_fill_control_urb
	ldr	w1, [x23]
	mov	x0, x20
	bl	_usb_submit_urb
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_kfree
LBB0_5:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_usb_free_urb
LBB0_6:
	mov	x0, x19
	bl	_netif_msg_rx_err
	cbz	x0, LBB0_8
; %bb.7:
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devdbg
LBB0_8:
	str	wzr, [x19]
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.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	_REQUEST_REGISTER,4,2           ; @REQUEST_REGISTER
	.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	_nc_flush_complete,4,2          ; @nc_flush_complete
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flush net1080; too many framing errors"

	.no_dead_strip	_nc_ensure_sync
.subsections_via_symbols
