	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idetape_wait_ready
_idetape_wait_ready:                    ## @idetape_wait_ready
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	16(%rbx), %r15
	movq	_IDE_AFLAG_MEDIUM_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ilog2
	movl	%eax, %edi
	movq	%r13, %rsi
	callq	_set_bit
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rdi, %r14
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$100, %edi
	callq	_msleep
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_16
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ide_do_test_unit_ready
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %ecx
	movl	4(%rbx), %eax
	cmpl	$2, %ecx
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$4, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$4, %eax
	cmpl	$2, 8(%rbx)
	je	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %ecx
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$4, %eax
	jne	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$8, %eax
	je	LBB0_15
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$58, %eax
	jne	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_IDETAPE_LU_LOAD_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ide_do_start_stop
	movl	$1, %r12d
	jmp	LBB0_15
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_13:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_AFLAG_MEDIUM_PRESENT,4,2   ## @IDE_AFLAG_MEDIUM_PRESENT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_IDETAPE_LU_LOAD_MASK,4,2       ## @IDETAPE_LU_LOAD_MASK
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_idetape_wait_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idetape_wait_ready
_idetape_wait_ready:                    ; @idetape_wait_ready
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	x20, [x22, #16]
Lloh0:
	adrp	x8, _IDE_AFLAG_MEDIUM_PRESENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDE_AFLAG_MEDIUM_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ilog2
	mov	x1, x19
	bl	_set_bit
Lloh3:
	adrp	x23, _jiffies@GOTPAGE
Lloh4:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x0, [x23]
	add	x21, x0, x21
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_14
; %bb.1:
	mov	w25, #0
Lloh5:
	adrp	x24, _IDETAPE_LU_LOAD_MASK@GOTPAGE
Lloh6:
	ldr	x24, [x24, _IDETAPE_LU_LOAD_MASK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	bl	_msleep
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_14
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ide_do_test_unit_ready
	cbz	x0, LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w8, w9, [x22]
	cmp	w8, #2
	ccmp	w9, #4, #0, eq
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #58
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #2
	b.eq	LBB0_11
	b	LBB0_14
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x22, #8]
	cmp	w9, #2
	b.ne	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w25, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_ide_do_start_stop
	mov	w25, #1
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, #4
	cmp	w8, #2
	b.ne	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #4
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.eq	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #8
	b.eq	LBB0_2
LBB0_14:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh9:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_AFLAG_MEDIUM_PRESENT,4,2   ; @IDE_AFLAG_MEDIUM_PRESENT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_IDETAPE_LU_LOAD_MASK,4,2       ; @IDETAPE_LU_LOAD_MASK
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_idetape_wait_ready
.subsections_via_symbols
