	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function diolan_flush_input
_diolan_flush_input:                    ## @diolan_flush_input
	.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
	movl	$10, %ebx
	movq	_DIOLAN_USB_TIMEOUT@GOTPCREL(%rip), %r13
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -44(%rbp)
	movl	12(%r15), %esi
	movl	16(%r15), %r12d
	movl	%r12d, %edi
	callq	_usb_rcvbulkpipe
	movl	8(%r15), %edx
	movl	(%r13), %r9d
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	$4, %ecx
	movq	%r14, %r8
	callq	_usb_bulk_msg
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, -44(%rbp)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	decl	%ebx
	jne	LBB0_1
## %bb.4:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DIOLAN_USB_TIMEOUT,4,2         ## @DIOLAN_USB_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to flush input buffer\n"

	.no_dead_strip	_diolan_flush_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function diolan_flush_input
_diolan_flush_input:                    ; @diolan_flush_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	mov	w21, #10
Lloh0:
	adrp	x22, _DIOLAN_USB_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DIOLAN_USB_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #12]
	ldp	w1, w20, [x19, #12]
	mov	x0, x20
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	ldr	w2, [x19, #8]
	ldr	w5, [x22]
	add	x4, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_usb_bulk_msg
	tbnz	w0, #31, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_1
; %bb.4:
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_DIOLAN_USB_TIMEOUT,4,2         ; @DIOLAN_USB_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to flush input buffer\n"

	.no_dead_strip	_diolan_flush_input
.subsections_via_symbols
