	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_init_encode_v6
_s5p_mfc_init_encode_v6:                ## @s5p_mfc_init_encode_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	movq	16(%rdi), %r14
	movq	8(%r14), %r15
	movq	_S5P_MFC_CODEC_H264_ENC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_enc_params_h264
	jmp	LBB0_10
LBB0_2:
	movq	_S5P_MFC_CODEC_MPEG4_ENC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_enc_params_mpeg4
	jmp	LBB0_10
LBB0_4:
	movq	_S5P_MFC_CODEC_H263_ENC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_enc_params_h263
	jmp	LBB0_10
LBB0_6:
	movq	_S5P_MFC_CODEC_VP8_ENC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_enc_params_vp8
	jmp	LBB0_10
LBB0_8:
	movq	_S5P_FIMV_CODEC_HEVC_ENC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_14
## %bb.9:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_enc_params_hevc
LBB0_10:
	movq	%r14, %rdi
	callq	_IS_MFCV7_PLUS
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	12(%rbx), %edi
	movl	8(%r15), %esi
	callq	_writel
	movl	12(%rbx), %edi
	movl	4(%r15), %esi
	callq	_writel
LBB0_12:
	movl	8(%rbx), %edi
	movl	(%r15), %esi
	callq	_writel
	movl	(%r14), %edi
	movq	_cmd_host2risc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_S5P_FIMV_CH_SEQ_HEADER_V6@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	callq	_s5p_mfc_hw_call
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_S5P_MFC_CODEC_H264_ENC,8,3     ## @S5P_MFC_CODEC_H264_ENC
	.comm	_S5P_MFC_CODEC_MPEG4_ENC,8,3    ## @S5P_MFC_CODEC_MPEG4_ENC
	.comm	_S5P_MFC_CODEC_H263_ENC,8,3     ## @S5P_MFC_CODEC_H263_ENC
	.comm	_S5P_MFC_CODEC_VP8_ENC,8,3      ## @S5P_MFC_CODEC_VP8_ENC
	.comm	_S5P_FIMV_CODEC_HEVC_ENC,8,3    ## @S5P_FIMV_CODEC_HEVC_ENC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown codec for encoding (%x).\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cmd_host2risc,4,2              ## @cmd_host2risc
	.comm	_S5P_FIMV_CH_SEQ_HEADER_V6,4,2  ## @S5P_FIMV_CH_SEQ_HEADER_V6
	.no_dead_strip	_s5p_mfc_init_encode_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_encode_v6
_s5p_mfc_init_encode_v6:                ; @s5p_mfc_init_encode_v6
	.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
	mov	x20, x0
	ldr	x19, [x0, #16]
	ldr	x21, [x19, #8]
	ldr	x1, [x0]
Lloh0:
	adrp	x8, _S5P_MFC_CODEC_H264_ENC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S5P_MFC_CODEC_H264_ENC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_s5p_mfc_set_enc_params_h264
	b	LBB0_10
LBB0_2:
Lloh3:
	adrp	x8, _S5P_MFC_CODEC_MPEG4_ENC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _S5P_MFC_CODEC_MPEG4_ENC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_s5p_mfc_set_enc_params_mpeg4
	b	LBB0_10
LBB0_4:
Lloh6:
	adrp	x8, _S5P_MFC_CODEC_H263_ENC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S5P_MFC_CODEC_H263_ENC@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_s5p_mfc_set_enc_params_h263
	b	LBB0_10
LBB0_6:
Lloh9:
	adrp	x8, _S5P_MFC_CODEC_VP8_ENC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S5P_MFC_CODEC_VP8_ENC@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_s5p_mfc_set_enc_params_vp8
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x8, _S5P_FIMV_CODEC_HEVC_ENC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S5P_FIMV_CODEC_HEVC_ENC@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_14
; %bb.9:
	mov	x0, x20
	bl	_s5p_mfc_set_enc_params_hevc
LBB0_10:
	mov	x0, x19
	bl	_IS_MFCV7_PLUS
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [x20, #12]
	ldr	w1, [x21, #8]
	bl	_writel
	ldr	w0, [x20, #12]
	ldr	w1, [x21, #4]
	bl	_writel
LBB0_12:
	ldr	w0, [x20, #8]
	ldr	w1, [x21]
	bl	_writel
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _cmd_host2risc@GOTPAGE
Lloh16:
	ldr	x8, [x8, _cmd_host2risc@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _S5P_FIMV_CH_SEQ_HEADER_V6@GOTPAGE
Lloh19:
	ldr	x8, [x8, _S5P_FIMV_CH_SEQ_HEADER_V6@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x2, x19
	mov	x4, #0
	bl	_s5p_mfc_hw_call
	mov	w0, #0
LBB0_13:
	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
	ret
LBB0_14:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_S5P_MFC_CODEC_H264_ENC,8,3     ; @S5P_MFC_CODEC_H264_ENC
	.comm	_S5P_MFC_CODEC_MPEG4_ENC,8,3    ; @S5P_MFC_CODEC_MPEG4_ENC
	.comm	_S5P_MFC_CODEC_H263_ENC,8,3     ; @S5P_MFC_CODEC_H263_ENC
	.comm	_S5P_MFC_CODEC_VP8_ENC,8,3      ; @S5P_MFC_CODEC_VP8_ENC
	.comm	_S5P_FIMV_CODEC_HEVC_ENC,8,3    ; @S5P_FIMV_CODEC_HEVC_ENC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown codec for encoding (%x).\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cmd_host2risc,4,2              ; @cmd_host2risc
	.comm	_S5P_FIMV_CH_SEQ_HEADER_V6,4,2  ; @S5P_FIMV_CH_SEQ_HEADER_V6
	.no_dead_strip	_s5p_mfc_init_encode_v6
.subsections_via_symbols
