	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ast_set_crtc_reg
_ast_set_crtc_reg:                      ## @ast_set_crtc_reg
	.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	%rsi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	movq	_AST2500@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	movl	$0, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	(%rdx), %rax
	movq	_AST2500PreCatchCRT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	andl	(%rax), %ecx
	setne	%sil
	movl	$40, %ebx
	cmovel	%ecx, %ebx
	shll	$7, %esi
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %r15
	movq	%rdi, %r13
	movl	$17, %edx
	movl	$127, %ecx
	xorl	%r8d, %r8d
	callq	_ast_set_index_reg_mask
	movl	(%r12), %r8d
	sarl	$3, %r8d
	addl	$-5, %r8d
	movl	%r8d, %r14d
	shrl	$8, %r14d
	andl	$1, %r14d
	movl	(%r15), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	4(%r12), %r8d
	sarl	$3, %r8d
	decl	%r8d
	movl	%r8d, %ebx
	shrl	$6, %ebx
	andl	$4, %ebx
	orl	%r14d, %ebx
	movl	(%r15), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movq	%r12, %r14
	movl	8(%r12), %r8d
	sarl	$3, %r8d
	decl	%r8d
	movl	%r8d, %r12d
	shrl	$4, %r12d
	andl	$16, %r12d
	orl	%ebx, %r12d
	movl	(%r15), %esi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	$2, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	12(%r14), %r8d
	movq	%r14, %rbx
	shrl	$3, %r8d
	addl	$127, %r8d
	movl	%r8d, %eax
	andl	$32, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r15d
	shrl	$6, %r15d
	andl	$1, %r15d
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$31, %r8d
	movq	%r13, %rdi
	movl	$3, %edx
	movl	$224, %ecx
	callq	_ast_set_index_reg_mask
	movl	16(%r14), %r8d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	subl	%r13d, %r8d
	sarl	$3, %r8d
	decl	%r8d
	movl	%r8d, %r14d
	shrl	$2, %r14d
	andl	$64, %r14d
	orl	%r12d, %r14d
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	20(%rbx), %eax
	subl	%r13d, %eax
	shrl	$3, %eax
	addl	$63, %eax
	movl	%eax, %ebx
	shrl	$3, %ebx
	andl	$4, %ebx
	orl	%r15d, %ebx
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	andl	$31, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rax,%rcx,4), %r8d
	movq	%r12, %rdi
	movl	$5, %edx
	movl	$96, %ecx
	callq	_ast_set_index_reg_mask
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$172, %edx
	xorl	%ecx, %ecx
	movl	%r14d, %r8d
	callq	_ast_set_index_reg_mask
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$173, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	callq	_ast_set_index_reg_mask
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	24(%r14), %r8d
	addl	$-2, %r8d
	movl	%r8d, %eax
	shrl	$8, %eax
	andl	$1, %eax
	movl	%r8d, %ebx
	shrl	$4, %ebx
	andl	$32, %ebx
	orl	%eax, %ebx
	movl	%r8d, %r15d
	shrl	$10, %r15d
	andl	$1, %r15d
	movl	(%r13), %esi
	movq	%r12, %rdi
	movq	%r12, %r13
	movl	$6, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	28(%r14), %r8d
	movq	%r14, %r12
	decl	%r8d
	movl	%r8d, %eax
	shrl	$6, %eax
	andl	$4, %eax
	orl	%ebx, %eax
	movl	%r8d, %r14d
	shrl	$2, %r14d
	andl	$128, %r14d
	orl	%eax, %r14d
	movl	%r8d, %ebx
	shrl	$7, %ebx
	andl	$8, %ebx
	orl	%r15d, %ebx
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	32(%r12), %eax
	leal	(%rax,%rax), %r15d
	addl	$126, %r15d
	movl	%eax, %r8d
	addl	$63, %r8d
	movl	%r15d, %eax
	andl	$32, %eax
	orl	%ebx, %eax
	andl	$64, %r15d
	orl	%eax, %r15d
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$15, %r8d
	movq	%r13, %rdi
	movl	$17, %edx
	movl	$112, %ecx
	callq	_ast_set_index_reg_mask
	movl	36(%r12), %r8d
	movq	%r12, %r13
	decl	%r8d
	movl	%r8d, %eax
	shrl	$7, %eax
	andl	$2, %eax
	orl	%r14d, %eax
	movl	%r8d, %ebx
	shrl	$3, %ebx
	andl	$64, %ebx
	orl	%eax, %ebx
	movl	%r8d, %r12d
	shrl	$9, %r12d
	andl	$2, %r12d
	orl	%r15d, %r12d
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$18, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	40(%r13), %r8d
	decl	%r8d
	movl	%r8d, %r14d
	shrl	$5, %r14d
	andl	$8, %r14d
	orl	%ebx, %r14d
	movl	%r8d, %r13d
	shrl	$4, %r13d
	andl	$32, %r13d
	movl	%r8d, %ebx
	shrl	$8, %ebx
	andl	$4, %ebx
	orl	%r12d, %ebx
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %r12
	movq	%r15, %rdi
	movl	$21, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	44(%rax), %r8d
	decl	%r8d
	movl	%r8d, %r15d
	shrl	$4, %r15d
	andl	$16, %r15d
	orl	%ebx, %r15d
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$22, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg_mask
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$7, %edx
	xorl	%ecx, %ecx
	movl	%r14d, %r8d
	callq	_ast_set_index_reg_mask
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$9, %edx
	movl	$223, %ecx
	movl	%r13d, %r8d
	callq	_ast_set_index_reg_mask
	movl	(%rbx), %esi
	orl	$128, %r15d
	movq	%r12, %rdi
	movl	$174, %edx
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	callq	_ast_set_index_reg_mask
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$182, %edx
	movl	$63, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_ast_set_index_reg_mask
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$17, %edx
	movl	$127, %ecx
	movl	$128, %r8d
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ast_set_index_reg_mask         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AST2500,8,3                    ## @AST2500
	.comm	_AST2500PreCatchCRT,4,2         ## @AST2500PreCatchCRT
	.comm	_AST_IO_CRTC_PORT,4,2           ## @AST_IO_CRTC_PORT
	.no_dead_strip	_ast_set_crtc_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ast_set_crtc_reg
