	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_pd_write_start
_do_pd_write_start:                     ## @do_pd_write_start
	.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	_pd_current@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_STAT_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_pd_wait_for
	movq	_STAT_ERR@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_3
LBB0_1:
	movq	_pd_retries@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_PD_MAX_RETRIES@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_2
## %bb.8:
	incq	%rcx
	movq	%rcx, (%rax)
	movq	_Wait@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	_Fail@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movq	(%rbx), %rdi
	movq	_IDE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_pd_block@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_pd_run@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pd_ide_command
	movq	_STAT_DRQ@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r14
	movq	_pd_buf@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	movl	(%r12), %esi
	movq	%r14, %rdx
	callq	_pd_wait_for
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	movl	$512, %edx                      ## imm = 0x200
	callq	_pi_write_block
	xorl	%eax, %eax
	callq	_pd_next_buf
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	_do_pd_write_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	_PD_TMO@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rdx
	movq	_phase@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_pd_timeout@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	movq	_Hold@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pd_current,8,3                 ## @pd_current
	.comm	_STAT_READY,4,2                 ## @STAT_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do_pd_write"

	.comm	_STAT_ERR,4,2                   ## @STAT_ERR
	.comm	_pd_retries,8,3                 ## @pd_retries
	.comm	_PD_MAX_RETRIES,8,3             ## @PD_MAX_RETRIES
	.comm	_Wait,4,2                       ## @Wait
	.comm	_Fail,4,2                       ## @Fail
	.comm	_IDE_WRITE,4,2                  ## @IDE_WRITE
	.comm	_pd_block,4,2                   ## @pd_block
	.comm	_pd_run,4,2                     ## @pd_run
	.comm	_STAT_DRQ,4,2                   ## @STAT_DRQ
L_.str.1:                               ## @.str.1
	.asciz	"do_pd_write_drq"

	.comm	_pd_buf,4,2                     ## @pd_buf
	.comm	_do_pd_write_done,4,2           ## @do_pd_write_done
	.comm	_phase,4,2                      ## @phase
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_PD_TMO,8,3                     ## @PD_TMO
	.comm	_pd_timeout,8,3                 ## @pd_timeout
	.comm	_Hold,4,2                       ## @Hold
	.no_dead_strip	_do_pd_write_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_pd_write_start
_do_pd_write_start:                     ; @do_pd_write_start
	.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
Lloh0:
	adrp	x20, _pd_current@GOTPAGE
Lloh1:
	ldr	x20, [x20, _pd_current@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh2:
	adrp	x8, _STAT_READY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STAT_READY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	bl	_pd_wait_for
Lloh7:
	adrp	x21, _STAT_ERR@GOTPAGE
Lloh8:
	ldr	x21, [x21, _STAT_ERR@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_4
LBB0_1:
Lloh9:
	adrp	x8, _pd_retries@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pd_retries@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh11:
	adrp	x10, _PD_MAX_RETRIES@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PD_MAX_RETRIES@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_3
; %bb.2:
	add	x9, x9, #1
	str	x9, [x8]
Lloh14:
	adrp	x8, _Wait@GOTPAGE
Lloh15:
	ldr	x8, [x8, _Wait@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh16:
	adrp	x8, _Fail@GOTPAGE
Lloh17:
	ldr	x8, [x8, _Fail@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	x0, [x20]
Lloh18:
	adrp	x8, _IDE_WRITE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IDE_WRITE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _pd_block@GOTPAGE
Lloh22:
	ldr	x8, [x8, _pd_block@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	adrp	x8, _pd_run@GOTPAGE
Lloh25:
	ldr	x8, [x8, _pd_run@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	bl	_pd_ide_command
Lloh27:
	adrp	x22, _STAT_DRQ@GOTPAGE
Lloh28:
	ldr	x22, [x22, _STAT_DRQ@GOTPAGEOFF]
Lloh29:
	adrp	x19, l_.str.1@PAGE
Lloh30:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh31:
	adrp	x23, _pd_buf@GOTPAGE
Lloh32:
	ldr	x23, [x23, _pd_buf@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w1, [x22]
	mov	x2, x19
	bl	_pd_wait_for
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w1, [x23]
	mov	w2, #512
	bl	_pi_write_block
	bl	_pd_next_buf
	cbz	x0, LBB0_5
; %bb.7:
Lloh33:
	adrp	x8, _do_pd_write_done@GOTPAGE
Lloh34:
	ldr	x8, [x8, _do_pd_write_done@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _phase@GOTPAGE
Lloh37:
	ldr	x9, [x9, _phase@GOTPAGEOFF]
Lloh38:
	str	w8, [x9]
Lloh39:
	adrp	x8, _jiffies@GOTPAGE
Lloh40:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
Lloh42:
	adrp	x9, _PD_TMO@GOTPAGE
Lloh43:
	ldr	x9, [x9, _PD_TMO@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh45:
	adrp	x9, _pd_timeout@GOTPAGE
Lloh46:
	ldr	x9, [x9, _pd_timeout@GOTPAGEOFF]
Lloh47:
	str	x8, [x9]
Lloh48:
	adrp	x8, _Hold@GOTPAGE
Lloh49:
	ldr	x8, [x8, _Hold@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_pd_current,8,3                 ; @pd_current
	.comm	_STAT_READY,4,2                 ; @STAT_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do_pd_write"

	.comm	_STAT_ERR,4,2                   ; @STAT_ERR
	.comm	_pd_retries,8,3                 ; @pd_retries
	.comm	_PD_MAX_RETRIES,8,3             ; @PD_MAX_RETRIES
	.comm	_Wait,4,2                       ; @Wait
	.comm	_Fail,4,2                       ; @Fail
	.comm	_IDE_WRITE,4,2                  ; @IDE_WRITE
	.comm	_pd_block,4,2                   ; @pd_block
	.comm	_pd_run,4,2                     ; @pd_run
	.comm	_STAT_DRQ,4,2                   ; @STAT_DRQ
l_.str.1:                               ; @.str.1
	.asciz	"do_pd_write_drq"

	.comm	_pd_buf,4,2                     ; @pd_buf
	.comm	_do_pd_write_done,4,2           ; @do_pd_write_done
	.comm	_phase,4,2                      ; @phase
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_PD_TMO,8,3                     ; @PD_TMO
	.comm	_pd_timeout,8,3                 ; @pd_timeout
	.comm	_Hold,4,2                       ; @Hold
	.no_dead_strip	_do_pd_write_start
.subsections_via_symbols
