	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thp_read_header
_thp_read_header:                       ## @thp_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	%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, %r14
	movq	(%rdi), %r12
	movq	8(%rdi), %r13
	movq	%r12, %rdi
	callq	_avio_size
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%r12, %rdi
	callq	_avio_rb32
	movl	%eax, (%r13)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, %rdi
	callq	_av_int2float
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_av_d2q
	movl	%eax, 48(%r13)
	movq	%rdx, 56(%r13)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, 40(%r13)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, 88(%r13)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, (%r12)
	testq	%r15, %r15
	jle	LBB0_4
## %bb.1:
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	cmpq	%rax, %r15
	jge	LBB0_4
LBB0_3:
	movq	%r15, (%r12)
LBB0_4:
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, 64(%r13)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, 72(%r13)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, 104(%r13)
	movq	88(%r13), %rax
	movq	%rax, 96(%r13)
	movq	64(%r13), %rsi
	movq	72(%r13), %rax
	movq	%rax, 80(%r13)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	movq	%r12, %rdi
	callq	_avio_rb32
	movl	%eax, 4(%r13)
	movq	8(%r13), %rsi
	movq	%r12, %rdi
	movl	$16, %edx
	callq	_avio_read
	cmpl	$0, 4(%r13)
	jle	LBB0_16
## %bb.5:
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	movslq	4(%r13), %rax
	cmpq	%rax, %r15
	jge	LBB0_16
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%r15,4), %eax
	cmpl	$1, %eax
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, 32(%r13)
	jne	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rbx
	movl	48(%r13), %edx
	movq	56(%r13), %rcx
	movq	%rax, %rdi
	movl	$64, %esi
	callq	_avpriv_set_pts_info
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, 28(%rcx)
	movq	_AV_CODEC_ID_THP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	movq	$0, 16(%rcx)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	8(%rbx), %rcx
	movq	%rax, 40(%rcx)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	8(%rbx), %rcx
	movq	%rax, 32(%rcx)
	movl	48(%r13), %edi
	movq	56(%r13), %rsi
	callq	_av_q2d
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	40(%r13), %rax
	movq	%rax, 16(%rbx)
	movq	%rax, 24(%rbx)
	movq	%rbx, 32(%r13)
	movl	(%rbx), %eax
	movl	%eax, 24(%r13)
	cmpl	$69632, (%r13)                  ## imm = 0x11000
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_avio_rb32
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, 16(%r13)
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rbx
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, 28(%rcx)
	movq	_AV_CODEC_ID_ADPCM_THP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	movq	$0, 16(%rcx)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, 16(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	movl	(%rbx), %eax
	movl	%eax, 20(%r13)
	movl	$1, 16(%r13)
	jmp	LBB0_15
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_THP,4,2            ## @AV_CODEC_ID_THP
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ADPCM_THP,4,2      ## @AV_CODEC_ID_ADPCM_THP
	.no_dead_strip	_thp_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thp_read_header
_thp_read_header:                       ; @thp_read_header
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	x20, x22, [x0]
	mov	x0, x20
	bl	_avio_size
	mov	x21, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x0, x20
	bl	_avio_rb32
	str	w0, [x22]
	mov	x0, x20
	bl	_avio_rb32
	mov	x0, x20
	bl	_avio_rb32
	mov	x0, x20
	bl	_avio_rb32
	bl	_av_int2float
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_av_d2q
	stp	x0, x1, [x22, #48]
	mov	x0, x20
	bl	_avio_rb32
	str	x0, [x22, #40]
	mov	x0, x20
	bl	_avio_rb32
	str	x0, [x22, #88]
	mov	x0, x20
	bl	_avio_rb32
	str	x0, [x20]
	cmp	x21, #1
	b.lt	LBB0_4
; %bb.1:
	cbz	x0, LBB0_3
; %bb.2:
	cmp	x21, x0
	b.ge	LBB0_4
LBB0_3:
	str	x21, [x20]
LBB0_4:
	mov	x0, x20
	bl	_avio_rb32
	str	x0, [x22, #64]
	mov	x0, x20
	bl	_avio_rb32
	mov	x0, x20
	bl	_avio_rb32
	str	x0, [x22, #72]
	mov	x0, x20
	bl	_avio_rb32
	ldr	x8, [x22, #88]
	stp	x8, x0, [x22, #96]
	ldp	x1, x8, [x22, #64]
	str	x8, [x22, #80]
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_avio_seek
	mov	x0, x20
	bl	_avio_rb32
	str	w0, [x22, #4]
	ldr	x1, [x22, #8]
	mov	x0, x20
	mov	w2, #16
	bl	_avio_read
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.5:
	mov	x23, #0
Lloh6:
	adrp	x24, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh7:
	ldr	x24, [x24, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh8:
	adrp	x25, _AV_CODEC_ID_ADPCM_THP@GOTPAGE
Lloh9:
	ldr	x25, [x25, _AV_CODEC_ID_ADPCM_THP@GOTPAGEOFF]
	mov	w26, #1
Lloh10:
	adrp	x27, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh11:
	ldr	x27, [x27, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh12:
	adrp	x28, _AV_CODEC_ID_THP@GOTPAGE
Lloh13:
	ldr	x28, [x28, _AV_CODEC_ID_THP@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22, #4]
	cmp	x23, x8
	b.ge	LBB0_16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w8, [x8, x23, lsl #2]
	cmp	w8, #1
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbnz	w8, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22, #32]
	cbnz	x8, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x21, x0
	ldr	w2, [x22, #48]
	ldr	x3, [x22, #56]
	mov	w1, #64
	bl	_avpriv_set_pts_info
	ldr	w8, [x27]
	ldr	x9, [x21, #8]
	ldr	w10, [x28]
	stp	w10, w8, [x9, #24]
	str	xzr, [x9, #16]
	mov	x0, x20
	bl	_avio_rb32
	ldr	x8, [x21, #8]
	str	x0, [x8, #40]
	mov	x0, x20
	bl	_avio_rb32
	ldr	x8, [x21, #8]
	str	x0, [x8, #32]
	ldp	x0, x1, [x22, #48]
	bl	_av_q2d
	ldr	x8, [x21, #8]
	str	x0, [x8]
	ldr	x8, [x22, #40]
	stp	x8, x8, [x21, #16]
	str	x21, [x22, #32]
	ldr	w8, [x21]
	str	w8, [x22, #24]
	ldr	w8, [x22]
	cmp	w8, #17, lsl #12                ; =69632
	b.ne	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_avio_rb32
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x22, #16]
	cbnz	w8, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x21, x0
	ldr	w8, [x24]
	ldr	x9, [x0, #8]
	ldr	w10, [x25]
	stp	w10, w8, [x9, #24]
	str	xzr, [x9, #16]
	mov	x0, x20
	bl	_avio_rb32
	ldr	x8, [x21, #8]
	str	x0, [x8, #8]
	mov	x0, x20
	bl	_avio_rb32
	ldr	x8, [x21, #8]
	str	x0, [x8]
	mov	x0, x20
	bl	_avio_rb32
	str	x0, [x21, #16]
	ldr	x8, [x21, #8]
	ldr	x3, [x8]
	mov	x0, x21
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	ldr	w8, [x21]
	stp	w26, w8, [x22, #16]
	b	LBB0_6
LBB0_16:
	mov	w0, #0
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_THP,4,2            ; @AV_CODEC_ID_THP
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ADPCM_THP,4,2      ; @AV_CODEC_ID_ADPCM_THP
	.no_dead_strip	_thp_read_header
.subsections_via_symbols
