	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_init_decode_v6
_s5p_mfc_init_decode_v6:                ## @s5p_mfc_init_decode_v6
	.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
	movq	%rdi, %r13
	movq	40(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r14
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_mfc_debug_enter
	movl	(%r13), %edx
	movq	_S5P_FIMV_CH_SEQ_HEADER_V6@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	movl	24(%r14), %edi
	callq	_readl
	movl	%eax, %r12d
	movl	24(%r14), %edi
	callq	_readl
	movl	%eax, %ebx
	movl	24(%r14), %edi
	callq	_readl
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_mfc_debug
	cmpq	$0, 32(%r13)
	je	LBB0_2
## %bb.1:
	movq	_S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %r15d
	shll	%cl, %r15d
	movl	4(%r13), %edi
	movl	20(%r14), %esi
	callq	_writel
LBB0_2:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_MFCV7_PLUS
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_MFCV6_V2
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movl	12(%r14), %esi
	movl	%r15d, %edi
	callq	_writel
	xorl	%r15d, %r15d
LBB0_5:
	movq	8(%r13), %rax
	movq	_S5P_MFC_CODEC_MPEG4_DEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movl	16(%r13), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	movl	16(%r13), %eax
	movq	_S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %r15d
LBB0_7:
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_V4L2_PIX_FMT_NV12MT_16X16@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_MFCV7_PLUS
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_MFCV6_V2
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	leaq	16(%r14), %rax
LBB0_11:
	movl	$1, %edi
	movl	%r12d, %ecx
	shll	%cl, %edi
	xorl	%ecx, %ecx
	cmpq	%rbx, -56(%rbp)                 ## 8-byte Folded Reload
	cmovnel	%ecx, %edi
	orl	%r15d, %edi
	movl	(%rax), %esi
	callq	_writel
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movq	_V4L2_PIX_FMT_NV21M@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	movl	8(%r14), %esi
	callq	_writel
	movl	20(%r13), %edi
	andl	$1, %edi
	movl	4(%r14), %esi
	callq	_writel
	movl	(%r13), %edi
	movl	(%r14), %esi
	callq	_writel
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %edi
	movq	_cmd_host2risc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_S5P_FIMV_CH_SEQ_HEADER_V6@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r8d, %r8d
	callq	_s5p_mfc_hw_call
	xorl	%eax, %eax
	callq	_mfc_debug_leave
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	12(%r14), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"InstNo: %d/%d\n"

	.comm	_S5P_FIMV_CH_SEQ_HEADER_V6,4,2  ## @S5P_FIMV_CH_SEQ_HEADER_V6
L_.str.1:                               ## @.str.1
	.asciz	"BUFs: %08x %08x %08x\n"

	.comm	_S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6,4,2 ## @S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6
	.comm	_S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6,4,2 ## @S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6
	.comm	_S5P_MFC_CODEC_MPEG4_DEC,8,3    ## @S5P_MFC_CODEC_MPEG4_DEC
L_.str.2:                               ## @.str.2
	.asciz	"Set loop filter to: %d\n"

	.comm	_S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6,4,2 ## @S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6
	.comm	_V4L2_PIX_FMT_NV12MT_16X16,8,3  ## @V4L2_PIX_FMT_NV12MT_16X16
	.comm	_S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6,4,2 ## @S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6
	.comm	_V4L2_PIX_FMT_NV21M,8,3         ## @V4L2_PIX_FMT_NV21M
	.comm	_cmd_host2risc,4,2              ## @cmd_host2risc
	.no_dead_strip	_s5p_mfc_init_decode_v6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_init_decode_v6
_s5p_mfc_init_decode_v6:                ; @s5p_mfc_init_decode_v6
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	ldr	x19, [x0, #40]
	ldr	x24, [x19, #8]
	bl	_mfc_debug_enter
	ldr	w2, [x20]
Lloh0:
	adrp	x23, _S5P_FIMV_CH_SEQ_HEADER_V6@GOTPAGE
Lloh1:
	ldr	x23, [x23, _S5P_FIMV_CH_SEQ_HEADER_V6@GOTPAGEOFF]
	ldr	w8, [x23]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	ldr	w0, [x24, #24]
	bl	_readl
	mov	x21, x0
	ldr	w0, [x24, #24]
	bl	_readl
	mov	x22, x0
	ldr	w0, [x24, #24]
	bl	_readl
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	mov	x2, x21
	bl	_mfc_debug
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w21, w9, w8
	ldr	w0, [x20, #4]
	ldr	w1, [x24, #20]
	bl	_writel
	b	LBB0_3
LBB0_2:
	mov	w21, #0
LBB0_3:
	mov	x0, x19
	bl	_IS_MFCV7_PLUS
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_IS_MFCV6_V2
	cbz	x0, LBB0_6
LBB0_5:
	ldr	w1, [x24, #12]
	mov	x0, x21
	bl	_writel
	mov	w21, #0
LBB0_6:
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _S5P_MFC_CODEC_MPEG4_DEC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _S5P_MFC_CODEC_MPEG4_DEC@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w2, [x20, #16]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	ldr	w8, [x20, #16]
Lloh14:
	adrp	x9, _S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6@GOTPAGE
Lloh15:
	ldr	x9, [x9, _S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w21, w8, w21
LBB0_8:
	ldr	x8, [x20, #24]
	ldr	x22, [x8]
Lloh17:
	adrp	x8, _V4L2_PIX_FMT_NV12MT_16X16@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_PIX_FMT_NV12MT_16X16@GOTPAGEOFF]
Lloh19:
	ldr	x25, [x8]
Lloh20:
	adrp	x8, _S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6@GOTPAGE
Lloh21:
	ldr	x8, [x8, _S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6@GOTPAGEOFF]
Lloh22:
	ldr	w26, [x8]
	mov	x0, x19
	bl	_IS_MFCV7_PLUS
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_IS_MFCV6_V2
	cbz	x0, LBB0_12
LBB0_10:
	add	x8, x24, #16
LBB0_11:
	mov	w9, #1
	lsl	w9, w9, w26
	cmp	x22, x25
	csel	w9, w9, wzr, eq
	orr	w0, w9, w21
	ldr	w1, [x8]
	bl	_writel
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _V4L2_PIX_FMT_NV21M@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV21M@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	ldr	w1, [x24, #8]
	bl	_writel
	ldr	w8, [x20, #20]
	and	w0, w8, #0x1
	ldr	w1, [x24, #4]
	bl	_writel
	ldr	w0, [x20]
	ldr	w1, [x24]
	bl	_writel
	ldr	w0, [x19]
Lloh26:
	adrp	x8, _cmd_host2risc@GOTPAGE
Lloh27:
	ldr	x8, [x8, _cmd_host2risc@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w3, [x23]
	mov	x2, x19
	mov	x4, #0
	bl	_s5p_mfc_hw_call
	bl	_mfc_debug_leave
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	add	x8, x24, #12
	b	LBB0_11
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"InstNo: %d/%d\n"

	.comm	_S5P_FIMV_CH_SEQ_HEADER_V6,4,2  ; @S5P_FIMV_CH_SEQ_HEADER_V6
l_.str.1:                               ; @.str.1
	.asciz	"BUFs: %08x %08x %08x\n"

	.comm	_S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6,4,2 ; @S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6
	.comm	_S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6,4,2 ; @S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6
	.comm	_S5P_MFC_CODEC_MPEG4_DEC,8,3    ; @S5P_MFC_CODEC_MPEG4_DEC
l_.str.2:                               ; @.str.2
	.asciz	"Set loop filter to: %d\n"

	.comm	_S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6,4,2 ; @S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6
	.comm	_V4L2_PIX_FMT_NV12MT_16X16,8,3  ; @V4L2_PIX_FMT_NV12MT_16X16
	.comm	_S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6,4,2 ; @S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6
	.comm	_V4L2_PIX_FMT_NV21M,8,3         ; @V4L2_PIX_FMT_NV21M
	.comm	_cmd_host2risc,4,2              ; @cmd_host2risc
	.no_dead_strip	_s5p_mfc_init_decode_v6
.subsections_via_symbols
