	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_frame_buffer
_alloc_frame_buffer:                    ## @alloc_frame_buffer
	.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
	movl	%r9d, %r15d
	movl	%r8d, %r12d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r13
	movl	36(%rdi), %edi
	callq	_av_codec_is_encoder
	movl	%eax, %ebx
	movq	(%r14), %rsi
	movq	%rsi, 32(%r14)
	movq	(%r13), %rax
	movq	_AV_CODEC_ID_WMV3IMAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.1:
	movq	_AV_CODEC_ID_VC1IMAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.2:
	movq	_AV_CODEC_ID_MSS2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movq	_EDGE_WIDTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movdqu	16(%r13), %xmm0
	movq	%rax, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	psllq	$1, %xmm1
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 16(%rsi)
LBB0_5:
	leaq	32(%r14), %rsi
	xorl	%edx, %edx
	cmpq	$0, 24(%r14)
	je	LBB0_7
## %bb.6:
	movq	_AV_GET_BUFFER_FLAG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_7:
	movq	%r13, %rdi
	callq	_ff_thread_get_buffer
	jmp	LBB0_9
LBB0_8:
	movdqu	16(%r13), %xmm0
	movdqu	%xmm0, 16(%rsi)
	movl	32(%r13), %eax
	movl	%eax, 8(%rsi)
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_avcodec_default_get_buffer2
LBB0_9:
	movq	(%r14), %r8
	testl	%eax, %eax
	js	LBB0_29
## %bb.10:
	movq	40(%r8), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_29
## %bb.11:
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.12:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	32(%r8), %r11
	movq	(%r11), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.13:
	movq	_EDGE_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%r8), %r9
	xorl	%r10d, %r10d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	movl	%r15d, %ecx
	cmovel	%r10d, %ecx
	movl	%r12d, %eax
	cmovel	%r10d, %eax
	movl	%r14d, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	imull	(%r9,%rbx), %edx
	movl	%r14d, %esi
	movl	%eax, %ecx
	sarl	%cl, %esi
	addl	%edx, %esi
	movslq	%esi, %rax
	addq	%rdi, %rax
	movq	%rax, (%r11,%rbx,2)
	movq	8(%r11,%rbx,2), %rdi
	addq	$4, %rbx
	testq	%rdi, %rdi
	jne	LBB0_14
LBB0_15:
	movdqu	16(%r13), %xmm0
	movdqu	%xmm0, 16(%r8)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_16:
	cmpq	$0, 8(%r13)
	je	LBB0_20
