	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_init_encode_v5
_s5p_mfc_init_encode_v5:                ## @s5p_mfc_init_encode_v5
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	movq	16(%rdi), %r14
	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_6
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_6
LBB0_4:
	movq	_S5P_MFC_CODEC_H263_ENC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_enc_params_h263
LBB0_6:
	movq	%rbx, %rdi
	callq	_s5p_mfc_set_shared_buffer
	movq	_S5P_FIMV_CH_SEQ_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$7, %esi
	shll	$16, %esi
	orl	8(%rbx), %esi
	movq	_S5P_FIMV_SI_CH0_INST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mfc_write
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown codec for encoding (%x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_S5P_FIMV_CH_SEQ_HEADER,4,2     ## @S5P_FIMV_CH_SEQ_HEADER
	.comm	_S5P_FIMV_SI_CH0_INST_ID,4,2    ## @S5P_FIMV_SI_CH0_INST_ID
	.no_dead_strip	_s5p_mfc_init_encode_v5
.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_v5
_s5p_mfc_init_encode_v5:                ; @s5p_mfc_init_encode_v5
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #16]
	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_6
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_6
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_8
; %bb.5:
	mov	x0, x20
	bl	_s5p_mfc_set_enc_params_h263
LBB0_6:
	mov	x0, x20
	bl	_s5p_mfc_set_shared_buffer
Lloh9:
	adrp	x8, _S5P_FIMV_CH_SEQ_HEADER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S5P_FIMV_CH_SEQ_HEADER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ubfiz	w8, w8, #16, #3
	ldr	w9, [x20, #8]
	orr	w1, w8, w9
Lloh12:
	adrp	x8, _S5P_FIMV_SI_CH0_INST_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S5P_FIMV_SI_CH0_INST_ID@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mfc_write
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown codec for encoding (%x)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_S5P_FIMV_CH_SEQ_HEADER,4,2     ; @S5P_FIMV_CH_SEQ_HEADER
	.comm	_S5P_FIMV_SI_CH0_INST_ID,4,2    ; @S5P_FIMV_SI_CH0_INST_ID
	.no_dead_strip	_s5p_mfc_init_encode_v5
.subsections_via_symbols
