	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encoder_buffer_callback
_encoder_buffer_callback:               ## @encoder_buffer_callback
	.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	%rsi, %r15
	movq	%rdi, %r14
	cmpl	$-1, _encoder_buffer_callback.base_time(%rip)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_get_microseconds64
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, _encoder_buffer_callback.base_time(%rip)
LBB0_2:
	movq	8(%r14), %r13
	testq	%r13, %r13
	je	LBB0_76
## %bb.3:
	xorl	%eax, %eax
	callq	_get_microseconds64
	movl	%eax, %ebx
	movq	80(%r13), %rdi
	callq	_vcos_assert
	movq	64(%r13), %rax
	cmpq	$0, 72(%rax)
	je	LBB0_5
## %bb.4:
	movq	96(%r13), %rdi
	callq	_vcos_assert
LBB0_5:
	movslq	%ebx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%r13)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_36
## %bb.6:
	movl	8(%r13), %r14d
	movl	12(%r13), %ecx
	subl	%ecx, %r14d
	movl	(%r15), %r12d
	cmpl	%r12d, %r14d
	cmovgel	%r12d, %r14d
	movl	4(%r15), %eax
	movq	_MMAL_BUFFER_HEADER_FLAG_CONFIG@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_10
## %bb.7:
	addl	16(%r13), %r12d
	cmpl	$9, %r12d
	jb	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	jmp	LBB0_74
LBB0_76:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	jmp	LBB0_77
LBB0_36:
	movq	_MMAL_BUFFER_HEADER_FLAG_CONFIG@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, 4(%r15)
	je	LBB0_53
## %bb.37:
	imulq	$274877907, -48(%rbp), %rax     ## 8-byte Folded Reload
                                        ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movq	64(%r13), %rdi
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_39
## %bb.38:
	addl	_encoder_buffer_callback.base_time(%rip), %ecx
	cmpl	%ecx, %eax
	jg	LBB0_41
LBB0_39:
	cmpq	$0, 96(%rdi)
	je	LBB0_53
## %bb.40:
	cmpq	$0, 88(%rdi)
	je	LBB0_53
