	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_subtitle_for_lang
_add_subtitle_for_lang:                 ## @add_subtitle_for_lang
	.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	%r8, %r12
	movq	%rcx, %rbx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movq	%rcx, %rsi
	xorl	%edx, %edx
	callq	_find_subtitle_track
	testl	%eax, %eax
	js	LBB0_21
## %bb.1:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 48(%r12)
	jne	LBB0_21
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r15d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_find_subtitle_track
	testl	%eax, %eax
	js	LBB0_21
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movl	%eax, %r15d
	cmpl	$0, (%rcx,%r15,4)
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %edi
	movl	%r15d, %esi
	callq	_hb_list_item
	movq	%rax, %r14
	cmpl	$0, 8(%r12)
	je	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movb	$1, %al
	xorl	%ebx, %ebx
	cmpl	$0, 16(%r12)
	movl	$0, %r13d
	jne	LBB0_20
	jmp	LBB0_17
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rdi
	movq	_VOBSUB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 40(%r12)
	jne	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_PGSSUB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 32(%r12)
	je	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movb	$1, %r13b
	movl	$1, %ebx
	jmp	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_hb_subtitle_can_pass
	movb	$1, %r13b
	movl	$1, %ebx
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 12(%r12)
	je	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_has_default_subtitle
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 16(%r14)
	setne	%al
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	xorb	$1, %r13b
	movzbl	%r13b, %ecx
	andl	%ecx, 12(%r12)
	orl	%ebx, 8(%r12)
	movzbl	%al, %edx
	movq	(%r12), %rax
	movl	$1, (%rax,%r15,4)
	movl	8(%r14), %r9d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	callq	_add_subtitle
	cmpq	$0, 48(%r12)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_3
	jmp	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 24(%r12)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_17
	jmp	LBB0_6
LBB0_21:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VOBSUB,8,3                     ## @VOBSUB
	.comm	_PGSSUB,8,3                     ## @PGSSUB
	.no_dead_strip	_add_subtitle_for_lang
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_subtitle_for_lang
_add_subtitle_for_lang:                 ; @add_subtitle_for_lang
	.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, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x0, x1
	mov	x1, x3
	mov	w2, #0
	bl	_find_subtitle_track
	tbnz	w0, #31, LBB0_20
; %bb.1:
Lloh0:
	adrp	x27, _VOBSUB@GOTPAGE
Lloh1:
	ldr	x27, [x27, _VOBSUB@GOTPAGEOFF]
	mov	w28, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	mov	w24, w0
	ldr	w8, [x8, w0, uxtw #2]
	cbnz	w8, LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	mov	x1, x24
	bl	_hb_list_item
	mov	x25, x0
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w26, #0
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w2, #1
	b	LBB0_17
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x25]
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh2:
	adrp	x8, _PGSSUB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PGSSUB@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x21
	bl	_hb_subtitle_can_pass
	cbz	w0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w26, #1
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_has_default_subtitle
	cbz	w0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w2, #0
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x25, #16]
	cmp	x8, #0
	cset	w2, ne
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	eor	w8, w26, #0x1
	ldp	w10, w9, [x19, #8]
	and	w8, w9, w8
	orr	w9, w10, w26
	stp	w9, w8, [x19, #8]
	ldr	x8, [x19]
	str	w28, [x8, x24, lsl #2]
	ldr	w5, [x25, #8]
	mov	x0, x23
	mov	x1, x24
	mov	w3, #0
	mov	x4, x26
	bl	_add_subtitle
LBB0_18:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w2, w24, #1
	mov	x0, x22
	mov	x1, x20
	bl	_find_subtitle_track
	tbz	w0, #31, LBB0_2
LBB0_20:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VOBSUB,8,3                     ; @VOBSUB
	.comm	_PGSSUB,8,3                     ; @PGSSUB
	.no_dead_strip	_add_subtitle_for_lang
.subsections_via_symbols
