	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function presets_add_config_file
_presets_add_config_file:               ## @presets_add_config_file
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	callq	_ghb_get_user_config_dir
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_g_strdup_printf
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_g_free
	movq	_G_FILE_TEST_IS_REGULAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_g_file_test
	movl	$-1, %r15d
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	%r12, %rdi
	callq	_hb_presets_read_file
	movq	%rax, %r14
	movq	%rax, -72(%rbp)
	movq	%r12, %rdi
	callq	_g_free
	testq	%r14, %r14
	je	LBB0_10
## %bb.2:
	leaq	-36(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_hb_presets_version
	leaq	-40(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	callq	_hb_presets_current_version
	movl	-36(%rbp), %eax
	cmpl	-40(%rbp), %eax
	je	LBB0_5
## %bb.3:
	xorl	%edi, %edi
	callq	_ghb_get_user_config_dir
	movq	%rax, %r15
	movl	-36(%rbp), %edx
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_g_strdup_printf
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_hb_value_write_json
	movq	%r15, %rdi
	callq	_g_free
	movq	%rbx, %rdi
	callq	_g_free
	movl	-36(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jle	LBB0_5
## %bb.4:
	leaq	-72(%rbp), %rdi
	callq	_hb_value_free
	movl	$-2, %r15d
	jmp	LBB0_10
LBB0_5:
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hb_presets_import
	movq	-64(%rbp), %rdi
	callq	_hb_presets_add
	movl	-36(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jne	LBB0_8
## %bb.6:
	movl	-48(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax
	cmpl	-52(%rbp), %eax
	je	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	callq	_hb_presets_builtin_update
	xorl	%eax, %eax
	callq	_store_presets
LBB0_9:
	leaq	-64(%rbp), %rdi
	callq	_hb_value_free
	leaq	-72(%rbp), %rdi
	callq	_hb_value_free
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s"

	.comm	_G_FILE_TEST_IS_REGULAR,4,2     ## @G_FILE_TEST_IS_REGULAR
L_.str.1:                               ## @.str.1
	.asciz	"%s/presets.%d.%d.%d.json"

	.no_dead_strip	_presets_add_config_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function presets_add_config_file
_presets_add_config_file:               ; @presets_add_config_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
	mov	x0, #0
	bl	_ghb_get_user_config_dir
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	bl	_g_strdup_printf
	mov	x20, x0
	mov	x0, x21
	bl	_g_free
Lloh2:
	adrp	x8, _G_FILE_TEST_IS_REGULAR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _G_FILE_TEST_IS_REGULAR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_g_file_test
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_hb_presets_read_file
	mov	x19, x0
	stur	x0, [x29, #-40]
	mov	x0, x20
	bl	_g_free
	cbz	x19, LBB0_5
; %bb.2:
	add	x1, sp, #40
	add	x2, sp, #36
	add	x3, sp, #32
	mov	x0, x19
	bl	_hb_presets_version
	sub	x0, x29, #44
	add	x1, sp, #48
	add	x2, sp, #44
	bl	_hb_presets_current_version
	ldr	w8, [sp, #40]
	ldur	w9, [x29, #-44]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.3:
	mov	x0, #0
	bl	_ghb_get_user_config_dir
	mov	x20, x0
	ldp	w8, w2, [sp, #36]
	ldr	w9, [sp, #32]
	stp	x8, x9, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_g_strdup_printf
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_hb_value_write_json
	mov	x0, x20
	bl	_g_free
	mov	x0, x21
	bl	_g_free
	ldr	w8, [sp, #40]
	ldur	w9, [x29, #-44]
	cmp	w8, w9
	b.le	LBB0_6
; %bb.4:
	sub	x0, x29, #40
	bl	_hb_value_free
	mov	w0, #-2
	b	LBB0_11
LBB0_5:
	mov	w0, #-1
	b	LBB0_11
LBB0_6:
	add	x1, sp, #24
	mov	x0, x19
	bl	_hb_presets_import
	ldr	x0, [sp, #24]
	bl	_hb_presets_add
	ldr	w8, [sp, #40]
	ldur	w9, [x29, #-44]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.7:
	ldr	w8, [sp, #36]
	ldr	w9, [sp, #48]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [sp, #32]
	ldr	w9, [sp, #44]
	cmp	w8, w9
	b.eq	LBB0_10
LBB0_9:
	bl	_hb_presets_builtin_update
	bl	_store_presets
LBB0_10:
	add	x0, sp, #24
	bl	_hb_value_free
	sub	x0, x29, #40
	bl	_hb_value_free
	mov	w0, #0
LBB0_11:
	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
	add	sp, sp, #112
	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	"%s/%s"

	.comm	_G_FILE_TEST_IS_REGULAR,4,2     ; @G_FILE_TEST_IS_REGULAR
l_.str.1:                               ; @.str.1
	.asciz	"%s/presets.%d.%d.%d.json"

	.no_dead_strip	_presets_add_config_file
.subsections_via_symbols
