	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_init_dmablit               ## -- Begin function via_init_dmablit
	.p2align	4, 0x90
_via_init_dmablit:                      ## @via_init_dmablit
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_pci_set_master
	movq	_VIA_NUM_BLIT_ENGINES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.1:
	xorl	%ecx, %ecx
	movq	_VIA_NUM_BLIT_SLOTS@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%r14), %rdi
	addq	$12, %rdi
	callq	_DRM_INIT_WAITQUEUE
	leaq	(%rbx,%r14), %rdi
	addq	$8, %rdi
	movq	_via_dmablit_workqueue@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	(%rbx,%r14), %rdi
	addq	$4, %rdi
	movq	_via_dmablit_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_setup_timer
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	_VIA_NUM_BLIT_ENGINES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rcx
	jge	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	imulq	$104, %rcx, %r14
	leaq	(%rdx,%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 96(%rdx,%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rdx,%r14)
	movups	%xmm0, 72(%rdx,%r14)
	movq	$0, 88(%rdx,%r14)
	movl	(%r15), %eax
	decl	%eax
	movl	%eax, (%rdx,%r14)
	leaq	(%rdx,%r14), %rdi
	addq	$24, %rdi
	movups	%xmm0, 32(%rdx,%r14)
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	$0, 48(%rdx,%r14)
	callq	_spin_lock_init
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %r13
	addq	$16, %r13
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	callq	_DRM_INIT_WAITQUEUE
	incq	%r12
	movslq	(%r15), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jl	LBB0_4
	jmp	LBB0_5
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_NUM_BLIT_ENGINES,4,2       ## @VIA_NUM_BLIT_ENGINES
	.comm	_VIA_NUM_BLIT_SLOTS,4,2         ## @VIA_NUM_BLIT_SLOTS
	.comm	_via_dmablit_workqueue,4,2      ## @via_dmablit_workqueue
	.comm	_via_dmablit_timer,4,2          ## @via_dmablit_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_init_dmablit               ; -- Begin function via_init_dmablit
	.p2align	2
_via_init_dmablit:                      ; @via_init_dmablit
	.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, x0
	ldr	x21, [x0, #8]
	ldr	w0, [x0]
	bl	_pci_set_master
Lloh0:
	adrp	x8, _VIA_NUM_BLIT_ENGINES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_NUM_BLIT_ENGINES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x23, #0
	mov	w24, #104
Lloh3:
	adrp	x25, _VIA_NUM_BLIT_SLOTS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _VIA_NUM_BLIT_SLOTS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	madd	x22, x23, x24, x28
	add	x0, x22, #12
	bl	_DRM_INIT_WAITQUEUE
	add	x0, x22, #8
Lloh5:
	adrp	x8, _via_dmablit_workqueue@GOTPAGE
Lloh6:
	ldr	x8, [x8, _via_dmablit_workqueue@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x22, #4
Lloh8:
	adrp	x8, _via_dmablit_timer@GOTPAGE
Lloh9:
	ldr	x8, [x8, _via_dmablit_timer@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_setup_timer
	add	x23, x23, #1
Lloh11:
	adrp	x8, _VIA_NUM_BLIT_ENGINES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIA_NUM_BLIT_ENGINES@GOTPAGEOFF]
Lloh13:
	ldrsw	x8, [x8]
	cmp	x23, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x28, [x21]
	madd	x20, x23, x24, x28
	movi.2d	v0, #0000000000000000
	stur	q0, [x20, #56]
	stur	q0, [x20, #72]
	stp	xzr, x19, [x20, #88]
	ldr	w8, [x25]
	sub	w8, w8, #1
	str	w8, [x20]
	add	x0, x20, #24
	stp	xzr, xzr, [x20, #40]
	str	xzr, [x20, #32]
	bl	_spin_lock_init
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, #0
	mov	x26, #0
	madd	x8, x23, x24, x28
	add	x27, x8, #16
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x27]
	add	x0, x8, x22
	bl	_DRM_INIT_WAITQUEUE
	add	x26, x26, #1
	ldrsw	x8, [x25]
	add	x22, x22, #4
	cmp	x26, x8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_NUM_BLIT_ENGINES,4,2       ; @VIA_NUM_BLIT_ENGINES
	.comm	_VIA_NUM_BLIT_SLOTS,4,2         ; @VIA_NUM_BLIT_SLOTS
	.comm	_via_dmablit_workqueue,4,2      ; @via_dmablit_workqueue
	.comm	_via_dmablit_timer,4,2          ; @via_dmablit_timer
.subsections_via_symbols
