	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunrast_encode_frame
_sunrast_encode_frame:                  ## @sunrast_encode_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	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movl	16(%r14), %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%r14), %r15
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_bytestream2_init_writer
	movq	%rbx, %rdi
	callq	_sunrast_image_write_header
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	movq	(%rcx), %rsi
	movq	8(%rcx), %rdx
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_sunrast_image_write_image
	movq	(%r14), %rax
	movq	_RT_BYTE_ENCODED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	8(%r12), %rdi
	addq	$64, %rdi
	movl	12(%r14), %esi
	callq	_AV_WB32
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r12)
	movq	%r15, %rdi
	callq	_bytestream2_tell_p
	movl	%eax, (%r12)
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT_BYTE_ENCODED,8,3            ## @RT_BYTE_ENCODED
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_sunrast_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunrast_encode_frame
_sunrast_encode_frame:                  ; @sunrast_encode_frame
	.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	x20, x3
	mov	x23, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x24, [x0]
	ldr	w2, [x24, #16]
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_4
; %bb.1:
	add	x21, x24, #8
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	x0, x21
	bl	_bytestream2_init_writer
	mov	x0, x22
	bl	_sunrast_image_write_header
	ldp	x9, x8, [x23]
	ldp	x1, x2, [x8]
	ldr	w3, [x9]
	mov	x0, x22
	bl	_sunrast_image_write_image
	ldr	x8, [x24]
Lloh0:
	adrp	x9, _RT_BYTE_ENCODED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RT_BYTE_ENCODED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	add	x0, x8, #64
	ldr	w1, [x24, #12]
	bl	_AV_WB32
LBB0_3:
	mov	w8, #1
	str	w8, [x20]
Lloh3:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x21
	bl	_bytestream2_tell_p
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_4:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RT_BYTE_ENCODED,8,3            ; @RT_BYTE_ENCODED
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_sunrast_encode_frame
.subsections_via_symbols
