	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function subtitle_edit
_subtitle_edit:                         ## @subtitle_edit
	.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
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_gtk_tree_view_get_selection
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_gtk_tree_view_get_model
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_gtk_tree_path_get_depth
	cmpl	$1, %eax
	jg	LBB0_8
## %bb.1:
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_gtk_tree_model_get_iter
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_gtk_tree_selection_select_iter
	movl	(%r15), %edi
	callq	_ghb_get_job_subtitle_settings
	movl	%eax, %edi
	callq	_ghb_value_dup
	movq	%rax, %r14
	movq	%rax, -56(%rbp)
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_GHB_WIDGET
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_GTK_DIALOG
	movl	%eax, %edi
	callq	_gtk_dialog_run
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_gtk_widget_hide
	movq	_GTK_RESPONSE_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_3
## %bb.6:
	leaq	-56(%rbp), %rdi
	callq	_ghb_value_free
	jmp	LBB0_7
LBB0_3:
	movl	(%r15), %edi
	callq	_ghb_get_job_settings
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movq	%r14, %rdx
	callq	_ghb_dict_set
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_subtitle_get_selected_settings
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_subtitle_update_dialog_widgets
LBB0_5:
	movq	%r15, %rdi
	callq	_subtitle_refresh_list_ui
LBB0_7:
	movq	%r15, %rdi
	callq	_ghb_update_summary_info
LBB0_8:
	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	"subtitle_dialog"

	.comm	_GTK_RESPONSE_OK,8,3            ## @GTK_RESPONSE_OK
L_.str.1:                               ## @.str.1
	.asciz	"Subtitle"

	.no_dead_strip	_subtitle_edit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function subtitle_edit
_subtitle_edit:                         ; @subtitle_edit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_gtk_tree_view_get_selection
	mov	x20, x0
	mov	x0, x22
	bl	_gtk_tree_view_get_model
	mov	x22, x0
	mov	x0, x21
	bl	_gtk_tree_path_get_depth
	cmp	w0, #1
	b.gt	LBB0_8
; %bb.1:
	add	x1, sp, #12
	mov	x0, x22
	mov	x2, x21
	bl	_gtk_tree_model_get_iter
	cbz	x0, LBB0_8
; %bb.2:
	add	x1, sp, #12
	mov	x0, x20
	bl	_gtk_tree_selection_select_iter
	ldr	w0, [x19]
	bl	_ghb_get_job_subtitle_settings
	bl	_ghb_value_dup
	mov	x20, x0
	str	x0, [sp]
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_GHB_WIDGET
	mov	x21, x0
	bl	_GTK_DIALOG
	bl	_gtk_dialog_run
	mov	x22, x0
	mov	x0, x21
	bl	_gtk_widget_hide
Lloh2:
	adrp	x8, _GTK_RESPONSE_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GTK_RESPONSE_OK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x22, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, sp
	bl	_ghb_value_free
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19]
	bl	_ghb_get_job_settings
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_ghb_dict_set
	mov	x0, x19
	mov	x1, #0
	bl	_subtitle_get_selected_settings
	cbz	x0, LBB0_6
; %bb.5:
	mov	x1, x0
	mov	x0, x19
	bl	_subtitle_update_dialog_widgets
LBB0_6:
	mov	x0, x19
	bl	_subtitle_refresh_list_ui
LBB0_7:
	mov	x0, x19
	bl	_ghb_update_summary_info
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"subtitle_dialog"

	.comm	_GTK_RESPONSE_OK,8,3            ; @GTK_RESPONSE_OK
l_.str.1:                               ; @.str.1
	.asciz	"Subtitle"

	.no_dead_strip	_subtitle_edit
.subsections_via_symbols
