	.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_hevc
_s5p_mfc_set_enc_params_hevc:           ## @s5p_mfc_set_enc_params_hevc
	.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, %r14
	movq	176(%rdi), %rax
	movq	(%rax), %r15
	xorl	%eax, %eax
	callq	_mfc_debug_enter
	movq	%r14, %rdi
	callq	_s5p_mfc_set_enc_params
	movq	96(%r15), %rdi
	callq	_readl
	andl	$-196609, %eax                  ## imm = 0xFFFCFFFF
	movl	8(%r14), %edi
	shll	$16, %edi
	orl	%eax, %edi
	movq	96(%r15), %rsi
	callq	_writel
	cmpl	$3840, (%r14)                   ## imm = 0xF00
	jne	LBB0_3
## %bb.1:
	cmpl	$2160, 4(%r14)                  ## imm = 0x870
	jne	LBB0_3
## %bb.2:
	movq	$51, 24(%r14)
LBB0_3:
	movl	32(%r14), %eax
	andl	$3, %eax
	movl	24(%r14), %ecx
	movl	28(%r14), %edi
	shll	$8, %ecx
	orl	%eax, %ecx
	shll	$16, %edi
	orl	%ecx, %edi
	movq	88(%r15), %rsi
	callq	_writel
	movl	36(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.5:
	cmpl	$130, %eax
	jne	LBB0_6
## %bb.7:
	movl	$1, 40(%r14)
	movl	$256, %ecx                      ## imm = 0x100
	jmp	LBB0_11
LBB0_8:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, 40(%r14)
	jmp	LBB0_10
LBB0_9:
	movq	$0, 40(%r14)
LBB0_10:
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_6:
	movl	40(%r14), %ecx
	andl	$1, %ecx
	shll	$8, %ecx
LBB0_11:
	movl	44(%r14), %eax
	movl	48(%r14), %edx
	andl	$1, %edx
	movl	52(%r14), %esi
	leal	(%rdx,%rsi,4), %edx
	addl	$-4, %edx
	movl	56(%r14), %esi
	shll	$3, %esi
	andl	$24, %esi
	orl	%edx, %esi
	movl	60(%r14), %edx
	shll	$5, %edx
	andl	$32, %edx
	movl	64(%r14), %edi
	shll	$6, %edi
	andl	$64, %edi
	orl	%edx, %edi
	orl	%esi, %edi
	movl	68(%r14), %edx
	shll	$7, %edx
	movzbl	%dl, %edx
	orl	%ecx, %edx
	andl	$1, %eax
	shll	$9, %eax
	orl	%edx, %eax
	orl	%edi, %eax
	movl	72(%r14), %ecx
	andl	$1, %ecx
	shll	$10, %ecx
	movl	76(%r14), %edx
	andl	$1, %edx
	shll	$11, %edx
	orl	%ecx, %edx
	movl	80(%r14), %esi
	andl	$1, %esi
	shll	$13, %esi
	orl	%edx, %esi
	movl	84(%r14), %ecx
	andl	$1, %ecx
	shll	$14, %ecx
	orl	%esi, %ecx
	orl	%eax, %ecx
	movl	88(%r14), %eax
	shll	$15, %eax
	movzwl	%ax, %eax
	movl	92(%r14), %edx
	andl	$1, %edx
	shll	$16, %edx
	orl	%eax, %edx
	movl	96(%r14), %eax
	andl	$1, %eax
	shll	$17, %eax
	orl	%edx, %eax
	movl	100(%r14), %edx
	andl	$7, %edx
	shll	$18, %edx
	orl	%eax, %edx
	movl	104(%r14), %eax
	andl	$1, %eax
	shll	$23, %eax
	orl	%edx, %eax
	orl	%ecx, %eax
	movl	108(%r14), %edi
	shll	$26, %edi
	orl	%eax, %edi
	movq	80(%r15), %rsi
	callq	_writel
	cmpl	$0, 56(%r14)
	je	LBB0_13
## %bb.12:
	movzwl	112(%r14), %edi
	movq	72(%r15), %rsi
	callq	_writel
LBB0_13:
	testb	$1, 40(%r14)
	jne	LBB0_15
## %bb.14:
	movl	116(%r14), %edi
	movq	64(%r15), %rsi
	callq	_writel
	movl	120(%r14), %edi
	movq	56(%r15), %rsi
	callq	_writel
LBB0_15:
	movl	124(%r14), %eax
	testl	%eax, %eax
	je	LBB0_20
## %bb.16:
	movl	128(%r14), %ecx
	andl	$1, %ecx
	andl	$7, %eax
	leal	(%rax,%rcx,8), %edi
	movq	48(%r15), %rsi
	callq	_writel
	cmpl	$0, 76(%r14)
	je	LBB0_18
## %bb.17:
	movq	136(%r14), %rax
	movl	(%rax), %edi
	movq	40(%r15), %rsi
	callq	_writel
	movq	136(%r14), %rax
	movl	4(%rax), %edi
	movq	40(%r15), %rsi
	addq	$4, %rsi
	callq	_writel
	movq	136(%r14), %rax
	movl	8(%rax), %edi
	movq	40(%r15), %rsi
	addq	$8, %rsi
	callq	_writel
	movq	136(%r14), %rax
	movl	12(%rax), %edi
	movq	40(%r15), %rsi
	addq	$12, %rsi
	callq	_writel
	movq	136(%r14), %rax
	movl	16(%rax), %edi
	movq	40(%r15), %rsi
	addq	$16, %rsi
	callq	_writel
	movq	136(%r14), %rax
	movl	20(%rax), %edi
	movq	40(%r15), %rsi
	addq	$20, %rsi
	callq	_writel
	movq	136(%r14), %rax
	movl	24(%rax), %edi
	movq	40(%r15), %rsi
	addq	$24, %rsi
	callq	_writel
LBB0_18:
	cmpq	$0, 16(%r14)
	je	LBB0_20
## %bb.19:
	movq	144(%r14), %rax
	movl	(%rax), %edi
	movq	32(%r15), %rsi
	callq	_writel
	movq	144(%r14), %rax
	movl	4(%rax), %edi
	movq	32(%r15), %rsi
	addq	$4, %rsi
	callq	_writel
	movq	144(%r14), %rax
	movl	8(%rax), %edi
	movq	32(%r15), %rsi
	addq	$8, %rsi
	callq	_writel
	movq	144(%r14), %rax
	movl	12(%rax), %edi
	movq	32(%r15), %rsi
	addq	$12, %rsi
	callq	_writel
	movq	144(%r14), %rax
	movl	16(%rax), %edi
	movq	32(%r15), %rsi
	addq	$16, %rsi
	callq	_writel
	movq	144(%r14), %rax
	movl	20(%rax), %edi
	movq	32(%r15), %rsi
	addq	$20, %rsi
	callq	_writel
	movq	144(%r14), %rax
	movl	24(%rax), %edi
	movq	32(%r15), %rsi
	addq	$24, %rsi
	callq	_writel
LBB0_20:
	movq	24(%r15), %rdi
	callq	_readl
	andl	$-257, %eax                     ## imm = 0xFEFF
	movl	12(%r14), %ebx
	shll	$8, %ebx
	orl	%eax, %ebx
	movq	24(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	andl	$-256, %ebx
	orl	152(%r14), %ebx
	movq	24(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	cmpq	$0, 16(%r14)
	je	LBB0_22
## %bb.21:
	movl	156(%r14), %edi
	shll	$16, %edi
	movq	_FRAME_DELTA_DEFAULT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	16(%r15), %rsi
	callq	_writel
LBB0_22:
	movl	160(%r14), %edi
	shll	$8, %edi
	orl	164(%r14), %edi
	movq	8(%r15), %rsi
	callq	_writel
	movq	(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
	cmpq	$0, 16(%r14)
	jne	LBB0_25
## %bb.23:
	cmpl	$0, 12(%r14)
	jne	LBB0_25
## %bb.24:
	movl	168(%r14), %eax
	movl	172(%r14), %edi
	shll	$16, %eax
	shll	$8, %edi
	orl	%eax, %edi
	orl	152(%r14), %edi
	movq	(%r15), %rsi
	callq	_writel
LBB0_25:
	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	_FRAME_DELTA_DEFAULT,4,2        ## @FRAME_DELTA_DEFAULT
	.no_dead_strip	_s5p_mfc_set_enc_params_hevc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function s5p_mfc_set_enc_params_hevc
lCPI0_0:
	.long	51                              ; 0x33
	.long	0                               ; 0x0
lCPI0_1:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_s5p_mfc_set_enc_params_hevc:           ; @s5p_mfc_set_enc_params_hevc
	.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, #176]
	ldr	x21, [x8]
	bl	_mfc_debug_enter
	mov	x0, x19
	bl	_s5p_mfc_set_enc_params
	ldr	x0, [x21, #96]
	bl	_readl
	and	w8, w0, #0xfffcffff
	ldr	w9, [x19, #8]
	orr	w0, w8, w9, lsl #16
	ldr	x1, [x21, #96]
	bl	_writel
	ldr	w8, [x19]
	cmp	w8, #3840
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #2160
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #24]
LBB0_3:
	ldp	w10, w8, [x19, #28]
	and	w8, w8, #0x3
	ldr	w9, [x19, #24]
	bfi	w8, w9, #8, #24
	orr	w0, w8, w10, lsl #16
	ldr	x1, [x21, #88]
	bl	_writel
	ldr	w8, [x19, #36]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.6:
	mov	w8, #1
	str	w8, [x19, #40]
	mov	w8, #256
	b	LBB0_10
LBB0_7:
	mov	w8, #0
Lloh2:
	adrp	x9, lCPI0_1@PAGE
Lloh3:
	ldr	d0, [x9, lCPI0_1@PAGEOFF]
	str	d0, [x19, #40]
	b	LBB0_10
LBB0_8:
	mov	w8, #0
	str	xzr, [x19, #40]
	b	LBB0_10
LBB0_9:
	ldr	w8, [x19, #40]
	ubfiz	w8, w8, #8, #1
LBB0_10:
	ldp	w10, w9, [x19, #44]
	and	w9, w9, #0x1
	ldp	w11, w12, [x19, #52]
	bfi	w9, w11, #2, #30
	sub	w9, w9, #4
	ubfiz	w11, w12, #3, #2
	orr	w9, w9, w11
	ldp	w11, w12, [x19, #60]
	ubfiz	w11, w11, #5, #1
	orr	w9, w9, w11
	ubfiz	w11, w12, #6, #1
	orr	w9, w9, w11
	ldp	w11, w12, [x19, #68]
	ubfiz	w11, w11, #7, #1
	orr	w9, w9, w11
	orr	w8, w9, w8
	ubfiz	w9, w10, #9, #1
	orr	w8, w8, w9
	ubfiz	w9, w12, #10, #1
	orr	w8, w8, w9
	ldp	w9, w10, [x19, #76]
	ubfiz	w9, w9, #11, #1
	orr	w8, w8, w9
	ubfiz	w9, w10, #13, #1
	orr	w8, w8, w9
	ldp	w9, w10, [x19, #84]
	ubfiz	w9, w9, #14, #1
	orr	w8, w8, w9
	ubfiz	w9, w10, #15, #1
	orr	w8, w8, w9
	ldp	w9, w10, [x19, #92]
	ubfiz	w9, w9, #16, #1
	orr	w8, w8, w9
	ubfiz	w9, w10, #17, #1
	orr	w8, w8, w9
	ldp	w9, w10, [x19, #100]
	ubfiz	w9, w9, #18, #3
	orr	w8, w8, w9
	ubfiz	w9, w10, #23, #1
	orr	w8, w8, w9
	ldr	w9, [x19, #108]
	orr	w0, w8, w9, lsl #26
	ldr	x1, [x21, #80]
	bl	_writel
	ldr	w8, [x19, #56]
	cbz	w8, LBB0_12
; %bb.11:
	ldrh	w0, [x19, #112]
	ldr	x1, [x21, #72]
	bl	_writel
LBB0_12:
	ldrb	w8, [x19, #40]
	tbnz	w8, #0, LBB0_14
; %bb.13:
	ldr	w0, [x19, #116]
	ldr	x1, [x21, #64]
	bl	_writel
	ldr	w0, [x19, #120]
	ldr	x1, [x21, #56]
	bl	_writel
LBB0_14:
	ldr	w8, [x19, #124]
	cbz	w8, LBB0_19
; %bb.15:
	ldr	w9, [x19, #128]
	and	w0, w8, #0x7
	bfi	w0, w9, #3, #1
	ldr	x1, [x21, #48]
	bl	_writel
	ldr	w8, [x19, #76]
	cbz	w8, LBB0_17
; %bb.16:
	ldr	x8, [x19, #136]
	ldr	w0, [x8]
	ldr	x1, [x21, #40]
	bl	_writel
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #4]
	ldr	x8, [x21, #40]
	add	x1, x8, #4
	bl	_writel
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #8]
	ldr	x8, [x21, #40]
	add	x1, x8, #8
	bl	_writel
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #12]
	ldr	x8, [x21, #40]
	add	x1, x8, #12
	bl	_writel
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #16]
	ldr	x8, [x21, #40]
	add	x1, x8, #16
	bl	_writel
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #20]
	ldr	x8, [x21, #40]
	add	x1, x8, #20
	bl	_writel
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #24]
	ldr	x8, [x21, #40]
	add	x1, x8, #24
	bl	_writel
LBB0_17:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_19
; %bb.18:
	ldr	x8, [x19, #144]
	ldr	w0, [x8]
	ldr	x1, [x21, #32]
	bl	_writel
	ldr	x8, [x19, #144]
	ldr	w0, [x8, #4]
	ldr	x8, [x21, #32]
	add	x1, x8, #4
	bl	_writel
	ldr	x8, [x19, #144]
	ldr	w0, [x8, #8]
	ldr	x8, [x21, #32]
	add	x1, x8, #8
	bl	_writel
	ldr	x8, [x19, #144]
	ldr	w0, [x8, #12]
	ldr	x8, [x21, #32]
	add	x1, x8, #12
	bl	_writel
	ldr	x8, [x19, #144]
	ldr	w0, [x8, #16]
	ldr	x8, [x21, #32]
	add	x1, x8, #16
	bl	_writel
	ldr	x8, [x19, #144]
	ldr	w0, [x8, #20]
	ldr	x8, [x21, #32]
	add	x1, x8, #20
	bl	_writel
	ldr	x8, [x19, #144]
	ldr	w0, [x8, #24]
	ldr	x8, [x21, #32]
	add	x1, x8, #24
	bl	_writel
LBB0_19:
	ldr	x0, [x21, #24]
	bl	_readl
	and	w8, w0, #0xfffffeff
	ldr	w9, [x19, #12]
	orr	w20, w8, w9, lsl #8
	ldr	x1, [x21, #24]
	mov	x0, x20
	bl	_writel
	and	w8, w20, #0xffffff00
	ldr	w9, [x19, #152]
	orr	w0, w8, w9
	ldr	x1, [x21, #24]
	bl	_writel
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w8, [x19, #156]
Lloh4:
	adrp	x9, _FRAME_DELTA_DEFAULT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _FRAME_DELTA_DEFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w0, w9, w8, lsl #16
	ldr	x1, [x21, #16]
	bl	_writel
LBB0_21:
	ldp	w8, w9, [x19, #160]
	orr	w0, w9, w8, lsl #8
	ldr	x1, [x21, #8]
	bl	_writel
	ldr	x1, [x21]
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_24
; %bb.22:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_24
; %bb.23:
	ldp	w8, w9, [x19, #168]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	ldr	w9, [x19, #152]
	orr	w0, w8, w9
	ldr	x1, [x21]
	bl	_writel
LBB0_24:
	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 AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FRAME_DELTA_DEFAULT,4,2        ; @FRAME_DELTA_DEFAULT
	.no_dead_strip	_s5p_mfc_set_enc_params_hevc
.subsections_via_symbols
