	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_driver_irq_preinstall      ## -- Begin function via_driver_irq_preinstall
	.p2align	4, 0x90
_via_driver_irq_preinstall:             ## @via_driver_irq_preinstall
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	testq	%r14, %r14
	je	LBB0_5
## %bb.1:
	movq	8(%r14), %rax
	movq	48(%r14), %r12
	movq	_VIA_IRQ_VBLANK_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
	movq	_VIA_IRQ_VBLANK_PENDING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%r14)
	movq	_VIA_PRO_GROUP_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_VIA_DX9_0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movq	_via_irqmap_unichrome@GOTPCREL(%rip), %rax
	cmovneq	_via_irqmap_pro_group_a@GOTPCREL(%rip), %rax
	movq	_via_num_unichrome@GOTPCREL(%rip), %rcx
	cmovneq	_via_num_pro_group_a@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	movl	(%rcx), %ecx
	movq	_via_unichrome_irqs@GOTPCREL(%rip), %rdx
	cmovneq	_via_pro_group_a_irqs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 16(%r14)
	movl	%ecx, 24(%r14)
	movl	%eax, 40(%r14)
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.2:
	addq	$8, %r12
	leaq	L_.str.1(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%r12), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %ecx
	movl	%ecx, -8(%r12)
	movl	4(%rax), %eax
	movl	%eax, -4(%r12)
	movq	%r12, %rdi
	callq	_init_waitqueue_head
	movl	-8(%r12), %eax
	orl	%eax, (%r14)
	movl	-4(%r12), %eax
	orl	%eax, 4(%r14)
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	incq	%rbx
	movslq	24(%r14), %rax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	$0, 32(%r14)
	movq	_VIA_REG_INTERRUPT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_via_read
	movl	(%rbx), %esi
	movl	(%r14), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	callq	_via_write
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_viadrv_acknowledge_irqs        ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev_priv: %p\n"

	.comm	_VIA_IRQ_VBLANK_ENABLE,4,2      ## @VIA_IRQ_VBLANK_ENABLE
	.comm	_VIA_IRQ_VBLANK_PENDING,4,2     ## @VIA_IRQ_VBLANK_PENDING
	.comm	_VIA_PRO_GROUP_A,8,3            ## @VIA_PRO_GROUP_A
	.comm	_VIA_DX9_0,8,3                  ## @VIA_DX9_0
	.comm	_via_pro_group_a_irqs,8,3       ## @via_pro_group_a_irqs
	.comm	_via_num_pro_group_a,4,2        ## @via_num_pro_group_a
	.comm	_via_irqmap_pro_group_a,4,2     ## @via_irqmap_pro_group_a
	.comm	_via_unichrome_irqs,8,3         ## @via_unichrome_irqs
	.comm	_via_num_unichrome,4,2          ## @via_num_unichrome
	.comm	_via_irqmap_unichrome,4,2       ## @via_irqmap_unichrome
L_.str.1:                               ## @.str.1
	.asciz	"Initializing IRQ %d\n"

	.comm	_VIA_REG_INTERRUPT,4,2          ## @VIA_REG_INTERRUPT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_driver_irq_preinstall      ; -- Begin function via_driver_irq_preinstall
	.p2align	2
_via_driver_irq_preinstall:             ; @via_driver_irq_preinstall
	.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
	ldr	x19, [x0]
	str	x19, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	cbz	x19, LBB0_5
