	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_g200wb_prepare
_mga_g200wb_prepare:                    ## @mga_g200wb_prepare
	.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	_DAC_INDEX@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_MGA1064_GEN_IO_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_WREG8
	movq	_DAC_DATA@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_RREG8
	orl	$16, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG_DAC
	movl	(%r15), %edi
	movq	_MGA1064_GEN_IO_DATA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_WREG8
	movl	(%r12), %edi
	callq	_RREG8
	orl	$16, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG_DAC
	movl	(%r15), %edi
	movq	_MGA1064_SPAREREG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_WREG8
	movl	(%r12), %edi
	callq	_RREG8
	movl	%eax, %ebx
	movl	%eax, %r14d
	orl	$128, %r14d
	movl	(%r13), %edi
	movl	%r14d, %esi
	callq	_WREG_DAC
	movb	$1, %al
	testb	$1, %bl
	jne	LBB0_4
## %bb.1:
	movl	$-299, %ebx                     ## imm = 0xFED5
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	(%r13), %esi
	callq	_WREG8
	movl	(%r12), %edi
	callq	_RREG8
	movl	%eax, %r14d
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	testl	%ebx, %ebx
	setne	%al
	testb	$1, %r14b
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rbx), %ecx
	testl	%ebx, %ebx
	movl	%ecx, %ebx
	jne	LBB0_2
LBB0_4:
	testb	%al, %al
	je	LBB0_9
## %bb.5:
	andl	$2, %r14d
	je	LBB0_9
## %bb.6:
	movl	$-299, %ebx                     ## imm = 0xFED5
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	(%r13), %esi
	callq	_WREG8
	movl	(%r12), %edi
	callq	_RREG8
	movl	%eax, %r14d
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	testb	$2, %r14b
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_7
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DAC_INDEX,4,2                  ## @DAC_INDEX
	.comm	_MGA1064_GEN_IO_CTL,4,2         ## @MGA1064_GEN_IO_CTL
	.comm	_DAC_DATA,4,2                   ## @DAC_DATA
	.comm	_MGA1064_GEN_IO_DATA,4,2        ## @MGA1064_GEN_IO_DATA
	.comm	_MGA1064_SPAREREG,4,2           ## @MGA1064_SPAREREG
	.no_dead_strip	_mga_g200wb_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_g200wb_prepare
_mga_g200wb_prepare:                    ; @mga_g200wb_prepare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x21, _DAC_INDEX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DAC_INDEX@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x19, _MGA1064_GEN_IO_CTL@GOTPAGE
Lloh3:
	ldr	x19, [x19, _MGA1064_GEN_IO_CTL@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_WREG8
Lloh4:
	adrp	x22, _DAC_DATA@GOTPAGE
Lloh5:
	ldr	x22, [x22, _DAC_DATA@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG8
	orr	w1, w0, #0x10
	ldr	w0, [x19]
	bl	_WREG_DAC
	ldr	w0, [x21]
Lloh6:
	adrp	x19, _MGA1064_GEN_IO_DATA@GOTPAGE
Lloh7:
	ldr	x19, [x19, _MGA1064_GEN_IO_DATA@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_WREG8
	ldr	w0, [x22]
	bl	_RREG8
	orr	w1, w0, #0x10
	ldr	w0, [x19]
	bl	_WREG_DAC
	ldr	w0, [x21]
Lloh8:
	adrp	x23, _MGA1064_SPAREREG@GOTPAGE
Lloh9:
	ldr	x23, [x23, _MGA1064_SPAREREG@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_WREG8
	ldr	w0, [x22]
	bl	_RREG8
	mov	x20, x0
	orr	w19, w0, #0x80
	ldr	w0, [x23]
	mov	x1, x19
	bl	_WREG_DAC
	tbnz	w20, #0, LBB0_4
; %bb.1:
	mov	w9, #-299
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x9
	ldr	w0, [x21]
	ldr	w1, [x23]
	bl	_WREG8
	ldr	w0, [x22]
	bl	_RREG8
	mov	x19, x0
	mov	w0, #1000
	bl	_udelay
	cmp	w20, #0
	cset	w8, ne
	tbnz	w19, #0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w9, w20, #1
	cbnz	w20, LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w8, #1
LBB0_5:
	cbz	w8, LBB0_10
; %bb.6:
	tbz	w19, #1, LBB0_10
; %bb.7:
	mov	w8, #-299
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x8
	ldr	w0, [x21]
	ldr	w1, [x23]
	bl	_WREG8
	ldr	w0, [x22]
	bl	_RREG8
	mov	x19, x0
	mov	w0, #1000
	bl	_udelay
	tbz	w19, #1, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w8, w20, #1
	cbnz	w20, LBB0_8
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DAC_INDEX,4,2                  ; @DAC_INDEX
	.comm	_MGA1064_GEN_IO_CTL,4,2         ; @MGA1064_GEN_IO_CTL
	.comm	_DAC_DATA,4,2                   ; @DAC_DATA
	.comm	_MGA1064_GEN_IO_DATA,4,2        ; @MGA1064_GEN_IO_DATA
	.comm	_MGA1064_SPAREREG,4,2           ; @MGA1064_SPAREREG
	.no_dead_strip	_mga_g200wb_prepare
.subsections_via_symbols
