	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idetape_analyze_error
_idetape_analyze_error:                 ## @idetape_analyze_error
	.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	16(%rdi), %r12
	movq	(%rdi), %rax
	movq	8(%rdi), %r15
	movq	(%rax), %r14
	movl	16(%r14), %edi
	callq	_bio_data
	movq	%rax, %rbx
	movl	8(%rax), %ecx
	andl	$15, %ecx
	movl	%ecx, (%r12)
	movl	48(%rax), %r8d
	movl	%r8d, 4(%r12)
	movl	52(%rax), %r9d
	movl	%r9d, 8(%r12)
	movq	_IDE_DBG_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_ide_debug_log
	movq	_PC_FLAG_DMA_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_2
## %bb.1:
	movl	12(%r12), %r13d
	leaq	12(%rbx), %rdi
	callq	_get_unaligned_be32
	imull	%r13d, %eax
	movl	%eax, (%r14)
LBB0_2:
	movq	8(%r15), %rdi
	movq	(%rdi), %rax
	movq	_READ_6@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_WRITE_6@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rdx, %rax
	je	LBB0_4
## %bb.3:
	cmpq	%rsi, %rax
	jne	LBB0_9
LBB0_4:
	cmpq	$0, 32(%rdi)
	jne	LBB0_9
## %bb.5:
	cmpq	$0, 24(%rdi)
	jne	LBB0_9
## %bb.6:
	cmpq	$0, 16(%rdi)
	jne	LBB0_9
## %bb.7:
	cmpl	$5, (%r12)
	jne	LBB0_9
## %bb.8:
	movq	$0, 24(%r15)
	movq	_PC_FLAG_ABORT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%edi, (%r15)
LBB0_9:
	cmpq	%rdx, %rax
	jne	LBB0_12
