	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svp_start                      ## -- Begin function svp_start
	.p2align	4, 0x90
_svp_start:                             ## @svp_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_svp_stop
	movq	%rbx, %rdi
	callq	_svp_reset_stop
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_mmal_connection_enable
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_CHECK_STATUS
LBB0_2:
	movl	40(%rbx), %esi
	movq	_svp_bh_output_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_svp_port_enable
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_CHECK_STATUS
	movq	$0, 32(%rbx)
	leaq	28(%rbx), %rdi
	movq	_svp_worker@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_vcos_thread_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_CHECK_STATUS
	movq	_SVP_CREATED_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
	cmpq	$0, 16(%rbx)
	je	LBB0_9
## %bb.6:
	movl	8(%rbx), %esi
	leaq	4(%rbx), %rdi
	testl	%esi, %esi
	jne	LBB0_8
## %bb.7:
	movq	_SVP_CAMERA_DURATION_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_8:
	callq	_vcos_timer_set
LBB0_9:
	movq	_SVP_WATCHDOG_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_vcos_timer_set
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create connection"

	.comm	_svp_bh_output_cb,4,2           ## @svp_bh_output_cb
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable output port"

L_.str.2:                               ## @.str.2
	.asciz	"svp-worker"

	.comm	_svp_worker,4,2                 ## @svp_worker
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
	.comm	_SVP_CREATED_THREAD,4,2         ## @SVP_CREATED_THREAD
	.comm	_SVP_CAMERA_DURATION_MS,4,2     ## @SVP_CAMERA_DURATION_MS
	.comm	_SVP_WATCHDOG_TIMEOUT_MS,4,2    ## @SVP_WATCHDOG_TIMEOUT_MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svp_start                      ; -- Begin function svp_start
	.p2align	2
_svp_start:                             ; @svp_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_svp_stop
	mov	x0, x19
	bl	_svp_reset_stop
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_mmal_connection_enable
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_CHECK_STATUS
LBB0_2:
	ldr	w1, [x19, #40]
Lloh2:
	adrp	x8, _svp_bh_output_cb@GOTPAGE
Lloh3:
	ldr	x8, [x8, _svp_bh_output_cb@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_svp_port_enable
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_CHECK_STATUS
	str	xzr, [x19, #32]
	add	x0, x19, #28
Lloh7:
	adrp	x8, _svp_worker@GOTPAGE
Lloh8:
	ldr	x8, [x8, _svp_worker@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	mov	x4, x19
	bl	_vcos_thread_create
Lloh12:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh14:
	adrp	x9, _MMAL_SUCCESS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x10, _MMAL_ENOMEM@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MMAL_ENOMEM@GOTPAGEOFF]
	cmp	x0, x8
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_CHECK_STATUS
Lloh21:
	adrp	x8, _SVP_CREATED_THREAD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SVP_CREATED_THREAD@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x19, #8]
	add	x0, x19, #4
Lloh24:
	adrp	x9, _SVP_CAMERA_DURATION_MS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SVP_CAMERA_DURATION_MS@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w1, w9, w8, eq
	bl	_vcos_timer_set
LBB0_4:
Lloh27:
	adrp	x8, _SVP_WATCHDOG_TIMEOUT_MS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SVP_WATCHDOG_TIMEOUT_MS@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vcos_timer_set
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create connection"

	.comm	_svp_bh_output_cb,4,2           ; @svp_bh_output_cb
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable output port"

l_.str.2:                               ; @.str.2
	.asciz	"svp-worker"

	.comm	_svp_worker,4,2                 ; @svp_worker
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.comm	_MMAL_ENOMEM,4,2                ; @MMAL_ENOMEM
	.comm	_SVP_CREATED_THREAD,4,2         ; @SVP_CREATED_THREAD
	.comm	_SVP_CAMERA_DURATION_MS,4,2     ; @SVP_CAMERA_DURATION_MS
	.comm	_SVP_WATCHDOG_TIMEOUT_MS,4,2    ; @SVP_WATCHDOG_TIMEOUT_MS
.subsections_via_symbols
