	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mediacodec_dec_init         ## -- Begin function ff_mediacodec_dec_init
	.p2align	4, 0x90
_ff_mediacodec_dec_init:                ## @ff_mediacodec_dec_init
	.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	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rdi, 56(%rsi)
	leaq	48(%rsi), %rdi
	movl	$1, %esi
	callq	_atomic_init
	leaq	44(%r13), %rdi
	xorl	%esi, %esi
	callq	_atomic_init
	leaq	40(%r13), %rdi
	movl	$1, %esi
	callq	_atomic_init
	movl	$-1, (%r13)
	leaq	_ff_mediacodec_dec_init.pix_fmts(%rip), %rsi
	movq	%r14, %rdi
	callq	_ff_get_format
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.1:
	movq	(%r14), %rax
	movq	8(%r14), %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	_AV_HWDEVICE_TYPE_MEDIACODEC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_ff_mediacodec_surface_ref
	movq	%rax, 32(%r13)
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_av_log
LBB0_5:
	cmpq	$0, 32(%r13)
	jne	LBB0_9
## %bb.6:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.7:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	movq	%r14, %rsi
	callq	_ff_mediacodec_surface_ref
	movq	%rax, 32(%r13)
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_av_log
LBB0_9:
	movq	%r14, %rdi
	callq	_ff_AMediaCodecProfile_getProfileFromAVCodecContext
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_11:
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_ff_AMediaCodecList_getCodecNameByType
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_av_log
	movq	24(%r13), %rdi
	callq	_ff_AMediaCodec_createCodecByName
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	32(%r13), %rdx
	movq	%rax, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ff_AMediaCodec_configure
	testl	%eax, %eax
	js	LBB0_16
## %bb.18:
	movq	8(%r13), %rdi
	callq	_ff_AMediaCodec_start
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movq	8(%r13), %rdi
	callq	_ff_AMediaCodec_getOutputFormat
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_25
## %bb.21:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_mediacodec_dec_parse_format
	testl	%eax, %eax
	js	LBB0_22
LBB0_25:
	movl	(%rbx), %esi
	movq	8(%r13), %rcx
	leaq	L_.str.7(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_24
LBB0_14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%r13), %r8
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_12
LBB0_16:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_ff_AMediaFormat_toString
	movq	%rax, -48(%rbp)
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	24(%r13), %rcx
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_17
LBB0_19:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_ff_AMediaFormat_toString
	movq	%rax, -48(%rbp)
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	24(%r13), %rcx
	leaq	L_.str.5(%rip), %rdx
LBB0_17:
	movq	%r14, %rdi
	movl	%r12d, %r8d
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_av_log
	leaq	-48(%rbp), %rdi
	callq	_av_freep
