	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kone_check_write
_kone_check_write:                      ## @kone_check_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_kone_command_confirm_write@GOTPCREL(%rip), %r15
	leaq	-28(%rbp), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$80, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	_kone_receive
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-28(%rbp), %edx
	cmpl	$3, %edx
	je	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	cmpl	$1, %edx
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kone_command_confirm_write,4,2 ## @kone_command_confirm_write
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got retval %d when checking write\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_kone_check_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kone_check_write
_kone_check_write:                      ; @kone_check_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _kone_command_confirm_write@GOTPAGE
Lloh1:
	ldr	x20, [x20, _kone_command_confirm_write@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #80
	bl	_msleep
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_kone_receive
	cbnz	w0, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w2, [sp, #12]
	cmp	w2, #3
	b.eq	LBB0_1
; %bb.3:
	cmp	w2, #1
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_kone_command_confirm_write,4,2 ; @kone_command_confirm_write
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got retval %d when checking write\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_kone_check_write
.subsections_via_symbols
