	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_irq_uninstall              ## -- Begin function psb_irq_uninstall
	.p2align	4, 0x90
_psb_irq_uninstall:                     ## @psb_irq_uninstall
	.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, %r15
	movq	8(%rdi), %rbx
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_2:
	movq	_PSB_HWSTAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edi
	callq	_PSB_WVDC32
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_PIPE_VBLANK_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_psb_disable_pipestat
	movq	(%r15), %rax
LBB0_4:
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.5:
	movq	_PIPE_VBLANK_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_psb_disable_pipestat
	movq	(%r15), %rax
LBB0_6:
	cmpq	$0, 16(%rax)
	je	LBB0_8
## %bb.7:
	movq	_PIPE_VBLANK_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_psb_disable_pipestat
LBB0_8:
	movq	__PSB_IRQ_SGX_FLAG@GOTPCREL(%rip), %rax
	movq	__PSB_IRQ_MSVDX_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	__LNC_IRQ_TOPAZ_FLAG@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	andl	(%rbx), %edi
	movl	%edi, (%rbx)
	notl	%edi
	movq	_PSB_INT_MASK_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PSB_WVDC32
	movl	(%rbx), %edi
	movq	_PSB_INT_ENABLE_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PSB_WVDC32
	xorl	%eax, %eax
	callq	_wmb
	movq	_PSB_INT_IDENTITY_R@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_PSB_RVDC32
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_PSB_WVDC32
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PSB_HWSTAM,4,2                 ## @PSB_HWSTAM
	.comm	_PIPE_VBLANK_INTERRUPT_ENABLE,4,2 ## @PIPE_VBLANK_INTERRUPT_ENABLE
	.comm	__PSB_IRQ_SGX_FLAG,4,2          ## @_PSB_IRQ_SGX_FLAG
	.comm	__PSB_IRQ_MSVDX_FLAG,4,2        ## @_PSB_IRQ_MSVDX_FLAG
	.comm	__LNC_IRQ_TOPAZ_FLAG,4,2        ## @_LNC_IRQ_TOPAZ_FLAG
	.comm	_PSB_INT_MASK_R,4,2             ## @PSB_INT_MASK_R
	.comm	_PSB_INT_ENABLE_R,4,2           ## @PSB_INT_ENABLE_R
	.comm	_PSB_INT_IDENTITY_R,4,2         ## @PSB_INT_IDENTITY_R
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_irq_uninstall              ; -- Begin function psb_irq_uninstall
	.p2align	2
_psb_irq_uninstall:                     ; @psb_irq_uninstall
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x0
	ldr	x20, [x0, #8]
	add	x19, x20, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	w1, #0
	blr	x8
LBB0_2:
Lloh0:
	adrp	x8, _PSB_HWSTAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSB_HWSTAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #-1
	bl	_PSB_WVDC32
	ldr	x8, [x21]
	ldr	x9, [x8]
Lloh3:
	adrp	x22, _PIPE_VBLANK_INTERRUPT_ENABLE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PIPE_VBLANK_INTERRUPT_ENABLE@GOTPAGEOFF]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #0
	bl	_psb_disable_pipestat
	ldr	x8, [x21]
LBB0_4:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_6
; %bb.5:
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #1
	bl	_psb_disable_pipestat
	ldr	x8, [x21]
LBB0_6:
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #2
	bl	_psb_disable_pipestat
LBB0_8:
Lloh5:
	adrp	x8, __PSB_IRQ_SGX_FLAG@GOTPAGE
Lloh6:
	ldr	x8, [x8, __PSB_IRQ_SGX_FLAG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, __PSB_IRQ_MSVDX_FLAG@GOTPAGE
Lloh9:
	ldr	x9, [x9, __PSB_IRQ_MSVDX_FLAG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, __LNC_IRQ_TOPAZ_FLAG@GOTPAGE
Lloh12:
	ldr	x9, [x9, __LNC_IRQ_TOPAZ_FLAG@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x20]
	and	w8, w9, w8
	str	w8, [x20]
	mvn	w0, w8
Lloh14:
	adrp	x8, _PSB_INT_MASK_R@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PSB_INT_MASK_R@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_PSB_WVDC32
	ldr	w0, [x20]
Lloh17:
	adrp	x8, _PSB_INT_ENABLE_R@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PSB_INT_ENABLE_R@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_PSB_WVDC32
	bl	_wmb
Lloh20:
	adrp	x20, _PSB_INT_IDENTITY_R@GOTPAGE
Lloh21:
	ldr	x20, [x20, _PSB_INT_IDENTITY_R@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_PSB_RVDC32
	ldr	w1, [x20]
	bl	_PSB_WVDC32
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PSB_HWSTAM,4,2                 ; @PSB_HWSTAM
	.comm	_PIPE_VBLANK_INTERRUPT_ENABLE,4,2 ; @PIPE_VBLANK_INTERRUPT_ENABLE
	.comm	__PSB_IRQ_SGX_FLAG,4,2          ; @_PSB_IRQ_SGX_FLAG
	.comm	__PSB_IRQ_MSVDX_FLAG,4,2        ; @_PSB_IRQ_MSVDX_FLAG
	.comm	__LNC_IRQ_TOPAZ_FLAG,4,2        ; @_LNC_IRQ_TOPAZ_FLAG
	.comm	_PSB_INT_MASK_R,4,2             ; @PSB_INT_MASK_R
	.comm	_PSB_INT_ENABLE_R,4,2           ; @PSB_INT_ENABLE_R
	.comm	_PSB_INT_IDENTITY_R,4,2         ; @PSB_INT_IDENTITY_R
.subsections_via_symbols
