	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_crtc_dpms                  ## -- Begin function gma_crtc_dpms
	.p2align	4, 0x90
_gma_crtc_dpms:                         ## @gma_crtc_dpms
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	(%rdi), %r12
	movq	(%r12), %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_to_gma_crtc
	movq	%rax, %rbx
	movslq	(%rax), %rax
	movq	8(%r13), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,4), %r14
	movq	%r12, %rdi
	callq	_IS_CDV
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%r13), %rax
	movq	%r12, %rdi
	callq	*8(%rax)
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14,4), %rcx
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	jae	LBB0_3
## %bb.12:
	cmpl	$0, 4(%rbx)
	movq	%r13, %r15
	jne	LBB0_20
## %bb.13:
	movl	$1, 4(%rbx)
	movl	(%rcx), %edi
	movq	%rcx, %rbx
	callq	_REG_READ
	movl	%eax, %r15d
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_15
## %bb.14:
	movl	(%rbx), %edi
	movl	%r15d, %esi
	callq	_REG_WRITE
	movl	(%rbx), %edi
	callq	_REG_READ
	movl	$150, %edi
	callq	_udelay
	movl	(%rbx), %edi
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%r15d, %esi
	callq	_REG_WRITE
	movl	(%rbx), %edi
	callq	_REG_READ
	movl	$150, %edi
	callq	_udelay
	movl	(%rbx), %edi
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	%r15d, %esi
	callq	_REG_WRITE
	movl	(%rbx), %edi
	callq	_REG_READ
	movl	$150, %edi
	callq	_udelay
LBB0_15:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx,%r14,4), %edi
	callq	_REG_READ
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%eax, %esi
	jne	LBB0_17
## %bb.16:
	leaq	(%rbx,%r14,4), %rcx
	addq	$12, %rcx
	movl	(%rcx), %edi
	orl	%eax, %esi
	callq	_REG_WRITE
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax,%r14,4), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_REG_WRITE
LBB0_17:
	movl	$150, %edi
	callq	_udelay
	movl	4(%rbx,%r14,4), %edi
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%eax, %esi
	movq	%r13, %r15
	jne	LBB0_19
## %bb.18:
	leaq	(%rbx,%r14,4), %rcx
	addq	$4, %rcx
	movl	(%rcx), %edi
	orl	%eax, %esi
	callq	_REG_WRITE
LBB0_19:
	movl	16(%rbx,%r14,4), %edi
	callq	_REG_READ
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	movq	_PIPE_FIFO_UNDERRUN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	16(%rbx,%r14,4), %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	16(%rbx,%r14,4), %edi
	callq	_REG_READ
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_gma_crtc_load_lut
	jmp	LBB0_20
LBB0_3:
	cmpl	$131, %r15d
	movq	%r13, %r15
	jne	LBB0_20
## %bb.4:
	cmpl	$0, 4(%rbx)
	je	LBB0_20
## %bb.5:
	movq	%rcx, %r13
	movl	$0, 4(%rbx)
	movq	_VGACNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VGA_DISP_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_REG_WRITE
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_crtc_vblank_off
	movq	%r12, %rdi
	callq	_gma_wait_for_vblank
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx,%r14,4), %edi
	callq	_REG_READ
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.6:
	leaq	(%rbx,%r14,4), %rdx
	addq	$12, %rdx
	movl	(%rdx), %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_REG_WRITE
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax,%r14,4), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	8(%rbx,%r14,4), %edi
	callq	_REG_READ
LBB0_7:
	movl	4(%rbx,%r14,4), %edi
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_9
## %bb.8:
	leaq	(%rbx,%r14,4), %rbx
	addq	$4, %rbx
	movl	(%rbx), %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	(%rbx), %edi
	callq	_REG_READ
LBB0_9:
	movq	%r12, %rdi
	callq	_gma_wait_for_vblank
	movl	$150, %edi
	callq	_udelay
	movl	(%r13), %edi
	callq	_REG_READ
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_11
## %bb.10:
	movl	(%r13), %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	(%r13), %edi
	callq	_REG_READ
LBB0_11:
	movl	$150, %edi
	callq	_udelay
LBB0_20:
	movq	%r12, %rdi
	callq	_IS_CDV
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movq	(%r15), %rax
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	*(%rax)
LBB0_22:
	movq	_DSPARB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$16190, %esi                    ## imm = 0x3F3E
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DPLL_VCO_ENABLE,4,2            ## @DPLL_VCO_ENABLE
	.comm	_DISPLAY_PLANE_ENABLE,4,2       ## @DISPLAY_PLANE_ENABLE
	.comm	_PIPEACONF_ENABLE,4,2           ## @PIPEACONF_ENABLE
	.comm	_PIPE_FIFO_UNDERRUN,4,2         ## @PIPE_FIFO_UNDERRUN
	.comm	_VGACNTRL,4,2                   ## @VGACNTRL
	.comm	_VGA_DISP_DISABLE,4,2           ## @VGA_DISP_DISABLE
	.comm	_DSPARB,4,2                     ## @DSPARB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_crtc_dpms                  ; -- Begin function gma_crtc_dpms
	.p2align	2
_gma_crtc_dpms:                         ; @gma_crtc_dpms
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0]
	ldr	x23, [x20]
	bl	_to_gma_crtc
	mov	x21, x0
	ldrsw	x24, [x0]
	ldr	x25, [x23, #8]
	mov	w8, #20
	madd	x26, x24, x8, x25
	mov	x0, x20
	bl	_IS_CDV
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x23]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
LBB0_2:
	sub	w8, w22, #128
	cmp	w8, #3
	b.hs	LBB0_11
