	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hnm_read_header
_hnm_read_header:                       ## @hnm_read_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	8(%rdi), %rbx
	movq	$0, 96(%rbx)
	leaq	80(%rbx), %rdi
	callq	_av_init_packet
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%rbx)
	movq	$0, 88(%rbx)
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_avio_skip
	movq	%r15, %rdi
	callq	_avio_rl16
	movl	%eax, (%rbx)
	movq	%r15, %rdi
	callq	_avio_rl16
	movl	%eax, 4(%rbx)
	movq	%r15, %rdi
	callq	_avio_rl32
	movq	%rax, 64(%rbx)
	movq	%r15, %rdi
	callq	_avio_rl32
	movq	%rax, 56(%rbx)
	movq	%r15, %rdi
	callq	_avio_rl32
	movq	%rax, 48(%rbx)
	movq	%r15, %rdi
	callq	_avio_rl16
	movq	%rax, 40(%rbx)
	movq	%r15, %rdi
	callq	_avio_rl16
	movq	%rax, 32(%rbx)
	movq	%r15, %rdi
	callq	_avio_rl32
	movq	%rax, 24(%rbx)
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_avio_skip
	movq	$0, 16(%rbx)
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	leal	-641(%rcx), %eax
	cmpl	$-385, %eax                     ## imm = 0xFE7F
	jb	LBB0_2
## %bb.1:
	leal	-481(%r8), %eax
	cmpl	$-332, %eax                     ## imm = 0xFEB4
	jbe	LBB0_2
## %bb.3:
	cmpl	$640, %ecx                      ## imm = 0x280
	movl	$74, %eax
	movl	$64, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, 8(%rbx)
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r12
	leaq	8(%rbx), %r14
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	movl	%eax, 28(%rcx)
	movq	_AV_CODEC_ID_HNM4_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	movq	$0, 16(%rcx)
	movl	(%rbx), %eax
	movl	%eax, (%rcx)
	movl	4(%rbx), %eax
	movl	%eax, 4(%rcx)
	movl	$1, %edi
	callq	_av_mallocz
	movq	8(%r12), %rcx
	movl	%eax, 12(%rcx)
	movl	$1, 8(%rcx)
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_memcpy
	movq	$0, (%r12)
	movq	_HNM4_FRAME_FPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$33, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	jmp	LBB0_5
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid resolution: %ux%u\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_HNM4_VIDEO,4,2     ## @AV_CODEC_ID_HNM4_VIDEO
	.comm	_HNM4_FRAME_FPS,4,2             ## @HNM4_FRAME_FPS
	.no_dead_strip	_hnm_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hnm_read_header
_hnm_read_header:                       ; @hnm_read_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldp	x20, x21, [x0]
	str	xzr, [x21, #96]
	add	x0, x21, #80
	bl	_av_init_packet
	stp	xzr, xzr, [x21, #80]
	str	xzr, [x21, #72]
	mov	x0, x20
	mov	w1, #8
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_rl16
	str	w0, [x21]
	mov	x0, x20
	bl	_avio_rl16
	str	w0, [x21, #4]
	mov	x0, x20
	bl	_avio_rl32
	str	x0, [x21, #64]
	mov	x0, x20
	bl	_avio_rl32
	str	x0, [x21, #56]
	mov	x0, x20
	bl	_avio_rl32
	str	x0, [x21, #48]
	mov	x0, x20
	bl	_avio_rl16
	str	x0, [x21, #40]
	mov	x0, x20
	bl	_avio_rl16
	str	x0, [x21, #32]
	mov	x0, x20
	bl	_avio_rl32
	str	x0, [x21, #24]
	mov	x0, x20
	mov	w1, #32
	bl	_avio_skip
	str	xzr, [x21, #16]
	ldp	w3, w4, [x21]
	sub	w8, w3, #641
	cmn	w8, #385
	b.lo	LBB0_4
; %bb.1:
	sub	w8, w4, #481
	cmn	w8, #332
	b.ls	LBB0_4
; %bb.2:
	mov	w8, #64
	mov	w9, #74
	cmp	w3, #640
	csel	w8, w9, w8, eq
	mov	x20, x21
	str	w8, [x20, #8]!
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_6
; %bb.3:
	mov	x19, x0
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
Lloh3:
	adrp	x10, _AV_CODEC_ID_HNM4_VIDEO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_CODEC_ID_HNM4_VIDEO@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #24]
	str	xzr, [x9, #16]
	ldr	d0, [x21]
	str	d0, [x9]
	mov	w21, #1
	mov	w0, #1
	bl	_av_mallocz
	ldr	x8, [x19, #8]
	stp	w21, w0, [x8, #8]
	mov	x1, x20
	mov	w2, #1
	bl	_memcpy
	str	xzr, [x19]
Lloh6:
	adrp	x8, _HNM4_FRAME_FPS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNM4_FRAME_FPS@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #33
	mov	w2, #1
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh14:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid resolution: %ux%u\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_HNM4_VIDEO,4,2     ; @AV_CODEC_ID_HNM4_VIDEO
	.comm	_HNM4_FRAME_FPS,4,2             ; @HNM4_FRAME_FPS
	.no_dead_strip	_hnm_read_header
.subsections_via_symbols
