	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hap_parse_frame_header
_hap_parse_frame_header:                ## @hap_parse_frame_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	%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
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	leaq	32(%rbx), %r13
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ff_hap_parse_section_header
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_31
## %bb.1:
	movq	%rbx, %r15
	movq	(%r14), %rbx
	movl	$72, %edi
	movl	$97, %esi
	movl	$112, %edx
	movl	$49, %ecx
	callq	_MKTAG
	cmpq	%rax, %rbx
	jne	LBB0_3
## %bb.2:
	movl	-44(%rbp), %ecx
	andl	$15, %ecx
	movq	_HAP_FMT_RGBDXT1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_12
LBB0_3:
	movq	(%r14), %rbx
	movl	$72, %edi
	movl	$97, %esi
	movl	$112, %edx
	movl	$53, %ecx
	callq	_MKTAG
	cmpq	%rax, %rbx
	jne	LBB0_5
## %bb.4:
	movl	-44(%rbp), %ecx
	andl	$15, %ecx
	movq	_HAP_FMT_RGBADXT5@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_12
LBB0_5:
	movq	(%r14), %rbx
	movl	$72, %edi
	movl	$97, %esi
	movl	$112, %edx
	movl	$89, %ecx
	callq	_MKTAG
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.6:
	movl	-44(%rbp), %ecx
	andl	$15, %ecx
	movq	_HAP_FMT_YCOCGDXT5@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_12
LBB0_7:
	movq	(%r14), %rbx
	movl	$72, %edi
	movl	$97, %esi
	movl	$112, %edx
	movl	$65, %ecx
	callq	_MKTAG
	cmpq	%rax, %rbx
	jne	LBB0_9
## %bb.8:
	movl	-44(%rbp), %ecx
	andl	$15, %ecx
	movq	_HAP_FMT_RGTC1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_12
LBB0_9:
	movq	(%r14), %rbx
	movl	$72, %edi
	movl	$97, %esi
	movl	$112, %edx
	movl	$77, %ecx
	callq	_MKTAG
	movl	-44(%rbp), %edx
	cmpq	%rax, %rbx
	jne	LBB0_13
## %bb.10:
	movl	%edx, %ecx
	andl	$15, %ecx
	movq	_HAP_FMT_RGTC1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_13
## %bb.11:
	movq	_HAP_FMT_YCOCGDXT5@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_13
LBB0_12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_23:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_31:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	andl	$240, %edx
	cmpl	$128, %edx
	jne	LBB0_18
## %bb.14:
	movq	%r15, %rbx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_ff_hap_set_chunk_count
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_18:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
                                        ## implicit-def: $rcx
	movq	%r15, %rbx
	testl	%r12d, %r12d
	jne	LBB0_31
	jmp	LBB0_20
