	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_video_init_regs
_aspeed_video_init_regs:                ## @aspeed_video_init_regs
	.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, %rbx
	movq	_VE_COMP_CTRL_RSVD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_VE_COMP_CTRL_DCT_LUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_VE_COMP_CTRL_DCT_CHR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	orl	$16, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	movq	_VE_CTRL_AUTO_OR_CURSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_VE_SEQ_CTRL_JPEG_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_VE_CTRL_FRC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FIELD_PREP
	orl	%eax, %r12d
LBB0_2:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	cmpq	$0, 16(%rbx)
	movl	$0, %r12d
	je	LBB0_4
## %bb.3:
	movq	_VE_SEQ_CTRL_YUV420@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_4:
	orl	%r15d, %r12d
	orl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	orl	%r13d, %r14d
	movq	_VE_PROTECTION_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VE_PROTECTION_KEY_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_aspeed_video_write
	movq	_VE_INTERRUPT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_aspeed_video_write
	movq	_VE_INTERRUPT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_aspeed_video_write
	movq	_VE_COMP_PROC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_aspeed_video_write
	movq	_VE_COMP_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_aspeed_video_write
	movq	_VE_JPEG_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	callq	_aspeed_video_write
	movq	_VE_SEQ_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_aspeed_video_write
	movq	_VE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_aspeed_video_write
	movq	_VE_COMP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_aspeed_video_write
	movq	_VE_SCALING_FACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$268439552, %edx                ## imm = 0x10001000
	callq	_aspeed_video_write
	movq	_VE_SCALING_FILTER0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2097152, %edx                  ## imm = 0x200000
	callq	_aspeed_video_write
	movq	_VE_SCALING_FILTER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2097152, %edx                  ## imm = 0x200000
	callq	_aspeed_video_write
	movq	_VE_SCALING_FILTER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2097152, %edx                  ## imm = 0x200000
	callq	_aspeed_video_write
	movq	_VE_SCALING_FILTER3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2097152, %edx                  ## imm = 0x200000
	callq	_aspeed_video_write
	movq	_VE_MODE_DETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$577135872, %edx                ## imm = 0x22666500
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_aspeed_video_write             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VE_COMP_CTRL_RSVD,4,2          ## @VE_COMP_CTRL_RSVD
	.comm	_VE_COMP_CTRL_DCT_LUM,4,2       ## @VE_COMP_CTRL_DCT_LUM
	.comm	_VE_COMP_CTRL_DCT_CHR,4,2       ## @VE_COMP_CTRL_DCT_CHR
	.comm	_VE_CTRL_AUTO_OR_CURSOR,4,2     ## @VE_CTRL_AUTO_OR_CURSOR
	.comm	_VE_SEQ_CTRL_JPEG_MODE,4,2      ## @VE_SEQ_CTRL_JPEG_MODE
	.comm	_VE_CTRL_FRC,4,2                ## @VE_CTRL_FRC
	.comm	_VE_SEQ_CTRL_YUV420,4,2         ## @VE_SEQ_CTRL_YUV420
	.comm	_VE_PROTECTION_KEY,4,2          ## @VE_PROTECTION_KEY
	.comm	_VE_PROTECTION_KEY_UNLOCK,4,2   ## @VE_PROTECTION_KEY_UNLOCK
	.comm	_VE_INTERRUPT_CTRL,4,2          ## @VE_INTERRUPT_CTRL
	.comm	_VE_INTERRUPT_STATUS,4,2        ## @VE_INTERRUPT_STATUS
	.comm	_VE_COMP_PROC_OFFSET,4,2        ## @VE_COMP_PROC_OFFSET
	.comm	_VE_COMP_OFFSET,4,2             ## @VE_COMP_OFFSET
	.comm	_VE_JPEG_ADDR,4,2               ## @VE_JPEG_ADDR
	.comm	_VE_SEQ_CTRL,4,2                ## @VE_SEQ_CTRL
	.comm	_VE_CTRL,4,2                    ## @VE_CTRL
	.comm	_VE_COMP_CTRL,4,2               ## @VE_COMP_CTRL
	.comm	_VE_SCALING_FACTOR,4,2          ## @VE_SCALING_FACTOR
	.comm	_VE_SCALING_FILTER0,4,2         ## @VE_SCALING_FILTER0
	.comm	_VE_SCALING_FILTER1,4,2         ## @VE_SCALING_FILTER1
	.comm	_VE_SCALING_FILTER2,4,2         ## @VE_SCALING_FILTER2
	.comm	_VE_SCALING_FILTER3,4,2         ## @VE_SCALING_FILTER3
	.comm	_VE_MODE_DETECT,4,2             ## @VE_MODE_DETECT
	.no_dead_strip	_aspeed_video_init_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_video_init_regs
