	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hnm_decode_frame
_hnm_decode_frame:                      ## @hnm_decode_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, %r15
	cmpl	$7, (%rcx)
	jg	LBB0_3
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_20
LBB0_3:
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	(%r15), %r12
	movq	8(%rcx), %rdi
	addq	$4, %rdi
	callq	_AV_RL16
	movq	_HNM4_CHUNK_ID_PL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_hnm_update_palette
LBB0_19:
	movl	(%rbx), %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_HNM4_CHUNK_ID_IZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.6:
	cmpl	$11, (%rbx)
	jle	LBB0_1
## %bb.7:
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_20
## %bb.8:
	movq	8(%rbx), %rsi
	addq	$12, %rsi
	movl	(%rbx), %edx
	addl	$-12, %edx
	movq	%r15, %rdi
	callq	_unpack_intraframe
	movl	24(%r12), %edi
	movl	4(%r12), %edx
	movl	16(%r12), %esi
	imull	(%r12), %edx
	callq	_memcpy
	cmpl	$74, 8(%r12)
	jne	LBB0_10
## %bb.9:
	movl	20(%r12), %edi
	movl	4(%r12), %edx
	movl	16(%r12), %esi
	imull	(%r12), %edx
	callq	_memcpy
	jmp	LBB0_11
LBB0_12:
	movq	_HNM4_CHUNK_ID_IU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.13:
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_20
## %bb.14:
	movq	8(%rbx), %rsi
	addq	$8, %rsi
	movl	(%rbx), %edx
	addl	$-8, %edx
	cmpl	$74, 8(%r12)
	jne	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	callq	_decode_interframe_v4a
	movl	20(%r12), %edi
	movl	4(%r12), %edx
	movl	16(%r12), %esi
	imull	(%r12), %edx
	callq	_memcpy
	jmp	LBB0_18
LBB0_21:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_2
LBB0_10:
	movq	%r15, %rdi
	callq	_postprocess_current_frame
LBB0_11:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_copy_processed_frame
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movl	$1, (%r13)
	movq	8(%r13), %rax
	movl	4(%rax), %edi
	movl	12(%r12), %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memcpy
	movl	$1, (%r14)
	jmp	LBB0_19
LBB0_16:
	movq	%r15, %rdi
	callq	_decode_interframe_v4
	testl	%eax, %eax
	js	LBB0_20
## %bb.17:
	movq	%r15, %rdi
	callq	_postprocess_current_frame
LBB0_18:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_copy_processed_frame
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movl	$0, (%r13)
	movq	8(%r13), %rax
	movl	4(%rax), %edi
	movl	12(%r12), %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memcpy
	movl	$1, (%r14)
	movq	%r12, %rdi
	callq	_hnm_flip_buffers
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"packet too small\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_HNM4_CHUNK_ID_PL,8,3           ## @HNM4_CHUNK_ID_PL
	.comm	_HNM4_CHUNK_ID_IZ,8,3           ## @HNM4_CHUNK_ID_IZ
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_HNM4_CHUNK_ID_IU,8,3           ## @HNM4_CHUNK_ID_IU
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
L_.str.1:                               ## @.str.1
	.asciz	"invalid chunk id: %d\n"

	.no_dead_strip	_hnm_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hnm_decode_frame
_hnm_decode_frame:                      ; @hnm_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x0
	ldr	w8, [x3]
	cmp	w8, #7
	b.gt	LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x22
	bl	_av_log
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_3:
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	ldr	x21, [x22]
	ldr	x8, [x3, #8]
	add	x0, x8, #4
	bl	_AV_RL16
Lloh8:
	adrp	x8, _HNM4_CHUNK_ID_PL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HNM4_CHUNK_ID_PL@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.4:
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	x0, x22
	bl	_hnm_update_palette
LBB0_5:
	ldr	w0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
Lloh11:
	adrp	x8, _HNM4_CHUNK_ID_IZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HNM4_CHUNK_ID_IZ@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.8:
	ldr	w8, [x19]
	cmp	w8, #11
	b.le	LBB0_1
; %bb.9:
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_6
; %bb.10:
	ldr	x8, [x19, #8]
	add	x1, x8, #12
	ldr	w8, [x19]
	sub	w2, w8, #12
	mov	x0, x22
	bl	_unpack_intraframe
	ldr	w0, [x21, #24]
	ldr	w1, [x21, #16]
	ldp	w8, w9, [x21]
	mul	w2, w9, w8
	bl	_memcpy
	ldr	w8, [x21, #8]
	cmp	w8, #74
	b.ne	LBB0_17
; %bb.11:
	ldp	w1, w0, [x21, #16]
	ldp	w8, w9, [x21]
	mul	w2, w9, w8
	bl	_memcpy
	b	LBB0_18
LBB0_12:
Lloh14:
	adrp	x8, _HNM4_CHUNK_ID_IU@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HNM4_CHUNK_ID_IU@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_6
; %bb.14:
	ldr	w8, [x21, #8]
	ldr	x9, [x19, #8]
	add	x1, x9, #8
	ldr	w9, [x19]
	sub	w2, w9, #8
	mov	x0, x22
	cmp	w8, #74
	b.ne	LBB0_19
; %bb.15:
	bl	_decode_interframe_v4a
	ldp	w1, w0, [x21, #16]
	ldp	w8, w9, [x21]
	mul	w2, w9, w8
	bl	_memcpy
	b	LBB0_21
LBB0_16:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_17:
	mov	x0, x22
	bl	_postprocess_current_frame
LBB0_18:
	mov	x0, x22
	mov	x1, x23
	bl	_copy_processed_frame
Lloh22:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x23, #16]
	mov	w22, #1
	str	w22, [x23]
	ldr	x8, [x23, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x21, #12]
	mov	w2, #1024
	bl	_memcpy
	str	w22, [x20]
	b	LBB0_5
LBB0_19:
	bl	_decode_interframe_v4
	tbnz	w0, #31, LBB0_6
; %bb.20:
	mov	x0, x22
	bl	_postprocess_current_frame
LBB0_21:
	mov	x0, x22
	mov	x1, x23
	bl	_copy_processed_frame
Lloh25:
	adrp	x8, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x23, #16]
	str	wzr, [x23]
	ldr	x8, [x23, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x21, #12]
	mov	w2, #1024
	bl	_memcpy
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x21
	bl	_hnm_flip_buffers
	b	LBB0_5
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"packet too small\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_HNM4_CHUNK_ID_PL,8,3           ; @HNM4_CHUNK_ID_PL
	.comm	_HNM4_CHUNK_ID_IZ,8,3           ; @HNM4_CHUNK_ID_IZ
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_HNM4_CHUNK_ID_IU,8,3           ; @HNM4_CHUNK_ID_IU
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
l_.str.1:                               ; @.str.1
	.asciz	"invalid chunk id: %d\n"

	.no_dead_strip	_hnm_decode_frame
.subsections_via_symbols
