	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_stop_stream
_stk_stop_stream:                       ## @stk_stop_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_is_present
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_stk_camera_read_reg
	movl	$-129, %edx
	andl	-28(%rbp), %edx
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_stk_camera_write_reg
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.2:
	movq	_MAX_ISO_BUFS@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_usb_kill_urb
	movl	(%r14), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r15), %rcx
	incq	%rbx
	jmp	LBB0_4
LBB0_8:
	movq	%r15, %rdi
	callq	_unset_streaming
	movl	(%r15), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_usb_set_interface
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_10:
	movq	%r15, %rdi
	callq	_stk_sensor_sleep
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_ISO_BUFS,4,2               ## @MAX_ISO_BUFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb_set_interface failed !\n"

L_.str.1:                               ## @.str.1
	.asciz	"error suspending the sensor\n"

	.no_dead_strip	_stk_stop_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk_stop_stream
_stk_stop_stream:                       ; @stk_stop_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_is_present
	cbz	x0, LBB0_11
; %bb.1:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #256
	bl	_stk_camera_read_reg
	ldr	w8, [sp, #12]
	and	w2, w8, #0xffffff7f
	mov	x0, x19
	mov	w1, #256
	bl	_stk_camera_write_reg
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_7
; %bb.2:
Lloh0:
	adrp	x20, _MAX_ISO_BUFS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAX_ISO_BUFS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x21, #0
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_5
LBB0_4:
	bl	_usb_kill_urb
	ldr	w8, [x20]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #8]
	ldr	x0, [x9, x21, lsl #3]
	cbnz	x0, LBB0_4
	b	LBB0_5
LBB0_7:
	mov	x0, x19
	bl	_unset_streaming
	ldr	w0, [x19]
	mov	w1, #0
	mov	w2, #0
	bl	_usb_set_interface
	cbz	x0, LBB0_9
; %bb.8:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_9:
	mov	x0, x19
	bl	_stk_sensor_sleep
	cbz	x0, LBB0_11
; %bb.10:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_11:
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_ISO_BUFS,4,2               ; @MAX_ISO_BUFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb_set_interface failed !\n"

l_.str.1:                               ; @.str.1
	.asciz	"error suspending the sensor\n"

	.no_dead_strip	_stk_stop_stream
.subsections_via_symbols
