	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_crtc_dpms
_mga_crtc_dpms:                         ## @mga_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	(%rdi), %rax
	movq	(%rax), %r14
	xorl	%ebx, %ebx
	addl	$-128, %esi
	cmpl	$3, %esi
	ja	LBB0_1
## %bb.2:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	movl	$32, %ebx
	movl	$32, %r15d
	jmp	LBB0_8
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_4:
	movl	$16, %r15d
	jmp	LBB0_7
LBB0_3:
	callq	_mga_crtc_load_lut
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_6:
	movl	$48, %r15d
LBB0_7:
	movl	$32, %ebx
LBB0_8:
	movq	_MGAREG_SEQ_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_WREG8
	movq	_MGAREG_SEQ_DATA@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_RREG8
	andl	$-33, %eax
	orl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mga_wait_vsync
	movq	%r14, %rdi
	callq	_mga_wait_busy
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_WREG8
	movl	$20, %edi
	callq	_msleep
	movq	_MGAREG_CRTCEXT_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_WREG8
	movq	_MGAREG_CRTCEXT_DATA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG8
	andl	$-49, %eax
	orl	%eax, %r15d
	movl	(%rbx), %edi
	movl	%r15d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG8                          ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_MGAREG_SEQ_INDEX,4,2           ## @MGAREG_SEQ_INDEX
	.comm	_MGAREG_SEQ_DATA,4,2            ## @MGAREG_SEQ_DATA
	.comm	_MGAREG_CRTCEXT_INDEX,4,2       ## @MGAREG_CRTCEXT_INDEX
	.comm	_MGAREG_CRTCEXT_DATA,4,2        ## @MGAREG_CRTCEXT_DATA
	.no_dead_strip	_mga_crtc_dpms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_crtc_dpms
_mga_crtc_dpms:                         ; @mga_crtc_dpms
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x8, [x0]
	ldr	x19, [x8]
	sub	w8, w1, #128
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w20, #32
	mov	w21, #32
	b	LBB0_8
LBB0_3:
	mov	w21, #16
	b	LBB0_7
LBB0_4:
	bl	_mga_crtc_load_lut
LBB0_5:
	mov	w20, #0
	mov	w21, #0
	b	LBB0_8
LBB0_6:
	mov	w21, #48
LBB0_7:
	mov	w20, #32
LBB0_8:
Lloh2:
	adrp	x8, _MGAREG_SEQ_INDEX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MGAREG_SEQ_INDEX@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_WREG8
Lloh5:
	adrp	x22, _MGAREG_SEQ_DATA@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MGAREG_SEQ_DATA@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG8
	and	w8, w0, #0xffffffdf
	orr	w20, w8, w20
	mov	x0, x19
	bl	_mga_wait_vsync
	mov	x0, x19
	bl	_mga_wait_busy
	ldr	w0, [x22]
	mov	x1, x20
	bl	_WREG8
	mov	w0, #20
	bl	_msleep
Lloh7:
	adrp	x8, _MGAREG_CRTCEXT_INDEX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MGAREG_CRTCEXT_INDEX@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_WREG8
Lloh10:
	adrp	x19, _MGAREG_CRTCEXT_DATA@GOTPAGE
Lloh11:
	ldr	x19, [x19, _MGAREG_CRTCEXT_DATA@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG8
	and	w8, w0, #0xffffffcf
	orr	w1, w8, w21
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_WREG8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_MGAREG_SEQ_INDEX,4,2           ; @MGAREG_SEQ_INDEX
	.comm	_MGAREG_SEQ_DATA,4,2            ; @MGAREG_SEQ_DATA
	.comm	_MGAREG_CRTCEXT_INDEX,4,2       ; @MGAREG_CRTCEXT_INDEX
	.comm	_MGAREG_CRTCEXT_DATA,4,2        ; @MGAREG_CRTCEXT_DATA
	.no_dead_strip	_mga_crtc_dpms
.subsections_via_symbols
