	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atapi_get_event_status_notification
_atapi_get_event_status_notification:   ## @atapi_get_event_status_notification
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testb	$1, 260(%rdx)
	jne	LBB0_2
## %bb.1:
	movq	_ATA_SENSE_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movl	$36, 4(%r15)
	shll	$12, %ecx
	movq	_ATA_S_READY@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_ATA_S_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	leaq	284(%rbx), %rdi
	callq	_be16dec
	movl	%eax, %r12d
	cmpl	$32, %eax
	movl	$32, %eax
	cmovael	%eax, %r12d
	leaq	-80(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r13, %rdi
	movl	$6, %esi
	callq	_be16enc
	movabsq	$68719476740, %rax              ## imm = 0x1000000004
	movq	%rax, -72(%rbp)
	movl	$2, -60(%rbp)
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	movq	%r13, %rcx
	movl	%r12d, %r8d
	callq	_write_prdt
	movq	_ATA_S_READY@GOTPCREL(%rip), %rax
	movq	_ATA_S_DSC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_3:
	orl	(%rax), %ecx
	movl	16(%rbx), %eax
	andl	$-8, %eax
	movq	_ATA_I_CMD@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movq	_ATA_I_IN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_ahci_write_fis_d2h
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_SENSE_ILLEGAL_REQUEST,4,2  ## @ATA_SENSE_ILLEGAL_REQUEST
	.comm	_ATA_S_READY,4,2                ## @ATA_S_READY
	.comm	_ATA_S_ERROR,4,2                ## @ATA_S_ERROR
	.comm	_ATA_S_DSC,4,2                  ## @ATA_S_DSC
	.comm	_ATA_I_CMD,4,2                  ## @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ## @ATA_I_IN
	.no_dead_strip	_atapi_get_event_status_notification
.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 atapi_get_event_status_notification
lCPI0_0:
	.long	4                               ; 0x4
	.long	16                              ; 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_atapi_get_event_status_notification:   ; @atapi_get_event_status_notification
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldrb	w8, [x2, #260]
	tbnz	w8, #0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ATA_SENSE_ILLEGAL_REQUEST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_SENSE_ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #36
	stp	w8, w9, [x21]
Lloh6:
	adrp	x9, _ATA_S_READY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATA_S_READY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8, lsl #12
Lloh9:
	adrp	x9, _ATA_S_ERROR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_S_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w8, w9
	b	LBB0_3
LBB0_2:
	add	x0, x19, #284
	bl	_be16dec
	mov	w8, #32
	cmp	w0, #32
	csel	w22, w0, w8, lo
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x0, sp, #8
	mov	w1, #6
	bl	_be16enc
Lloh12:
	adrp	x8, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	mov	w8, #2
	str	w8, [sp, #28]
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x4, x22
	bl	_write_prdt
Lloh14:
	adrp	x8, _ATA_S_READY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATA_S_READY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _ATA_S_DSC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ATA_S_DSC@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w3, w9, w8
LBB0_3:
	ldr	w8, [x19, #16]
	and	w8, w8, #0xfffffff8
Lloh20:
	adrp	x9, _ATA_I_CMD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATA_I_CMD@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh23:
	adrp	x9, _ATA_I_IN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ATA_I_IN@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #16]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_ahci_write_fis_d2h
	ldr	x8, [sp, #40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_SENSE_ILLEGAL_REQUEST,4,2  ; @ATA_SENSE_ILLEGAL_REQUEST
	.comm	_ATA_S_READY,4,2                ; @ATA_S_READY
	.comm	_ATA_S_ERROR,4,2                ; @ATA_S_ERROR
	.comm	_ATA_S_DSC,4,2                  ; @ATA_S_DSC
	.comm	_ATA_I_CMD,4,2                  ; @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ; @ATA_I_IN
	.no_dead_strip	_atapi_get_event_status_notification
.subsections_via_symbols
