	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m001_s_stream
_mt9m001_s_stream:                      ## @mt9m001_s_stream
	.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, %r12
	callq	_v4l2_get_subdevdata
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_to_mt9m001
	movq	%rax, %r14
	leaq	4(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	cmpl	%r15d, (%r14)
	je	LBB0_10
## %bb.1:
	testl	%r15d, %r15d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_8
## %bb.2:
	movq	%r13, %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	%r12, %rdi
	callq	_mt9m001_apply_selection
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:
	leaq	8(%r14), %rdi
	callq	___v4l2_ctrl_handler_setup
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.7:
	movq	_MT9M001_OUTPUT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$2, %edx
	callq	_reg_write
	testl	%eax, %eax
	jns	LBB0_9
LBB0_3:
	movl	%eax, %r15d
LBB0_4:
	movq	%r13, %rdi
	callq	_pm_runtime_put
	jmp	LBB0_11
LBB0_8:
	movq	_MT9M001_OUTPUT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_reg_write
	movq	%r13, %rdi
	callq	_pm_runtime_put
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9M001_OUTPUT_CONTROL,4,2     ## @MT9M001_OUTPUT_CONTROL
	.no_dead_strip	_mt9m001_s_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m001_s_stream
_mt9m001_s_stream:                      ; @mt9m001_s_stream
	.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	x21, x1
	mov	x24, x0
	bl	_v4l2_get_subdevdata
	mov	x20, x0
	bl	_to_mt9m001
	mov	x22, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x22]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_11
LBB0_2:
	cbz	w21, LBB0_9
; %bb.3:
	mov	x0, x20
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	x0, x24
	bl	_mt9m001_apply_selection
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.5:
	add	x0, x22, #8
	bl	___v4l2_ctrl_handler_setup
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.6:
Lloh0:
	adrp	x8, _MT9M001_OUTPUT_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9M001_OUTPUT_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #2
	bl	_reg_write
	tbz	w0, #31, LBB0_10
LBB0_7:
	mov	x23, x0
LBB0_8:
	mov	x0, x20
	bl	_pm_runtime_put
	b	LBB0_11
LBB0_9:
Lloh3:
	adrp	x8, _MT9M001_OUTPUT_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT9M001_OUTPUT_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_reg_write
	mov	x0, x20
	bl	_pm_runtime_put
LBB0_10:
	mov	w23, #0
	str	w21, [x22]
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9M001_OUTPUT_CONTROL,4,2     ; @MT9M001_OUTPUT_CONTROL
	.no_dead_strip	_mt9m001_s_stream
.subsections_via_symbols
