	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_enc_ctrls_setup        ## -- Begin function s5p_mfc_enc_ctrls_setup
	.p2align	4, 0x90
_s5p_mfc_enc_ctrls_setup:               ## @s5p_mfc_enc_ctrls_setup
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_NUM_CTRLS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_v4l2_ctrl_handler_init
	cmpl	$0, (%r14)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_mfc_err
LBB0_20:
	movl	(%r14), %eax
	jmp	LBB0_21
LBB0_2:
	cmpl	$0, (%r13)
	jle	LBB0_18
## %bb.3:
	movq	_controls@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r13), %rcx
	addq	$64, %r12
	cmpq	%rcx, %rbx
	jge	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	40(%rax,%r12), %edi
	callq	_IS_MFC51_PRIV
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	-104(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_s5p_mfc_enc_ctrl_ops@GOTPCREL(%rip), %rax
	movq	%rax, -48(%rbp)
	movq	(%r15), %rax
	movl	40(%rax,%r12), %edi
	movl	%edi, -80(%rbp)
	movl	36(%rax,%r12), %ecx
	movl	%ecx, -52(%rbp)
	movl	32(%rax,%r12), %ecx
	movl	%ecx, -56(%rbp)
	movl	16(%rax,%r12), %ecx
	movl	%ecx, -60(%rbp)
	movl	56(%rax,%r12), %ecx
	movl	%ecx, -64(%rbp)
	movq	(%rax,%r12), %rcx
	movq	%rcx, -104(%rbp)
	movq	$0, -72(%rbp)
	movq	_V4L2_CTRL_TYPE_MENU@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	$0, -88(%rbp)
	movq	48(%rax,%r12), %rax
	movq	%rax, -96(%rbp)
	callq	_mfc51_get_menu
	movl	%eax, -76(%rbp)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	movq	(%rax,%r12), %rcx
	movl	40(%rax,%r12), %edx
	movq	_V4L2_CTRL_TYPE_MENU@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_V4L2_CTRL_TYPE_INTEGER_MENU@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	36(%rax,%r12), %ecx
	movl	32(%rax,%r12), %r8d
	movq	24(%rax,%r12), %r9
	movl	16(%rax,%r12), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movq	_s5p_mfc_enc_ctrl_ops@GOTPCREL(%rip), %rsi
	callq	_v4l2_ctrl_new_std
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rax,%r12), %rax
	movq	%rax, -88(%rbp)
	movq	$0, -96(%rbp)
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	-104(%rbp), %rsi
	xorl	%edx, %edx
	callq	_v4l2_ctrl_new_custom
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	16(%rax,%r12), %r9d
	movl	32(%rax,%r12), %ecx
	movq	%r14, %rdi
	movq	_s5p_mfc_enc_ctrl_ops@GOTPCREL(%rip), %rsi
	xorl	%r8d, %r8d
	callq	_v4l2_ctrl_new_std_menu
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	cmpl	$0, (%r14)
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	cmpq	$0, 8(%rax,%r12)
	je	LBB0_4
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_V4L2_CTRL_FLAG_VOLATILE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, (%rcx)
	jmp	LBB0_4
LBB0_18:
	movq	%r14, %rdi
	callq	_v4l2_ctrl_handler_setup
	xorl	%eax, %eax
LBB0_21:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_mfc_err
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_CTRLS,4,2                  ## @NUM_CTRLS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"v4l2_ctrl_handler_init failed\n"

	.comm	_controls,8,3                   ## @controls
	.comm	_s5p_mfc_enc_ctrl_ops,4,2       ## @s5p_mfc_enc_ctrl_ops
	.comm	_V4L2_CTRL_TYPE_MENU,8,3        ## @V4L2_CTRL_TYPE_MENU
	.comm	_V4L2_CTRL_TYPE_INTEGER_MENU,8,3 ## @V4L2_CTRL_TYPE_INTEGER_MENU
L_.str.1:                               ## @.str.1
	.asciz	"Adding control (%d) failed\n"

	.comm	_V4L2_CTRL_FLAG_VOLATILE,4,2    ## @V4L2_CTRL_FLAG_VOLATILE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_enc_ctrls_setup        ; -- Begin function s5p_mfc_enc_ctrls_setup
	.p2align	2
