	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waitbusy
_waitbusy:                              ## @waitbusy
	.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, %r12
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IN4500
	movq	_COMMAND_BUSY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	movw	$1, %bx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r13d
	movzwl	%bx, %eax
	imull	$52429, %eax, %eax              ## imm = 0xCCCD
	shrl	$20, %eax
	leal	(%rax,%rax,4), %r14d
	movl	$10, %edi
	callq	_udelay
	leal	-1(,%r14,4), %eax
	cmpw	%r13w, %ax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_EVACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EV_CLEARCOMMANDBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_OUT4500
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_IN4500
	testl	%eax, (%r15)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	leal	1(%r13), %eax
	cmpl	$9999, %r13d                    ## imm = 0x270F
	jb	LBB0_3
LBB0_7:
	xorl	%eax, %eax
	cmpl	$9999, %r13d                    ## imm = 0x270F
	setb	%al
	jmp	LBB0_8
LBB0_1:
	movl	$1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_COMMAND_BUSY,4,2               ## @COMMAND_BUSY
	.comm	_EVACK,4,2                      ## @EVACK
	.comm	_EV_CLEARCOMMANDBUSY,4,2        ## @EV_CLEARCOMMANDBUSY
	.no_dead_strip	_waitbusy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waitbusy
_waitbusy:                              ; @waitbusy
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x20, _COMMAND@GOTPAGE
Lloh1:
	ldr	x20, [x20, _COMMAND@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_IN4500
Lloh2:
	adrp	x21, _COMMAND_BUSY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _COMMAND_BUSY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	mov	w24, #0
	mov	w22, #52429
	movk	w22, #52428, lsl #16
	mov	w23, #52428
	movk	w23, #3276, lsl #16
Lloh4:
	adrp	x25, _EVACK@GOTPAGE
Lloh5:
	ldr	x25, [x25, _EVACK@GOTPAGEOFF]
Lloh6:
	adrp	x26, _EV_CLEARCOMMANDBUSY@GOTPAGE
Lloh7:
	ldr	x26, [x26, _EV_CLEARCOMMANDBUSY@GOTPAGEOFF]
	mov	w27, #9999
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_IN4500
	ldr	w8, [x21]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w28, w27, #2, ne
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x28, x24
	mov	w0, #10
	bl	_udelay
	add	w24, w24, #1
	and	w8, w24, #0xffff
	mul	w8, w8, w22
	ror	w8, w8, #2
	cmp	w8, w23
	b.hi	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x25]
	ldr	w2, [x26]
	mov	x0, x19
	bl	_OUT4500
	b	LBB0_2
LBB0_5:
	mov	w8, #9999
	cmp	w28, w8
	cset	w0, lo
	b	LBB0_7
LBB0_6:
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_COMMAND_BUSY,4,2               ; @COMMAND_BUSY
	.comm	_EVACK,4,2                      ; @EVACK
	.comm	_EV_CLEARCOMMANDBUSY,4,2        ; @EV_CLEARCOMMANDBUSY
	.no_dead_strip	_waitbusy
.subsections_via_symbols
