	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_shader_manager_set_preset ## -- Begin function menu_shader_manager_set_preset
	.p2align	4, 0x90
_menu_shader_manager_set_preset:        ## @menu_shader_manager_set_preset
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.1:
	movl	%esi, %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_retroarch_apply_shader
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_menu_shader_manager_clear_num_passes
LBB0_10:
	movl	$1, %r15d
	jmp	LBB0_11
LBB0_5:
	xorl	%r15d, %r15d
	testq	%r14, %r14
	je	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_video_shader_read_preset
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_RARCH_LOG
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_video_shader_read_conf_preset
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_video_shader_resolve_parameters
LBB0_9:
	movq	%r12, %rdi
	callq	_config_file_free
	jmp	LBB0_10
LBB0_2:
	movq	%r14, %rdi
	callq	_menu_shader_manager_clear_num_passes
	xorl	%r15d, %r15d
LBB0_11:
	movq	_CMD_EVENT_SHADER_PRESET_LOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_command_event
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_EVENT_SHADER_PRESET_LOADED,4,2 ## @CMD_EVENT_SHADER_PRESET_LOADED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting Menu shader: %s.\n"

	.comm	_MENU_ENTRIES_CTL_SET_REFRESH,4,2 ## @MENU_ENTRIES_CTL_SET_REFRESH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_shader_manager_set_preset ; -- Begin function menu_shader_manager_set_preset
	.p2align	2
_menu_shader_manager_set_preset:        ; @menu_shader_manager_set_preset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x19, x0
	cbz	w3, LBB0_2
; %bb.1:
	mov	x0, x1
	mov	x1, x20
	mov	w2, #1
	bl	_retroarch_apply_shader
	cbz	w0, LBB0_10
LBB0_2:
	mov	x0, x20
	bl	_string_is_empty
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_menu_shader_manager_clear_num_passes
LBB0_4:
	mov	w19, #1
	b	LBB0_12
LBB0_5:
	cbz	x19, LBB0_12
; %bb.6:
	mov	x0, x20
	bl	_video_shader_read_preset
	cbz	x0, LBB0_11
; %bb.7:
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
	mov	x0, x21
	mov	x1, x19
	bl	_video_shader_read_conf_preset
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x19
	bl	_video_shader_resolve_parameters
LBB0_9:
	mov	x0, x21
	bl	_config_file_free
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	bl	_menu_shader_manager_clear_num_passes
LBB0_11:
	mov	w19, #0
LBB0_12:
Lloh2:
	adrp	x8, _CMD_EVENT_SHADER_PRESET_LOADED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_EVENT_SHADER_PRESET_LOADED@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_command_event
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_EVENT_SHADER_PRESET_LOADED,4,2 ; @CMD_EVENT_SHADER_PRESET_LOADED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting Menu shader: %s.\n"

	.comm	_MENU_ENTRIES_CTL_SET_REFRESH,4,2 ; @MENU_ENTRIES_CTL_SET_REFRESH
.subsections_via_symbols
