	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_s_ext_ctrls
_pvr2_s_ext_ctrls:                      ## @pvr2_s_ext_ctrls
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdx), %rax
	movq	_V4L2_CTRL_WHICH_DEF_VAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_1:
	movq	%rdx, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	cmpl	$0, 8(%rdx)
	je	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %r12
	movl	4(%r12,%rbx,8), %esi
	movq	%r14, %rdi
	callq	_pvr2_hdw_get_ctrl_v4l
	movl	(%r12,%rbx,8), %esi
	movl	%eax, %edi
	callq	_pvr2_ctrl_set_value
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	8(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_6:
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_4:
	movl	%eax, %r12d
	movl	%ebx, 12(%r15)
LBB0_7:
	movq	%r14, %rdi
	callq	_pvr2_hdw_commit_ctl
LBB0_8:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CTRL_WHICH_DEF_VAL,8,3    ## @V4L2_CTRL_WHICH_DEF_VAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_pvr2_s_ext_ctrls
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_s_ext_ctrls
_pvr2_s_ext_ctrls:                      ; @pvr2_s_ext_ctrls
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _V4L2_CTRL_WHICH_DEF_VAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_CTRL_WHICH_DEF_VAL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_2:
	mov	x20, x2
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x19, [x8]
	ldr	w8, [x2, #8]
	cbz	w8, LBB0_6
; %bb.3:
	mov	x23, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x21, x8, x23
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_pvr2_hdw_get_ctrl_v4l
	ldr	w1, [x21]
	bl	_pvr2_ctrl_set_value
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	w8, [x20, #8]
	add	x23, x23, #8
	cmp	x22, x8
	b.lo	LBB0_4
LBB0_6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	mov	x21, x0
	str	w22, [x20, #12]
LBB0_8:
	mov	x0, x19
	bl	_pvr2_hdw_commit_ctl
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CTRL_WHICH_DEF_VAL,8,3    ; @V4L2_CTRL_WHICH_DEF_VAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_pvr2_s_ext_ctrls
.subsections_via_symbols