LBB0_12:
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_23:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r13), %rcx
	leaq	L_.str.8(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ff_mediacodec_dec_close
LBB0_24:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @ff_mediacodec_dec_init.pix_fmts
_ff_mediacodec_dec_init.pix_fmts:
	.long	129                             ## 0x81
	.long	128                             ## 0x80

	.comm	_AV_HWDEVICE_TYPE_MEDIACODEC,8,3 ## @AV_HWDEVICE_TYPE_MEDIACODEC
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Using surface %p\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported or unknown profile\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.2:                               ## @.str.2
	.asciz	"Found decoder %s\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create media decoder for type %s and name %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to configure codec %s (status = %d) with format %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to start codec %s (status = %d) with format %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to configure context\n"

L_.str.7:                               ## @.str.7
	.asciz	"MediaCodec %p started successfully\n"

L_.str.8:                               ## @.str.8
	.asciz	"MediaCodec %p failed to start\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mediacodec_dec_init         ; -- Begin function ff_mediacodec_dec_init
	.p2align	2
_ff_mediacodec_dec_init:                ; @ff_mediacodec_dec_init
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	str	x0, [x1, #56]
	add	x0, x1, #48
	mov	w1, #1
	bl	_atomic_init
	add	x0, x20, #44
	mov	w1, #0
	bl	_atomic_init
	add	x0, x20, #40
	mov	w1, #1
	bl	_atomic_init
	mov	w8, #-1
	str	w8, [x20]
Lloh0:
	adrp	x1, _ff_mediacodec_dec_init.pix_fmts@PAGE
Lloh1:
	add	x1, x1, _ff_mediacodec_dec_init.pix_fmts@PAGEOFF
	mov	x0, x19
	bl	_ff_get_format
	cmp	w0, #129
	b.ne	LBB0_9
; %bb.1:
	ldp	x8, x23, [x19]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x8, [x8]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _AV_HWDEVICE_TYPE_MEDIACODEC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_HWDEVICE_TYPE_MEDIACODEC@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x0, [x8]
	mov	x1, x19
	bl	_ff_mediacodec_surface_ref
	str	x0, [x20, #32]
Lloh5:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_5:
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_9
; %bb.6:
	cbz	x23, LBB0_9
; %bb.7:
	ldr	x0, [x23]
	cbz	x0, LBB0_9
; %bb.8:
	mov	x1, x19
	bl	_ff_mediacodec_surface_ref
	str	x0, [x20, #32]
Lloh10:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_9:
	mov	x0, x19
	bl	_ff_AMediaCodecProfile_getProfileFromAVCodecContext
	mov	x23, x0
	tbz	w0, #31, LBB0_11
; %bb.10:
Lloh15:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_11:
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	mov	x3, x19
	bl	_ff_AMediaCodecList_getCodecNameByType
	str	x0, [x20, #24]
	cbz	x0, LBB0_22
; %bb.12:
Lloh20:
	adrp	x23, _AV_LOG_DEBUG@GOTPAGE
Lloh21:
	ldr	x23, [x23, _AV_LOG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x23]
	str	x0, [sp]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	x0, [x20, #24]
	bl	_ff_AMediaCodec_createCodecByName
	str	x0, [x20, #8]
	cbz	x0, LBB0_18
; %bb.13:
	ldr	x2, [x20, #32]
	mov	x1, x21
	mov	x3, #0
	mov	w4, #0
	bl	_ff_AMediaCodec_configure
	tbnz	w0, #31, LBB0_19
; %bb.14:
	ldr	x0, [x20, #8]
	bl	_ff_AMediaCodec_start
	tbnz	w0, #31, LBB0_20
; %bb.15:
	ldr	x0, [x20, #8]
	bl	_ff_AMediaCodec_getOutputFormat
	str	x0, [x20, #16]
	cbz	x0, LBB0_17
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	bl	_mediacodec_dec_parse_format
	tbnz	w0, #31, LBB0_25
LBB0_17:
	ldr	w1, [x23]
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh24:
	adrp	x2, l_.str.7@PAGE
Lloh25:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w21, #0
	b	LBB0_24
LBB0_18:
Lloh26:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	x8, [x20, #24]
	stp	x22, x8, [sp]
Lloh29:
	adrp	x2, l_.str.3@PAGE
Lloh30:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_22
LBB0_19:
	mov	x22, x0
	mov	x0, x21
	bl	_ff_AMediaFormat_toString
	str	x0, [sp, #24]
Lloh31:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	x8, [x20, #24]
	stp	x22, x0, [sp, #8]
	str	x8, [sp]
Lloh34:
	adrp	x2, l_.str.4@PAGE
Lloh35:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_21
LBB0_20:
	mov	x22, x0
	mov	x0, x21
	bl	_ff_AMediaFormat_toString
	str	x0, [sp, #24]
Lloh36:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	ldr	x8, [x20, #24]
	stp	x22, x0, [sp, #8]
	str	x8, [sp]
Lloh39:
	adrp	x2, l_.str.5@PAGE
Lloh40:
	add	x2, x2, l_.str.5@PAGEOFF
LBB0_21:
	mov	x0, x19
	bl	_av_log
	add	x0, sp, #24
	bl	_av_freep
LBB0_22:
Lloh41:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh43:
	ldr	w21, [x8]
LBB0_23:
Lloh44:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh47:
	adrp	x2, l_.str.8@PAGE
Lloh48:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	x0, x19
	mov	x1, x20
	bl	_ff_mediacodec_dec_close
LBB0_24:
	mov	x0, x21
	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_25:
	mov	x21, x0
Lloh49:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x2, l_.str.6@PAGE
Lloh53:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_23
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @ff_mediacodec_dec_init.pix_fmts
_ff_mediacodec_dec_init.pix_fmts:
	.long	129                             ; 0x81
	.long	128                             ; 0x80

	.comm	_AV_HWDEVICE_TYPE_MEDIACODEC,8,3 ; @AV_HWDEVICE_TYPE_MEDIACODEC
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Using surface %p\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported or unknown profile\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.2:                               ; @.str.2
	.asciz	"Found decoder %s\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create media decoder for type %s and name %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to configure codec %s (status = %d) with format %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to start codec %s (status = %d) with format %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to configure context\n"

l_.str.7:                               ; @.str.7
	.asciz	"MediaCodec %p started successfully\n"

l_.str.8:                               ; @.str.8
	.asciz	"MediaCodec %p failed to start\n"

.subsections_via_symbols
