	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_hd
_reset_hd:                              ## @reset_hd
	.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	_reset@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_NR_HD@GOTPCREL(%rip), %r14
	movabsq	$4294967297, %r12               ## imm = 0x100000001
	movq	_ATA_CMD_INIT_DEV_PARAMS@GOTPCREL(%rip), %r13
	leaq	_reset_hd(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_check_status
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, (%rbx)
	movl	$-1, _reset_hd.i(%rip)
	xorl	%eax, %eax
	callq	_reset_controller
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	_reset_hd.i(%rip), %rax
	incq	%rax
	movl	%eax, _reset_hd.i(%rip)
	cmpl	(%r14), %eax
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_hd_info@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	shlq	$5, %rax
	leaq	(%rsi,%rax), %rdi
	movq	%r12, (%rsi,%rax)
	movl	24(%rsi,%rax), %edx
	movq	16(%rsi,%rax), %rcx
	decq	%rcx
	movl	8(%rsi,%rax), %r8d
	movl	(%r13), %r9d
	movq	%r15, (%rsp)
	movl	%edx, %esi
	callq	_hd_out
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hd_request                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_reset_hd.i,4,2  ## @reset_hd.i
	.comm	_reset,8,3                      ## @reset
	.comm	_NR_HD,4,2                      ## @NR_HD
	.comm	_hd_info,8,3                    ## @hd_info
	.comm	_ATA_CMD_INIT_DEV_PARAMS,4,2    ## @ATA_CMD_INIT_DEV_PARAMS
	.no_dead_strip	_reset_hd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_hd
_reset_hd:                              ; @reset_hd
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset b8, -88
	.cfi_offset b9, -96
Lloh0:
	adrp	x20, _reset@GOTPAGE
Lloh1:
	ldr	x20, [x20, _reset@GOTPAGEOFF]
	ldr	x8, [x20]
	adrp	x21, _reset_hd.i@PAGE
Lloh2:
	adrp	x22, _NR_HD@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NR_HD@GOTPAGEOFF]
Lloh4:
	adrp	x23, _hd_info@GOTPAGE
Lloh5:
	ldr	x23, [x23, _hd_info@GOTPAGEOFF]
	movi.2s	v8, #1
Lloh6:
	adrp	x24, _ATA_CMD_INIT_DEV_PARAMS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ATA_CMD_INIT_DEV_PARAMS@GOTPAGEOFF]
Lloh8:
	adrp	x19, _reset_hd@PAGE
Lloh9:
	add	x19, x19, _reset_hd@PAGEOFF
	mov	w25, #-1
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_check_status
	ldr	x8, [x20]
	cbz	x8, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x8, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [x20]
	str	w25, [x21, _reset_hd.i@PAGEOFF]
	bl	_reset_controller
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldrsw	x8, [x21, _reset_hd.i@PAGEOFF]
	add	x8, x8, #1
	str	w8, [x21, _reset_hd.i@PAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x23]
	add	x0, x9, x8, lsl #5
	str	d8, [x0]
	ldr	w1, [x0, #24]
	ldr	x8, [x0, #16]
	sub	x3, x8, #1
	ldr	w4, [x0, #8]
	ldr	w5, [x24]
	mov	x2, x1
	mov	x6, x19
	bl	_hd_out
	ldr	x8, [x20]
	cbnz	x8, LBB0_2
; %bb.6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	b	_hd_request
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_reset_hd.i,4,2  ; @reset_hd.i
	.comm	_reset,8,3                      ; @reset
	.comm	_NR_HD,4,2                      ; @NR_HD
	.comm	_hd_info,8,3                    ; @hd_info
	.comm	_ATA_CMD_INIT_DEV_PARAMS,4,2    ; @ATA_CMD_INIT_DEV_PARAMS
	.no_dead_strip	_reset_hd
.subsections_via_symbols
