	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_presets_load               ## -- Begin function ghb_presets_load
	.p2align	4, 0x90
_ghb_presets_load:                      ## @ghb_presets_load
	.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	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_presets_add_config_file
	cmpl	$-2, %eax
	jne	LBB0_5
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_GHB_WIDGET
	movl	%eax, %edi
	callq	_GTK_WINDOW
	movq	%rax, %r15
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movslq	%eax, %rdi
	xorl	%eax, %eax
	callq	_g_strdup_printf
	movq	%rax, %r14
	movq	_GTK_MESSAGE_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rdi
	callq	__
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_ghb_message_dialog
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_g_free
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.2:
	leaq	-52(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_hb_presets_current_version
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_g_strdup_printf
	movq	%rax, %rbx
	leaq	L_.str.6(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_ghb_log
	movq	%rbx, %rdi
	callq	_presets_add_config_file
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_ghb_log
	xorl	%eax, %eax
	callq	_hb_presets_builtin_update
LBB0_4:
	movq	%rbx, %rdi
	callq	_g_free
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_5:
	testl	%eax, %eax
	jns	LBB0_8
## %bb.6:
	leaq	L_.str.8(%rip), %rdi
	callq	_presets_add_config_file
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_ghb_log
	xorl	%eax, %eax
	callq	_hb_presets_builtin_update
	xorl	%eax, %eax
	callq	_store_presets
LBB0_8:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ghb_update_ui_combo_box
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"presets.json"

L_.str.1:                               ## @.str.1
	.asciz	"hb_window"

L_.str.2:                               ## @.str.2
	.asciz	"Presets found are newer than what is supported by this version of HandBrake!\n\nWould you like to continue?"

	.comm	_GTK_MESSAGE_WARNING,4,2        ## @GTK_MESSAGE_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"Get me out of here!"

L_.str.4:                               ## @.str.4
	.asciz	"Load backup presets"

L_.str.5:                               ## @.str.5
	.asciz	"presets.%d.%d.%d.json"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to read presets file, trying backup (%s)..."

L_.str.7:                               ## @.str.7
	.asciz	"Failed to read backup presets, using defaults..."

L_.str.8:                               ## @.str.8
	.asciz	"presets"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to read presets file, initailizing new presets..."

L_.str.10:                              ## @.str.10
	.asciz	"PresetCategory"

	.comm	_FALSE,4,2                      ## @FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_presets_load               ; -- Begin function ghb_presets_load
	.p2align	2
_ghb_presets_load:                      ; @ghb_presets_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_presets_add_config_file
	cmn	w0, #2
	b.ne	LBB0_5
; %bb.1:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_GHB_WIDGET
	bl	_GTK_WINDOW
	mov	x20, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_g_strdup_printf
	mov	x21, x0
Lloh6:
	adrp	x8, _GTK_MESSAGE_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GTK_MESSAGE_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	mov	x23, x0
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	__
	mov	x4, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	bl	_ghb_message_dialog
	mov	x20, x0
	mov	x0, x21
	bl	_g_free
	cbz	w20, LBB0_9
; %bb.2:
	add	x0, sp, #44
	add	x1, sp, #40
	add	x2, sp, #36
	bl	_hb_presets_current_version
	ldp	w9, w8, [sp, #40]
	ldr	w10, [sp, #36]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_g_strdup_printf
	mov	x20, x0
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_ghb_log
	mov	x0, x20
	bl	_presets_add_config_file
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_ghb_log
	bl	_hb_presets_builtin_update
LBB0_4:
	mov	x0, x20
	bl	_g_free
	b	LBB0_8
LBB0_5:
	tbz	w0, #31, LBB0_8
; %bb.6:
Lloh19:
	adrp	x0, l_.str.8@PAGE
Lloh20:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_presets_add_config_file
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh21:
	adrp	x0, l_.str.9@PAGE
Lloh22:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_ghb_log
	bl	_hb_presets_builtin_update
	bl	_store_presets
LBB0_8:
Lloh23:
	adrp	x8, _FALSE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
Lloh26:
	adrp	x1, l_.str.10@PAGE
Lloh27:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	x2, #0
	bl	_ghb_update_ui_combo_box
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"presets.json"

l_.str.1:                               ; @.str.1
	.asciz	"hb_window"

l_.str.2:                               ; @.str.2
	.asciz	"Presets found are newer than what is supported by this version of HandBrake!\n\nWould you like to continue?"

	.comm	_GTK_MESSAGE_WARNING,4,2        ; @GTK_MESSAGE_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"Get me out of here!"

l_.str.4:                               ; @.str.4
	.asciz	"Load backup presets"

l_.str.5:                               ; @.str.5
	.asciz	"presets.%d.%d.%d.json"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to read presets file, trying backup (%s)..."

l_.str.7:                               ; @.str.7
	.asciz	"Failed to read backup presets, using defaults..."

l_.str.8:                               ; @.str.8
	.asciz	"presets"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to read presets file, initailizing new presets..."

l_.str.10:                              ; @.str.10
	.asciz	"PresetCategory"

	.comm	_FALSE,4,2                      ; @FALSE
.subsections_via_symbols