_aspeed_video_init_regs:                ; @aspeed_video_init_regs
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _VE_COMP_CTRL_RSVD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VE_COMP_CTRL_RSVD@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x8, _VE_COMP_CTRL_DCT_LUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VE_COMP_CTRL_DCT_LUM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_FIELD_PREP
	mov	x21, x0
Lloh6:
	adrp	x8, _VE_COMP_CTRL_DCT_CHR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VE_COMP_CTRL_DCT_CHR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w8, [x19]
	orr	w1, w8, #0x10
	bl	_FIELD_PREP
	mov	x23, x0
Lloh9:
	adrp	x8, _VE_CTRL_AUTO_OR_CURSOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VE_CTRL_AUTO_OR_CURSOR@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
Lloh12:
	adrp	x8, _VE_SEQ_CTRL_JPEG_MODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VE_SEQ_CTRL_JPEG_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	ldr	w1, [x19, #4]
	cbz	w1, LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _VE_CTRL_FRC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VE_CTRL_FRC@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_FIELD_PREP
	orr	w20, w0, w20
LBB0_2:
	ldr	x8, [x19, #16]
Lloh18:
	adrp	x9, _VE_SEQ_CTRL_YUV420@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VE_SEQ_CTRL_YUV420@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	orr	w22, w8, w22
	orr	w8, w21, w24
	orr	w21, w8, w23
Lloh21:
	adrp	x8, _VE_PROTECTION_KEY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VE_PROTECTION_KEY@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _VE_PROTECTION_KEY_UNLOCK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VE_PROTECTION_KEY_UNLOCK@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_aspeed_video_write
Lloh27:
	adrp	x8, _VE_INTERRUPT_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VE_INTERRUPT_CTRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_aspeed_video_write
Lloh30:
	adrp	x8, _VE_INTERRUPT_STATUS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VE_INTERRUPT_STATUS@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_aspeed_video_write
Lloh33:
	adrp	x8, _VE_COMP_PROC_OFFSET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _VE_COMP_PROC_OFFSET@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_aspeed_video_write
Lloh36:
	adrp	x8, _VE_COMP_OFFSET@GOTPAGE
Lloh37:
	ldr	x8, [x8, _VE_COMP_OFFSET@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_aspeed_video_write
Lloh39:
	adrp	x8, _VE_JPEG_ADDR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _VE_JPEG_ADDR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x19
	bl	_aspeed_video_write
Lloh42:
	adrp	x8, _VE_SEQ_CTRL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _VE_SEQ_CTRL@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_aspeed_video_write
Lloh45:
	adrp	x8, _VE_CTRL@GOTPAGE
Lloh46:
	ldr	x8, [x8, _VE_CTRL@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_aspeed_video_write
Lloh48:
	adrp	x8, _VE_COMP_CTRL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _VE_COMP_CTRL@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_aspeed_video_write
Lloh51:
	adrp	x8, _VE_SCALING_FACTOR@GOTPAGE
Lloh52:
	ldr	x8, [x8, _VE_SCALING_FACTOR@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #268439552
	bl	_aspeed_video_write
Lloh54:
	adrp	x8, _VE_SCALING_FILTER0@GOTPAGE
Lloh55:
	ldr	x8, [x8, _VE_SCALING_FILTER0@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2097152
	bl	_aspeed_video_write
Lloh57:
	adrp	x8, _VE_SCALING_FILTER1@GOTPAGE
Lloh58:
	ldr	x8, [x8, _VE_SCALING_FILTER1@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2097152
	bl	_aspeed_video_write
Lloh60:
	adrp	x8, _VE_SCALING_FILTER2@GOTPAGE
Lloh61:
	ldr	x8, [x8, _VE_SCALING_FILTER2@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2097152
	bl	_aspeed_video_write
Lloh63:
	adrp	x8, _VE_SCALING_FILTER3@GOTPAGE
Lloh64:
	ldr	x8, [x8, _VE_SCALING_FILTER3@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2097152
	bl	_aspeed_video_write
Lloh66:
	adrp	x8, _VE_MODE_DETECT@GOTPAGE
Lloh67:
	ldr	x8, [x8, _VE_MODE_DETECT@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #25856
	movk	w2, #8806, lsl #16
	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	_aspeed_video_write
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_VE_COMP_CTRL_RSVD,4,2          ; @VE_COMP_CTRL_RSVD
	.comm	_VE_COMP_CTRL_DCT_LUM,4,2       ; @VE_COMP_CTRL_DCT_LUM
	.comm	_VE_COMP_CTRL_DCT_CHR,4,2       ; @VE_COMP_CTRL_DCT_CHR
	.comm	_VE_CTRL_AUTO_OR_CURSOR,4,2     ; @VE_CTRL_AUTO_OR_CURSOR
	.comm	_VE_SEQ_CTRL_JPEG_MODE,4,2      ; @VE_SEQ_CTRL_JPEG_MODE
	.comm	_VE_CTRL_FRC,4,2                ; @VE_CTRL_FRC
	.comm	_VE_SEQ_CTRL_YUV420,4,2         ; @VE_SEQ_CTRL_YUV420
	.comm	_VE_PROTECTION_KEY,4,2          ; @VE_PROTECTION_KEY
	.comm	_VE_PROTECTION_KEY_UNLOCK,4,2   ; @VE_PROTECTION_KEY_UNLOCK
	.comm	_VE_INTERRUPT_CTRL,4,2          ; @VE_INTERRUPT_CTRL
	.comm	_VE_INTERRUPT_STATUS,4,2        ; @VE_INTERRUPT_STATUS
	.comm	_VE_COMP_PROC_OFFSET,4,2        ; @VE_COMP_PROC_OFFSET
	.comm	_VE_COMP_OFFSET,4,2             ; @VE_COMP_OFFSET
	.comm	_VE_JPEG_ADDR,4,2               ; @VE_JPEG_ADDR
	.comm	_VE_SEQ_CTRL,4,2                ; @VE_SEQ_CTRL
	.comm	_VE_CTRL,4,2                    ; @VE_CTRL
	.comm	_VE_COMP_CTRL,4,2               ; @VE_COMP_CTRL
	.comm	_VE_SCALING_FACTOR,4,2          ; @VE_SCALING_FACTOR
	.comm	_VE_SCALING_FILTER0,4,2         ; @VE_SCALING_FILTER0
	.comm	_VE_SCALING_FILTER1,4,2         ; @VE_SCALING_FILTER1
	.comm	_VE_SCALING_FILTER2,4,2         ; @VE_SCALING_FILTER2
	.comm	_VE_SCALING_FILTER3,4,2         ; @VE_SCALING_FILTER3
	.comm	_VE_MODE_DETECT,4,2             ; @VE_MODE_DETECT
	.no_dead_strip	_aspeed_video_init_regs
.subsections_via_symbols
