	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idedisk_prep_rq
_idedisk_prep_rq:                       ## @idedisk_prep_rq
	.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, %r15
	movq	%rsi, %rdi
	callq	_req_op
	movq	_REQ_OP_FLUSH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_ide_req
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ide_req
	movq	(%rax), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	jmp	LBB0_4
LBB0_3:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r14
LBB0_4:
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_BUG_ON
	movl	8(%r15), %edi
	callq	_ata_id_flush_ext_enabled
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	cmpq	$268435455, (%r15)              ## imm = 0xFFFFFFF
	jbe	LBB0_7
## %bb.6:
	movq	_ATA_CMD_FLUSH_EXT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_ATA_CMD_FLUSH@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movq	_IDE_VALID_OUT_TF@GOTPCREL(%rip), %rax
	movq	_IDE_VALID_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 16(%r14)
	movq	_IDE_TFLAG_DYN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	_ATA_PROT_NODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_REQ_OP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	_REQ_OP_DRV_OUT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	_ATA_PRIV_TASKFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_ide_req
	movl	%r15d, 8(%rax)
	movq	%rbx, %rdi
	callq	_ide_req
	movq	%r14, (%rax)
	movq	%rbx, (%r14)
LBB0_9:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REQ_OP_FLUSH,8,3               ## @REQ_OP_FLUSH
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ATA_CMD_FLUSH_EXT,4,2          ## @ATA_CMD_FLUSH_EXT
	.comm	_ATA_CMD_FLUSH,4,2              ## @ATA_CMD_FLUSH
	.comm	_IDE_VALID_OUT_TF,4,2           ## @IDE_VALID_OUT_TF
	.comm	_IDE_VALID_DEVICE,4,2           ## @IDE_VALID_DEVICE
	.comm	_IDE_TFLAG_DYN,4,2              ## @IDE_TFLAG_DYN
	.comm	_ATA_PROT_NODATA,4,2            ## @ATA_PROT_NODATA
	.comm	_REQ_OP_MASK,4,2                ## @REQ_OP_MASK
	.comm	_REQ_OP_DRV_OUT,4,2             ## @REQ_OP_DRV_OUT
	.comm	_ATA_PRIV_TASKFILE,4,2          ## @ATA_PRIV_TASKFILE
	.no_dead_strip	_idedisk_prep_rq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idedisk_prep_rq
_idedisk_prep_rq:                       ; @idedisk_prep_rq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_req_op
Lloh0:
	adrp	x8, _REQ_OP_FLUSH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REQ_OP_FLUSH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_ide_req
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ide_req
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x20, x0
LBB0_4:
	cmp	x20, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w0, [x21, #8]
	bl	_ata_id_flush_ext_enabled
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x21]
	lsr	x8, x8, #28
	cbz	x8, LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _ATA_CMD_FLUSH_EXT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATA_CMD_FLUSH_EXT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _ATA_CMD_FLUSH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_CMD_FLUSH@GOTPAGEOFF]
LBB0_8:
Lloh10:
	adrp	x9, _IDE_VALID_OUT_TF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IDE_VALID_OUT_TF@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _IDE_VALID_DEVICE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IDE_VALID_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w8, [x8]
	stp	w9, w8, [x20, #16]
Lloh16:
	adrp	x8, _IDE_TFLAG_DYN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IDE_TFLAG_DYN@GOTPAGEOFF]
Lloh18:
	adrp	x9, _ATA_PROT_NODATA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATA_PROT_NODATA@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
Lloh22:
	adrp	x8, _REQ_OP_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REQ_OP_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh25:
	adrp	x9, _REQ_OP_DRV_OUT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _REQ_OP_DRV_OUT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh28:
	adrp	x8, _ATA_PRIV_TASKFILE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ATA_PRIV_TASKFILE@GOTPAGEOFF]
Lloh30:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_ide_req
	str	w21, [x0, #8]
	mov	x0, x19
	bl	_ide_req
	str	x20, [x0]
	str	x19, [x20]
LBB0_9:
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_REQ_OP_FLUSH,8,3               ; @REQ_OP_FLUSH
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ATA_CMD_FLUSH_EXT,4,2          ; @ATA_CMD_FLUSH_EXT
	.comm	_ATA_CMD_FLUSH,4,2              ; @ATA_CMD_FLUSH
	.comm	_IDE_VALID_OUT_TF,4,2           ; @IDE_VALID_OUT_TF
	.comm	_IDE_VALID_DEVICE,4,2           ; @IDE_VALID_DEVICE
	.comm	_IDE_TFLAG_DYN,4,2              ; @IDE_TFLAG_DYN
	.comm	_ATA_PROT_NODATA,4,2            ; @ATA_PROT_NODATA
	.comm	_REQ_OP_MASK,4,2                ; @REQ_OP_MASK
	.comm	_REQ_OP_DRV_OUT,4,2             ; @REQ_OP_DRV_OUT
	.comm	_ATA_PRIV_TASKFILE,4,2          ; @ATA_PRIV_TASKFILE
	.no_dead_strip	_idedisk_prep_rq
.subsections_via_symbols
