	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_to_container_format
_mmal_to_container_format:              ## @mmal_to_container_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_mmal_to_container_es_type
	movq	%rax, (%r14)
	movq	_VC_CONTAINER_ES_TYPE_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_2:
	movq	8(%rbx), %rdi
	callq	_mmal_to_container_encoding
	movl	%eax, 44(%r14)
	movq	8(%rbx), %rdi
	movl	40(%rbx), %esi
	callq	_mmal_to_container_variant
	movl	%eax, 32(%r14)
	movl	44(%rbx), %eax
	movl	%eax, 40(%r14)
	movl	$0, 36(%r14)
	movq	_MMAL_ES_FORMAT_FLAG_FRAMED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_4
## %bb.3:
	movq	_VC_CONTAINER_ES_FORMAT_FLAG_FRAMED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
LBB0_4:
	movq	24(%r14), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	8(%rbx), %rax
	movq	_MMAL_ENCODING_H264@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:
	cmpl	$0, 40(%rbx)
	jne	LBB0_9
## %bb.6:
	cmpl	$5, 20(%rbx)
	jl	LBB0_9
## %bb.7:
	movq	24(%rbx), %rax
	cmpl	$1, (%rax)
	jne	LBB0_9
## %bb.8:
	movq	_VC_CONTAINER_VARIANT_H264_AVC1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
LBB0_9:
	movl	(%rbx), %esi
	cmpl	$129, %esi
	je	LBB0_12
## %bb.10:
	cmpl	$128, %esi
	jne	LBB0_13
## %bb.11:
	movq	32(%rbx), %rax
	movl	36(%rax), %ecx
	movq	24(%r14), %rdx
	movl	%ecx, 36(%rdx)
	movl	32(%rax), %ecx
	movl	%ecx, 32(%rdx)
	movups	16(%rax), %xmm0
	movups	%xmm0, 16(%rdx)
	jmp	LBB0_14
LBB0_12:
	movq	32(%rbx), %rax
	movq	24(%r14), %rcx
	movups	(%rax), %xmm0
	movups	%xmm0, (%rcx)
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_LOG_ERROR
LBB0_14:
	movl	20(%rbx), %eax
	movl	%eax, 8(%r14)
	movq	24(%rbx), %rax
	movq	%rax, 16(%r14)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ES_TYPE_UNKNOWN,8,3 ## @VC_CONTAINER_ES_TYPE_UNKNOWN
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.comm	_MMAL_ES_FORMAT_FLAG_FRAMED,4,2 ## @MMAL_ES_FORMAT_FLAG_FRAMED
	.comm	_VC_CONTAINER_ES_FORMAT_FLAG_FRAMED,4,2 ## @VC_CONTAINER_ES_FORMAT_FLAG_FRAMED
	.comm	_MMAL_ENCODING_H264,8,3         ## @MMAL_ENCODING_H264
	.comm	_VC_CONTAINER_VARIANT_H264_AVC1,4,2 ## @VC_CONTAINER_VARIANT_H264_AVC1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"format es type not handled (%i)"

	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.no_dead_strip	_mmal_to_container_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_to_container_format
_mmal_to_container_format:              ; @mmal_to_container_format
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1]
	bl	_mmal_to_container_es_type
	str	x0, [x19]
Lloh0:
	adrp	x8, _VC_CONTAINER_ES_TYPE_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_ES_TYPE_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
	ldr	x0, [x20, #8]
	bl	_mmal_to_container_encoding
	str	w0, [x19, #44]
	ldr	x0, [x20, #8]
	ldr	w1, [x20, #40]
	bl	_mmal_to_container_variant
	ldr	w8, [x20, #44]
	stp	wzr, w8, [x19, #36]
	str	w0, [x19, #32]
	ldr	w8, [x20, #16]
Lloh5:
	adrp	x9, _MMAL_ES_FORMAT_FLAG_FRAMED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MMAL_ES_FORMAT_FLAG_FRAMED@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _VC_CONTAINER_ES_FORMAT_FLAG_FRAMED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VC_CONTAINER_ES_FORMAT_FLAG_FRAMED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #36]
LBB0_4:
	ldr	x0, [x19, #24]
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	x8, [x20, #8]
Lloh11:
	adrp	x9, _MMAL_ENCODING_H264@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MMAL_ENCODING_H264@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	ldr	w8, [x20, #40]
	cbnz	w8, LBB0_9
; %bb.6:
	ldr	w8, [x20, #20]
	cmp	w8, #5
	b.lt	LBB0_9
; %bb.7:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:
Lloh14:
	adrp	x8, _VC_CONTAINER_VARIANT_H264_AVC1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VC_CONTAINER_VARIANT_H264_AVC1@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #32]
LBB0_9:
	ldr	w1, [x20]
	cmp	w1, #129
	b.eq	LBB0_12
; %bb.10:
	cmp	w1, #128
	b.ne	LBB0_13
; %bb.11:
	ldr	x8, [x20, #32]
	ldr	x9, [x19, #24]
	ldr	d0, [x8, #32]
	str	d0, [x9, #32]
	ldr	q0, [x8, #16]
	str	q0, [x9, #16]
	b	LBB0_14
LBB0_12:
	ldr	x8, [x20, #32]
	ldr	x9, [x19, #24]
	ldr	q0, [x8]
	str	q0, [x9]
	b	LBB0_14
LBB0_13:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_ERROR
LBB0_14:
	ldr	w8, [x20, #20]
	str	w8, [x19, #8]
	ldr	x8, [x20, #24]
	str	x8, [x19, #16]
Lloh19:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ES_TYPE_UNKNOWN,8,3 ; @VC_CONTAINER_ES_TYPE_UNKNOWN
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.comm	_MMAL_ES_FORMAT_FLAG_FRAMED,4,2 ; @MMAL_ES_FORMAT_FLAG_FRAMED
	.comm	_VC_CONTAINER_ES_FORMAT_FLAG_FRAMED,4,2 ; @VC_CONTAINER_ES_FORMAT_FLAG_FRAMED
	.comm	_MMAL_ENCODING_H264,8,3         ; @MMAL_ENCODING_H264
	.comm	_VC_CONTAINER_VARIANT_H264_AVC1,4,2 ; @VC_CONTAINER_VARIANT_H264_AVC1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"format es type not handled (%i)"

	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.no_dead_strip	_mmal_to_container_format
.subsections_via_symbols
