	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pes_add_audio_to_title
_pes_add_audio_to_title:                ## @pes_add_audio_to_title
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rcx
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rax,8), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_get_id
	movl	%eax, %r15d
	movl	(%r14), %edi
	callq	_hb_list_count
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_hb_list_item
	cmpl	(%rax), %r15d
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_3
LBB0_5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$36, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %rbx
	movl	%r15d, (%rax)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	8(%r15,%r14,8), %eax
	movl	%eax, 28(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	20(%r15,%r14,8), %eax
	movl	%eax, 24(%rbx)
	movl	16(%r15,%r14,8), %eax
	movl	%eax, 20(%rbx)
	movabsq	$386547056640001, %rax          ## imm = 0x15F9000000001
	movq	%rax, 12(%rbx)
	movl	12(%r15,%r14,8), %edi
	callq	_lang_for_code
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_set_audio_description
	movl	4(%r15,%r14,8), %esi
	movl	8(%r15,%r14,8), %edx
	movq	%rbx, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	callq	_hb_log
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
	testl	%r12d, %r12d
	js	LBB0_14
## %bb.6:
	cmpl	%r12d, %r13d
	cmovll	%r13d, %r12d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_13
## %bb.7:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %r15
	addq	$4, %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r12d
	cmpl	%r12d, %r13d
	je	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	%r12d, %esi
	callq	_hb_list_item
	movl	(%rax), %eax
	movzwl	%ax, %ecx
	sarl	$16, %eax
	cmpl	%ecx, (%r15)
	jl	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	jg	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%eax, (%rcx)
	jg	LBB0_11
	jmp	LBB0_13
LBB0_4:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r14, %rsi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hb_list_add                    ## TAILCALL
LBB0_12:
	movl	%r13d, %r12d
LBB0_13:
	movl	(%rbx), %edi
	movl	%r12d, %esi
	movq	%r14, %rdx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hb_list_insert                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stream id 0x%x (type 0x%x substream 0x%x) audio 0x%x"

	.no_dead_strip	_pes_add_audio_to_title
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pes_add_audio_to_title
lCPI0_0:
	.long	1                               ; 0x1
	.long	90000                           ; 0x15f90
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_pes_add_audio_to_title:                ; @pes_add_audio_to_title
	.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	x22, x3
	mov	x19, x2
	mov	x24, x1
	mov	x25, x0
	ldr	x27, [x0, #8]
	mov	w8, #24
	smaddl	x20, w1, w8, x27
	mov	x0, x20
	bl	_get_id
	mov	x26, x0
	ldr	w0, [x19]
	bl	_hb_list_count
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, x23
	bl	_hb_list_item
	ldr	w8, [x0]
	cmp	w26, w8
	b.eq	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w23, w23, #1
	cmp	w21, w23
	b.ne	LBB0_2
LBB0_4:
	sxtw	x28, w24
	mov	w0, #36
	mov	w1, #1
	bl	_calloc
	mov	x23, x0
	mov	w8, #24
	madd	x27, x28, x8, x27
	ldr	w8, [x25]
	ldr	w9, [x27, #8]
	stp	w9, w8, [x0, #28]
	ldr	w8, [x20]
	stp	w26, w8, [x0]
	ldr	d0, [x27, #16]
	stur	d0, [x0, #20]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x0, #12]
	ldr	w0, [x27, #12]
	bl	_lang_for_code
	mov	x1, x0
	mov	x0, x23
	bl	_set_audio_description
	mov	x25, x27
	ldr	w1, [x25, #4]!
	ldr	w2, [x27, #8]
	ldr	w3, [x20]
	ldr	w4, [x23]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
	str	w24, [x23, #8]
	tbnz	w22, #31, LBB0_11
; %bb.5:
	cmp	w21, w22
	csel	w22, w21, w22, lt
	b.gt	LBB0_7
	b	LBB0_13
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
	cmp	w21, w22
	b.eq	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, x22
	bl	_hb_list_item
	ldr	w8, [x0]
	and	w9, w8, #0xffff
	ldr	w10, [x25]
	cmp	w10, w9
	b.lt	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	b.gt	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	asr	w8, w8, #16
	ldr	w9, [x20]
	cmp	w9, w8
	b.gt	LBB0_6
	b	LBB0_13
LBB0_10:
	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_11:
	ldr	w0, [x19]
	mov	x1, x23
	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	_hb_list_add
LBB0_12:
	mov	x22, x21
LBB0_13:
	ldr	w0, [x19]
	mov	x1, x22
	mov	x2, x23
	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	_hb_list_insert
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stream id 0x%x (type 0x%x substream 0x%x) audio 0x%x"

	.no_dead_strip	_pes_add_audio_to_title
.subsections_via_symbols
