	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pd_door_lock
_pd_door_lock:                          ## @pd_door_lock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_STAT_READY@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	callq	_pd_wait_for
	movq	_STAT_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_IDE_DOORLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_pd_send_command
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_pd_wait_for
LBB0_2:
	movq	_Ok@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STAT_READY,4,2                 ## @STAT_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Lock"

	.comm	_STAT_ERR,4,2                   ## @STAT_ERR
	.comm	_IDE_DOORLOCK,4,2               ## @IDE_DOORLOCK
L_.str.1:                               ## @.str.1
	.asciz	"Lock done"

	.comm	_Ok,4,2                         ## @Ok
	.no_dead_strip	_pd_door_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pd_door_lock
_pd_door_lock:                          ; @pd_door_lock
	.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	x20, _STAT_READY@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STAT_READY@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_pd_wait_for
Lloh4:
	adrp	x8, _STAT_ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _STAT_ERR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _IDE_DOORLOCK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IDE_DOORLOCK@GOTPAGEOFF]
Lloh9:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_pd_send_command
	ldr	w1, [x20]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pd_wait_for
LBB0_2:
Lloh12:
	adrp	x8, _Ok@GOTPAGE
Lloh13:
	ldr	x8, [x8, _Ok@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_STAT_READY,4,2                 ; @STAT_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Lock"

	.comm	_STAT_ERR,4,2                   ; @STAT_ERR
	.comm	_IDE_DOORLOCK,4,2               ; @IDE_DOORLOCK
l_.str.1:                               ; @.str.1
	.asciz	"Lock done"

	.comm	_Ok,4,2                         ; @Ok
	.no_dead_strip	_pd_door_lock
.subsections_via_symbols
