	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_driver_irq_handler         ## -- Begin function via_driver_irq_handler
	.p2align	4, 0x90
_via_driver_irq_handler:                ## @via_driver_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, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r12
	movq	32(%r12), %rbx
	movq	_VIA_REG_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_via_read
	movl	%eax, %r15d
	movq	_VIA_IRQ_VBLANK_PENDING@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_1
## %bb.2:
	leaq	24(%r12), %r13
	movq	%r13, %rdi
	callq	_atomic_inc
	movq	%r13, %rdi
	callq	_atomic_read
	testb	$15, %al
	jne	LBB0_6
## %bb.3:
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %r14d
	cmpl	$0, (%r12)
	je	LBB0_5
## %bb.4:
	movl	28(%r12), %esi
	movl	%r14d, %edi
	callq	_ktime_sub
	sarl	$4, %eax
	movl	%eax, 4(%r12)
LBB0_5:
	movl	%r14d, 28(%r12)
	movl	$1, (%r12)
LBB0_6:
	movq	%r13, %rdi
	callq	_atomic_read
	testb	%al, %al
	jne	LBB0_8
## %bb.7:
	movl	4(%r12), %edi
	callq	_ktime_to_ns
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_drm_handle_vblank
	movl	$1, %r13d
	cmpl	$0, 8(%r12)
	jg	LBB0_10
	jmp	LBB0_16
LBB0_1:
	xorl	%r13d, %r13d
	cmpl	$0, 8(%r12)
	jle	LBB0_16
LBB0_10:
	addq	$4, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	$1, %edx
	callq	_via_dmablit_handler
	movl	$1, %r13d
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	%r14d
	addq	$12, %rbx
	cmpl	8(%r12), %r14d
	jge	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	testl	%r15d, -4(%rbx)
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	4(%rbx), %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	callq	_wake_up
	movq	16(%r12), %rax
	movq	_drm_via_irq_dma0_td@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%r13d, %r13d
	cmpl	(%rax,%rcx,4), %r14d
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_drm_via_irq_dma1_td@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, %r13d
	cmpl	(%rax,%rcx,4), %r14d
	je	LBB0_14
	jmp	LBB0_15
LBB0_16:
	movq	_VIA_REG_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_via_write
	testl	%r13d, %r13d
	jne	LBB0_17
## %bb.18:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_REG_INTERRUPT,4,2          ## @VIA_REG_INTERRUPT
	.comm	_VIA_IRQ_VBLANK_PENDING,4,2     ## @VIA_IRQ_VBLANK_PENDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nsec per vblank is: %llu\n"

	.comm	_drm_via_irq_dma0_td,8,3        ## @drm_via_irq_dma0_td
	.comm	_drm_via_irq_dma1_td,8,3        ## @drm_via_irq_dma1_td
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_driver_irq_handler         ; -- Begin function via_driver_irq_handler
	.p2align	2
_via_driver_irq_handler:                ; @via_driver_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	x20, x1
	ldr	x19, [x1]
	ldr	x25, [x19, #32]
Lloh0:
	adrp	x24, _VIA_REG_INTERRUPT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VIA_REG_INTERRUPT@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_via_read
	mov	x21, x0
Lloh2:
	adrp	x8, _VIA_IRQ_VBLANK_PENDING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIA_IRQ_VBLANK_PENDING@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.1:
	add	x22, x19, #24
	mov	x0, x22
	bl	_atomic_inc
	mov	x0, x22
	bl	_atomic_read
	tst	w0, #0xf
	b.ne	LBB0_5
; %bb.2:
	bl	_ktime_get
	mov	x23, x0
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	w1, [x19, #28]
	mov	x0, x23
	bl	_ktime_sub
	asr	w8, w0, #4
	str	w8, [x19, #4]
LBB0_4:
	str	w23, [x19, #28]
	mov	w8, #1
	str	w8, [x19]
LBB0_5:
	mov	x0, x22
	bl	_atomic_read
	tst	w0, #0xff
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x19, #4]
	bl	_ktime_to_ns
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
LBB0_7:
	mov	x0, x20
	mov	w1, #0
	bl	_drm_handle_vblank
	mov	w23, #1
	b	LBB0_9
LBB0_8:
	mov	w23, #0
LBB0_9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:
	mov	w26, #0
	add	x22, x25, #4
Lloh7:
	adrp	x25, _drm_via_irq_dma0_td@GOTPAGE
Lloh8:
	ldr	x25, [x25, _drm_via_irq_dma0_td@GOTPAGEOFF]
Lloh9:
	adrp	x27, _drm_via_irq_dma1_td@GOTPAGE
Lloh10:
	ldr	x27, [x27, _drm_via_irq_dma1_td@GOTPAGEOFF]
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w23, #0
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x20
	mov	x1, x23
	mov	w2, #1
	bl	_via_dmablit_handler
	mov	w23, #1
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w26, w26, #1
	ldr	w8, [x19, #8]
	add	x22, x22, #12
	cmp	w26, w8
	b.ge	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x22, #-4]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x0, x22, #4
	bl	_atomic_inc
	mov	x0, x22
	bl	_wake_up
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	ldr	w9, [x8, x9, lsl #2]
	cmp	w26, w9
	b.eq	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x9, [x27]
	ldr	w8, [x8, x9, lsl #2]
	mov	w23, #1
	cmp	w26, w8
	b.eq	LBB0_12
	b	LBB0_13
LBB0_17:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_via_write
Lloh11:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh13:
	adrp	x9, _IRQ_HANDLED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IRQ_HANDLED@GOTPAGEOFF]
	cmp	w23, #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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_REG_INTERRUPT,4,2          ; @VIA_REG_INTERRUPT
	.comm	_VIA_IRQ_VBLANK_PENDING,4,2     ; @VIA_IRQ_VBLANK_PENDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nsec per vblank is: %llu\n"

	.comm	_drm_via_irq_dma0_td,8,3        ; @drm_via_irq_dma0_td
	.comm	_drm_via_irq_dma1_td,8,3        ; @drm_via_irq_dma1_td
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
.subsections_via_symbols
