	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k6aa_set_power
_s5k6aa_set_power:                      ## @s5k6aa_set_power
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_to_s5k6aa
	movq	%rax, %rbx
	leaq	4(%rax), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	cmpl	%eax, (%rbx)
	jne	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	callq	___s5k6aa_power_on
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	%r14, %rdi
	callq	_s5k6aa_initialize_isp
	jmp	LBB0_5
LBB0_4:
	callq	___s5k6aa_power_off
LBB0_5:
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_6
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
LBB0_6:
	xorl	%eax, %eax
	cmpl	$1, %r15d
	sbbl	%eax, %eax
	orl	$1, %eax
	addl	%eax, (%rbx)
LBB0_7:
	movq	%r12, %rdi
	callq	_mutex_unlock
	xorl	%r13d, %r13d
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.8:
	cmpl	$1, (%rbx)
	jne	LBB0_11
## %bb.9:
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_ctrl_handler_setup        ## TAILCALL
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_s5k6aa_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k6aa_set_power
_s5k6aa_set_power:                      ; @s5k6aa_set_power
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_to_s5k6aa
	mov	x21, x0
	add	x22, x0, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x21]
	cmp	w20, #0
	cset	w9, eq
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x21
	cbz	w20, LBB0_9
; %bb.2:
	bl	___s5k6aa_power_on
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.3:
	mov	x0, x19
	bl	_s5k6aa_initialize_isp
	mov	x23, x0
	cbnz	w0, LBB0_10
LBB0_4:
	ldr	w8, [x21]
	sub	w9, w8, #1
	cmp	w20, #0
	csinc	w8, w9, w8, eq
	str	w8, [x21]
LBB0_5:
	mov	x0, x22
	bl	_mutex_unlock
	cbz	w20, LBB0_8
; %bb.6:
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x19]
	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
	b	_v4l2_ctrl_handler_setup
LBB0_8:
	mov	w23, #0
	b	LBB0_11
LBB0_9:
	bl	___s5k6aa_power_off
	mov	x23, x0
	cbz	w0, LBB0_4
LBB0_10:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x23
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_s5k6aa_set_power
.subsections_via_symbols