; %bb.3:
	ldr	w8, [x21, #4]
	cbnz	w8, LBB0_20
; %bb.4:
	mov	w8, #1
	str	w8, [x21, #4]
	ldr	w0, [x26]
	bl	_REG_READ
Lloh0:
	adrp	x22, _DPLL_VCO_ENABLE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DPLL_VCO_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:
	mov	x21, x0
	ldr	w0, [x26]
	mov	x1, x21
	bl	_REG_WRITE
	ldr	w0, [x26]
	bl	_REG_READ
	mov	w0, #150
	bl	_udelay
	ldr	w0, [x26]
	ldr	w8, [x22]
	orr	w1, w8, w21
	bl	_REG_WRITE
	ldr	w0, [x26]
	bl	_REG_READ
	mov	w0, #150
	bl	_udelay
	ldr	w0, [x26]
	ldr	w8, [x22]
	orr	w1, w8, w21
	bl	_REG_WRITE
	ldr	w0, [x26]
	bl	_REG_READ
	mov	w0, #150
	bl	_udelay
LBB0_6:
	mov	w8, #20
	madd	x21, x24, x8, x25
	ldr	w0, [x21, #12]!
	bl	_REG_READ
Lloh2:
	adrp	x8, _DISPLAY_PLANE_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DISPLAY_PLANE_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
	tst	w9, w0
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [x21]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_REG_WRITE
	mov	w8, #20
	madd	x8, x24, x8, x25
	ldr	w21, [x8, #8]
	mov	x0, x21
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x21
	bl	_REG_WRITE
LBB0_8:
	mov	w0, #150
	bl	_udelay
	mov	w8, #20
	madd	x21, x24, x8, x25
	ldr	w0, [x21, #4]!
	bl	_REG_READ
Lloh5:
	adrp	x8, _PIPEACONF_ENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PIPEACONF_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x8]
	tst	w9, w0
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x21]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_REG_WRITE
LBB0_10:
	mov	w8, #20
	madd	x21, x24, x8, x25
	ldr	w0, [x21, #16]
	bl	_REG_READ
	and	w8, w0, #0xffff0000
Lloh8:
	adrp	x9, _PIPE_FIFO_UNDERRUN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PIPE_FIFO_UNDERRUN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x21, #16]
	bl	_REG_WRITE
	ldr	w0, [x21, #16]
	bl	_REG_READ
	mov	x0, x19
	bl	_gma_crtc_load_lut
	b	LBB0_20
LBB0_11:
	cmp	w22, #131
	b.ne	LBB0_20
; %bb.12:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_20
; %bb.13:
	str	wzr, [x21, #4]
Lloh11:
	adrp	x8, _VGACNTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VGACNTRL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _VGA_DISP_DISABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VGA_DISP_DISABLE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_REG_WRITE
	mov	x0, x19
	bl	_drm_crtc_vblank_off
	mov	x0, x20
	bl	_gma_wait_for_vblank
	mov	w8, #20
	madd	x21, x24, x8, x25
	ldr	w0, [x21, #12]!
	bl	_REG_READ
Lloh17:
	adrp	x8, _DISPLAY_PLANE_ENABLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DISPLAY_PLANE_ENABLE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_15
; %bb.14:
	ldr	w8, [x21]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_REG_WRITE
	mov	w8, #20
	madd	x22, x24, x8, x25
	ldr	w21, [x22, #8]
	mov	x0, x21
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x21
	bl	_REG_WRITE
	ldr	w0, [x22, #8]
	bl	_REG_READ
LBB0_15:
	mov	w8, #20
	madd	x21, x24, x8, x25
	ldr	w0, [x21, #4]!
	bl	_REG_READ
Lloh20:
	adrp	x8, _PIPEACONF_ENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PIPEACONF_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_17
; %bb.16:
	ldr	w8, [x21]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_REG_WRITE
	ldr	w0, [x21]
	bl	_REG_READ
LBB0_17:
	mov	x0, x20
	bl	_gma_wait_for_vblank
	mov	w0, #150
	bl	_udelay
	ldr	w0, [x26]
	bl	_REG_READ
Lloh23:
	adrp	x8, _DPLL_VCO_ENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DPLL_VCO_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_19
; %bb.18:
	ldr	w8, [x26]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_REG_WRITE
	ldr	w0, [x26]
	bl	_REG_READ
LBB0_19:
	mov	w0, #150
	bl	_udelay
LBB0_20:
	mov	x0, x20
	bl	_IS_CDV
	cbz	x0, LBB0_22
; %bb.21:
	ldr	x8, [x23]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x19
	blr	x8
LBB0_22:
Lloh26:
	adrp	x8, _DSPARB@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DSPARB@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	w1, #16190
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_REG_WRITE
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_DPLL_VCO_ENABLE,4,2            ; @DPLL_VCO_ENABLE
	.comm	_DISPLAY_PLANE_ENABLE,4,2       ; @DISPLAY_PLANE_ENABLE
	.comm	_PIPEACONF_ENABLE,4,2           ; @PIPEACONF_ENABLE
	.comm	_PIPE_FIFO_UNDERRUN,4,2         ; @PIPE_FIFO_UNDERRUN
	.comm	_VGACNTRL,4,2                   ; @VGACNTRL
	.comm	_VGA_DISP_DISABLE,4,2           ; @VGA_DISP_DISABLE
	.comm	_DSPARB,4,2                     ; @DSPARB
.subsections_via_symbols