LBB0_16:
	movl	$240, %eax
	andl	-44(%rbp), %eax
	movq	24(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	$0, 8(%rcx)
	movl	(%rbx), %edx
	movl	%edx, 16(%rcx)
LBB0_17:
	cmpl	$129, %eax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rax, %rcx
	testl	%r12d, %r12d
	jne	LBB0_31
LBB0_20:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	$0, 8(%rbx)
	cmpl	$0, 16(%rbx)
	jle	LBB0_30
## %bb.21:
	movl	$32, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_22
LBB0_28:                                ##   in Loop: Header=BB0_22 Depth=1
	movslq	-16(%r14,%r13), %rcx
	movq	%rcx, (%r14,%r13)
LBB0_29:                                ##   in Loop: Header=BB0_22 Depth=1
	addq	%rcx, %rax
	movq	%rax, 8(%rbx)
	incq	%r15
	movslq	16(%rbx), %rax
	addq	$40, %r13
	cmpq	%rax, %r15
	jge	LBB0_30
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %r14
	movslq	-16(%r14,%r13), %r12
	addq	-24(%r14,%r13), %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_bytestream2_get_bytes_left
	cmpq	%rax, %r12
	jg	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	8(%rbx), %rax
	movq	%rax, -8(%r14,%r13)
	movl	-32(%r14,%r13), %ecx
	cmpl	$129, %ecx
	je	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_22 Depth=1
	cmpl	$128, %ecx
	jne	LBB0_23
## %bb.26:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	-24(%r14,%r13), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rsi
	movslq	-16(%r14,%r13), %rdx
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	callq	_bytestream2_init
	movq	%r12, %rdi
	callq	_ff_snappy_peek_uncompressed_length
	movq	%rax, %r12
	testq	%rax, %rax
	js	LBB0_31
## %bb.27:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%r12, (%r14,%r13)
	movq	(%r14,%r13), %rcx
	movq	8(%rbx), %rax
	jmp	LBB0_29
LBB0_30:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	xorl	%r12d, %r12d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_HAP_FMT_RGBDXT1,4,2            ## @HAP_FMT_RGBDXT1
	.comm	_HAP_FMT_RGBADXT5,4,2           ## @HAP_FMT_RGBADXT5
	.comm	_HAP_FMT_YCOCGDXT5,4,2          ## @HAP_FMT_YCOCGDXT5
	.comm	_HAP_FMT_RGTC1,4,2              ## @HAP_FMT_RGTC1
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid texture format %#04x.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"none"

L_.str.2:                               ## @.str.2
	.asciz	"snappy"

	.comm	_HAP_ST_DECODE_INSTRUCTIONS,4,2 ## @HAP_ST_DECODE_INSTRUCTIONS
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.4:                               ## @.str.4
	.asciz	"%s compressor\n"

	.no_dead_strip	_hap_parse_frame_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hap_parse_frame_header
_hap_parse_frame_header:                ; @hap_parse_frame_header
	.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	x19, x0
	ldr	x20, [x0, #8]
	add	x21, x20, #32
	add	x2, sp, #28
	mov	x0, x21
	mov	x1, x20
	bl	_ff_hap_parse_section_header
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	x22, [x19]
	mov	w0, #72
	mov	w1, #97
	mov	w2, #112
	mov	w3, #49
	bl	_MKTAG
	cmp	x22, x0
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [sp, #28]
	and	w8, w8, #0xf
Lloh0:
	adrp	x9, _HAP_FMT_RGBDXT1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HAP_FMT_RGBDXT1@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_3:
	ldr	x22, [x19]
	mov	w0, #72
	mov	w1, #97
	mov	w2, #112
	mov	w3, #53
	bl	_MKTAG
	cmp	x22, x0
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [sp, #28]
	and	w8, w8, #0xf
Lloh3:
	adrp	x9, _HAP_FMT_RGBADXT5@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HAP_FMT_RGBADXT5@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_5:
	ldr	x22, [x19]
	mov	w0, #72
	mov	w1, #97
	mov	w2, #112
	mov	w3, #89
	bl	_MKTAG
	cmp	x22, x0
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [sp, #28]
	and	w8, w8, #0xf
Lloh6:
	adrp	x9, _HAP_FMT_YCOCGDXT5@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HAP_FMT_YCOCGDXT5@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_7:
	ldr	x22, [x19]
	mov	w0, #72
	mov	w1, #97
	mov	w2, #112
	mov	w3, #65
	bl	_MKTAG
	cmp	x22, x0
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [sp, #28]
	and	w8, w8, #0xf
Lloh9:
	adrp	x9, _HAP_FMT_RGTC1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HAP_FMT_RGTC1@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_9:
	ldr	x22, [x19]
	mov	w0, #72
	mov	w1, #97
	mov	w2, #112
	mov	w3, #77
	bl	_MKTAG
	ldr	w9, [sp, #28]
	cmp	x22, x0
	b.ne	LBB0_15
; %bb.10:
	and	w8, w9, #0xf
Lloh12:
	adrp	x10, _HAP_FMT_RGTC1@GOTPAGE
Lloh13:
	ldr	x10, [x10, _HAP_FMT_RGTC1@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w8, w10
	b.eq	LBB0_15
; %bb.11:
Lloh15:
	adrp	x10, _HAP_FMT_YCOCGDXT5@GOTPAGE
Lloh16:
	ldr	x10, [x10, _HAP_FMT_YCOCGDXT5@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	cmp	w8, w10
	b.eq	LBB0_15
LBB0_12:
Lloh18:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_13:
Lloh23:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
LBB0_14:
                                        ; kill: def $w0 killed $w0 killed $x0
	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_15:
	and	w8, w9, #0xf0
	cmp	w8, #128
	b.ne	LBB0_18
; %bb.16:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_ff_hap_set_chunk_count
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_19
; %bb.17:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	b	LBB0_20
LBB0_18:
Lloh26:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
                                        ; implicit-def: $x22
	cbnz	w0, LBB0_14
	b	LBB0_21
LBB0_19:
	ldr	w8, [sp, #28]
	and	w8, w8, #0xf0
	ldr	x9, [x20, #24]
	str	w8, [x9]
	str	xzr, [x9, #8]
	ldr	w10, [x20]
	str	w10, [x9, #16]
LBB0_20:
Lloh29:
	adrp	x9, l_.str.2@PAGE
Lloh30:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh31:
	adrp	x10, l_.str.1@PAGE
Lloh32:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w8, #129
	csel	x22, x10, x9, eq
	cbnz	w0, LBB0_14
LBB0_21:
	str	xzr, [x20, #8]
	ldr	w8, [x20, #16]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.22:
	mov	x23, #0
	mov	x24, #0
	b	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_25 Depth=1
	ldrsw	x9, [x26, #16]
	add	x10, x25, x23
	str	x9, [x10, #32]
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x8, x8, x9
	str	x8, [x20, #8]
	add	x24, x24, #1
	ldrsw	x8, [x20, #16]
	add	x23, x23, #40
	cmp	x24, x8
	b.ge	LBB0_30
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x20, #24]
	add	x26, x25, x23
	ldr	x8, [x26, #8]
	ldrsw	x9, [x26, #16]
	add	x27, x8, x9
	mov	x0, x21
	bl	_bytestream2_get_bytes_left
	cmp	x27, x0
	b.gt	LBB0_13
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x8, [x20, #8]
	str	x8, [x26, #24]
	ldr	w9, [x26]
	cmp	w9, #129
	b.eq	LBB0_23
; %bb.27:                               ;   in Loop: Header=BB0_25 Depth=1
	cmp	w9, #128
	b.ne	LBB0_13
; %bb.28:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x26, #8]
	add	x1, x9, x8
	ldrsw	x2, [x26, #16]
	add	x0, sp, #16
	bl	_bytestream2_init
	add	x0, sp, #16
	bl	_ff_snappy_peek_uncompressed_length
	tbnz	x0, #63, LBB0_14
; %bb.29:                               ;   in Loop: Header=BB0_25 Depth=1
	add	x8, x25, x23
	str	x0, [x8, #32]
	mov	x9, x0
	ldr	x8, [x20, #8]
	b	LBB0_24
LBB0_30:
Lloh33:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh36:
	adrp	x2, l_.str.4@PAGE
Lloh37:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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 AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_HAP_FMT_RGBDXT1,4,2            ; @HAP_FMT_RGBDXT1
	.comm	_HAP_FMT_RGBADXT5,4,2           ; @HAP_FMT_RGBADXT5
	.comm	_HAP_FMT_YCOCGDXT5,4,2          ; @HAP_FMT_YCOCGDXT5
	.comm	_HAP_FMT_RGTC1,4,2              ; @HAP_FMT_RGTC1
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid texture format %#04x.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"none"

l_.str.2:                               ; @.str.2
	.asciz	"snappy"

	.comm	_HAP_ST_DECODE_INSTRUCTIONS,4,2 ; @HAP_ST_DECODE_INSTRUCTIONS
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.4:                               ; @.str.4
	.asciz	"%s compressor\n"

	.no_dead_strip	_hap_parse_frame_header
.subsections_via_symbols
