	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_wait_stat                  ## -- Begin function ide_wait_stat
	.p2align	4, 0x90
_ide_wait_stat:                         ## @ide_wait_stat
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	%rax, 8(%rbx)
	jle	LBB0_3
## %bb.2:
	movq	_ide_stopped@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r15d
	jmp	LBB0_6
LBB0_3:
	leaq	-28(%rbp), %rax
	movq	%rbx, %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	movq	%r8, %rcx
	movq	%rax, %r8
	callq	___ide_wait_stat
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r15d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_ide_error
LBB0_6:
	movl	%eax, (%r14)
	jmp	LBB0_7
LBB0_4:
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ide_stopped,4,2                ## @ide_stopped
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"status timeout"

L_.str.1:                               ## @.str.1
	.asciz	"status error"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_wait_stat                  ; -- Begin function ide_wait_stat
	.p2align	2
_ide_wait_stat:                         ; @ide_wait_stat
	.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	x8, x4
	mov	x21, x1
	mov	x19, x0
	ldr	x9, [x1]
	cbz	x9, LBB0_3
; %bb.1:
	ldr	x10, [x21, #8]
	cmp	x10, x9
	b.le	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _ide_stopped@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ide_stopped@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w20, #1
	b	LBB0_5
LBB0_3:
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x2
	mov	x2, x3
	mov	x3, x8
	bl	___ide_wait_stat
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x10, l_.str@PAGE
Lloh9:
	add	x10, x10, l_.str@PAGEOFF
	cmn	w20, w8
	csel	x1, x10, x9, eq
	ldr	w2, [sp, #12]
	mov	x0, x21
	bl	_ide_error
LBB0_5:
	str	w0, [x19]
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ide_stopped,4,2                ; @ide_stopped
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"status timeout"

l_.str.1:                               ; @.str.1
	.asciz	"status error"

.subsections_via_symbols
