	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function preview_worker
_preview_worker:                        ## @preview_worker
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %r14
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movq	%rbx, %rdi
	callq	*8(%rbx)
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%rbx, %rdi
	callq	*16(%rbx)
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	cmpl	$0, (%rbx)
	jne	LBB0_11
## %bb.3:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%rbx), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_mmal_port_send_buffer
	cmpq	(%r12), %rax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	jmp	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_preview_process_returned_bufs
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, (%rbx)
	je	LBB0_4
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	movl	$1, (%rbx)
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, %rdi
	callq	_mmal_buffer_header_release
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%rbx), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	jne	LBB0_10
## %bb.12:
	movq	%rbx, %rdi
	callq	*24(%rbx)
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: port %p"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to send buffer to %s"

L_.str.2:                               ## @.str.2
	.asciz	"Preview error. Exiting."

L_.str.3:                               ## @.str.3
	.asciz	"Exiting preview worker"

	.no_dead_strip	_preview_worker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function preview_worker
_preview_worker:                        ; @preview_worker
	.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
	ldr	x20, [x0, #48]
Lloh0:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	x8, x20, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_trace
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_13
; %bb.1:
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_13
; %bb.2:
	ldr	w8, [x19]
	cbnz	w8, LBB0_13
; %bb.3:
Lloh5:
	adrp	x22, _MMAL_SUCCESS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	bl	_mmal_queue_get
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	bl	_mmal_queue_get
	mov	x1, x0
	cbz	x0, LBB0_9
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_mmal_port_send_buffer
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x20]
	str	x8, [sp]
	mov	x0, x21
	bl	_vcos_log_error
	b	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_preview_process_returned_bufs
	cbnz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	cbz	w8, LBB0_4
	b	LBB0_13
LBB0_11:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vcos_log_error
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	bl	_mmal_buffer_header_release
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #32]
	bl	_mmal_queue_get
	cbnz	x0, LBB0_12
; %bb.14:
	ldr	x8, [x19, #24]
	mov	x0, x19
	blr	x8
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_vcos_log_trace
	mov	x0, #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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: port %p"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to send buffer to %s"

l_.str.2:                               ; @.str.2
	.asciz	"Preview error. Exiting."

l_.str.3:                               ; @.str.3
	.asciz	"Exiting preview worker"

	.no_dead_strip	_preview_worker
.subsections_via_symbols
