	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function librav1e_send_frame
_librav1e_send_frame:                   ## @librav1e_send_frame
	.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	%rdi, %rbx
	movq	(%rdi), %r14
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r13
	movl	24(%rsi), %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, %r12
	movl	(%r14), %edi
	callq	_rav1e_frame_new
	testq	%rax, %rax
	je	LBB0_18
## %bb.3:
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.4:
	movq	8(%r12), %rax
	xorl	%ecx, %ecx
	cmpl	$8, (%rax)
	sete	%cl
	movl	$2, %r9d
	subl	%ecx, %r9d
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %r8d
	movl	(%r13), %ecx
	imull	%r8d, %ecx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_rav1e_frame_fill_plane
	cmpl	$2, (%r12)
	jl	LBB0_7
## %bb.5:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	4(%r12), %ecx
	movq	8(%r12), %rax
	xorl	%edx, %edx
	cmpl	$8, (%rax)
	sete	%dl
	movl	$2, %r9d
	subl	%edx, %r9d
	movq	16(%r13), %rdx
	movl	(%r13), %eax
	sarl	%cl, %eax
	movl	(%rdx,%rbx,4), %edx
	movq	8(%r13), %rcx
	movl	(%rcx,%rbx,4), %r8d
	imull	%r8d, %eax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_rav1e_frame_fill_plane
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_rav1e_send_frame
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_rav1e_frame_unref
	cmpl	$128, %ebx
	je	LBB0_9
LBB0_10:
	cmpl	$129, %ebx
	je	LBB0_14
## %bb.11:
	cmpl	$130, %ebx
	jne	LBB0_15
## %bb.12:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_rav1e_send_frame
	movl	%eax, %ebx
	cmpl	$128, %ebx
	jne	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$129, %edi
	callq	_rav1e_status_to_str
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_rav1e_status_to_str
	leaq	L_.str.2(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%ebx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not allocate new rav1e frame.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"Could not send frame: %s\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
L_.str.2:                               ## @.str.2
	.asciz	"Unknown return code %d from rav1e_send_frame: %s\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.no_dead_strip	_librav1e_send_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function librav1e_send_frame
_librav1e_send_frame:                   ; @librav1e_send_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x24, [x0]
	cbz	x1, LBB0_10
; %bb.1:
	mov	x20, x1
	ldr	w0, [x1, #24]
	bl	_av_pix_fmt_desc_get
	mov	x22, x0
	ldr	w0, [x24]
	bl	_rav1e_frame_new
	cbz	x0, LBB0_12
; %bb.2:
	mov	x21, x0
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	cmp	w8, #8
	mov	w25, #1
	cinc	w5, w25, ne
	ldp	x9, x8, [x20, #8]
	ldr	w2, [x8]
	ldr	w8, [x20]
	ldr	w4, [x9]
	mul	w3, w4, w8
	mov	x0, x21
	mov	w1, #0
	bl	_rav1e_frame_fill_plane
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.4:
	mov	w23, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22, #4]
	ldr	x9, [x22, #8]
	ldr	w9, [x9]
	cmp	w9, #8
	lsl	x9, x23, #2
	ldp	x11, x10, [x20, #8]
	ldr	w2, [x10, x9]
	cinc	w5, w25, ne
	ldr	w10, [x20]
	asr	w8, w10, w8
	ldr	w4, [x11, x9]
	mul	w3, w4, w8
	mov	x0, x21
	mov	x1, x23
	bl	_rav1e_frame_fill_plane
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	w0, [x24]
	mov	x1, x21
	bl	_rav1e_send_frame
	mov	x20, x0
	mov	x0, x21
	bl	_rav1e_frame_unref
	cmp	w20, #128
	b.eq	LBB0_11
LBB0_7:
	cmp	w20, #129
	b.eq	LBB0_14
; %bb.8:
	cmp	w20, #130
	b.ne	LBB0_15
; %bb.9:
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
	ldr	w0, [x24]
	bl	_rav1e_send_frame
	mov	x20, x0
	cmp	w20, #128
	b.ne	LBB0_7
LBB0_11:
	mov	w0, #0
	b	LBB0_17
LBB0_12:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_AVERROR
LBB0_14:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	w0, #129
	bl	_rav1e_status_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh14:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_rav1e_status_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_av_log
Lloh21:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
LBB0_17:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not allocate new rav1e frame.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"Could not send frame: %s\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
l_.str.2:                               ; @.str.2
	.asciz	"Unknown return code %d from rav1e_send_frame: %s\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.no_dead_strip	_librav1e_send_frame
.subsections_via_symbols
