	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_preset2
_select_preset2:                        ## @select_preset2
	.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
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %rbx
	cmpq	$0, (%rsi)
	je	LBB0_8
## %bb.2:
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_GHB_WIDGET
	movl	%eax, %edi
	callq	_GTK_TREE_VIEW
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_gtk_tree_view_get_selection
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_gtk_tree_view_get_model
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_ghb_tree_path_new_from_index
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_gtk_tree_view_expand_to_path
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_gtk_tree_model_get_iter
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	callq	_gtk_tree_model_get_iter_first
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	leaq	-44(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_gtk_tree_selection_select_iter
LBB0_6:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_gtk_tree_view_scroll_to_cell
	movq	%r12, %rdi
	callq	_gtk_tree_path_free
LBB0_7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_set_preset_menu_button_label
	movq	%rbx, %rdi
	callq	_preset_get_type
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_G_ACTION_MAP
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_g_action_map_lookup_action
	movl	%eax, %edi
	callq	_G_SIMPLE_ACTION
	movq	_HB_PRESET_TYPE_CUSTOM@GOTPCREL(%rip), %r15
	xorl	%esi, %esi
	cmpl	(%r15), %ebx
	sete	%sil
	movq	%rax, %rdi
	callq	_g_simple_action_set_enabled
	movl	(%r14), %edi
	callq	_G_ACTION_MAP
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_g_action_map_lookup_action
	movl	%eax, %edi
	callq	_G_SIMPLE_ACTION
	xorl	%esi, %esi
	cmpl	(%r15), %ebx
	sete	%sil
	movq	%rax, %rdi
	callq	_g_simple_action_set_enabled
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	"presets_list"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"preset-rename"

	.comm	_HB_PRESET_TYPE_CUSTOM,4,2      ## @HB_PRESET_TYPE_CUSTOM
L_.str.2:                               ## @.str.2
	.asciz	"preset-save"

	.no_dead_strip	_select_preset2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_preset2
_select_preset2:                        ; @select_preset2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cbz	x1, LBB0_8
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_GHB_WIDGET
	bl	_GTK_TREE_VIEW
	mov	x21, x0
	bl	_gtk_tree_view_get_selection
	mov	x23, x0
	mov	x0, x21
	bl	_gtk_tree_view_get_model
	mov	x24, x0
	mov	x0, x20
	bl	_ghb_tree_path_new_from_index
	cbz	x0, LBB0_7
; %bb.3:
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_gtk_tree_view_expand_to_path
	add	x1, sp, #12
	mov	x0, x24
	mov	x2, x22
	bl	_gtk_tree_model_get_iter
	cbnz	x0, LBB0_5
; %bb.4:
	add	x1, sp, #12
	mov	x0, x24
	bl	_gtk_tree_model_get_iter_first
	cbz	x0, LBB0_6
LBB0_5:
	add	x1, sp, #12
	mov	x0, x23
	bl	_gtk_tree_selection_select_iter
LBB0_6:
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_gtk_tree_view_scroll_to_cell
	mov	x0, x22
	bl	_gtk_tree_path_free
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_set_preset_menu_button_label
	mov	x0, x20
	bl	_preset_get_type
	mov	x20, x0
	ldr	w0, [x19]
	bl	_G_ACTION_MAP
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_g_action_map_lookup_action
	bl	_G_SIMPLE_ACTION
Lloh7:
	adrp	x21, _HB_PRESET_TYPE_CUSTOM@GOTPAGE
Lloh8:
	ldr	x21, [x21, _HB_PRESET_TYPE_CUSTOM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w20, w8
	cset	w1, eq
	bl	_g_simple_action_set_enabled
	ldr	w0, [x19]
	bl	_G_ACTION_MAP
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_g_action_map_lookup_action
	bl	_G_SIMPLE_ACTION
	ldr	w8, [x21]
	cmp	w20, w8
	cset	w1, eq
	bl	_g_simple_action_set_enabled
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"presets_list"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"preset-rename"

	.comm	_HB_PRESET_TYPE_CUSTOM,4,2      ; @HB_PRESET_TYPE_CUSTOM
l_.str.2:                               ; @.str.2
	.asciz	"preset-save"

	.no_dead_strip	_select_preset2
.subsections_via_symbols
