	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_import_subtitle_add         ## -- Begin function hb_import_subtitle_add
	.p2align	4, 0x90
_hb_import_subtitle_add:                ## @hb_import_subtitle_add
	.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	$24, %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, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$48, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_hb_list_count
	shll	$8, %eax
	movq	_HB_SUBTITLE_IMPORT_TAG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	_TEXTSUB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	%r12d, 4(%rbx)
	movq	_IMPORTSRT@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
## %bb.4:
	movq	_WORK_DECSRTSUB@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_hb_error
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_3:
	movq	_WORK_DECSSASUB@GOTPCREL(%rip), %rax
LBB0_5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movabsq	$386547056640001, %rax          ## imm = 0x15F9000000001
	movq	%rax, 32(%rbx)
	movq	%r13, %rdi
	callq	_lang_for_code2
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_hb_log
	leaq	L_.str.2(%rip), %rdi
	callq	_lang_for_code2
	movq	%rax, %r14
LBB0_7:
	movl	28(%rbx), %r15d
	movq	(%r14), %r13
	cmpb	$0, (%r13)
	jne	LBB0_9
## %bb.8:
	movq	8(%r14), %r13
LBB0_9:
	movl	%r12d, %edi
	callq	_hb_subsource_name
	leaq	L_.str.3(%rip), %rdx
	movl	%r15d, %edi
	movl	$4, %esi
	movq	%r13, %rcx
	movq	%rax, %r8
	callq	_snprintf
	movl	24(%rbx), %edi
	movl	16(%r14), %esi
	callq	_strcpy
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rdi
	movq	%rdi, 8(%rbx)
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.10:
	cmpq	$0, (%rdi)
	je	LBB0_12
## %bb.11:
	callq	_strdup
	movq	%rax, 8(%rbx)
	jmp	LBB0_13
LBB0_12:
	movq	$0, 8(%rbx)
LBB0_13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r15), %rdi
	callq	_strdup
	movq	%rax, 16(%rbx)
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_hb_list_add
	movl	$1, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_srt_add: malloc failed"

	.comm	_HB_SUBTITLE_IMPORT_TAG,4,2     ## @HB_SUBTITLE_IMPORT_TAG
	.comm	_TEXTSUB,4,2                    ## @TEXTSUB
	.comm	_IMPORTSRT,4,2                  ## @IMPORTSRT
	.comm	_WORK_DECSRTSUB,4,2             ## @WORK_DECSRTSUB
	.comm	_WORK_DECSSASUB,4,2             ## @WORK_DECSSASUB
L_.str.1:                               ## @.str.1
	.asciz	"hb_srt_add: unknown language code (%s)"

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

L_.str.3:                               ## @.str.3
	.asciz	"%s [%s]"

.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 hb_import_subtitle_add
lCPI0_0:
	.long	1                               ; 0x1
	.long	90000                           ; 0x15f90
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hb_import_subtitle_add
	.p2align	2
_hb_import_subtitle_add:                ; @hb_import_subtitle_add
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	mov	w0, #1
	mov	w1, #48
	bl	_calloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_hb_list_count
Lloh0:
	adrp	x8, _HB_SUBTITLE_IMPORT_TAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HB_SUBTITLE_IMPORT_TAG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w8, w8, w0, lsl #8
Lloh3:
	adrp	x9, _TEXTSUB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TEXTSUB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x20, #44]
	stp	w8, w22, [x20]
Lloh6:
	adrp	x8, _IMPORTSRT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IMPORTSRT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _WORK_DECSRTSUB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WORK_DECSRTSUB@GOTPAGEOFF]
Lloh11:
	adrp	x10, _WORK_DECSSASUB@GOTPAGE
Lloh12:
	ldr	x10, [x10, _WORK_DECSSASUB@GOTPAGEOFF]
	cmp	w8, w22
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x20, #40]
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20, #32]
	mov	x0, x23
	bl	_lang_for_code2
	mov	x24, x0
	cbnz	x0, LBB0_3
; %bb.2:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_hb_log
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_lang_for_code2
	mov	x24, x0
LBB0_3:
	ldr	w23, [x20, #28]
	ldr	x25, [x24]
	ldrb	w8, [x25]
	cbnz	w8, LBB0_5
; %bb.4:
	ldr	x25, [x24, #8]
LBB0_5:
	mov	x0, x22
	bl	_hb_subsource_name
	mov	x4, x0
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x23
	mov	w1, #4
	mov	x3, x25
	bl	_snprintf
	ldr	w0, [x20, #24]
	ldr	w1, [x24, #16]
	bl	_strcpy
	ldr	x0, [x21]
	str	x0, [x20, #8]
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.7:
	bl	_strdup
	str	x0, [x20, #8]
	b	LBB0_9
LBB0_8:
	str	xzr, [x20, #8]
LBB0_9:
	ldr	x0, [x21, #8]
	bl	_strdup
	str	x0, [x20, #16]
	ldr	w0, [x19]
	mov	x1, x20
	bl	_hb_list_add
	mov	w0, #1
	b	LBB0_11
LBB0_10:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_srt_add: malloc failed"

	.comm	_HB_SUBTITLE_IMPORT_TAG,4,2     ; @HB_SUBTITLE_IMPORT_TAG
	.comm	_TEXTSUB,4,2                    ; @TEXTSUB
	.comm	_IMPORTSRT,4,2                  ; @IMPORTSRT
	.comm	_WORK_DECSRTSUB,4,2             ; @WORK_DECSRTSUB
	.comm	_WORK_DECSSASUB,4,2             ; @WORK_DECSSASUB
l_.str.1:                               ; @.str.1
	.asciz	"hb_srt_add: unknown language code (%s)"

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

l_.str.3:                               ; @.str.3
	.asciz	"%s [%s]"

.subsections_via_symbols