LBB0_41:
	movl	%eax, _encoder_buffer_callback.base_time(%rip)
	movq	$0, 88(%rdi)
	movl	4(%rdi), %eax
	movl	8(%rdi), %ecx
	leal	1(%rax), %edx
	cmpl	%ecx, %eax
	movl	$1, %eax
	cmovll	%edx, %eax
	testl	%ecx, %ecx
	cmovel	%edx, %eax
	movl	%eax, 4(%rdi)
	movq	80(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_45
## %bb.42:
	cmpb	$45, (%rsi)
	je	LBB0_45
## %bb.43:
	callq	_open_filename
	testq	%rax, %rax
	je	LBB0_45
## %bb.44:
	movq	%rax, %rbx
	movq	80(%r13), %rdi
	callq	_fclose
	movq	%rbx, 80(%r13)
LBB0_45:
	movq	64(%r13), %rdi
	movq	16(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_49
## %bb.46:
	cmpb	$45, (%rsi)
	je	LBB0_49
## %bb.47:
	callq	_open_filename
	testq	%rax, %rax
	je	LBB0_49
## %bb.48:
	movq	%rax, %rbx
	movq	96(%r13), %rdi
	callq	_fclose
	movq	%rbx, 96(%r13)
LBB0_49:
	movq	64(%r13), %rdi
	movq	24(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_53
## %bb.50:
	cmpb	$45, (%rsi)
	je	LBB0_53
## %bb.51:
	callq	_open_filename
	testq	%rax, %rax
	je	LBB0_53
## %bb.52:
	movq	%rax, %rbx
	movq	72(%r13), %rdi
	callq	_fclose
	movq	%rbx, 72(%r13)
LBB0_53:
	cmpl	$0, (%r15)
	je	LBB0_74
## %bb.54:
	movq	%r15, %rdi
	callq	_mmal_buffer_header_mem_lock
	movq	_MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_59
## %bb.55:
	movq	64(%r13), %rax
	cmpq	$0, 72(%rax)
	je	LBB0_58
## %bb.56:
	movq	16(%r15), %rdi
	movl	(%r15), %edx
	movq	96(%r13), %rcx
	movl	$1, %esi
	callq	_fwrite
	movl	%eax, %ebx
	cmpq	$0, 88(%r13)
	je	LBB0_72
## %bb.57:
	movq	96(%r13), %rdi
	callq	_fflush
	jmp	LBB0_72
LBB0_10:
	movq	_MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_74
## %bb.11:
	movl	_encoder_buffer_callback.frame_start(%rip), %edx
	cmpl	$-1, %edx
	jne	LBB0_13
## %bb.12:
	movl	%ecx, _encoder_buffer_callback.frame_start(%rip)
	movl	%ecx, %edx
LBB0_13:
	movq	_MMAL_BUFFER_HEADER_FLAG_KEYFRAME@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.14:
	movq	32(%r13), %rcx
	movq	40(%r13), %rax
	movl	%edx, (%rcx,%rax,4)
	incq	%rax
	movq	_IFRAME_BUFSIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_15
## %bb.16:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_17
LBB0_9:
	movq	%r15, %rdi
	callq	_mmal_buffer_header_mem_lock
	movslq	16(%r13), %rdi
	shlq	$2, %rdi
	addq	24(%r13), %rdi
	movq	16(%r15), %rsi
	movl	(%r15), %edx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_mmal_buffer_header_mem_unlock
	movl	(%r15), %eax
	addl	%eax, 16(%r13)
	jmp	LBB0_74
LBB0_59:
	movq	16(%r15), %rdi
	movl	(%r15), %edx
	movq	80(%r13), %rcx
	movl	$1, %esi
	callq	_fwrite
	movl	%eax, %ebx
	cmpq	$0, 88(%r13)
	je	LBB0_61
## %bb.60:
	movq	80(%r13), %rdi
	callq	_fflush
LBB0_61:
	movq	64(%r13), %rax
	cmpq	$0, 64(%rax)
	je	LBB0_72
## %bb.62:
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_65
## %bb.63:
	movq	_MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	jne	LBB0_65
## %bb.64:
	movq	_MMAL_BUFFER_HEADER_FLAG_KEYFRAME@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_72
LBB0_65:
	testl	%ecx, (%r12)
	jne	LBB0_72
## %bb.66:
	movq	8(%r15), %rcx
	movq	_MMAL_TIME_UNKNOWN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_72
## %bb.67:
	cmpq	32(%rax), %rcx
	je	LBB0_72
## %bb.68:
	cmpq	$0, 40(%rax)
	je	LBB0_70
## %bb.69:
	movq	48(%rax), %rdx
	jmp	LBB0_71
LBB0_58:
	movl	(%r15), %ebx
LBB0_72:
	movq	%r15, %rdi
	callq	_mmal_buffer_header_mem_unlock
	movl	(%r15), %edx
	cmpl	%edx, %ebx
	je	LBB0_74
## %bb.73:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_vcos_log_error
	movl	$1, 56(%r13)
	jmp	LBB0_74
LBB0_15:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_17:
	movq	%rdx, 40(%r13)
	movl	4(%r15), %eax
LBB0_18:
	movq	_MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.19:
	movl	$-1, _encoder_buffer_callback.frame_start(%rip)
LBB0_20:
	subl	%r14d, %r12d
	movl	48(%r13), %ecx
	leal	1(%rcx), %eax
	movq	_IFRAME_BUFSIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	cltd
	idivl	%r8d
	movslq	%edx, %rax
	cmpq	%rax, 40(%r13)
	jne	LBB0_21
LBB0_26:
	movq	%r15, %rdi
	callq	_mmal_buffer_header_mem_lock
	movslq	12(%r13), %rdi
	shlq	$2, %rdi
	addq	(%r13), %rdi
	movq	16(%r15), %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movq	(%r13), %rdi
	movslq	%r14d, %rsi
	addq	16(%r15), %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_mmal_buffer_header_mem_unlock
	movl	(%r15), %eax
	addl	12(%r13), %eax
	movl	8(%r13), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_28
## %bb.27:
	movl	$1, 52(%r13)
LBB0_28:
	cltd
	idivl	%ecx
	movl	%edx, 12(%r13)
	movl	48(%r13), %ebx
	movslq	%ebx, %rax
	movq	40(%r13), %rcx
	cmpq	%rax, %rcx
	movq	_IFRAME_BUFSIZE@GOTPCREL(%rip), %r14
	je	LBB0_74
## %bb.29:
	leaq	L_.str.1(%rip), %r12
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdx
	movq	32(%r13), %rsi
	movslq	(%rsi,%rax,4), %rax
	cmpl	$0, (%rdx,%rax,4)
	jne	LBB0_34
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	$0, 4(%rdx,%rax,4)
	jne	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	$0, 8(%rdx,%rax,4)
	jne	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	$1, 12(%rdx,%rax,4)
	je	LBB0_35
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	movq	40(%r13), %rcx
LBB0_35:                                ##   in Loop: Header=BB0_30 Depth=1
	incl	%ebx
	movl	%ebx, %eax
	cltd
	idivl	(%r14)
	movl	%edx, %ebx
	movslq	%edx, %rax
	cmpq	%rax, %rcx
	jne	LBB0_30
LBB0_74:
	imulq	$1125899907, -48(%rbp), %rbx    ## 8-byte Folded Reload
                                        ## imm = 0x431BDE83
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$50, %rbx
	addl	%eax, %ebx
	cmpl	_encoder_buffer_callback.last_second(%rip), %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_77
## %bb.75:
	movq	64(%r13), %rdi
	callq	_update_annotation_data
	movl	%ebx, _encoder_buffer_callback.last_second(%rip)
LBB0_77:
	movq	%r15, %rdi
	callq	_mmal_buffer_header_release
	cmpq	$0, (%r14)
	je	LBB0_80
## %bb.78:
	movq	64(%r13), %rax
	movq	56(%rax), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_81
## %bb.79:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_mmal_port_send_buffer
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_81
LBB0_80:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_81:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vcos_log_error                 ## TAILCALL
LBB0_21:
	movl	12(%r13), %edi
	movq	32(%r13), %rsi
	movl	(%r15), %ebx
	addl	%edi, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %rax
	movl	(%rsi,%rax,4), %eax
	cmpl	%eax, %edi
	jle	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	addl	8(%r13), %eax
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=1
	cmpl	%eax, %ebx
	jle	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_22 Depth=1
	incl	%ecx
	movl	%ecx, %eax
	cltd
	idivl	%r8d
	movl	%edx, %ecx
	movl	%edx, 48(%r13)
	jmp	LBB0_22
LBB0_70:
	movq	%rcx, 48(%rax)
	movq	%rcx, %rdx
LBB0_71:
	movq	%rcx, 32(%rax)
	subq	%rdx, %rcx
	movq	72(%r13), %rdi
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	imull	$1000, %edx, %eax               ## imm = 0x3E8
	subl	%eax, %ecx
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_fprintf
	movq	64(%r13), %rax
	incq	40(%rax)
	jmp	LBB0_72
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @encoder_buffer_callback.base_time
_encoder_buffer_callback.base_time:
	.long	4294967295                      ## 0xffffffff

	.p2align	2                               ## @encoder_buffer_callback.last_second
_encoder_buffer_callback.last_second:
	.long	4294967295                      ## 0xffffffff

	.comm	_MMAL_BUFFER_HEADER_FLAG_CONFIG,4,2 ## @MMAL_BUFFER_HEADER_FLAG_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error in header bytes\n"

	.comm	_MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO,4,2 ## @MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO
	.section	__DATA,__data
	.p2align	2                               ## @encoder_buffer_callback.frame_start
_encoder_buffer_callback.frame_start:
	.long	4294967295                      ## 0xffffffff

	.comm	_MMAL_BUFFER_HEADER_FLAG_KEYFRAME,4,2 ## @MMAL_BUFFER_HEADER_FLAG_KEYFRAME
	.comm	_IFRAME_BUFSIZE,4,2             ## @IFRAME_BUFSIZE
	.comm	_MMAL_BUFFER_HEADER_FLAG_FRAME_END,4,2 ## @MMAL_BUFFER_HEADER_FLAG_FRAME_END
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Error in iframe list\n"

	.comm	_MMAL_TIME_UNKNOWN,8,3          ## @MMAL_TIME_UNKNOWN
L_.str.2:                               ## @.str.2
	.asciz	"%lld.%03lld\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to write buffer data (%d from %d)- aborting"

L_.str.4:                               ## @.str.4
	.asciz	"Received a encoder buffer callback with no state"

	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.5:                               ## @.str.5
	.asciz	"Unable to return a buffer to the encoder port"

	.no_dead_strip	_encoder_buffer_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encoder_buffer_callback
_encoder_buffer_callback:               ; @encoder_buffer_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	adrp	x22, _encoder_buffer_callback.base_time@PAGE
	ldr	w8, [x22, _encoder_buffer_callback.base_time@PAGEOFF]
	cmn	w8, #1
	b.eq	LBB0_8
; %bb.1:
	ldr	x24, [x19, #8]
	cbz	x24, LBB0_9
LBB0_2:
	bl	_get_microseconds64
	mov	x21, x0
	ldr	x0, [x24, #80]
	bl	_vcos_assert
	ldr	x8, [x24, #64]
	ldr	x8, [x8, #72]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x24, #96]
	bl	_vcos_assert
LBB0_4:
	ldr	x8, [x24]
	cbz	x8, LBB0_10
; %bb.5:
	ldp	w9, w11, [x24, #8]
	ldp	w8, w10, [x20]
	sub	w9, w9, w11
	cmp	w9, w8
	csel	w22, w9, w8, lt
Lloh0:
	adrp	x9, _MMAL_BUFFER_HEADER_FLAG_CONFIG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMAL_BUFFER_HEADER_FLAG_CONFIG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w10
	b.eq	LBB0_32
; %bb.6:
	ldr	w9, [x24, #16]
	add	w8, w9, w8
	cmp	w8, #9
	b.lo	LBB0_50
; %bb.7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_error
	b	LBB0_65
LBB0_8:
	bl	_get_microseconds64
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	w8, [x22, _encoder_buffer_callback.base_time@PAGEOFF]
	ldr	x24, [x19, #8]
	cbnz	x24, LBB0_2
LBB0_9:
Lloh5:
	adrp	x0, l_.str.4@PAGE
Lloh6:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_vcos_log_error
	b	LBB0_67
LBB0_10:
	ldr	w8, [x20, #4]
Lloh7:
	adrp	x23, _MMAL_BUFFER_HEADER_FLAG_CONFIG@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MMAL_BUFFER_HEADER_FLAG_CONFIG@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.11:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w21, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	ldr	x0, [x24, #64]
	ldr	w9, [x0]
	cbz	w9, LBB0_13
; %bb.12:
	ldr	w10, [x22, _encoder_buffer_callback.base_time@PAGEOFF]
	add	w9, w10, w9
	cmp	w8, w9
	b.gt	LBB0_15
LBB0_13:
	ldr	x9, [x0, #96]
	cbz	x9, LBB0_27
; %bb.14:
	ldr	x9, [x0, #88]
	cbz	x9, LBB0_27
LBB0_15:
	str	w8, [x22, _encoder_buffer_callback.base_time@PAGEOFF]
	str	xzr, [x0, #88]
	ldp	w8, w9, [x0, #4]
	cmp	w8, w9
	ccmp	w9, #0, #4, ge
	mov	w9, #1
	csinc	w8, w9, w8, ne
	str	w8, [x0, #4]
	ldr	x1, [x0, #80]
	cbz	x1, LBB0_19
; %bb.16:
	ldrb	w8, [x1]
	cmp	w8, #45
	b.eq	LBB0_19
; %bb.17:
	bl	_open_filename
	cbz	x0, LBB0_19
; %bb.18:
	mov	x22, x0
	ldr	x0, [x24, #80]
	bl	_fclose
	str	x22, [x24, #80]
LBB0_19:
	ldr	x0, [x24, #64]
	ldr	x1, [x0, #16]
	cbz	x1, LBB0_23
; %bb.20:
	ldrb	w8, [x1]
	cmp	w8, #45
	b.eq	LBB0_23
; %bb.21:
	bl	_open_filename
	cbz	x0, LBB0_23
; %bb.22:
	mov	x22, x0
	ldr	x0, [x24, #96]
	bl	_fclose
	str	x22, [x24, #96]
LBB0_23:
	ldr	x0, [x24, #64]
	ldr	x1, [x0, #24]
	cbz	x1, LBB0_27
; %bb.24:
	ldrb	w8, [x1]
	cmp	w8, #45
	b.eq	LBB0_27
; %bb.25:
	bl	_open_filename
	cbz	x0, LBB0_27
; %bb.26:
	mov	x22, x0
	ldr	x0, [x24, #72]
	bl	_fclose
	str	x22, [x24, #72]
LBB0_27:
	ldr	w8, [x20]
	cbz	w8, LBB0_65
; %bb.28:
	mov	x0, x20
	bl	_mmal_buffer_header_mem_lock
	ldr	w8, [x20, #4]
Lloh9:
	adrp	x9, _MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_51
; %bb.29:
	ldr	x8, [x24, #64]
	ldr	x8, [x8, #72]
	cbz	x8, LBB0_62
; %bb.30:
	ldr	x0, [x20, #16]
	ldr	w2, [x20]
	ldr	x3, [x24, #96]
	mov	w1, #1
	bl	_fwrite
	mov	x22, x0
	ldr	x8, [x24, #88]
	cbz	x8, LBB0_63
; %bb.31:
	ldr	x0, [x24, #96]
	bl	_fflush
	b	LBB0_63
LBB0_32:
Lloh12:
	adrp	x9, _MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w10
	b.ne	LBB0_65
; %bb.33:
	adrp	x9, _encoder_buffer_callback.frame_start@PAGE
	ldr	w12, [x9, _encoder_buffer_callback.frame_start@PAGEOFF]
	cmn	w12, #1
	b.ne	LBB0_35
; %bb.34:
	str	w11, [x9, _encoder_buffer_callback.frame_start@PAGEOFF]
	mov	x12, x11
LBB0_35:
Lloh15:
	adrp	x11, _MMAL_BUFFER_HEADER_FLAG_KEYFRAME@GOTPAGE
Lloh16:
	ldr	x11, [x11, _MMAL_BUFFER_HEADER_FLAG_KEYFRAME@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
Lloh18:
	adrp	x25, _IFRAME_BUFSIZE@GOTPAGE
Lloh19:
	ldr	x25, [x25, _IFRAME_BUFSIZE@GOTPAGEOFF]
	tst	w11, w10
	b.eq	LBB0_37
; %bb.36:
	ldp	x10, x11, [x24, #32]
	str	w12, [x10, x11, lsl #2]
	add	x10, x11, #1
	ldrsw	x11, [x25]
	udiv	x12, x10, x11
	msub	x10, x12, x11, x10
	str	x10, [x24, #40]
	ldr	w10, [x20, #4]
LBB0_37:
	sub	w23, w8, w22
Lloh20:
	adrp	x8, _MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_39
; %bb.38:
	mov	w8, #-1
	str	w8, [x9, _encoder_buffer_callback.frame_start@PAGEOFF]
LBB0_39:
	ldr	w9, [x24, #48]
	add	w10, w9, #1
	ldr	w8, [x25]
	sdiv	w11, w10, w8
	msub	w10, w11, w8, w10
	ldr	x11, [x24, #40]
	cmp	x11, w10, sxtw
	b.ne	LBB0_72
LBB0_40:
	mov	x0, x20
	bl	_mmal_buffer_header_mem_lock
	ldr	x8, [x24]
	ldrsw	x9, [x24, #12]
	add	x0, x8, x9, lsl #2
	ldr	x1, [x20, #16]
	mov	x2, x22
	bl	_memcpy
	ldr	x0, [x24]
	ldr	x8, [x20, #16]
	add	x1, x8, w22, sxtw
	mov	x2, x23
	bl	_memcpy
	mov	x0, x20
	bl	_mmal_buffer_header_mem_unlock
	ldr	w9, [x20]
	ldp	w8, w10, [x24, #8]
	add	w9, w9, w10
	cmp	w9, w8
	b.le	LBB0_42
; %bb.41:
	mov	w10, #1
	str	w10, [x24, #52]
LBB0_42:
	sdiv	w10, w9, w8
	msub	w8, w10, w8, w9
	str	w8, [x24, #12]
	ldr	w23, [x24, #48]
	sxtw	x9, w23
	ldr	x8, [x24, #40]
	cmp	x8, x9
	b.eq	LBB0_65
; %bb.43:
Lloh23:
	adrp	x22, l_.str.1@PAGE
Lloh24:
	add	x22, x22, l_.str.1@PAGEOFF
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
LBB0_44:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x24, #32]
	ldrsw	x10, [x10, x9, lsl #2]
	ldr	x9, [x24]
	ldr	w11, [x9, x10, lsl #2]
	cbnz	w11, LBB0_48
; %bb.45:                               ;   in Loop: Header=BB0_44 Depth=1
	add	w11, w10, #1
	ldr	w11, [x9, w11, sxtw #2]
	cbnz	w11, LBB0_48
; %bb.46:                               ;   in Loop: Header=BB0_44 Depth=1
	add	w11, w10, #2
	ldr	w11, [x9, w11, sxtw #2]
	cbnz	w11, LBB0_48
; %bb.47:                               ;   in Loop: Header=BB0_44 Depth=1
	add	w10, w10, #3
	ldr	w9, [x9, w10, sxtw #2]
	cmp	w9, #1
	b.eq	LBB0_49
LBB0_48:                                ;   in Loop: Header=BB0_44 Depth=1
	mov	x0, x22
	bl	_vcos_log_error
	ldr	x8, [x24, #40]
LBB0_49:                                ;   in Loop: Header=BB0_44 Depth=1
	add	w9, w23, #1
	ldr	w10, [x25]
	sdiv	w11, w9, w10
	msub	w23, w11, w10, w9
	sxtw	x9, w23
	cmp	x8, x9
	b.ne	LBB0_44
	b	LBB0_65
LBB0_50:
	mov	x0, x20
	bl	_mmal_buffer_header_mem_lock
	ldr	x8, [x24, #24]
	ldrsw	x9, [x24, #16]
	add	x0, x8, x9, lsl #2
	ldr	x1, [x20, #16]
	ldr	w2, [x20]
	bl	_memcpy
	mov	x0, x20
	bl	_mmal_buffer_header_mem_unlock
	ldr	w8, [x20]
	ldr	w9, [x24, #16]
	add	w8, w9, w8
	str	w8, [x24, #16]
	b	LBB0_65
LBB0_51:
	ldr	x0, [x20, #16]
	ldr	w2, [x20]
	ldr	x3, [x24, #80]
	mov	w1, #1
	bl	_fwrite
	mov	x22, x0
	ldr	x8, [x24, #88]
	cbz	x8, LBB0_53
; %bb.52:
	ldr	x0, [x24, #80]
	bl	_fflush
LBB0_53:
	ldr	x8, [x24, #64]
	ldr	x9, [x8, #64]
	cbz	x9, LBB0_63
; %bb.54:
	ldr	w9, [x20, #4]
	cbz	w9, LBB0_57
; %bb.55:
Lloh25:
	adrp	x10, _MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	and	w10, w10, w9
	cbnz	w10, LBB0_57
; %bb.56:
Lloh28:
	adrp	x10, _MMAL_BUFFER_HEADER_FLAG_KEYFRAME@GOTPAGE
Lloh29:
	ldr	x10, [x10, _MMAL_BUFFER_HEADER_FLAG_KEYFRAME@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_63
LBB0_57:
	ldr	w10, [x23]
	tst	w10, w9
	b.ne	LBB0_63
; %bb.58:
	ldr	x9, [x20, #8]
Lloh31:
	adrp	x10, _MMAL_TIME_UNKNOWN@GOTPAGE
Lloh32:
	ldr	x10, [x10, _MMAL_TIME_UNKNOWN@GOTPAGEOFF]
Lloh33:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_63
; %bb.59:
	ldr	x10, [x8, #32]
	cmp	x9, x10
	b.eq	LBB0_63
; %bb.60:
	ldr	x10, [x8, #40]
	cbz	x10, LBB0_77
; %bb.61:
	ldr	x10, [x8, #48]
	b	LBB0_78
LBB0_62:
	ldr	w22, [x20]
LBB0_63:
	mov	x0, x20
	bl	_mmal_buffer_header_mem_unlock
	ldr	w8, [x20]
	cmp	w22, w8
	b.eq	LBB0_65
; %bb.64:
	stp	x22, x8, [sp]
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_vcos_log_error
	mov	w8, #1
	str	w8, [x24, #56]
LBB0_65:
	mov	w8, #56963
	movk	w8, #17179, lsl #16
	smull	x8, w21, w8
	lsr	x9, x8, #63
	asr	x8, x8, #50
	adrp	x21, _encoder_buffer_callback.last_second@PAGE
	ldr	w10, [x21, _encoder_buffer_callback.last_second@PAGEOFF]
	add	w22, w8, w9
	cmp	w22, w10
	b.eq	LBB0_67
; %bb.66:
	ldr	x0, [x24, #64]
	bl	_update_annotation_data
	str	w22, [x21, _encoder_buffer_callback.last_second@PAGEOFF]
LBB0_67:
	mov	x0, x20
	bl	_mmal_buffer_header_release
	ldr	x8, [x19]
	cbz	x8, LBB0_70
; %bb.68:
	ldr	x8, [x24, #64]
	ldr	x8, [x8, #56]
	ldr	w0, [x8]
	bl	_mmal_queue_get
	cbz	x0, LBB0_71
; %bb.69:
	mov	x1, x0
	mov	x0, x19
	bl	_mmal_port_send_buffer
Lloh36:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_71
LBB0_70:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_71:
Lloh39:
	adrp	x0, l_.str.5@PAGE
Lloh40:
	add	x0, x0, l_.str.5@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_vcos_log_error
LBB0_72:
	ldr	w10, [x24, #12]
	ldr	x11, [x24, #32]
	ldr	w12, [x20]
	add	w12, w12, w10
LBB0_73:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11, w9, sxtw #2]
	cmp	w10, w13
	b.le	LBB0_75
; %bb.74:                               ;   in Loop: Header=BB0_73 Depth=1
	ldr	w14, [x24, #8]
	add	w13, w14, w13
LBB0_75:                                ;   in Loop: Header=BB0_73 Depth=1
	cmp	w12, w13
	b.le	LBB0_40
; %bb.76:                               ;   in Loop: Header=BB0_73 Depth=1
	add	w9, w9, #1
	sdiv	w13, w9, w8
	msub	w9, w13, w8, w9
	str	w9, [x24, #48]
	b	LBB0_73
LBB0_77:
	str	x9, [x8, #48]
	mov	x10, x9
LBB0_78:
	str	x9, [x8, #32]
	sub	w8, w9, w10
	ldr	x0, [x24, #72]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w2, w9, w10, asr #6
	mov	w9, #1000
	msub	w3, w2, w9, w8
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	ldr	x8, [x24, #64]
	ldr	x9, [x8, #40]
	add	x9, x9, #1
	str	x9, [x8, #40]
	b	LBB0_63
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @encoder_buffer_callback.base_time
_encoder_buffer_callback.base_time:
	.long	4294967295                      ; 0xffffffff

	.p2align	2                               ; @encoder_buffer_callback.last_second
_encoder_buffer_callback.last_second:
	.long	4294967295                      ; 0xffffffff

	.comm	_MMAL_BUFFER_HEADER_FLAG_CONFIG,4,2 ; @MMAL_BUFFER_HEADER_FLAG_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error in header bytes\n"

	.comm	_MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO,4,2 ; @MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO
	.section	__DATA,__data
	.p2align	2                               ; @encoder_buffer_callback.frame_start
_encoder_buffer_callback.frame_start:
	.long	4294967295                      ; 0xffffffff

	.comm	_MMAL_BUFFER_HEADER_FLAG_KEYFRAME,4,2 ; @MMAL_BUFFER_HEADER_FLAG_KEYFRAME
	.comm	_IFRAME_BUFSIZE,4,2             ; @IFRAME_BUFSIZE
	.comm	_MMAL_BUFFER_HEADER_FLAG_FRAME_END,4,2 ; @MMAL_BUFFER_HEADER_FLAG_FRAME_END
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Error in iframe list\n"

	.comm	_MMAL_TIME_UNKNOWN,8,3          ; @MMAL_TIME_UNKNOWN
l_.str.2:                               ; @.str.2
	.asciz	"%lld.%03lld\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to write buffer data (%d from %d)- aborting"

l_.str.4:                               ; @.str.4
	.asciz	"Received a encoder buffer callback with no state"

	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.5:                               ; @.str.5
	.asciz	"Unable to return a buffer to the encoder port"

	.no_dead_strip	_encoder_buffer_callback
.subsections_via_symbols
