	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_video_encoder_create
_test_video_encoder_create:             ## @test_video_encoder_create
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	$0, -48(%rbp)
	movq	_MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	12(%rdi), %edi
	leaq	-56(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_parse_vformat
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_24
LBB0_2:
	movq	-56(%rbp), %rax
	movq	_MMAL_ENCODING_JPEG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_4:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mmal_component_create
	movl	%eax, (%r14)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_5
## %bb.6:
	movq	-48(%rbp), %rax
	cmpl	$0, 20(%rax)
	je	LBB0_8
## %bb.7:
	cmpl	$0, 16(%rax)
	je	LBB0_8
## %bb.9:
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %r15
	movq	(%rcx), %r12
	movq	48(%r12), %rdi
	movq	48(%r15), %rsi
	callq	_mmal_format_copy
	movq	-56(%rbp), %rax
	movq	48(%r12), %rcx
	movq	%rax, (%rcx)
	movl	8(%r13), %eax
	movl	%eax, 8(%rcx)
	movq	%r12, %rdi
	callq	_mmal_port_format_commit
	movl	%eax, (%r14)
	cmpl	(%rbx), %eax
	jne	LBB0_10
## %bb.11:
	movq	8(%r12), %rax
	movq	16(%r12), %rcx
	cmpq	%rcx, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, (%r12)
	movq	32(%r12), %rax
	movq	40(%r12), %rcx
	cmpq	%rcx, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, 24(%r12)
	xorl	%eax, %eax
	callq	_enable_zero_copy
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movq	_MMAL_PARAMETER_ZERO_COPY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	leaq	-68(%rbp), %rsi
	movl	$1, -68(%rbp)
	movq	$0, -64(%rbp)
	movq	%r12, %rdi
	callq	_mmal_port_parameter_set
	movl	%eax, (%r14)
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %r12
	cmpl	(%rbx), %eax
	je	LBB0_15
## %bb.13:
	cmpl	(%r12), %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_23
LBB0_5:
	leaq	L_.str(%rip), %rdi
LBB0_23:
	callq	_LOG_ERROR
LBB0_24:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	callq	_mmal_component_destroy
LBB0_26:
	xorl	%eax, %eax
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
	jmp	LBB0_1
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_23
LBB0_15:
	movq	%r15, %rdi
	leaq	-68(%rbp), %rsi
	callq	_mmal_port_parameter_set
	movl	%eax, (%r14)
	cmpl	(%rbx), %eax
	je	LBB0_18
## %bb.16:
	cmpl	(%r12), %eax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_23
LBB0_18:
	leaq	L_.str.5(%rip), %rdi
	callq	_LOG_INFO
LBB0_19:
	cmpq	$0, (%r13)
	je	LBB0_21
## %bb.20:
	movq	_MMAL_ENCODING_OPAQUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	48(%r15), %rcx
	movq	%rax, (%rcx)
LBB0_21:
	movq	-48(%rbp), %rdi
	callq	_mmal_component_enable
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_28
## %bb.22:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_23
LBB0_28:
	movq	-48(%rbp), %rax
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER,8,3 ## @MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.comm	_MMAL_ENCODING_JPEG,8,3         ## @MMAL_ENCODING_JPEG
	.comm	_MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER,8,3 ## @MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't create video encoder"

L_.str.1:                               ## @.str.1
	.asciz	"video encoder doesn't have input/output ports"

L_.str.2:                               ## @.str.2
	.asciz	"format not set on video encoder output port"

	.comm	_MMAL_PARAMETER_ZERO_COPY,4,2   ## @MMAL_PARAMETER_ZERO_COPY
	.comm	_MMAL_ENOSYS,4,2                ## @MMAL_ENOSYS
L_.str.3:                               ## @.str.3
	.asciz	"failed to set zero copy on encoder output"

L_.str.4:                               ## @.str.4
	.asciz	"failed to set zero copy on encoder input"

L_.str.5:                               ## @.str.5
	.asciz	"enabled zero copy on encoder"

	.comm	_MMAL_ENCODING_OPAQUE,8,3       ## @MMAL_ENCODING_OPAQUE
L_.str.6:                               ## @.str.6
	.asciz	"video encoder component couldn't be enabled"

	.no_dead_strip	_test_video_encoder_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_video_encoder_create
_test_video_encoder_create:             ; @test_video_encoder_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #24]
Lloh0:
	adrp	x8, _MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	w0, [x0, #12]
	add	x3, sp, #16
	mov	w1, #0
	mov	w2, #0
	bl	_parse_vformat
	cbz	x0, LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [sp, #24]
	cbnz	x0, LBB0_12
	b	LBB0_13
LBB0_2:
	ldr	x8, [sp, #16]
Lloh6:
	adrp	x9, _MMAL_ENCODING_JPEG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMAL_ENCODING_JPEG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	csel	x0, x10, x21, eq
	add	x1, sp, #24
	bl	_mmal_component_create
	str	w0, [x19]
Lloh12:
	adrp	x24, _MMAL_SUCCESS@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.3:
	ldr	x8, [sp, #24]
	ldr	w9, [x8, #20]
	cbz	w9, LBB0_14
; %bb.4:
	ldr	w9, [x8, #16]
	cbz	w9, LBB0_14
; %bb.5:
	ldp	x8, x9, [x8]
	ldr	x21, [x9]
	ldr	x22, [x8]
	ldr	x0, [x22, #48]
	ldr	x1, [x21, #48]
	bl	_mmal_format_copy
	ldr	x8, [sp, #16]
	ldr	x9, [x22, #48]
	str	x8, [x9]
	ldr	w8, [x20, #8]
	str	w8, [x9, #8]
	mov	x0, x22
	bl	_mmal_port_format_commit
	str	w0, [x19]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.6:
	ldp	x8, x9, [x22, #8]
	cmp	x8, x9
	csel	x8, x8, x9, gt
	str	x8, [x22]
	ldp	x8, x9, [x22, #32]
	cmp	x8, x9
	csel	x8, x8, x9, gt
	str	x8, [x22, #24]
	bl	_enable_zero_copy
	cbz	x0, LBB0_20
; %bb.7:
Lloh14:
	adrp	x8, _MMAL_PARAMETER_ZERO_COPY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMAL_PARAMETER_ZERO_COPY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	mov	x9, sp
	orr	x23, x9, #0x4
	mov	w9, #1
	stp	w8, w9, [sp]
	str	xzr, [sp, #8]
	mov	x0, x22
	mov	x1, x23
	bl	_mmal_port_parameter_set
	str	w0, [x19]
	ldr	w8, [x24]
Lloh17:
	adrp	x22, _MMAL_ENOSYS@GOTPAGE
Lloh18:
	ldr	x22, [x22, _MMAL_ENOSYS@GOTPAGEOFF]
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.8:
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.9:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
LBB0_11:
	bl	_LOG_ERROR
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_13
LBB0_12:
	bl	_mmal_component_destroy
	mov	x0, #0
LBB0_13:
	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
	add	sp, sp, #96
	ret
LBB0_14:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_1
LBB0_15:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_16:
	mov	x0, x21
	mov	x1, x23
	bl	_mmal_port_parameter_set
	str	w0, [x19]
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_19
; %bb.17:
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_19
; %bb.18:
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_19:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_LOG_INFO
LBB0_20:
	ldr	x8, [x20]
	cbz	x8, LBB0_22
; %bb.21:
Lloh31:
	adrp	x8, _MMAL_ENCODING_OPAQUE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MMAL_ENCODING_OPAQUE@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	x9, [x21, #48]
	str	x8, [x9]
LBB0_22:
	ldr	x0, [sp, #24]
	bl	_mmal_component_enable
	str	w0, [x19]
	cbz	w0, LBB0_24
; %bb.23:
Lloh34:
	adrp	x0, l_.str.6@PAGE
Lloh35:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_11
LBB0_24:
	ldr	x0, [sp, #24]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER,8,3 ; @MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.comm	_MMAL_ENCODING_JPEG,8,3         ; @MMAL_ENCODING_JPEG
	.comm	_MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER,8,3 ; @MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't create video encoder"

l_.str.1:                               ; @.str.1
	.asciz	"video encoder doesn't have input/output ports"

l_.str.2:                               ; @.str.2
	.asciz	"format not set on video encoder output port"

	.comm	_MMAL_PARAMETER_ZERO_COPY,4,2   ; @MMAL_PARAMETER_ZERO_COPY
	.comm	_MMAL_ENOSYS,4,2                ; @MMAL_ENOSYS
l_.str.3:                               ; @.str.3
	.asciz	"failed to set zero copy on encoder output"

l_.str.4:                               ; @.str.4
	.asciz	"failed to set zero copy on encoder input"

l_.str.5:                               ; @.str.5
	.asciz	"enabled zero copy on encoder"

	.comm	_MMAL_ENCODING_OPAQUE,8,3       ; @MMAL_ENCODING_OPAQUE
l_.str.6:                               ; @.str.6
	.asciz	"video encoder component couldn't be enabled"

	.no_dead_strip	_test_video_encoder_create
.subsections_via_symbols
