	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_or_set_cluster
_try_or_set_cluster:                    ## @try_or_set_cluster
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_V4L2_CTRL_FLAG_GRABBED@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_cur_to_new
	movl	(%r13), %eax
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 32(%rdi)
	je	LBB0_4
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %ecx
	testl	%ecx, 4(%rdi)
	je	LBB0_5
## %bb.23:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_24
LBB0_6:
	movq	_try_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_call_op
	movl	%eax, %r14d
	testl	%r12d, %r12d
	je	LBB0_24
## %bb.7:
	testl	%r14d, %r14d
	jne	LBB0_24
## %bb.8:
	movq	%r13, %rdi
	callq	_cluster_changed
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_24
## %bb.9:
	movq	_s_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_call_op
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_10
LBB0_24:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r13, %rdi
	callq	_is_cur_manual
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_is_new_manual
	cmpl	$0, (%r13)
	movl	$0, %r14d
	jle	LBB0_24
## %bb.11:
	movq	%rax, %rbx
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	%rbx, %r12
	movq	16(%r13), %rax
	movq	(%rax,%r15,8), %rsi
	cmovel	%r14d, %edx
	orl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_new_to_cur
	incq	%r15
	movslq	(%r13), %rax
	cmpq	%rax, %r15
	jge	LBB0_24
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpq	%rbx, %r12
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r13, %rdi
	callq	_is_new_manual
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpq	$0, 24(%r13)
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%r15,8), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$1, 8(%rax)
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	$0, %edx
	testq	%r15, %r15
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_V4L2_EVENT_CTRL_CH_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CTRL_FLAG_GRABBED,4,2     ## @V4L2_CTRL_FLAG_GRABBED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_try_ctrl,4,2                   ## @try_ctrl
	.comm	_s_ctrl,4,2                     ## @s_ctrl
	.comm	_V4L2_EVENT_CTRL_CH_FLAGS,4,2   ## @V4L2_EVENT_CTRL_CH_FLAGS
	.no_dead_strip	_try_or_set_cluster
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_or_set_cluster
_try_or_set_cluster:                    ; @try_or_set_cluster
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x23, #0
Lloh0:
	adrp	x24, _V4L2_CTRL_FLAG_GRABBED@GOTPAGE
Lloh1:
	ldr	x24, [x24, _V4L2_CTRL_FLAG_GRABBED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_cur_to_new
	ldr	w8, [x20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	ldr	x0, [x9, x23, lsl #3]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x0, #32]
	cbz	w9, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w22, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x0, #4]
	ldr	w10, [x24]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.8:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_23
LBB0_9:
Lloh5:
	adrp	x8, _try_ctrl@GOTPAGE
Lloh6:
	ldr	x8, [x8, _try_ctrl@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_call_op
	cbz	w22, LBB0_23
; %bb.10:
	cbnz	w0, LBB0_23
; %bb.11:
	mov	x0, x20
	bl	_cluster_changed
	cbz	w0, LBB0_23
; %bb.12:
Lloh8:
	adrp	x8, _s_ctrl@GOTPAGE
Lloh9:
	ldr	x8, [x8, _s_ctrl@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_call_op
	cbnz	w0, LBB0_23
; %bb.13:
	mov	x0, x20
	bl	_is_cur_manual
	mov	x22, x0
	mov	x0, x20
	bl	_is_new_manual
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.14:
	mov	x23, x0
	mov	x24, #0
	mov	w25, #1
Lloh11:
	adrp	x26, _V4L2_EVENT_CTRL_CH_FLAGS@GOTPAGE
Lloh12:
	ldr	x26, [x26, _V4L2_EVENT_CTRL_CH_FLAGS@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	cmp	x24, #0
	ccmp	x22, x23, #4, ne
	ldr	x8, [x20, #16]
	ldr	x1, [x8, x24, lsl #3]
	ldr	w8, [x26]
	csel	w8, w8, wzr, ne
	orr	w2, w8, w19
	mov	x0, x21
	bl	_new_to_cur
	add	x24, x24, #1
	ldrsw	x8, [x20]
	cmp	x24, x8
	b.ge	LBB0_22
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	cbz	x24, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	x22, x23
	b.eq	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x20
	bl	_is_new_manual
	cbz	x0, LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_15
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x20, #16]
	ldr	x8, [x8, x24, lsl #3]
	cbz	x8, LBB0_15
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	str	w25, [x8, #8]
	b	LBB0_15
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CTRL_FLAG_GRABBED,4,2     ; @V4L2_CTRL_FLAG_GRABBED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_try_ctrl,4,2                   ; @try_ctrl
	.comm	_s_ctrl,4,2                     ; @s_ctrl
	.comm	_V4L2_EVENT_CTRL_CH_FLAGS,4,2   ; @V4L2_EVENT_CTRL_CH_FLAGS
	.no_dead_strip	_try_or_set_cluster
.subsections_via_symbols
