	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_hvs_irq_handler
_vc4_hvs_irq_handler:                   ## @vc4_hvs_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
	pushq	%rax
	.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, %rdi
	callq	_to_vc4_dev
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SCALER_DISPSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HVS_READ
	movl	%eax, %r13d
	movq	_SCALER_DISPCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HVS_READ
	movq	_SCALER_CHANNELS_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.1:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_SCALER_DISPSTAT_EUFLOW
	testl	%r13d, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_SCALER_DISPCTRL_DSPEISLUR
	testl	%r12d, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_vc4_hvs_mask_underrun
	movq	%r15, %rdi
	callq	_vc4_hvs_report_underrun
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
LBB0_6:
	movq	_SCALER_DISPSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_SCALER_DISPSTAT_IRQMASK
	movl	%eax, %ebx
	movl	$1, %edi
	callq	_SCALER_DISPSTAT_IRQMASK
	orl	%eax, %ebx
	movl	$2, %edi
	callq	_SCALER_DISPSTAT_IRQMASK
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_HVS_WRITE
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_SCALER_DISPSTAT,4,2            ## @SCALER_DISPSTAT
	.comm	_SCALER_DISPCTRL,4,2            ## @SCALER_DISPCTRL
	.comm	_SCALER_CHANNELS_COUNT,4,2      ## @SCALER_CHANNELS_COUNT
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_vc4_hvs_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_hvs_irq_handler
_vc4_hvs_irq_handler:                   ; @vc4_hvs_irq_handler
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x0, x1
	bl	_to_vc4_dev
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x24, _SCALER_DISPSTAT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SCALER_DISPSTAT@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_HVS_READ
	mov	x21, x0
Lloh5:
	adrp	x8, _SCALER_DISPCTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCALER_DISPCTRL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_HVS_READ
Lloh8:
	adrp	x25, _SCALER_CHANNELS_COUNT@GOTPAGE
Lloh9:
	ldr	x25, [x25, _SCALER_CHANNELS_COUNT@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, x0
	mov	w23, #0
Lloh10:
	adrp	x26, _IRQ_HANDLED@GOTPAGE
Lloh11:
	ldr	x26, [x26, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	ldr	w8, [x25]
	cmp	w23, w8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_SCALER_DISPSTAT_EUFLOW
	tst	w0, w21
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_SCALER_DISPCTRL_DSPEISLUR
	tst	w0, w22
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_vc4_hvs_mask_underrun
	mov	x0, x20
	bl	_vc4_hvs_report_underrun
	ldr	w19, [x26]
	b	LBB0_2
LBB0_6:
	ldr	w20, [x24]
	mov	w0, #0
	bl	_SCALER_DISPSTAT_IRQMASK
	mov	x21, x0
	mov	w0, #1
	bl	_SCALER_DISPSTAT_IRQMASK
	orr	w21, w0, w21
	mov	w0, #2
	bl	_SCALER_DISPSTAT_IRQMASK
	orr	w1, w21, w0
	mov	x0, x20
	bl	_HVS_WRITE
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_SCALER_DISPSTAT,4,2            ; @SCALER_DISPSTAT
	.comm	_SCALER_DISPCTRL,4,2            ; @SCALER_DISPCTRL
	.comm	_SCALER_CHANNELS_COUNT,4,2      ; @SCALER_CHANNELS_COUNT
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_vc4_hvs_irq_handler
.subsections_via_symbols
