	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_reset
_ide_reset:                             ## @ide_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_IDE_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_2:
	cmpq	$0, 112(%rbx)
	jne	LBB0_3
## %bb.4:
	movq	_MAX_MULT_SECTORS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movq	%rax, 104(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	movups	%xmm0, 56(%rbx)
	movups	%xmm0, 72(%rbx)
	movups	%xmm0, 88(%rbx)
	movq	_READY_STAT@GOTPCREL(%rip), %rax
	movq	_SEEK_STAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 28(%rbx)
	movl	$160, 24(%rbx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%rbx)
	cmpq	$0, 48(%rbx)
	je	LBB0_7
## %bb.6:
	movabsq	$1009317314580, %rax            ## imm = 0xEB00000014
	movq	%rax, 16(%rbx)
	jmp	LBB0_8
LBB0_7:
	movl	$0, 16(%rbx)
LBB0_8:
	movq	_ide_dummy_transfer_stop@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	%rbx, %rdi
	callq	_ide_dummy_transfer_stop
	movq	$0, 32(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_debug,8,3                  ## @IDE_debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ide: reset\n"

	.comm	_MAX_MULT_SECTORS,8,3           ## @MAX_MULT_SECTORS
	.comm	_READY_STAT,4,2                 ## @READY_STAT
	.comm	_SEEK_STAT,4,2                  ## @SEEK_STAT
	.no_dead_strip	_ide_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ide_reset
lCPI0_0:
	.long	20                              ; 0x14
	.long	235                             ; 0xeb
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ide_reset:                             ; @ide_reset
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _IDE_debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDE_debug@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	ldr	x8, [x19, #112]
Lloh8:
	adrp	x9, _MAX_MULT_SECTORS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX_MULT_SECTORS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x8, x9, xzr, eq
	str	x8, [x19, #104]
	stp	xzr, xzr, [x19, #8]
	str	xzr, [x19]
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #56]
	stur	q0, [x19, #72]
Lloh11:
	adrp	x8, _READY_STAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _READY_STAT@GOTPAGEOFF]
	stur	q0, [x19, #88]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SEEK_STAT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SEEK_STAT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	w9, #160
	stp	w9, w8, [x19, #24]
	movi.2s	v0, #1
	str	d0, [x19, #8]
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_4
; %bb.3:
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
	b	LBB0_5
LBB0_4:
	str	wzr, [x19, #16]
LBB0_5:
Lloh19:
	adrp	x8, _ide_dummy_transfer_stop@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ide_dummy_transfer_stop@GOTPAGEOFF]
	str	x8, [x19, #40]
	mov	x0, x19
	bl	_ide_dummy_transfer_stop
	str	xzr, [x19, #32]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_debug,8,3                  ; @IDE_debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ide: reset\n"

	.comm	_MAX_MULT_SECTORS,8,3           ; @MAX_MULT_SECTORS
	.comm	_READY_STAT,4,2                 ; @READY_STAT
	.comm	_SEEK_STAT,4,2                  ; @SEEK_STAT
	.no_dead_strip	_ide_reset
.subsections_via_symbols
