	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_sata_phy_check_events
_fsl_sata_phy_check_events:             ## @fsl_sata_phy_check_events
	.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	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_ATA_SE_EXCHANGED@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_10
LBB0_4:
	movl	20(%rbx), %edi
	movq	_FSL_SATA_P_SSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATA_INL
	movq	_bootverbose@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_ATA_SS_DET_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_ATA_SS_DET_NO_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_device_printf
LBB0_6:
	movq	_AC_BUS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rbx), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_xpt_async
	xorl	%eax, %eax
	callq	_xpt_alloc_ccb_nowait
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	%rax, %r15
	movl	8(%rbx), %edi
	callq	_cam_sim_path
	movq	_CAM_TARGET_WILDCARD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CAM_LUN_WILDCARD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_xpt_create_path
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_xpt_rescan
	movl	$1, %r14d
	jmp	LBB0_11
LBB0_3:
	movq	_ATA_SE_PHY_CHANGED@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	jne	LBB0_4
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	callq	_xpt_free_ccb
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_SE_PHY_CHANGED,4,2         ## @ATA_SE_PHY_CHANGED
	.comm	_ATA_SE_EXCHANGED,4,2           ## @ATA_SE_EXCHANGED
	.comm	_FSL_SATA_P_SSTS,4,2            ## @FSL_SATA_P_SSTS
	.comm	_bootverbose,8,3                ## @bootverbose
	.comm	_ATA_SS_DET_MASK,4,2            ## @ATA_SS_DET_MASK
	.comm	_ATA_SS_DET_NO_DEVICE,4,2       ## @ATA_SS_DET_NO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CONNECT requested\n"

L_.str.1:                               ## @.str.1
	.asciz	"DISCONNECT requested\n"

	.comm	_AC_BUS_RESET,4,2               ## @AC_BUS_RESET
	.comm	_CAM_TARGET_WILDCARD,4,2        ## @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,4,2           ## @CAM_LUN_WILDCARD
	.comm	_CAM_REQ_CMP,8,3                ## @CAM_REQ_CMP
	.no_dead_strip	_fsl_sata_phy_check_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_sata_phy_check_events
_fsl_sata_phy_check_events:             ; @fsl_sata_phy_check_events
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ATA_SE_EXCHANGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_SE_EXCHANGED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ATA_SE_PHY_CHANGED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATA_SE_PHY_CHANGED@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_10
; %bb.4:
	ldr	w0, [x19, #20]
Lloh4:
	adrp	x8, _FSL_SATA_P_SSTS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FSL_SATA_P_SSTS@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_ATA_INL
Lloh7:
	adrp	x8, _bootverbose@GOTPAGE
Lloh8:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh10:
	adrp	x8, _ATA_SS_DET_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ATA_SS_DET_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh13:
	adrp	x9, _ATA_SS_DET_NO_DEVICE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ATA_SS_DET_NO_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	ldr	w0, [x19, #16]
Lloh16:
	adrp	x10, l_.str@PAGE
Lloh17:
	add	x10, x10, l_.str@PAGEOFF
Lloh18:
	adrp	x11, l_.str.1@PAGE
Lloh19:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w8, w9
	csel	x1, x11, x10, eq
	bl	_device_printf
LBB0_6:
Lloh20:
	adrp	x8, _AC_BUS_RESET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AC_BUS_RESET@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	mov	x2, #0
	bl	_xpt_async
	bl	_xpt_alloc_ccb_nowait
	cbz	x0, LBB0_11
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_cam_sim_path
	mov	x2, x0
Lloh23:
	adrp	x8, _CAM_TARGET_WILDCARD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CAM_TARGET_WILDCARD@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
Lloh26:
	adrp	x8, _CAM_LUN_WILDCARD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CAM_LUN_WILDCARD@GOTPAGEOFF]
Lloh28:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_xpt_create_path
Lloh29:
	adrp	x8, _CAM_REQ_CMP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_xpt_rescan
	mov	w0, #1
	b	LBB0_11
LBB0_9:
	mov	x0, x20
	bl	_xpt_free_ccb
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_SE_PHY_CHANGED,4,2         ; @ATA_SE_PHY_CHANGED
	.comm	_ATA_SE_EXCHANGED,4,2           ; @ATA_SE_EXCHANGED
	.comm	_FSL_SATA_P_SSTS,4,2            ; @FSL_SATA_P_SSTS
	.comm	_bootverbose,8,3                ; @bootverbose
	.comm	_ATA_SS_DET_MASK,4,2            ; @ATA_SS_DET_MASK
	.comm	_ATA_SS_DET_NO_DEVICE,4,2       ; @ATA_SS_DET_NO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CONNECT requested\n"

l_.str.1:                               ; @.str.1
	.asciz	"DISCONNECT requested\n"

	.comm	_AC_BUS_RESET,4,2               ; @AC_BUS_RESET
	.comm	_CAM_TARGET_WILDCARD,4,2        ; @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,4,2           ; @CAM_LUN_WILDCARD
	.comm	_CAM_REQ_CMP,8,3                ; @CAM_REQ_CMP
	.no_dead_strip	_fsl_sata_phy_check_events
.subsections_via_symbols
