	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_encode_test               ## -- Begin function mmal_encode_test
	.p2align	4, 0x90
_mmal_encode_test:                      ## @mmal_encode_test
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_encoder@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rcx
	movq	(%rcx), %r15
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rcx, 8(%rax)
	cmpq	$0, 24(%r15)
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	_mmal_wrapper_port_disable
	cmpq	(%r12), %rax
	jne	LBB0_2
LBB0_4:
	movq	_INPUT_ENC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 8(%rcx)
	movq	_WIDTH@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movl	$32, %esi
	callq	_VCOS_ALIGN_UP
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_HEIGHT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movl	$16, %esi
	callq	_VCOS_ALIGN_UP
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rcx)
	movq	(%r14), %rax
	movq	%rax, 16(%rcx)
	movq	(%rbx), %rax
	movq	%rax, 8(%rcx)
	movq	%r15, %rdi
	callq	_mmal_port_format_commit
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.6:
	movl	8(%r15), %eax
	movl	16(%r15), %ecx
	movl	%ecx, 20(%r15)
	movl	%eax, 12(%r15)
	movq	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_mmal_wrapper_port_enable
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.8:
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rsi
	movq	(%rsi), %rax
	addq	$8, %rsi
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_encoder@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	cmpq	$0, 24(%rbx)
	je	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_mmal_wrapper_port_disable
	cmpq	(%r12), %rax
	jne	LBB0_10
LBB0_11:
	movl	-48(%rbp), %eax
	movq	(%rbx), %rcx
	movl	%eax, 8(%rcx)
	movq	%rbx, %rdi
	callq	_mmal_port_format_commit
	cmpq	(%r12), %rax
	jne	LBB0_12