_s5p_mfc_enc_ctrls_setup:               ; @s5p_mfc_enc_ctrls_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x21, _NUM_CTRLS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NUM_CTRLS@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_v4l2_ctrl_handler_init
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_mfc_err
	ldr	w0, [x19]
	b	LBB0_19
LBB0_3:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.4:
	mov	x22, #0
Lloh4:
	adrp	x23, _controls@GOTPAGE
Lloh5:
	ldr	x23, [x23, _controls@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	w24, #32
Lloh6:
	adrp	x25, _V4L2_CTRL_TYPE_MENU@GOTPAGE
Lloh7:
	ldr	x25, [x25, _V4L2_CTRL_TYPE_MENU@GOTPAGEOFF]
Lloh8:
	adrp	x26, _V4L2_CTRL_TYPE_INTEGER_MENU@GOTPAGE
Lloh9:
	ldr	x26, [x26, _V4L2_CTRL_TYPE_INTEGER_MENU@GOTPAGEOFF]
Lloh10:
	adrp	x20, _s5p_mfc_enc_ctrl_ops@GOTPAGE
Lloh11:
	ldr	x20, [x20, _s5p_mfc_enc_ctrl_ops@GOTPAGEOFF]
Lloh12:
	adrp	x27, _V4L2_CTRL_FLAG_VOLATILE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _V4L2_CTRL_FLAG_VOLATILE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldrsw	x9, [x21]
	add	x24, x24, #64
	cmp	x22, x9
	b.ge	LBB0_18
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x24
	ldr	w0, [x8, #8]
	bl	_IS_MFC51_PRIV
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	str	x20, [sp, #72]
	ldr	x8, [x23]
	add	x8, x8, x24
	ldr	w0, [x8, #8]
	str	w0, [sp, #40]
	ldr	d0, [x8]
	str	d0, [sp, #64]
	ldur	w9, [x8, #-16]
	str	w9, [sp, #60]
	ldr	w9, [x8, #24]
	str	w9, [sp, #56]
	ldur	x9, [x8, #-32]
	str	x9, [sp, #16]
	str	xzr, [sp, #48]
	ldr	x10, [x25]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [sp, #32]
	ldr	x8, [x8, #16]
	str	x8, [sp, #24]
	bl	_mfc51_get_menu
	str	w0, [sp, #44]
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	add	x8, x8, x24
	ldur	x9, [x8, #-32]
	ldr	x10, [x25]
	ldr	x11, [x26]
	ldr	w2, [x8, #8]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w3, [x8]
	ldur	w5, [x8, #-16]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	bl	_v4l2_ctrl_new_std_menu
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldur	x8, [x8, #-8]
	stp	xzr, x8, [sp, #24]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #16
	mov	x0, x19
	mov	x2, #0
	bl	_v4l2_ctrl_new_custom
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w4, w3, [x8]
	ldur	x5, [x8, #-8]
	ldur	w6, [x8, #-16]
	mov	x0, x19
	mov	x1, x20
	bl	_v4l2_ctrl_new_std
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	str	x0, [x8, x22, lsl #3]
	ldr	w8, [x19]
	cbnz	w8, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	add	x9, x8, x24
	ldur	x9, [x9, #-24]
	cbz	x9, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x22, lsl #3]
	cbz	x9, LBB0_5
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w10, [x27]
	ldr	w11, [x9]
	orr	w10, w11, w10
	str	w10, [x9]
	b	LBB0_5
LBB0_18:
	mov	x0, x19
	bl	_v4l2_ctrl_handler_setup
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_20:
	str	x22, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_CTRLS,4,2                  ; @NUM_CTRLS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"v4l2_ctrl_handler_init failed\n"

	.comm	_controls,8,3                   ; @controls
	.comm	_s5p_mfc_enc_ctrl_ops,4,2       ; @s5p_mfc_enc_ctrl_ops
	.comm	_V4L2_CTRL_TYPE_MENU,8,3        ; @V4L2_CTRL_TYPE_MENU
	.comm	_V4L2_CTRL_TYPE_INTEGER_MENU,8,3 ; @V4L2_CTRL_TYPE_INTEGER_MENU
l_.str.1:                               ; @.str.1
	.asciz	"Adding control (%d) failed\n"

	.comm	_V4L2_CTRL_FLAG_VOLATILE,4,2    ; @V4L2_CTRL_FLAG_VOLATILE
.subsections_via_symbols