_ast_set_crtc_reg:                      ; @ast_set_crtc_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	ldr	x8, [x0]
	ldr	x19, [x8]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AST2500@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AST2500@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x2]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AST2500PreCatchCRT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AST2500PreCatchCRT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	mov	w9, #40
	csel	w24, wzr, w9, eq
	lsl	w8, w8, #7
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_3
LBB0_2:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	mov	w24, #0
LBB0_3:
Lloh6:
	adrp	x25, _AST_IO_CRTC_PORT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _AST_IO_CRTC_PORT@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #17
	mov	w3, #127
	mov	w4, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21]
	asr	w8, w8, #3
	sub	w22, w8, #5
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	x4, x22
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #4]
	asr	w8, w8, #3
	sub	w4, w8, #1
	lsr	w8, w4, #6
	and	w20, w8, #0x4
	bfxil	w20, w22, #8, #1
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #8]
	asr	w8, w8, #3
	sub	w4, w8, #1
	lsr	w8, w4, #4
	and	w8, w8, #0x10
	orr	w20, w20, w8
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #2
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #12]
	lsr	w8, w8, #3
	add	w26, w8, #127
	lsl	w8, w26, #2
	and	w22, w8, #0x80
	ldr	w1, [x25]
	and	w4, w26, #0x1f
	mov	x0, x19
	mov	w2, #3
	mov	w3, #224
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #16]
	sub	w8, w8, w24
	asr	w8, w8, #3
	sub	w4, w8, #1
	lsr	w8, w4, #2
	and	w8, w8, #0x40
	orr	w23, w20, w8
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #4
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #20]
	sub	w8, w8, w24
	lsr	w8, w8, #3
	add	w8, w8, #63
	lsr	w9, w8, #3
	and	w24, w9, #0x4
	bfxil	w24, w26, #6, #1
	ldr	w1, [x25]
	bfxil	w22, w8, #0, #5
	mov	x0, x19
	mov	w2, #5
	mov	w3, #96
	mov	x4, x22
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #172
	mov	w3, #0
	mov	x4, x23
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #173
	mov	w3, #0
	mov	x4, x24
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #24]
	sub	w22, w8, #2
	lsr	w8, w22, #4
	and	w20, w8, #0x20
	bfxil	w20, w22, #8, #1
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #6
	mov	w3, #0
	mov	x4, x22
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #28]
	sub	w4, w8, #1
	lsr	w8, w4, #6
	and	w8, w8, #0x4
	orr	w8, w20, w8
	lsr	w9, w4, #2
	and	w9, w9, #0x80
	orr	w20, w8, w9
	lsr	w8, w4, #7
	and	w26, w8, #0x8
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #16
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #32]
	add	w8, w8, #63
	lsr	w9, w8, #5
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
	lsr	w28, w8, #4
	ldr	w1, [x25]
	and	w4, w8, #0xf
	mov	x0, x19
	mov	w2, #17
	mov	w3, #112
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #36]
	sub	w4, w8, #1
	lsr	w8, w4, #7
	and	w8, w8, #0x2
	orr	w8, w20, w8
	lsr	w9, w4, #3
	and	w9, w9, #0x40
	orr	w23, w8, w9
	lsr	w8, w4, #9
	and	w20, w8, #0x2
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #18
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #40]
	sub	w4, w8, #1
	lsr	w8, w4, #5
	and	w8, w8, #0x8
	orr	w23, w23, w8
	lsr	w8, w4, #4
	and	w24, w8, #0x20
	lsr	w8, w4, #8
	and	w27, w8, #0x4
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #21
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w8, [x21, #44]
	sub	w4, w8, #1
	lsr	w8, w4, #4
	and	w21, w8, #0x10
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #22
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #7
	mov	w3, #0
	mov	x4, x23
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #9
	mov	w3, #223
	mov	x4, x24
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	bfxil	w26, w22, #10, #1
	bfi	w26, w28, #5, #1
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	bfi	w26, w8, #6, #1
	orr	w8, w26, w20
	orr	w8, w8, w27
	orr	w8, w8, w21
	orr	w4, w8, #0x80
	mov	x0, x19
	mov	w2, #174
	mov	w3, #0
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #182
	mov	w3, #63
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	bl	_ast_set_index_reg_mask
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #17
	mov	w3, #127
	mov	w4, #128
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ast_set_index_reg_mask
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AST2500,8,3                    ; @AST2500
	.comm	_AST2500PreCatchCRT,4,2         ; @AST2500PreCatchCRT
	.comm	_AST_IO_CRTC_PORT,4,2           ; @AST_IO_CRTC_PORT
	.no_dead_strip	_ast_set_crtc_reg
.subsections_via_symbols