## %bb.17:
	xorl	%edi, %edi
	cmpq	$0, 16(%r14)
	sete	%dil
	callq	_assert
	movq	8(%r13), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.18:
	callq	_av_buffer_allocz
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_34
## %bb.19:
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
LBB0_20:
	movl	24(%rbp), %r9d
	movl	16(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.21:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %r8d
	cmpl	%ecx, %r8d
	jne	LBB0_30
LBB0_22:
	movq	(%r14), %rdx
	testl	%r9d, %r9d
	je	LBB0_24
## %bb.23:
	movq	(%rdx), %rsi
	movl	4(%rsi), %eax
	cmpl	%r9d, %eax
	jne	LBB0_31
LBB0_24:
	movl	8(%rdx), %edi
	callq	_av_pix_fmt_count_planes
	cmpl	$3, %eax
	jl	LBB0_26
## %bb.25:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	4(%rax), %ecx
	cmpl	8(%rax), %ecx
	jne	LBB0_37
LBB0_26:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpl	$0, (%rdx)
	jne	LBB0_36
## %bb.27:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_ff_mpeg_framesize_alloc
	testl	%eax, %eax
	jns	LBB0_36
## %bb.28:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ff_mpeg_unref_picture
	movl	%r15d, %ebx
	jmp	LBB0_36
LBB0_29:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	32(%r8), %rcx
	movq	(%rcx), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_35
LBB0_30:
	movl	4(%rax), %eax
	jmp	LBB0_32
LBB0_31:
	movl	(%rsi), %r8d
LBB0_32:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%eax, (%rsp)
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_33:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ff_mpeg_unref_picture
	jmp	LBB0_35
LBB0_34:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_35:
	movl	$-1, %ebx
LBB0_36:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_37:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_WMV3IMAGE,8,3      ## @AV_CODEC_ID_WMV3IMAGE
	.comm	_AV_CODEC_ID_VC1IMAGE,8,3       ## @AV_CODEC_ID_VC1IMAGE
	.comm	_AV_CODEC_ID_MSS2,8,3           ## @AV_CODEC_ID_MSS2
	.comm	_EDGE_WIDTH,4,2                 ## @EDGE_WIDTH
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ## @AV_GET_BUFFER_FLAG_REF
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get_buffer() failed (%d %p)\n"

L_.str.1:                               ## @.str.1
	.asciz	"alloc_frame_buffer() failed (hwaccel private data allocation)\n"

L_.str.2:                               ## @.str.2
	.asciz	"get_buffer() failed (stride changed: linesize=%d/%d uvlinesize=%d/%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"get_buffer() failed (uv stride mismatch)\n"

L_.str.4:                               ## @.str.4
	.asciz	"get_buffer() failed to allocate context scratch buffers.\n"

	.no_dead_strip	_alloc_frame_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_frame_buffer
_alloc_frame_buffer:                    ; @alloc_frame_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x7
	mov	x21, x6
	mov	x25, x5
	mov	x26, x4
	mov	x23, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #36]
	bl	_av_codec_is_encoder
	mov	x27, x0
	ldr	x1, [x20]
	mov	x8, x20
	str	x1, [x8, #32]!
	ldr	x9, [x19]
Lloh0:
	adrp	x10, _AV_CODEC_ID_WMV3IMAGE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_CODEC_ID_WMV3IMAGE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _AV_CODEC_ID_VC1IMAGE@GOTPAGE
Lloh4:
	ldr	x11, [x11, _AV_CODEC_ID_VC1IMAGE@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
Lloh6:
	adrp	x12, _AV_CODEC_ID_MSS2@GOTPAGE
Lloh7:
	ldr	x12, [x12, _AV_CODEC_ID_MSS2@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	ccmp	x9, x12, #4, ne
	b.ne	LBB0_2
; %bb.1:
	ldr	q0, [x19, #16]
	str	q0, [x1, #16]
	ldr	w8, [x19, #32]
	str	w8, [x1, #8]
	mov	x0, x19
	mov	w2, #0
	bl	_avcodec_default_get_buffer2
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20]
	tbz	w0, #31, LBB0_5
	b	LBB0_24
LBB0_2:
	cbz	w27, LBB0_4
; %bb.3:
Lloh9:
	adrp	x9, _EDGE_WIDTH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EDGE_WIDTH@GOTPAGEOFF]
Lloh11:
	ldrsw	x9, [x9]
	lsl	x9, x9, #1
	ldr	q0, [x19, #16]
	dup.2d	v1, x9
	add.2d	v0, v0, v1
	str	q0, [x1, #16]
LBB0_4:
	ldr	x9, [x20, #24]
Lloh12:
	adrp	x10, _AV_GET_BUFFER_FLAG_REF@GOTPAGE
Lloh13:
	ldr	x10, [x10, _AV_GET_BUFFER_FLAG_REF@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w2, wzr, w10, eq
	mov	x0, x19
	mov	x1, x8
	bl	_ff_thread_get_buffer
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20]
	tbnz	w0, #31, LBB0_24
LBB0_5:
	ldr	x9, [x8, #40]
	ldr	w9, [x9]
	cbz	w9, LBB0_24
; %bb.6:
	cbz	w27, LBB0_11
; %bb.7:
	ldr	x9, [x8, #32]
	ldr	x11, [x9]
	cbz	x11, LBB0_10
; %bb.8:
	mov	x10, #0
Lloh15:
	adrp	x12, _EDGE_WIDTH@GOTPAGE
Lloh16:
	ldr	x12, [x12, _EDGE_WIDTH@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	ldr	x13, [x8]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x14, x9, x10, lsl #3
	cmp	x10, #0
	csel	w15, wzr, w25, eq
	asr	w15, w12, w15
	ldr	w16, [x13, x10, lsl #2]
	csel	w17, wzr, w26, eq
	asr	w17, w12, w17
	madd	w15, w16, w15, w17
	add	x11, x11, w15, sxtw
	str	x11, [x14]
	add	x10, x10, #1
	ldr	x11, [x14, #8]
	cbnz	x11, LBB0_9
LBB0_10:
	ldr	q0, [x19, #16]
	str	q0, [x8, #16]
LBB0_11:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.12:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_15
; %bb.13:
	bl	_av_buffer_allocz
	str	x0, [x20, #8]
	cbz	x0, LBB0_32
; %bb.14:
	ldr	x8, [x0]
	str	x8, [x20, #16]
LBB0_15:
	cbz	w21, LBB0_17
; %bb.16:
	ldr	x8, [x20]
	ldr	x9, [x8]
	ldr	w8, [x9]
	cmp	w8, w21
	b.ne	LBB0_26
LBB0_17:
	ldr	x8, [x20]
	cbz	w22, LBB0_19
; %bb.18:
	ldr	x10, [x8]
	ldr	w9, [x10, #4]
	cmp	w9, w22
	b.ne	LBB0_27
LBB0_19:
	ldr	w0, [x8, #8]
	bl	_av_pix_fmt_count_planes
	cmp	w0, #3
	b.lt	LBB0_21
; %bb.20:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldp	w9, w8, [x8, #4]
	cmp	w9, w8
	b.ne	LBB0_33
LBB0_21:
	ldr	w8, [x23]
	cbnz	w8, LBB0_23
; %bb.22:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_ff_mpeg_framesize_alloc
	tbnz	w0, #31, LBB0_34
LBB0_23:
	mov	w21, #0
	b	LBB0_31
LBB0_24:
Lloh18:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	ldr	x8, [x8, #32]
	ldr	x8, [x8]
	stp	x0, x8, [sp]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
LBB0_25:
	mov	x0, x19
	bl	_av_log
	b	LBB0_30
LBB0_26:
	ldr	w9, [x9, #4]
	b	LBB0_28
LBB0_27:
	ldr	w8, [x10]
LBB0_28:
Lloh23:
	adrp	x10, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x10, [x10, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x10]
	stp	x22, x9, [sp, #16]
	stp	x21, x8, [sp]
Lloh26:
	adrp	x2, l_.str.2@PAGE
Lloh27:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_29:
	mov	x0, x19
	bl	_av_log
	mov	x0, x19
	mov	x1, x20
	bl	_ff_mpeg_unref_picture
LBB0_30:
	mov	w21, #-1
LBB0_31:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_32:
Lloh28:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.1@PAGE
Lloh32:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_25
LBB0_33:
Lloh33:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x2, l_.str.3@PAGE
Lloh37:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_29
LBB0_34:
	mov	x21, x0
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.4@PAGE
Lloh42:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	x0, x19
	mov	x1, x20
	bl	_ff_mpeg_unref_picture
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_WMV3IMAGE,8,3      ; @AV_CODEC_ID_WMV3IMAGE
	.comm	_AV_CODEC_ID_VC1IMAGE,8,3       ; @AV_CODEC_ID_VC1IMAGE
	.comm	_AV_CODEC_ID_MSS2,8,3           ; @AV_CODEC_ID_MSS2
	.comm	_EDGE_WIDTH,4,2                 ; @EDGE_WIDTH
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ; @AV_GET_BUFFER_FLAG_REF
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get_buffer() failed (%d %p)\n"

l_.str.1:                               ; @.str.1
	.asciz	"alloc_frame_buffer() failed (hwaccel private data allocation)\n"

l_.str.2:                               ; @.str.2
	.asciz	"get_buffer() failed (stride changed: linesize=%d/%d uvlinesize=%d/%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"get_buffer() failed (uv stride mismatch)\n"

l_.str.4:                               ; @.str.4
	.asciz	"get_buffer() failed to allocate context scratch buffers.\n"

	.no_dead_strip	_alloc_frame_buffer
.subsections_via_symbols
