	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_crtc_restore               ## -- Begin function gma_crtc_restore
	.p2align	4, 0x90
_gma_crtc_restore:                      ## @gma_crtc_restore
	.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	(%rdi), %r14
	movq	8(%r14), %rbx
	callq	_to_gma_crtc
	movq	8(%rax), %r13
	testq	%r13, %r13
	je	LBB0_6
## %bb.1:
	movq	(%rax), %r12
	movq	(%rbx), %r15
	movl	(%r13), %esi
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%esi, %eax
	je	LBB0_3
## %bb.2:
	movq	%r12, %rcx
	shlq	$7, %rcx
	leaq	(%rcx,%r12,8), %rbx
	movq	112(%r15,%rbx), %rdi
	notl	%eax
	andl	%eax, %esi
	callq	_REG_WRITE
	movq	112(%r15,%rbx), %rdi
	callq	_REG_READ
	movl	$150, %edi
	callq	_udelay
LBB0_3:
	movq	%r12, %rax
	shlq	$7, %rax
	leaq	(%rax,%r12,8), %r12
	movq	128(%r15,%r12), %rdi
	movl	4(%r13), %esi
	callq	_REG_WRITE
	movq	128(%r15,%r12), %rdi
	callq	_REG_READ
	movq	120(%r15,%r12), %rdi
	movl	8(%r13), %esi
	callq	_REG_WRITE
	movq	120(%r15,%r12), %rdi
	callq	_REG_READ
	movq	112(%r15,%r12), %rdi
	movl	(%r13), %esi
	callq	_REG_WRITE
	movq	112(%r15,%r12), %rdi
	callq	_REG_READ
	movl	$150, %edi
	callq	_udelay
	movq	104(%r15,%r12), %rdi
	movl	12(%r13), %esi
	callq	_REG_WRITE
	movq	96(%r15,%r12), %rdi
	movl	16(%r13), %esi
	callq	_REG_WRITE
	movq	88(%r15,%r12), %rdi
	movl	20(%r13), %esi
	callq	_REG_WRITE
	movq	80(%r15,%r12), %rdi
	movl	24(%r13), %esi
	callq	_REG_WRITE
	movq	72(%r15,%r12), %rdi
	movl	28(%r13), %esi
	callq	_REG_WRITE
	movq	64(%r15,%r12), %rdi
	movl	32(%r13), %esi
	callq	_REG_WRITE
	movq	56(%r15,%r12), %rdi
	movl	36(%r13), %esi
	callq	_REG_WRITE
	movq	48(%r15,%r12), %rdi
	movl	40(%r13), %esi
	callq	_REG_WRITE
	movq	40(%r15,%r12), %rdi
	movl	44(%r13), %esi
	callq	_REG_WRITE
	movq	32(%r15,%r12), %rdi
	movl	48(%r13), %esi
	callq	_REG_WRITE
	movq	8(%r15,%r12), %rdi
	movl	52(%r13), %esi
	callq	_REG_WRITE
	movq	24(%r15,%r12), %rdi
	movl	56(%r13), %esi
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_gma_wait_for_vblank
	movq	16(%r15,%r12), %rdi
	movl	60(%r13), %esi
	callq	_REG_WRITE
	movq	8(%r15,%r12), %rdi
	movl	52(%r13), %esi
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_gma_wait_for_vblank
	movq	(%r15,%r12), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r14,%rbx), %rdi
	movq	64(%r13), %rax
	movl	(%rax,%rbx), %esi
	callq	_REG_WRITE
	addq	$4, %rbx
	cmpq	$1024, %rbx                     ## imm = 0x400
	jne	LBB0_4
## %bb.5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No crtc state\n"

	.comm	_DPLL_VCO_ENABLE,4,2            ## @DPLL_VCO_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_crtc_restore               ; -- Begin function gma_crtc_restore
	.p2align	2
_gma_crtc_restore:                      ; @gma_crtc_restore
	.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
	ldr	x19, [x0]
	ldr	x21, [x19, #8]
	bl	_to_gma_crtc
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_6
; %bb.1:
	ldr	x21, [x21]
	ldr	x22, [x0]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _DPLL_VCO_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DPLL_VCO_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w10, #136
	madd	x23, x22, x10, x21
	ldr	x0, [x23, #112]
	bic	w1, w8, w9
	bl	_REG_WRITE
	ldr	x0, [x23, #112]
	bl	_REG_READ
	mov	w0, #150
	bl	_udelay
LBB0_3:
	mov	w8, #136
	madd	x21, x22, x8, x21
	ldr	x0, [x21, #128]
	ldr	w1, [x20, #4]
	bl	_REG_WRITE
	ldr	x0, [x21, #128]
	bl	_REG_READ
	ldr	x0, [x21, #120]
	ldr	w1, [x20, #8]
	bl	_REG_WRITE
	ldr	x0, [x21, #120]
	bl	_REG_READ
	ldr	x0, [x21, #112]
	ldr	w1, [x20]
	bl	_REG_WRITE
	ldr	x0, [x21, #112]
	bl	_REG_READ
	mov	w0, #150
	bl	_udelay
	ldr	x0, [x21, #104]
	ldr	w1, [x20, #12]
	bl	_REG_WRITE
	ldr	x0, [x21, #96]
	ldr	w1, [x20, #16]
	bl	_REG_WRITE
	ldr	x0, [x21, #88]
	ldr	w1, [x20, #20]
	bl	_REG_WRITE
	ldr	x0, [x21, #80]
	ldr	w1, [x20, #24]
	bl	_REG_WRITE
	ldr	x0, [x21, #72]
	ldr	w1, [x20, #28]
	bl	_REG_WRITE
	ldr	x0, [x21, #64]
	ldr	w1, [x20, #32]
	bl	_REG_WRITE
	ldr	x0, [x21, #56]
	ldr	w1, [x20, #36]
	bl	_REG_WRITE
	ldr	x0, [x21, #48]
	ldr	w1, [x20, #40]
	bl	_REG_WRITE
	ldr	x0, [x21, #40]
	ldr	w1, [x20, #44]
	bl	_REG_WRITE
	ldr	x0, [x21, #32]
	ldr	w1, [x20, #48]
	bl	_REG_WRITE
	ldr	x0, [x21, #8]
	ldr	w1, [x20, #52]
	bl	_REG_WRITE
	ldr	x0, [x21, #24]
	ldr	w1, [x20, #56]
	bl	_REG_WRITE
	mov	x0, x19
	bl	_gma_wait_for_vblank
	ldr	x0, [x21, #16]
	ldr	w1, [x20, #60]
	bl	_REG_WRITE
	ldr	x0, [x21, #8]
	ldr	w1, [x20, #52]
	bl	_REG_WRITE
	mov	x0, x19
	bl	_gma_wait_for_vblank
	mov	x19, #0
	ldr	x21, [x21]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x21, x19
	ldr	x8, [x20, #64]
	ldr	w1, [x8, x19]
	bl	_REG_WRITE
	add	x19, x19, #4
	cmp	x19, #1024
	b.ne	LBB0_4
; %bb.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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No crtc state\n"

	.comm	_DPLL_VCO_ENABLE,4,2            ; @DPLL_VCO_ENABLE
.subsections_via_symbols
