	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_swncq_hotplug
_nv_swncq_hotplug:                      ## @nv_swncq_hotplug
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_ata_ehi_clear_desc
	movq	_SCR_ERROR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sata_scr_read
	movl	(%r15), %esi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_sata_scr_write
	movq	_NV_SWNCQ_IRQ_ADDED@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_2:
	movq	_NV_SWNCQ_IRQ_REMOVED@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%rbx, %rdi
	callq	_ata_ehi_push_desc
LBB0_5:
	movq	%rbx, %rdi
	callq	_ata_ehi_hotplugged
	movl	-28(%rbp), %eax
	orl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_ata_port_freeze
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCR_ERROR,4,2                  ## @SCR_ERROR
	.comm	_NV_SWNCQ_IRQ_ADDED,4,2         ## @NV_SWNCQ_IRQ_ADDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hot plug"

	.comm	_NV_SWNCQ_IRQ_REMOVED,4,2       ## @NV_SWNCQ_IRQ_REMOVED
L_.str.1:                               ## @.str.1
	.asciz	"hot unplug"

	.no_dead_strip	_nv_swncq_hotplug
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv_swncq_hotplug
_nv_swncq_hotplug:                      ; @nv_swncq_hotplug
	.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	x20, x1
	mov	x19, x0
	bl	_ata_ehi_clear_desc
Lloh0:
	adrp	x21, _SCR_ERROR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SCR_ERROR@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_sata_scr_read
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_sata_scr_write
Lloh2:
	adrp	x8, _NV_SWNCQ_IRQ_ADDED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NV_SWNCQ_IRQ_ADDED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh7:
	adrp	x8, _NV_SWNCQ_IRQ_REMOVED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NV_SWNCQ_IRQ_REMOVED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_ata_ehi_push_desc
LBB0_5:
	mov	x0, x19
	bl	_ata_ehi_hotplugged
	ldr	w8, [sp, #12]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_ata_port_freeze
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SCR_ERROR,4,2                  ; @SCR_ERROR
	.comm	_NV_SWNCQ_IRQ_ADDED,4,2         ; @NV_SWNCQ_IRQ_ADDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hot plug"

	.comm	_NV_SWNCQ_IRQ_REMOVED,4,2       ; @NV_SWNCQ_IRQ_REMOVED
l_.str.1:                               ; @.str.1
	.asciz	"hot unplug"

	.no_dead_strip	_nv_swncq_hotplug
.subsections_via_symbols