; %bb.1:
	ldr	x8, [x19, #48]
Lloh2:
	adrp	x9, _VIA_IRQ_VBLANK_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VIA_IRQ_VBLANK_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	w9, [x19]
Lloh5:
	adrp	x9, _VIA_IRQ_VBLANK_PENDING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VIA_IRQ_VBLANK_PENDING@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w9, [x19, #4]
	ldr	x9, [x19, #8]
Lloh8:
	adrp	x10, _VIA_PRO_GROUP_A@GOTPAGE
Lloh9:
	ldr	x10, [x10, _VIA_PRO_GROUP_A@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
Lloh11:
	adrp	x10, _VIA_DX9_0@GOTPAGE
Lloh12:
	ldr	x10, [x10, _VIA_DX9_0@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	ccmp	x9, x10, #4, ne
Lloh14:
	adrp	x9, _via_irqmap_pro_group_a@GOTPAGE
Lloh15:
	ldr	x9, [x9, _via_irqmap_pro_group_a@GOTPAGEOFF]
Lloh16:
	adrp	x10, _via_irqmap_unichrome@GOTPAGE
Lloh17:
	ldr	x10, [x10, _via_irqmap_unichrome@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _via_num_pro_group_a@GOTPAGE
Lloh19:
	ldr	x10, [x10, _via_num_pro_group_a@GOTPAGEOFF]
Lloh20:
	adrp	x11, _via_num_unichrome@GOTPAGE
Lloh21:
	ldr	x11, [x11, _via_num_unichrome@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
Lloh22:
	adrp	x11, _via_pro_group_a_irqs@GOTPAGE
Lloh23:
	ldr	x11, [x11, _via_pro_group_a_irqs@GOTPAGEOFF]
Lloh24:
	adrp	x12, _via_unichrome_irqs@GOTPAGE
Lloh25:
	ldr	x12, [x12, _via_unichrome_irqs@GOTPAGEOFF]
	csel	x11, x11, x12, eq
	ldr	x11, [x11]
	str	x11, [x19, #16]
	str	w10, [x19, #24]
	str	w9, [x19, #40]
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x22, #0
	add	x20, x8, #8
Lloh26:
	adrp	x21, l_.str.1@PAGE
Lloh27:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, #4
	mov	w1, #0
	bl	_atomic_set
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w9, [x8]
	stur	w9, [x20, #-8]
	ldr	w8, [x8, #4]
	stur	w8, [x20, #-4]
	mov	x0, x20
	bl	_init_waitqueue_head
	ldur	d0, [x20, #-8]
	ldr	d1, [x19]
	orr.8b	v0, v1, v0
	str	d0, [x19]
	str	x22, [sp]
	mov	x0, x21
	bl	_DRM_DEBUG
	add	x22, x22, #1
	ldrsw	x8, [x19, #24]
	add	x20, x20, #16
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_4:
	str	xzr, [x19, #32]
Lloh28:
	adrp	x20, _VIA_REG_INTERRUPT@GOTPAGE
Lloh29:
	ldr	x20, [x20, _VIA_REG_INTERRUPT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_via_read
	ldr	w1, [x20]
	ldr	w8, [x19]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_via_write
	mov	x0, x19
	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
	b	_viadrv_acknowledge_irqs
LBB0_5:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev_priv: %p\n"

	.comm	_VIA_IRQ_VBLANK_ENABLE,4,2      ; @VIA_IRQ_VBLANK_ENABLE
	.comm	_VIA_IRQ_VBLANK_PENDING,4,2     ; @VIA_IRQ_VBLANK_PENDING
	.comm	_VIA_PRO_GROUP_A,8,3            ; @VIA_PRO_GROUP_A
	.comm	_VIA_DX9_0,8,3                  ; @VIA_DX9_0
	.comm	_via_pro_group_a_irqs,8,3       ; @via_pro_group_a_irqs
	.comm	_via_num_pro_group_a,4,2        ; @via_num_pro_group_a
	.comm	_via_irqmap_pro_group_a,4,2     ; @via_irqmap_pro_group_a
	.comm	_via_unichrome_irqs,8,3         ; @via_unichrome_irqs
	.comm	_via_num_unichrome,4,2          ; @via_num_unichrome
	.comm	_via_irqmap_unichrome,4,2       ; @via_irqmap_unichrome
l_.str.1:                               ; @.str.1
	.asciz	"Initializing IRQ %d\n"

	.comm	_VIA_REG_INTERRUPT,4,2          ; @VIA_REG_INTERRUPT
.subsections_via_symbols
