	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idetape_queue_rw_tail
_idetape_queue_rw_tail:                 ## @idetape_queue_rw_tail
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	_IDE_DBG_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_ide_debug_log
	movq	_REQ_IDETAPE_READ@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	setne	%al
	movq	_REQ_IDETAPE_WRITE@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_BUG_ON
	testl	%r12d, %r12d
	js	LBB0_1
## %bb.2:
	movl	%r12d, %eax
	cltd
	idivl	(%r15)
	xorl	%edi, %edi
	testl	%edx, %edx
	setne	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_BUG_ON
	movl	(%rbx), %edi
	movq	_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	___GFP_WAIT@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_blk_get_request
	movq	%rbx, %rcx
	movq	%rax, %rbx
	movq	_REQ_TYPE_SPECIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	(%rbx), %rax
	movl	%r14d, 52(%rax)
	movl	16(%r15), %esi
	movl	%esi, 28(%rbx)
	movl	20(%r15), %eax
	movl	%eax, 24(%rbx)
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.4:
	movl	(%rcx), %edi
	movl	8(%r15), %edx
	movl	(%r13), %r8d
	movq	%rbx, %rsi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %ecx
	callq	_blk_rq_map_kern
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	16(%r15), %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_6:
	movl	(%rcx), %edi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_blk_execute_rq
	subl	16(%rbx), %r12d
	movl	8(%r15), %eax
	movl	%eax, 12(%r15)
	movq	_REQ_IDETAPE_READ@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	movl	$0, %eax
	cmovel	%r12d, %eax
	movl	%eax, 4(%r15)
	movq	8(%rbx), %rax
	movq	_IDE_DRV_ERROR_GENERAL@GOTPCREL(%rip), %rcx
	movl	%r12d, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_8:
	movq	%rbx, %rdi
	callq	_blk_put_request
	movl	%r13d, %eax
	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, size: %d"

	.comm	_REQ_IDETAPE_READ,4,2           ## @REQ_IDETAPE_READ
	.comm	_REQ_IDETAPE_WRITE,4,2          ## @REQ_IDETAPE_WRITE
	.comm	_READ,4,2                       ## @READ
	.comm	___GFP_WAIT,4,2                 ## @__GFP_WAIT
	.comm	_REQ_TYPE_SPECIAL,4,2           ## @REQ_TYPE_SPECIAL
	.comm	_IDE_DRV_ERROR_GENERAL,8,3      ## @IDE_DRV_ERROR_GENERAL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_idetape_queue_rw_tail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idetape_queue_rw_tail
_idetape_queue_rw_tail:                 ; @idetape_queue_rw_tail
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x8, _IDE_DBG_FUNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDE_DBG_FUNC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_ide_debug_log
Lloh5:
	adrp	x25, _REQ_IDETAPE_READ@GOTPAGE
Lloh6:
	ldr	x25, [x25, _REQ_IDETAPE_READ@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, w19
Lloh7:
	adrp	x8, _REQ_IDETAPE_WRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REQ_IDETAPE_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ccmp	w8, w19, #4, ne
	cset	w0, ne
	bl	_BUG_ON
	tbnz	w20, #31, LBB0_2
; %bb.1:
	ldr	w8, [x24]
	sdiv	w9, w20, w8
	msub	w8, w9, w8, w20
	cmp	w8, #0
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	bl	_BUG_ON
	ldr	w0, [x21]
Lloh10:
	adrp	x8, _READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x23, ___GFP_WAIT@GOTPAGE
Lloh14:
	ldr	x23, [x23, ___GFP_WAIT@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_blk_get_request
	mov	x22, x0
Lloh15:
	adrp	x8, _REQ_TYPE_SPECIAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REQ_TYPE_SPECIAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x0, #32]
	ldr	x8, [x0]
	str	w19, [x8, #52]
	ldr	d0, [x24, #16]
	rev64.2s	v1, v0
	str	d1, [x0, #24]
	cbz	w20, LBB0_6
; %bb.4:
	ldr	w0, [x21]
	ldr	w2, [x24, #8]
	ldr	w4, [x23]
	mov	x1, x22
	mov	x3, x20
	bl	_blk_rq_map_kern
	mov	x23, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	w1, [x24, #16]
	b	LBB0_7
LBB0_6:
	fmov	w1, s0
LBB0_7:
	ldr	w0, [x21]
	mov	x2, x22
	mov	w3, #0
	bl	_blk_execute_rq
	ldr	w8, [x22, #16]
	sub	w23, w20, w8
	ldr	w8, [x24, #8]
	str	w8, [x24, #12]
	ldr	w8, [x25]
	cmp	w8, w19
	csel	w8, w23, wzr, eq
	str	w8, [x24, #4]
	ldr	x8, [x22, #8]
Lloh18:
	adrp	x9, _IDE_DRV_ERROR_GENERAL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IDE_DRV_ERROR_GENERAL@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x22
	bl	_blk_put_request
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.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, size: %d"

	.comm	_REQ_IDETAPE_READ,4,2           ; @REQ_IDETAPE_READ
	.comm	_REQ_IDETAPE_WRITE,4,2          ; @REQ_IDETAPE_WRITE
	.comm	_READ,4,2                       ; @READ
	.comm	___GFP_WAIT,4,2                 ; @__GFP_WAIT
	.comm	_REQ_TYPE_SPECIAL,4,2           ; @REQ_TYPE_SPECIAL
	.comm	_IDE_DRV_ERROR_GENERAL,8,3      ; @IDE_DRV_ERROR_GENERAL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_idetape_queue_rw_tail
.subsections_via_symbols