## %bb.13:
	movq	_MMAL_PARAMETER_JPEG_Q_FACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$100, %edx
	callq	_mmal_port_parameter_set_uint32
	movl	8(%rbx), %eax
	movl	16(%rbx), %ecx
	movl	%ecx, 20(%rbx)
	movl	%eax, 12(%rbx)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_mmal_wrapper_port_enable
	cmpq	(%r12), %rax
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_14
## %bb.15:
	leaq	L_.str.8(%rip), %rdi
	leaq	-48(%rbp), %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.9(%rip), %rsi
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_fopen
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_33
## %bb.16:
	leaq	-56(%rbp), %r14
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_17
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.11(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	testl	%r13d, %r13d
	je	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$1, %r13d
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_mmal_wrapper_buffer_get_full
	movq	_MMAL_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_sem@GOTPCREL(%rip), %rdi
	callq	_vcos_semaphore_wait
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_mmal_wrapper_buffer_get_empty
	cmpq	(%r12), %rax
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mmal_port_send_buffer
	cmpq	(%r12), %rax
	je	LBB0_17
	jmp	LBB0_19
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=1
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	leaq	-64(%rbp), %rsi
	xorl	%edx, %edx
	callq	_mmal_wrapper_buffer_get_empty
	cmpq	(%r12), %rax
	jne	LBB0_22
## %bb.25:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-64(%rbp), %rax
	movl	(%rax), %esi
	leaq	L_.str.12(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	-64(%rbp), %rax
	movl	(%rax), %esi
	movl	12(%rax), %edi
	movq	(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	callq	_create_rgba_test_image
	movq	-64(%rbp), %rsi
	movl	(%rsi), %eax
	movl	%eax, 4(%rsi)
	movq	_MMAL_BUFFER_HEADER_FLAG_EOS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rsi)
	movq	%r15, %rdi
	callq	_mmal_port_send_buffer
	movl	$1, %r13d
	cmpq	(%r12), %rax
	je	LBB0_22
	jmp	LBB0_26
LBB0_27:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpq	(%r12), %rax
	jne	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-56(%rbp), %rax
	movl	4(%rax), %esi
	leaq	L_.str.14(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	-56(%rbp), %rax
	movl	4(%rax), %edx
	movl	8(%rax), %ecx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	_MMAL_BUFFER_HEADER_FLAG_EOS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	12(%rax), %edi
	movl	$1, %esi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_fwrite
	movq	-56(%rbp), %rdi
	cmpl	4(%rdi), %eax
	jne	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_17 Depth=1
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	callq	_mmal_buffer_header_release
	testl	%r15d, -68(%rbp)                ## 4-byte Folded Reload
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_17
	jmp	LBB0_32
LBB0_26:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.11(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_32:
	movq	%rbx, %rdi
	callq	_mmal_port_flush
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
	leaq	L_.str.16(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_printf
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.13(%rip), %rsi
	jmp	LBB0_3
LBB0_30:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.15(%rip), %rsi
LBB0_3:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_3
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_3
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_3
LBB0_33:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.10(%rip), %rsi
	movl	%ebx, %edi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Encoding test image %s\n"

	.comm	_encoder,8,3                    ## @encoder
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Failed to disable input port\n"

	.comm	_INPUT_ENC,4,2                  ## @INPUT_ENC
	.comm	_WIDTH,8,3                      ## @WIDTH
	.comm	_HEIGHT,8,3                     ## @HEIGHT
L_.str.2:                               ## @.str.2
	.asciz	"Failed to commit input port format\n"

	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE,4,2 ## @MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
L_.str.3:                               ## @.str.3
	.asciz	"Failed to enable input port\n"

L_.str.4:                               ## @.str.4
	.asciz	"- input %4.4s %ux%u\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to disable output port\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to commit output port format\n"

	.comm	_MMAL_PARAMETER_JPEG_Q_FACTOR,4,2 ## @MMAL_PARAMETER_JPEG_Q_FACTOR
L_.str.7:                               ## @.str.7
	.asciz	"Failed to enable output port\n"

L_.str.8:                               ## @.str.8
	.asciz	"- output %4.4s\n"

L_.str.9:                               ## @.str.9
	.asciz	"w"

L_.str.10:                              ## @.str.10
	.asciz	"Failed to open file %s (%s)\n"

	.comm	_errno,4,2                      ## @errno
L_.str.11:                              ## @.str.11
	.asciz	"Failed to send buffer\n"

L_.str.12:                              ## @.str.12
	.asciz	"- sending %u bytes to encoder\n"

	.comm	_MMAL_BUFFER_HEADER_FLAG_EOS,4,2 ## @MMAL_BUFFER_HEADER_FLAG_EOS
	.comm	_MMAL_EAGAIN,8,3                ## @MMAL_EAGAIN
	.comm	_sem,4,2                        ## @sem
L_.str.13:                              ## @.str.13
	.asciz	"Failed to get full buffer\n"

L_.str.14:                              ## @.str.14
	.asciz	"- received %i bytes\n"

L_.str.15:                              ## @.str.15
	.asciz	"Failed to write complete buffer\n"

L_.str.16:                              ## @.str.16
	.asciz	"- written %u bytes to %s\n\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_encode_test               ; -- Begin function mmal_encode_test
	.p2align	2
_mmal_encode_test:                      ; @mmal_encode_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	str	w0, [sp, #60]
	str	x1, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh2:
	adrp	x19, _encoder@GOTPAGE
Lloh3:
	ldr	x19, [x19, _encoder@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x9, [x8, #16]
	ldr	x20, [x9]
Lloh4:
	adrp	x27, _MMAL_SUCCESS@GOTPAGE
Lloh5:
	ldr	x27, [x27, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x9, [x27]
	str	x9, [x8, #8]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_mmal_wrapper_port_disable
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_32
LBB0_2:
Lloh6:
	adrp	x8, _INPUT_ENC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INPUT_ENC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x20]
	str	w8, [x9, #8]
Lloh9:
	adrp	x21, _WIDTH@GOTPAGE
Lloh10:
	ldr	x21, [x21, _WIDTH@GOTPAGEOFF]
	ldr	x0, [x21]
	mov	w1, #32
	bl	_VCOS_ALIGN_UP
	ldr	x8, [x20]
	ldr	x8, [x8]
	str	w0, [x8]
Lloh11:
	adrp	x22, _HEIGHT@GOTPAGE
Lloh12:
	ldr	x22, [x22, _HEIGHT@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	w1, #16
	bl	_VCOS_ALIGN_UP
	ldr	x8, [x20]
	ldr	x8, [x8]
	str	w0, [x8, #4]
	stp	xzr, xzr, [x8, #24]
	ldr	x9, [x21]
	ldr	x10, [x22]
	stp	x10, x9, [x8, #8]
	mov	x0, x20
	bl	_mmal_port_format_commit
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.3:
	ldr	w8, [x20, #16]
	str	w8, [x20, #20]
	ldr	w8, [x20, #8]
	str	w8, [x20, #12]
Lloh13:
	adrp	x22, _MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPAGE
Lloh14:
	ldr	x22, [x22, _MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_mmal_wrapper_port_enable
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_28
; %bb.4:
	ldr	x8, [x20]
	ldr	x9, [x8], #8
	ldp	w10, w9, [x9]
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_mmal_wrapper_port_disable
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_33
LBB0_6:
	ldr	w8, [sp, #60]
	ldr	x9, [x21]
	str	w8, [x9, #8]
	mov	x0, x21
	bl	_mmal_port_format_commit
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_29
; %bb.7:
Lloh17:
	adrp	x8, _MMAL_PARAMETER_JPEG_Q_FACTOR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMAL_PARAMETER_JPEG_Q_FACTOR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #100
	bl	_mmal_port_parameter_set_uint32
	ldr	w8, [x21, #16]
	str	w8, [x21, #20]
	ldr	w8, [x21, #8]
	str	w8, [x21, #12]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_mmal_wrapper_port_enable
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_30
; %bb.8:
	add	x8, sp, #60
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str.8@PAGE
Lloh21:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_printf
Lloh22:
	adrp	x1, l_.str.9@PAGE
Lloh23:
	add	x1, x1, l_.str.9@PAGEOFF
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x23
	bl	_fopen
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	cbz	x0, LBB0_31
; %bb.9:
	mov	w24, #0
	mov	w28, #0
Lloh24:
	adrp	x19, _stderr@GOTPAGE
Lloh25:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
Lloh26:
	adrp	x23, l_.str.11@PAGE
Lloh27:
	add	x23, x23, l_.str.11@PAGEOFF
Lloh28:
	adrp	x22, _MMAL_EAGAIN@GOTPAGE
Lloh29:
	ldr	x22, [x22, _MMAL_EAGAIN@GOTPAGEOFF]
Lloh30:
	adrp	x25, _sem@GOTPAGE
Lloh31:
	ldr	x25, [x25, _sem@GOTPAGEOFF]
	b	LBB0_15
LBB0_10:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w0, [x19]
	mov	x1, x23
	bl	_fprintf
LBB0_11:                                ;   in Loop: Header=BB0_15 Depth=1
	cbz	w24, LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w24, #1
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x1, sp, #40
	mov	x0, x21
	mov	w2, #0
	bl	_mmal_wrapper_buffer_get_full
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x25
	bl	_vcos_semaphore_wait
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #40
	mov	x0, x21
	mov	w2, #0
	bl	_mmal_wrapper_buffer_get_empty
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x1, [sp, #40]
	mov	x0, x21
	bl	_mmal_port_send_buffer
	ldr	x8, [x27]
	cmp	x0, x8
	b.eq	LBB0_15
	b	LBB0_10
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x1, sp, #48
	mov	x0, x20
	mov	w2, #0
	bl	_mmal_wrapper_buffer_get_empty
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [sp, #48]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh32:
	adrp	x0, l_.str.12@PAGE
Lloh33:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_printf
	ldr	x8, [sp, #48]
	ldr	w0, [x8, #12]
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w2, [x8]
	bl	_create_rgba_test_image
	ldr	x1, [sp, #48]
	ldr	w8, [x1]
Lloh34:
	adrp	x9, _MMAL_BUFFER_HEADER_FLAG_EOS@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MMAL_BUFFER_HEADER_FLAG_EOS@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	stp	w8, w9, [x1, #4]
	mov	x0, x20
	bl	_mmal_port_send_buffer
	ldr	x8, [x27]
	cmp	x0, x8
	b.eq	LBB0_12
	b	LBB0_22
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_24
; %bb.20:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x19, x28
	ldr	x8, [sp, #40]
	ldr	w8, [x8, #4]
	str	x8, [sp]
Lloh37:
	adrp	x0, l_.str.14@PAGE
Lloh38:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_printf
	ldp	x3, x8, [sp, #32]               ; 8-byte Folded Reload
Lloh39:
	adrp	x9, _MMAL_BUFFER_HEADER_FLAG_EOS@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MMAL_BUFFER_HEADER_FLAG_EOS@GOTPAGEOFF]
Lloh41:
	ldr	w26, [x9]
	ldp	w28, w0, [x8, #8]
	ldr	w2, [x8, #4]
	mov	w1, #1
	bl	_fwrite
	mov	x8, x0
	ldr	x0, [sp, #40]
	ldr	w9, [x0, #4]
	cmp	w8, w9
	b.ne	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
	and	w26, w26, w28
	mov	x28, x19
	add	w28, w8, w28
	bl	_mmal_buffer_header_release
Lloh42:
	adrp	x19, _stderr@GOTPAGE
Lloh43:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	cbz	w26, LBB0_15
	b	LBB0_23
LBB0_22:
	ldr	w0, [x19]
Lloh44:
	adrp	x1, l_.str.11@PAGE
Lloh45:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_fprintf
LBB0_23:
	mov	x0, x21
	bl	_mmal_port_flush
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_fclose
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	stp	x28, x8, [sp]
Lloh46:
	adrp	x0, l_.str.16@PAGE
Lloh47:
	add	x0, x0, l_.str.16@PAGEOFF
	bl	_printf
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_24:
Lloh48:
	adrp	x8, _stderr@GOTPAGE
Lloh49:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
Lloh51:
	adrp	x1, l_.str.13@PAGE
Lloh52:
	add	x1, x1, l_.str.13@PAGEOFF
	b	LBB0_26
LBB0_25:
Lloh53:
	adrp	x8, _stderr@GOTPAGE
Lloh54:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
Lloh56:
	adrp	x1, l_.str.15@PAGE
Lloh57:
	add	x1, x1, l_.str.15@PAGEOFF
LBB0_26:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_27:
Lloh58:
	adrp	x8, _stderr@GOTPAGE
Lloh59:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh60:
	ldr	w0, [x8]
Lloh61:
	adrp	x1, l_.str.2@PAGE
Lloh62:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_28:
Lloh63:
	adrp	x8, _stderr@GOTPAGE
Lloh64:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh65:
	ldr	w0, [x8]
Lloh66:
	adrp	x1, l_.str.3@PAGE
Lloh67:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_29:
Lloh68:
	adrp	x8, _stderr@GOTPAGE
Lloh69:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh70:
	ldr	w0, [x8]
Lloh71:
	adrp	x1, l_.str.6@PAGE
Lloh72:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_26
LBB0_30:
Lloh73:
	adrp	x8, _stderr@GOTPAGE
Lloh74:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh75:
	ldr	w0, [x8]
Lloh76:
	adrp	x1, l_.str.7@PAGE
Lloh77:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_26
LBB0_31:
Lloh78:
	adrp	x8, _stderr@GOTPAGE
Lloh79:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh80:
	ldr	w20, [x8]
Lloh81:
	adrp	x8, _errno@GOTPAGE
Lloh82:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh83:
	ldr	w0, [x8]
	bl	_strerror
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	stp	x8, x0, [sp]
Lloh84:
	adrp	x1, l_.str.10@PAGE
Lloh85:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x20
	b	LBB0_26
LBB0_32:
Lloh86:
	adrp	x8, _stderr@GOTPAGE
Lloh87:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh88:
	ldr	w0, [x8]
Lloh89:
	adrp	x1, l_.str.1@PAGE
Lloh90:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_26
LBB0_33:
Lloh91:
	adrp	x8, _stderr@GOTPAGE
Lloh92:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh93:
	ldr	w0, [x8]
Lloh94:
	adrp	x1, l_.str.5@PAGE
Lloh95:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_26
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpAdd	Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Encoding test image %s\n"

	.comm	_encoder,8,3                    ; @encoder
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Failed to disable input port\n"

	.comm	_INPUT_ENC,4,2                  ; @INPUT_ENC
	.comm	_WIDTH,8,3                      ; @WIDTH
	.comm	_HEIGHT,8,3                     ; @HEIGHT
l_.str.2:                               ; @.str.2
	.asciz	"Failed to commit input port format\n"

	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE,4,2 ; @MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
l_.str.3:                               ; @.str.3
	.asciz	"Failed to enable input port\n"

l_.str.4:                               ; @.str.4
	.asciz	"- input %4.4s %ux%u\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to disable output port\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to commit output port format\n"

	.comm	_MMAL_PARAMETER_JPEG_Q_FACTOR,4,2 ; @MMAL_PARAMETER_JPEG_Q_FACTOR
l_.str.7:                               ; @.str.7
	.asciz	"Failed to enable output port\n"

l_.str.8:                               ; @.str.8
	.asciz	"- output %4.4s\n"

l_.str.9:                               ; @.str.9
	.asciz	"w"

l_.str.10:                              ; @.str.10
	.asciz	"Failed to open file %s (%s)\n"

	.comm	_errno,4,2                      ; @errno
l_.str.11:                              ; @.str.11
	.asciz	"Failed to send buffer\n"

l_.str.12:                              ; @.str.12
	.asciz	"- sending %u bytes to encoder\n"

	.comm	_MMAL_BUFFER_HEADER_FLAG_EOS,4,2 ; @MMAL_BUFFER_HEADER_FLAG_EOS
	.comm	_MMAL_EAGAIN,8,3                ; @MMAL_EAGAIN
	.comm	_sem,4,2                        ; @sem
l_.str.13:                              ; @.str.13
	.asciz	"Failed to get full buffer\n"

l_.str.14:                              ; @.str.14
	.asciz	"- received %i bytes\n"

l_.str.15:                              ; @.str.15
	.asciz	"Failed to write complete buffer\n"

l_.str.16:                              ; @.str.16
	.asciz	"- written %u bytes to %s\n\n"

.subsections_via_symbols
