	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_set_enc_params
_s5p_mfc_set_enc_params:                ## @s5p_mfc_set_enc_params
	.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, %r15
	movq	112(%rdi), %rax
	movq	(%rax), %rbx
	xorl	%eax, %eax
	callq	_mfc_debug_enter
	movl	(%r15), %edi
	movl	96(%rbx), %esi
	callq	_writel
	movl	4(%r15), %edi
	movl	92(%rbx), %esi
	callq	_writel
	movl	(%r15), %edi
	movl	88(%rbx), %esi
	callq	_writel
	movl	4(%r15), %edi
	movl	84(%rbx), %esi
	callq	_writel
	movl	80(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movzwl	32(%r15), %edi
	movl	76(%rbx), %esi
	callq	_writel
	movq	40(%r15), %rax
	movq	%rax, 8(%r15)
	movq	_V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	52(%rbx), %esi
	movl	$8, %edi
	callq	_writel
	movl	108(%r15), %eax
	movl	%eax, 28(%r15)
	jmp	LBB0_5
LBB0_2:
	movq	_V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES@GOTPCREL(%rip), %rcx
	movl	52(%rbx), %esi
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	$8, %edi
	callq	_writel
	movl	104(%r15), %eax
	movl	%eax, 24(%r15)
	jmp	LBB0_5
LBB0_4:
	xorl	%edi, %edi
	callq	_writel
LBB0_5:
	movq	%r15, %rdi
	callq	_s5p_mfc_set_slice_mode
	movl	48(%r15), %edi
	movl	72(%rbx), %esi
	callq	_writel
	movl	52(%rbx), %edi
	callq	_readl
	xorl	%edi, %edi
	cmpl	$0, 48(%r15)
	setne	%dil
	andl	$-17, %eax
	shll	$4, %edi
	orl	%eax, %edi
	movl	52(%rbx), %esi
	callq	_writel
	movl	52(%rbx), %edi
	callq	_readl
	andl	$-513, %eax                     ## imm = 0xFDFF
	movl	52(%rbx), %esi
	movl	%eax, %edi
	callq	_writel
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	_V4L2_PIX_FMT_NV12M@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movl	52(%rbx), %edi
	callq	_readl
	andl	$-129, %eax
	jmp	LBB0_11
LBB0_7:
	movq	_V4L2_PIX_FMT_NV21M@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movl	52(%rbx), %edi
	callq	_readl
	andl	$-129, %eax
	movl	$1, %r14d
	jmp	LBB0_12
LBB0_9:
	movq	_V4L2_PIX_FMT_NV12MT_16X16@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.10:
	movl	52(%rbx), %edi
	callq	_readl
	orl	$128, %eax
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movl	52(%rbx), %esi
	movl	%eax, %edi
	callq	_writel
	movl	68(%rbx), %esi
	movl	%r14d, %edi
	callq	_writel
LBB0_13:
	movl	52(%rbx), %edi
	callq	_readl
	orl	$256, %eax                      ## imm = 0x100
	movl	52(%rbx), %esi
	movl	%eax, %edi
	callq	_writel
	movl	64(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	cmpq	$0, 96(%r15)
	je	LBB0_15
## %bb.14:
	movl	52(%r15), %eax
	movl	56(%r15), %ecx
	movzbl	%al, %eax
	shll	$16, %eax
	shll	$8, %ecx
	movzwl	%cx, %ecx
	orl	%eax, %ecx
	movzbl	60(%r15), %eax
	leal	(%rax,%rcx), %edi
	addl	$-2147483648, %edi              ## imm = 0x80000000
	movl	64(%rbx), %esi
	callq	_writel
LBB0_15:
	movl	64(%r15), %edi
	andl	$1, %edi
	shll	$9, %edi
	movl	48(%rbx), %esi
	callq	_writel
	cmpl	$0, 64(%r15)
	je	LBB0_16
## %bb.17:
	movl	68(%r15), %edi
	jmp	LBB0_18
LBB0_16:
	movl	$1, %edi
LBB0_18:
	movl	60(%rbx), %esi
	callq	_writel
	cmpl	$0, 64(%r15)
	je	LBB0_20
## %bb.19:
	movq	72(%r15), %rax
	movq	_TIGHT_CBR_MAX@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setl	%dl
	movl	56(%rbx), %esi
	movl	$2, %edi
	subl	%edx, %edi
	callq	_writel
LBB0_20:
	movl	52(%rbx), %edi
	callq	_readl
                                        ## kill: def $eax killed $eax def $rax
	andl	$-8, %eax
	movl	80(%r15), %ecx
	movl	84(%r15), %edi
	andl	$1, %ecx
	leal	(%rax,%rcx,4), %eax
	andl	$3, %edi
	orl	%eax, %edi
	movl	52(%rbx), %esi
	callq	_writel
	movl	48(%rbx), %edi
	callq	_readl
	andl	$-1025, %eax                    ## imm = 0xFBFF
	movl	48(%rbx), %esi
	movl	%eax, %edi
	callq	_writel
	movq	_S5P_FIMV_E_MV_RANGE_V6_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	andl	88(%r15), %edi
	movl	44(%rbx), %esi
	callq	_writel
	movl	(%r14), %edi
	andl	92(%r15), %edi
	movl	40(%rbx), %esi
	callq	_writel
	movl	36(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	32(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	28(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	24(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	20(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	16(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	12(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	8(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	4(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_writel
	xorl	%eax, %eax
	callq	_mfc_debug_leave
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB,8,3 ## @V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB
	.comm	_V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES,8,3 ## @V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES
	.comm	_V4L2_PIX_FMT_NV12M,8,3         ## @V4L2_PIX_FMT_NV12M
	.comm	_V4L2_PIX_FMT_NV21M,8,3         ## @V4L2_PIX_FMT_NV21M
	.comm	_V4L2_PIX_FMT_NV12MT_16X16,8,3  ## @V4L2_PIX_FMT_NV12MT_16X16
	.comm	_TIGHT_CBR_MAX,8,3              ## @TIGHT_CBR_MAX
	.comm	_S5P_FIMV_E_MV_RANGE_V6_MASK,4,2 ## @S5P_FIMV_E_MV_RANGE_V6_MASK
	.no_dead_strip	_s5p_mfc_set_enc_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_set_enc_params
_s5p_mfc_set_enc_params:                ; @s5p_mfc_set_enc_params
	.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	x19, x0
	ldr	x8, [x0, #112]
	ldr	x21, [x8]
	bl	_mfc_debug_enter
	ldr	w0, [x19]
	ldr	w1, [x21, #96]
	bl	_writel
	ldr	w0, [x19, #4]
	ldr	w1, [x21, #92]
	bl	_writel
	ldr	w0, [x19]
	ldr	w1, [x21, #88]
	bl	_writel
	ldr	w0, [x19, #4]
	ldr	w1, [x21, #84]
	bl	_writel
	ldr	w1, [x21, #80]
	mov	w0, #0
	bl	_writel
	ldrh	w0, [x19, #32]
	ldr	w1, [x21, #76]
	bl	_writel
	ldr	x8, [x19, #40]
	str	x8, [x19, #8]
Lloh0:
	adrp	x9, _V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x21, #52]
	mov	w0, #8
	bl	_writel
	ldr	w8, [x19, #108]
	str	w8, [x19, #28]
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x9, _V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w1, [x21, #52]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #8
	bl	_writel
	ldr	w8, [x19, #104]
	str	w8, [x19, #24]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
	bl	_writel
LBB0_5:
	mov	x0, x19
	bl	_s5p_mfc_set_slice_mode
	ldr	w0, [x19, #48]
	ldr	w1, [x21, #72]
	bl	_writel
	ldr	w0, [x21, #52]
	bl	_readl
	ldr	w8, [x19, #48]
	cmp	w8, #0
	cset	w8, ne
	bfi	w0, w8, #4, #1
	ldr	w1, [x21, #52]
	bl	_writel
	ldr	w0, [x21, #52]
	bl	_readl
	and	w0, w0, #0xfffffdff
	ldr	w1, [x21, #52]
	bl	_writel
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _V4L2_PIX_FMT_NV12M@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV12M@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x21, #52]
	bl	_readl
	mov	w20, #0
	and	w0, w0, #0xffffff7f
	b	LBB0_11
LBB0_7:
Lloh9:
	adrp	x9, _V4L2_PIX_FMT_NV21M@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV21M@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [x21, #52]
	bl	_readl
	and	w0, w0, #0xffffff7f
	mov	w20, #1
	b	LBB0_11
LBB0_9:
Lloh12:
	adrp	x9, _V4L2_PIX_FMT_NV12MT_16X16@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV12MT_16X16@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	w0, [x21, #52]
	bl	_readl
	mov	w20, #0
	orr	w0, w0, #0x80
LBB0_11:
	ldr	w1, [x21, #52]
	bl	_writel
	ldr	w1, [x21, #68]
	mov	x0, x20
	bl	_writel
LBB0_12:
	ldr	w0, [x21, #52]
	bl	_readl
	orr	w0, w0, #0x100
	ldr	w1, [x21, #52]
	bl	_writel
	ldr	w1, [x21, #64]
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_14
; %bb.13:
	ldp	w8, w9, [x19, #52]
	ubfiz	w9, w9, #8, #8
	ldrb	w10, [x19, #60]
	bfi	w9, w8, #16, #8
	orr	w8, w9, w10
	orr	w0, w8, #0x80000000
	ldr	w1, [x21, #64]
	bl	_writel
LBB0_14:
	ldr	w8, [x19, #64]
	ubfiz	w0, w8, #9, #1
	ldr	w1, [x21, #48]
	bl	_writel
	ldr	w8, [x19, #64]
	cbz	w8, LBB0_16
; %bb.15:
	ldr	w0, [x19, #68]
	b	LBB0_17
LBB0_16:
	mov	w0, #1
LBB0_17:
	ldr	w1, [x21, #60]
	bl	_writel
	ldr	w8, [x19, #64]
	cbz	w8, LBB0_19
; %bb.18:
Lloh15:
	adrp	x8, _TIGHT_CBR_MAX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TIGHT_CBR_MAX@GOTPAGEOFF]
	ldr	x9, [x19, #72]
Lloh17:
	ldr	x8, [x8]
	ldr	w1, [x21, #56]
	cmp	x9, x8
	mov	w8, #1
	cinc	w0, w8, ge
	bl	_writel
LBB0_19:
	ldr	w0, [x21, #52]
	bl	_readl
	and	w0, w0, #0xfffffff8
	ldp	w8, w9, [x19, #80]
	bfi	w0, w8, #2, #1
	bfxil	w0, w9, #0, #2
	ldr	w1, [x21, #52]
	bl	_writel
	ldr	w0, [x21, #48]
	bl	_readl
	and	w0, w0, #0xfffffbff
	ldr	w1, [x21, #48]
	bl	_writel
	ldr	w8, [x19, #88]
Lloh18:
	adrp	x20, _S5P_FIMV_E_MV_RANGE_V6_MASK@GOTPAGE
Lloh19:
	ldr	x20, [x20, _S5P_FIMV_E_MV_RANGE_V6_MASK@GOTPAGEOFF]
	ldr	w9, [x20]
	and	w0, w9, w8
	ldr	w1, [x21, #44]
	bl	_writel
	ldr	w8, [x19, #92]
	ldr	w9, [x20]
	and	w0, w9, w8
	ldr	w1, [x21, #40]
	bl	_writel
	ldr	w1, [x21, #36]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #32]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #28]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #24]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #20]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #16]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #12]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #8]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21, #4]
	mov	w0, #0
	bl	_writel
	ldr	w1, [x21]
	mov	w0, #0
	bl	_writel
	bl	_mfc_debug_leave
	mov	w0, #0
	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
	.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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB,8,3 ; @V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB
	.comm	_V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES,8,3 ; @V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES
	.comm	_V4L2_PIX_FMT_NV12M,8,3         ; @V4L2_PIX_FMT_NV12M
	.comm	_V4L2_PIX_FMT_NV21M,8,3         ; @V4L2_PIX_FMT_NV21M
	.comm	_V4L2_PIX_FMT_NV12MT_16X16,8,3  ; @V4L2_PIX_FMT_NV12MT_16X16
	.comm	_TIGHT_CBR_MAX,8,3              ; @TIGHT_CBR_MAX
	.comm	_S5P_FIMV_E_MV_RANGE_V6_MASK,4,2 ; @S5P_FIMV_E_MV_RANGE_V6_MASK
	.no_dead_strip	_s5p_mfc_set_enc_params
.subsections_via_symbols
