	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl_core_set_shader
_gl_core_set_shader:                    ## @gl_core_set_shader
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_gl_core_context_bind_hw_render
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_gl_core_filter_chain_free
LBB0_4:
	movq	$0, (%rbx)
	movq	%r14, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	_RARCH_SHADER_SLANG@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_WARN
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rdi
	callq	_string_is_empty
	movl	$1, %r15d
	testq	%rax, %rax
	je	LBB0_8
LBB0_10:
	movq	%rbx, %rdi
	callq	_gl_core_init_default_filter_chain
	jmp	LBB0_11
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_gl_core_init_filter_chain_preset
	movl	$1, %r15d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_gl_core_context_bind_hw_render
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_RARCH_ERR
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_RARCH_SHADER_SLANG,4,2         ## @RARCH_SHADER_SLANG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GLCore]: Only Slang shaders are supported. Falling back to stock.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[GLCore]: Failed to create filter chain: \"%s\". Falling back to stock.\n"

	.no_dead_strip	_gl_core_set_shader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl_core_set_shader
_gl_core_set_shader:                    ; @gl_core_set_shader
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w1, #0
	bl	_gl_core_context_bind_hw_render
	ldr	x0, [x19]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_gl_core_filter_chain_free
LBB0_3:
	str	xzr, [x19]
	mov	x0, x20
	bl	_string_is_empty
	cbnz	x0, LBB0_6
; %bb.4:
Lloh0:
	adrp	x8, _RARCH_SHADER_SLANG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RARCH_SHADER_SLANG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_WARN
	mov	x20, #0
LBB0_6:
	mov	x0, x20
	bl	_string_is_empty
	cbz	x0, LBB0_10
; %bb.7:
	mov	w20, #1
LBB0_8:
	mov	x0, x19
	bl	_gl_core_init_default_filter_chain
	b	LBB0_12
LBB0_9:
	mov	w20, #0
	b	LBB0_13
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	bl	_gl_core_init_filter_chain_preset
	cbz	w0, LBB0_14
; %bb.11:
	mov	w20, #1
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_gl_core_context_bind_hw_render
LBB0_13:
	mov	x0, x20
	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
LBB0_14:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_RARCH_ERR
	mov	w20, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_RARCH_SHADER_SLANG,4,2         ; @RARCH_SHADER_SLANG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GLCore]: Only Slang shaders are supported. Falling back to stock.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[GLCore]: Failed to create filter chain: \"%s\". Falling back to stock.\n"

	.no_dead_strip	_gl_core_set_shader
.subsections_via_symbols
