	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_irq_handler                ## -- Begin function psb_irq_handler
	.p2align	4, 0x90
_psb_irq_handler:                       ## @psb_irq_handler
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rsi), %rbx
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movq	_PSB_INT_IDENTITY_R@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PSB_RVDC32
	movl	%eax, %r13d
	movq	__PSB_PIPE_EVENT_FLAG@GOTPCREL(%rip), %rax
	movq	__PSB_IRQ_ASLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	__PSB_IRQ_SGX_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	__PSB_IRQ_DISP_HOTSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ebx
	andl	%r13d, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock
	xorl	%r12d, %r12d
	testl	%r13d, %r14d
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_gma_power_is_on
	testq	%rax, %rax
	movq	%r15, %r14
	movl	%ebx, %r15d
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_psb_vdc_interrupt
	movl	$1, %r12d
LBB0_4:
	testl	%r13d, -44(%rbp)                ## 4-byte Folded Reload
	je	LBB0_6
LBB0_5:
	movq	_PSB_CR_EVENT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PSB_RSGX32
	movl	%eax, %ebx
	movq	_PSB_CR_EVENT_STATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PSB_RSGX32
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_psb_sgx_interrupt
	movl	$1, %r12d
LBB0_6:
	testl	%r13d, -48(%rbp)                ## 4-byte Folded Reload
	je	LBB0_9
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	*%rax
	movl	%eax, %r12d
	movq	_PORT_HOTPLUG_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
LBB0_9:
	movq	_PSB_INT_IDENTITY_R@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r15d, %edi
	callq	_PSB_WVDC32
	movl	(%rbx), %edi
	callq	_PSB_RVDC32
	xorl	%eax, %eax
	callq	_rmb
	testl	%r12d, %r12d
	jne	LBB0_10
## %bb.11:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, %r14
	movl	%ebx, %r15d
	testl	%r13d, -44(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PSB_INT_IDENTITY_R,4,2         ## @PSB_INT_IDENTITY_R
	.comm	__PSB_PIPE_EVENT_FLAG,4,2       ## @_PSB_PIPE_EVENT_FLAG
	.comm	__PSB_IRQ_ASLE,4,2              ## @_PSB_IRQ_ASLE
	.comm	__PSB_IRQ_SGX_FLAG,4,2          ## @_PSB_IRQ_SGX_FLAG
	.comm	__PSB_IRQ_DISP_HOTSYNC,4,2      ## @_PSB_IRQ_DISP_HOTSYNC
	.comm	_PSB_CR_EVENT_STATUS,4,2        ## @PSB_CR_EVENT_STATUS
	.comm	_PSB_CR_EVENT_STATUS2,4,2       ## @PSB_CR_EVENT_STATUS2
	.comm	_PORT_HOTPLUG_STAT,4,2          ## @PORT_HOTPLUG_STAT
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_irq_handler                ; -- Begin function psb_irq_handler
	.p2align	2
_psb_irq_handler:                       ; @psb_irq_handler
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	ldr	x24, [x1]
	add	x21, x24, #16
	mov	x0, x21
	bl	_spin_lock
Lloh0:
	adrp	x23, _PSB_INT_IDENTITY_R@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PSB_INT_IDENTITY_R@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_PSB_RVDC32
	mov	x22, x0
Lloh2:
	adrp	x8, __PSB_PIPE_EVENT_FLAG@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PSB_PIPE_EVENT_FLAG@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, __PSB_IRQ_ASLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, __PSB_IRQ_ASLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w27, w8, w0
Lloh8:
	adrp	x8, __PSB_IRQ_SGX_FLAG@GOTPAGE
Lloh9:
	ldr	x8, [x8, __PSB_IRQ_SGX_FLAG@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w25, w8, w0
Lloh11:
	adrp	x8, __PSB_IRQ_DISP_HOTSYNC@GOTPAGE
Lloh12:
	ldr	x8, [x8, __PSB_IRQ_DISP_HOTSYNC@GOTPAGEOFF]
Lloh13:
	ldr	w26, [x8]
	ldr	w8, [x24]
	and	w20, w8, w0
	mov	x0, x21
	bl	_spin_unlock
	cbz	w27, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_gma_power_is_on
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_psb_vdc_interrupt
	mov	w21, #1
	and	w22, w26, w22
	cbnz	w25, LBB0_4
	b	LBB0_5
LBB0_3:
	mov	w21, #0
	and	w22, w26, w22
	cbz	w25, LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _PSB_CR_EVENT_STATUS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PSB_CR_EVENT_STATUS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_PSB_RSGX32
	mov	x21, x0
Lloh17:
	adrp	x8, _PSB_CR_EVENT_STATUS2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PSB_CR_EVENT_STATUS2@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_PSB_RSGX32
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_psb_sgx_interrupt
	mov	w21, #1
LBB0_5:
	cbz	w22, LBB0_8
; %bb.6:
	ldr	x8, [x24, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	blr	x8
	mov	x21, x0
Lloh20:
	adrp	x8, _PORT_HOTPLUG_STAT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PORT_HOTPLUG_STAT@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x19
	bl	_REG_WRITE
LBB0_8:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_PSB_WVDC32
	ldr	w0, [x23]
	bl	_PSB_RVDC32
	bl	_rmb
Lloh23:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh25:
	adrp	x9, _IRQ_HANDLED@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IRQ_HANDLED@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x8, x9, eq
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_PSB_INT_IDENTITY_R,4,2         ; @PSB_INT_IDENTITY_R
	.comm	__PSB_PIPE_EVENT_FLAG,4,2       ; @_PSB_PIPE_EVENT_FLAG
	.comm	__PSB_IRQ_ASLE,4,2              ; @_PSB_IRQ_ASLE
	.comm	__PSB_IRQ_SGX_FLAG,4,2          ; @_PSB_IRQ_SGX_FLAG
	.comm	__PSB_IRQ_DISP_HOTSYNC,4,2      ; @_PSB_IRQ_DISP_HOTSYNC
	.comm	_PSB_CR_EVENT_STATUS,4,2        ; @PSB_CR_EVENT_STATUS
	.comm	_PSB_CR_EVENT_STATUS2,4,2       ; @PSB_CR_EVENT_STATUS2
	.comm	_PORT_HOTPLUG_STAT,4,2          ; @PORT_HOTPLUG_STAT
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
.subsections_via_symbols
