	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_start_stream
_stk_start_stream:                      ## @stk_start_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_is_present
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%r15, %rdi
	callq	_is_memallocd
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_is_initialised
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	16(%r15), %edi
	xorl	%esi, %esi
	movl	$5, %edx
	callq	_usb_set_interface
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_8:
	movq	%r15, %rdi
	callq	_stk_sensor_wakeup
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
LBB0_10:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$278, %esi                      ## imm = 0x116
	callq	_stk_camera_read_reg
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$279, %esi                      ## imm = 0x117
	callq	_stk_camera_read_reg
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movl	$278, %esi                      ## imm = 0x116
	xorl	%edx, %edx
	callq	_stk_camera_write_reg
	movq	%r15, %rdi
	movl	$279, %esi                      ## imm = 0x117
	xorl	%edx, %edx
	callq	_stk_camera_write_reg
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_stk_camera_read_reg
	movl	$128, %edx
	orl	-52(%rbp), %edx
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_stk_camera_write_reg
	movl	-48(%rbp), %edx
	movq	%r15, %rdi
	movl	$278, %esi                      ## imm = 0x116
	callq	_stk_camera_write_reg
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$279, %esi                      ## imm = 0x117
	callq	_stk_camera_write_reg
	movq	_MAX_ISO_BUFS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_17
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_atomic_inc
	testl	%r13d, %r13d
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r12), %eax
	jmp	LBB0_16
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_18:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r15, %rdi
	callq	_set_streaming
	jmp	LBB0_18
LBB0_14:
	movl	%r13d, %r14d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIXME: Buffers are not allocated\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.1:                               ## @.str.1
	.asciz	"usb_set_interface failed !\n"

L_.str.2:                               ## @.str.2
	.asciz	"error awaking the sensor\n"

	.comm	_MAX_ISO_BUFS,4,2               ## @MAX_ISO_BUFS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_stk_start_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk_start_stream
_stk_start_stream:                      ; @stk_start_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	bl	_is_present
	cbz	w0, LBB0_14
; %bb.1:
	mov	x0, x19
	bl	_is_memallocd
	cbz	w0, LBB0_13
; %bb.2:
	mov	x0, x19
	bl	_is_initialised
	cbz	w0, LBB0_13
; %bb.3:
	ldr	w0, [x19, #16]
	mov	w1, #0
	mov	w2, #5
	bl	_usb_set_interface
	tbz	w0, #31, LBB0_5
; %bb.4:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_5:
	mov	x0, x19
	bl	_stk_sensor_wakeup
	cbz	x0, LBB0_7
; %bb.6:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
LBB0_7:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #278
	bl	_stk_camera_read_reg
	add	x2, sp, #4
	mov	x0, x19
	mov	w1, #279
	bl	_stk_camera_read_reg
	mov	x0, x19
	mov	w1, #278
	mov	w2, #0
	bl	_stk_camera_write_reg
	mov	x0, x19
	mov	w1, #279
	mov	w2, #0
	bl	_stk_camera_write_reg
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #256
	bl	_stk_camera_read_reg
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x80
	mov	x0, x19
	mov	w1, #256
	bl	_stk_camera_write_reg
	ldr	w2, [sp, #8]
	mov	x0, x19
	mov	w1, #278
	bl	_stk_camera_write_reg
	ldr	w2, [sp, #4]
	mov	x0, x19
	mov	w1, #279
	bl	_stk_camera_write_reg
Lloh4:
	adrp	x21, _MAX_ISO_BUFS@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MAX_ISO_BUFS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.8:
	mov	x22, #0
Lloh6:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_17
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [x23]
	bl	_usb_submit_urb
	mov	x20, x0
	mov	x0, x19
	bl	_atomic_inc
	cbnz	w20, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x21]
	b	LBB0_9
LBB0_13:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_16:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_17:
	mov	x0, x19
	bl	_set_streaming
	mov	w20, #0
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIXME: Buffers are not allocated\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.1:                               ; @.str.1
	.asciz	"usb_set_interface failed !\n"

l_.str.2:                               ; @.str.2
	.asciz	"error awaking the sensor\n"

	.comm	_MAX_ISO_BUFS,4,2               ; @MAX_ISO_BUFS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_stk_start_stream
.subsections_via_symbols