## %bb.10:
	testb	$-128, 8(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_IDE_DRV_ERROR_FILEMARK@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	%rdi, 24(%r15)
	movq	_PC_FLAG_ABORT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%edi, (%r15)
LBB0_12:
	cmpq	%rsi, %rax
	jne	LBB0_18
## %bb.13:
	testb	$64, 8(%rbx)
	jne	LBB0_17
## %bb.14:
	cmpl	$13, (%r12)
	jne	LBB0_18
## %bb.15:
	cmpl	$0, 4(%r12)
	jne	LBB0_18
## %bb.16:
	cmpl	$2, 8(%r12)
	jne	LBB0_18
LBB0_17:
	movq	_IDE_DRV_ERROR_EOD@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, 24(%r15)
	movq	_PC_FLAG_ABORT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%esi, (%r15)
LBB0_18:
	cmpq	%rdx, %rax
	je	LBB0_20
## %bb.19:
	cmpq	(%rcx), %rax
	jne	LBB0_26
LBB0_20:
	cmpl	$8, (%r12)
	jne	LBB0_21
## %bb.22:
	movq	_IDE_DRV_ERROR_EOD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	movq	_PC_FLAG_ABORT@GOTPCREL(%rip), %rcx
	movl	(%r15), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	jmp	LBB0_23
LBB0_21:
	movl	(%r15), %eax
LBB0_23:
	movq	_PC_FLAG_ABORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_26
## %bb.24:
	movq	%r14, %rdi
	callq	_blk_rq_bytes
	cmpl	(%r14), %eax
	je	LBB0_26
## %bb.25:
	movq	_IDETAPE_MAX_PC_RETRIES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	incq	%rax
	movq	%rax, 16(%r15)
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_DBG_FUNC,4,2               ## @IDE_DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmd: 0x%x, sense key = %x, asc = %x, ascq = %x"

	.comm	_PC_FLAG_DMA_ERROR,4,2          ## @PC_FLAG_DMA_ERROR
	.comm	_READ_6,8,3                     ## @READ_6
	.comm	_WRITE_6,8,3                    ## @WRITE_6
	.comm	_PC_FLAG_ABORT,4,2              ## @PC_FLAG_ABORT
	.comm	_IDE_DRV_ERROR_FILEMARK,8,3     ## @IDE_DRV_ERROR_FILEMARK
	.comm	_IDE_DRV_ERROR_EOD,8,3          ## @IDE_DRV_ERROR_EOD
	.comm	_IDETAPE_MAX_PC_RETRIES,8,3     ## @IDETAPE_MAX_PC_RETRIES
	.no_dead_strip	_idetape_analyze_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idetape_analyze_error
_idetape_analyze_error:                 ; @idetape_analyze_error
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldp	x21, x22, [x0, #8]
	ldr	x8, [x0]
	ldr	x19, [x8]
	ldr	w0, [x19, #16]
	bl	_bio_data
	mov	x20, x0
	ldr	w8, [x0, #8]
	and	w3, w8, #0xf
	str	w3, [x22]
	ldr	w4, [x0, #48]
	str	w4, [x22, #4]
	ldr	w5, [x0, #52]
	str	w5, [x22, #8]
Lloh0:
	adrp	x8, _IDE_DBG_FUNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDE_DBG_FUNC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ide_debug_log
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _PC_FLAG_DMA_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PC_FLAG_DMA_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w23, [x22, #12]
	add	x0, x20, #12
	bl	_get_unaligned_be32
	mul	w8, w0, w23
	str	w8, [x19]
LBB0_2:
	ldr	x12, [x21, #8]
	ldr	x8, [x12]
Lloh8:
	adrp	x9, _READ_6@GOTPAGE
Lloh9:
	ldr	x9, [x9, _READ_6@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _WRITE_6@GOTPAGE
Lloh12:
	ldr	x10, [x10, _WRITE_6@GOTPAGEOFF]
	ldr	x11, [x10]
	cmp	x8, x9
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_8
; %bb.3:
	ldr	x13, [x12, #32]
	cbnz	x13, LBB0_8
; %bb.4:
	ldr	x13, [x12, #24]
	cbnz	x13, LBB0_8
; %bb.5:
	ldr	x12, [x12, #16]
	cbnz	x12, LBB0_8
; %bb.6:
	ldr	w12, [x22]
	cmp	w12, #5
	b.ne	LBB0_8
; %bb.7:
	str	xzr, [x21, #24]
Lloh13:
	adrp	x12, _PC_FLAG_ABORT@GOTPAGE
Lloh14:
	ldr	x12, [x12, _PC_FLAG_ABORT@GOTPAGEOFF]
Lloh15:
	ldr	w12, [x12]
	ldr	w13, [x21]
	orr	w12, w13, w12
	str	w12, [x21]
LBB0_8:
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	ldrb	w12, [x20, #8]
	tbz	w12, #7, LBB0_11
; %bb.10:
Lloh16:
	adrp	x12, _IDE_DRV_ERROR_FILEMARK@GOTPAGE
Lloh17:
	ldr	x12, [x12, _IDE_DRV_ERROR_FILEMARK@GOTPAGEOFF]
Lloh18:
	ldr	x12, [x12]
	str	x12, [x21, #24]
Lloh19:
	adrp	x12, _PC_FLAG_ABORT@GOTPAGE
Lloh20:
	ldr	x12, [x12, _PC_FLAG_ABORT@GOTPAGEOFF]
Lloh21:
	ldr	w12, [x12]
	ldr	w13, [x21]
	orr	w12, w13, w12
	str	w12, [x21]
LBB0_11:
	cmp	x8, x11
	b.ne	LBB0_17
; %bb.12:
	ldrb	w11, [x20, #8]
	tbnz	w11, #6, LBB0_16
; %bb.13:
	ldr	w11, [x22]
	cmp	w11, #13
	b.ne	LBB0_17
; %bb.14:
	ldr	w11, [x22, #4]
	cbnz	w11, LBB0_17
; %bb.15:
	ldr	w11, [x22, #8]
	cmp	w11, #2
	b.ne	LBB0_17
LBB0_16:
Lloh22:
	adrp	x11, _IDE_DRV_ERROR_EOD@GOTPAGE
Lloh23:
	ldr	x11, [x11, _IDE_DRV_ERROR_EOD@GOTPAGEOFF]
Lloh24:
	ldr	x11, [x11]
	str	x11, [x21, #24]
Lloh25:
	adrp	x11, _PC_FLAG_ABORT@GOTPAGE
Lloh26:
	ldr	x11, [x11, _PC_FLAG_ABORT@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	ldr	w12, [x21]
	orr	w11, w12, w11
	str	w11, [x21]
LBB0_17:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_24
; %bb.18:
	ldr	w9, [x22]
Lloh28:
	adrp	x8, _PC_FLAG_ABORT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PC_FLAG_ABORT@GOTPAGEOFF]
	cmp	w9, #8
	b.ne	LBB0_20
; %bb.19:
Lloh30:
	adrp	x9, _IDE_DRV_ERROR_EOD@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IDE_DRV_ERROR_EOD@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	str	x9, [x21, #24]
	ldr	w9, [x8]
	ldr	w10, [x21]
	orr	w9, w10, w9
	str	w9, [x21]
	b	LBB0_21
LBB0_20:
	ldr	w9, [x21]
LBB0_21:
	ldr	w8, [x8]
	tst	w8, w9
	b.ne	LBB0_24
; %bb.22:
	mov	x0, x19
	bl	_blk_rq_bytes
	ldr	w8, [x19]
	cmp	w0, w8
	b.eq	LBB0_24
; %bb.23:
Lloh33:
	adrp	x8, _IDETAPE_MAX_PC_RETRIES@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IDETAPE_MAX_PC_RETRIES@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	add	x8, x8, #1
	str	x8, [x21, #16]
LBB0_24:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_DBG_FUNC,4,2               ; @IDE_DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmd: 0x%x, sense key = %x, asc = %x, ascq = %x"

	.comm	_PC_FLAG_DMA_ERROR,4,2          ; @PC_FLAG_DMA_ERROR
	.comm	_READ_6,8,3                     ; @READ_6
	.comm	_WRITE_6,8,3                    ; @WRITE_6
	.comm	_PC_FLAG_ABORT,4,2              ; @PC_FLAG_ABORT
	.comm	_IDE_DRV_ERROR_FILEMARK,8,3     ; @IDE_DRV_ERROR_FILEMARK
	.comm	_IDE_DRV_ERROR_EOD,8,3          ; @IDE_DRV_ERROR_EOD
	.comm	_IDETAPE_MAX_PC_RETRIES,8,3     ; @IDETAPE_MAX_PC_RETRIES
	.no_dead_strip	_idetape_analyze_error
.subsections_via_symbols
