	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmjpeg_configure_decoder
_brcmjpeg_configure_decoder:            ## @brcmjpeg_configure_decoder
	.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
	pushq	%rax
	.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, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movl	8(%rsi), %edi
	callq	_brcmjpeg_pixfmt_to_encoding
	movq	%rax, %r15
	movq	_MMAL_ENCODING_I420@GOTPCREL(%rip), %rax
	movq	_MMAL_ENCODING_I422@GOTPCREL(%rip), %rcx
	movq	_MMAL_ENCODING_RGBA@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	cmpq	(%rdx), %r15
	je	LBB0_2
## %bb.1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
LBB0_2:
	cmpq	(%rcx), %r15
	cmoveq	%rbx, %rdi
	cmpq	(%rax), %r15
	cmoveq	%rbx, %rdi
	movq	_OUTPUT_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_CHECK_MMAL_STATUS
	movq	$0, 8(%r12)
	movq	(%r13), %rax
	movq	(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	(%rcx), %rax
	movq	(%rax), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_mmal_wrapper_port_disable
	movq	_EXECUTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rax, %rdi
	callq	_CHECK_MMAL_STATUS
LBB0_4:
	movq	8(%rbx), %rax
	movq	%r15, 8(%rax)
	movq	(%rax), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movups	%xmm0, (%rax)
	movq	%rbx, %rdi
	callq	_mmal_port_format_commit
	movq	_OUTPUT_FORMAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rax, %rdi
	callq	_CHECK_MMAL_STATUS
	movl	$1, (%rbx)
	cmpq	$0, (%r14)
	jne	LBB0_5
## %bb.6:
	movq	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mmal_wrapper_port_enable
	movq	_EXECUTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rax, %rdi
	callq	_CHECK_MMAL_STATUS
	movq	8(%rbx), %rsi
	movq	(%rsi), %rax
	addq	$8, %rsi
	movq	24(%rax), %rdx
	movq	16(%rax), %rcx
	movq	(%rax), %r9
	movq	8(%rax), %r8
	leaq	L_.str.4(%rip), %rdi
	callq	_LOG_DEBUG
	movq	_BRCMJPEG_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.comm	_BRCMJPEG_SUCCESS,4,2           ## @BRCMJPEG_SUCCESS
	.comm	_MMAL_ENCODING_I420,8,3         ## @MMAL_ENCODING_I420
	.comm	_MMAL_ENCODING_I422,8,3         ## @MMAL_ENCODING_I422
	.comm	_MMAL_ENCODING_RGBA,8,3         ## @MMAL_ENCODING_RGBA
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.comm	_OUTPUT_FORMAT,4,2              ## @OUTPUT_FORMAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"format not supported"

	.comm	_EXECUTE,4,2                    ## @EXECUTE
L_.str.1:                               ## @.str.1
	.asciz	"failed to disable output port"

L_.str.2:                               ## @.str.2
	.asciz	"failed to commit output port format"

	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY,4,2 ## @MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY
	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE,4,2 ## @MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
L_.str.3:                               ## @.str.3
	.asciz	"failed to enable output port"

L_.str.4:                               ## @.str.4
	.asciz	"decoder configured (%4.4s:%ux%u|%ux%u)"

	.no_dead_strip	_brcmjpeg_configure_decoder
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmjpeg_configure_decoder
_brcmjpeg_configure_decoder:            ; @brcmjpeg_configure_decoder
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _MMAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x23, [x22]
	ldr	w0, [x1, #8]
	bl	_brcmjpeg_pixfmt_to_encoding
	mov	x21, x0
Lloh2:
	adrp	x8, _MMAL_ENCODING_I420@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMAL_ENCODING_I420@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _MMAL_ENCODING_I422@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MMAL_ENCODING_I422@GOTPAGEOFF]
Lloh7:
	adrp	x10, _MMAL_ENCODING_RGBA@GOTPAGE
Lloh8:
	ldr	x10, [x10, _MMAL_ENCODING_RGBA@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	ldr	x10, [x10]
	cmp	x0, x10
	ccmp	x0, x9, #4, ne
Lloh11:
	adrp	x9, _MMAL_EINVAL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MMAL_EINVAL@GOTPAGEOFF]
	ccmp	x0, x8, #4, ne
Lloh13:
	ldr	x8, [x9]
	csel	x0, x23, x8, eq
Lloh14:
	adrp	x23, _OUTPUT_FORMAT@GOTPAGE
Lloh15:
	ldr	x23, [x23, _OUTPUT_FORMAT@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	bl	_CHECK_MMAL_STATUS
	str	xzr, [x20, #8]
	ldr	x8, [x22]
	ldr	x9, [x20]
	str	x8, [x9, #8]
	ldr	x8, [x9]
	ldr	x20, [x8]
	ldr	x8, [x20, #16]
Lloh18:
	adrp	x22, _EXECUTE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _EXECUTE@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_mmal_wrapper_port_disable
	ldr	w1, [x22]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_CHECK_MMAL_STATUS
LBB0_2:
	ldr	x8, [x20, #8]
	str	x21, [x8, #8]
	ldr	x8, [x8]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x8]
	mov	x0, x20
	bl	_mmal_port_format_commit
	ldr	w1, [x23]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_CHECK_MMAL_STATUS
	mov	w8, #1
	str	w8, [x20]
Lloh24:
	adrp	x8, _MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh26:
	adrp	x10, _MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY@GOTPAGE
Lloh27:
	ldr	x10, [x10, _MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mmal_wrapper_port_enable
	ldr	w1, [x22]
Lloh28:
	adrp	x2, l_.str.3@PAGE
Lloh29:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_CHECK_MMAL_STATUS
	ldr	x1, [x20, #8]
	ldr	x8, [x1], #8
	ldp	x3, x2, [x8, #16]
	ldp	x5, x4, [x8]
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_LOG_DEBUG
Lloh32:
	adrp	x8, _BRCMJPEG_SUCCESS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BRCMJPEG_SUCCESS@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.comm	_BRCMJPEG_SUCCESS,4,2           ; @BRCMJPEG_SUCCESS
	.comm	_MMAL_ENCODING_I420,8,3         ; @MMAL_ENCODING_I420
	.comm	_MMAL_ENCODING_I422,8,3         ; @MMAL_ENCODING_I422
	.comm	_MMAL_ENCODING_RGBA,8,3         ; @MMAL_ENCODING_RGBA
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.comm	_OUTPUT_FORMAT,4,2              ; @OUTPUT_FORMAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"format not supported"

	.comm	_EXECUTE,4,2                    ; @EXECUTE
l_.str.1:                               ; @.str.1
	.asciz	"failed to disable output port"

l_.str.2:                               ; @.str.2
	.asciz	"failed to commit output port format"

	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY,4,2 ; @MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY
	.comm	_MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE,4,2 ; @MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
l_.str.3:                               ; @.str.3
	.asciz	"failed to enable output port"

l_.str.4:                               ; @.str.4
	.asciz	"decoder configured (%4.4s:%ux%u|%ux%u)"

	.no_dead_strip	_brcmjpeg_configure_decoder
.subsections_via_symbols
