	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_park_store                 ## -- Begin function ide_park_store
	.p2align	4, 0x90
_ide_park_store:                        ## @ide_park_store
	.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	%rcx, %r15
	movq	%rdx, %rbx
	callq	_to_ide_device
	movq	%rax, %r14
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_strict_strtol
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	-32(%rbp), %rax
	cmpq	$-3, %rax
	jle	LBB0_2
## %bb.3:
	xorl	%ebx, %ebx
	cmpq	$30001, %rax                    ## imm = 0x7531
	jl	LBB0_5
## %bb.4:
	movq	$30000, -32(%rbp)               ## imm = 0x7530
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	_ide_setting_mtx@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	js	LBB0_10
## %bb.6:
	movl	(%r14), %eax
	movq	_IDE_DFLAG_NO_UNLOAD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_15
## %bb.7:
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.8:
	movq	_IDE_DFLAG_PARKED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
LBB0_9:
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_issue_park_cmd
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_17
LBB0_10:
	movq	8(%r14), %rax
	movq	_ide_disk@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.11:
	cmpq	$-2, %rdi
	je	LBB0_14
## %bb.12:
	cmpq	$-1, %rdi
	jne	LBB0_16
## %bb.13:
	movq	_IDE_DFLAG_NO_UNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
	jmp	LBB0_16
LBB0_15:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movq	_ide_setting_mtx@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	cmovnel	%ebx, %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_IDE_DFLAG_NO_UNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_ide_setting_mtx,4,2            ## @ide_setting_mtx
	.comm	_IDE_DFLAG_NO_UNLOAD,4,2        ## @IDE_DFLAG_NO_UNLOAD
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IDE_DFLAG_PARKED,4,2           ## @IDE_DFLAG_PARKED
	.comm	_ide_disk,8,3                   ## @ide_disk
	.comm	_MAX_PARK_TIMEOUT,8,3           ## @MAX_PARK_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_park_store                 ; -- Begin function ide_park_store
	.p2align	2
_ide_park_store:                        ; @ide_park_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x21, x2
	bl	_to_ide_device
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_strict_strtol
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [sp, #8]
	cmn	x8, #3
	b.le	LBB0_4
; %bb.2:
	mov	w9, #30001
	cmp	x8, x9
	b.lt	LBB0_5
; %bb.3:
	mov	w8, #30000
	str	x8, [sp, #8]
Lloh0:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_5:
	mov	w21, #0
LBB0_6:
Lloh6:
	adrp	x0, _ide_setting_mtx@GOTPAGE
Lloh7:
	ldr	x0, [x0, _ide_setting_mtx@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x0, [sp, #8]
	tbnz	x0, #63, LBB0_11
; %bb.7:
	ldr	w8, [x20]
Lloh8:
	adrp	x9, _IDE_DFLAG_NO_UNLOAD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IDE_DFLAG_NO_UNLOAD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.8:
	cbnz	x0, LBB0_10
; %bb.9:
Lloh11:
	adrp	x9, _IDE_DFLAG_PARKED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IDE_DFLAG_PARKED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
LBB0_10:
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_issue_park_cmd
	b	LBB0_16
LBB0_11:
	ldr	x8, [x20, #8]
Lloh14:
	adrp	x9, _ide_disk@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ide_disk@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.12:
	cmn	x0, #2
	b.eq	LBB0_18
; %bb.13:
	cmn	x0, #1
	b.ne	LBB0_16
; %bb.14:
Lloh17:
	adrp	x8, _IDE_DFLAG_NO_UNLOAD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IDE_DFLAG_NO_UNLOAD@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	b	LBB0_16
LBB0_15:
Lloh20:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
Lloh23:
	adrp	x0, _ide_setting_mtx@GOTPAGE
Lloh24:
	ldr	x0, [x0, _ide_setting_mtx@GOTPAGEOFF]
	bl	_mutex_unlock
	cmp	w21, #0
	csel	w0, w19, w21, eq
LBB0_17:
	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
	add	sp, sp, #64
	ret
LBB0_18:
Lloh25:
	adrp	x8, _IDE_DFLAG_NO_UNLOAD@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IDE_DFLAG_NO_UNLOAD@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_ide_setting_mtx,4,2            ; @ide_setting_mtx
	.comm	_IDE_DFLAG_NO_UNLOAD,4,2        ; @IDE_DFLAG_NO_UNLOAD
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IDE_DFLAG_PARKED,4,2           ; @IDE_DFLAG_PARKED
	.comm	_ide_disk,8,3                   ; @ide_disk
	.comm	_MAX_PARK_TIMEOUT,8,3           ; @MAX_PARK_TIMEOUT
.subsections_via_symbols
