	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function wiiu_gfx_set_shader
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_wiiu_gfx_set_shader:                   ## @wiiu_gfx_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_GX2DrawDone
	movq	%r12, %rdi
	callq	_wiiu_free_shader_preset
	movq	%rbx, %rdi
	callq	_string_is_empty
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	_RARCH_SHADER_SLANG@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.7:
	movq	%rbx, %rdi
	callq	_video_shader_read_preset
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	movq	%rax, %r15
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	movq	%rax, 8(%r12)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_video_shader_read_conf_preset
	movq	8(%r12), %rsi
	testl	%eax, %eax
	je	LBB0_36
## %bb.9:
	cmpl	$0, (%rsi)
	je	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rsi), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_slang_preprocess_parse_parameters
	incq	%rbx
	movq	8(%r12), %rsi
	movl	(%rsi), %eax
	cmpq	%rax, %rbx
	jb	LBB0_11
LBB0_12:
	movq	%r15, %rdi
	callq	_video_shader_resolve_current_parameters
	movq	%r15, %rdi
	callq	_config_file_free
	movq	8(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_20
## %bb.13:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	incq	%r13
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	addq	$24, %r14
	cmpq	%rcx, %r13
	jae	LBB0_20
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	8(%r12), %rax
	movq	16(%rax), %rax
	movl	(%rax,%r13,4), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_strncpy
	movq	%rbx, %rdi
	movl	$46, %esi
	callq	_strrchr
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	movslq	%eax, %rcx
	movq	%rbx, %rax
	addq	%rcx, %rax
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	$1752393518, (%rax)             ## imm = 0x6873672E
	movb	$0, 4(%rax)
	movq	%rbx, %rdi
	callq	_gfd_open
	movq	16(%r12), %rcx
	movq	%rax, (%rcx,%r14)
	testq	%rax, %rax
	je	LBB0_29
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%rax), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_18
## %bb.30:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%rcx), %rax
	movl	(%rax), %edi
	movq	_GX2_UNIFORM_BLOCK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MEM2_alloc
	movq	16(%r12), %rcx
	movq	16(%rcx,%r14), %rcx
	movq	%rax, (%rcx)
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	16(%rax,%r14), %rax
	movq	(%rax), %rdi
	movq	8(%rcx), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	16(%rax,%r14), %rax
	movq	(%rax), %rsi
	movq	8(%rcx), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	callq	_GX2Invalidate
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rax
	movq	8(%rax), %rcx
	cmpl	$2, (%rcx)
	jl	LBB0_18
## %bb.31:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%rcx), %rax
	movl	4(%rax), %edi
	movq	_GX2_UNIFORM_BLOCK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MEM2_alloc
	movq	16(%r12), %rcx
	movq	16(%rcx,%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	16(%rax,%r14), %rax
	movq	8(%rax), %rdi
	movq	8(%rcx), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	16(%rax,%r14), %rax
	movq	8(%rax), %rsi
	movq	8(%rcx), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	callq	_GX2Invalidate
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rax
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	jle	LBB0_19
## %bb.32:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%rax), %rax
	movl	(%rax), %edi
	movq	_GX2_UNIFORM_BLOCK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MEM2_alloc
	movq	16(%r12), %rcx
	movq	8(%rcx,%r14), %rcx
	movq	%rax, (%rcx)
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	8(%rax,%r14), %rax
	movq	(%rax), %rdi
	movq	(%rcx), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	8(%rax,%r14), %rax
	movq	(%rax), %rsi
	movq	(%rcx), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	callq	_GX2Invalidate
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rax
	movq	(%rax), %rax
	cmpl	$2, (%rax)
	jl	LBB0_19
## %bb.33:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	8(%rax), %rax
	movl	4(%rax), %edi
	movq	_GX2_UNIFORM_BLOCK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MEM2_alloc
	movq	16(%r12), %rcx
	movq	8(%rcx,%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	8(%rax,%r14), %rax
	movq	8(%rax), %rdi
	movq	(%rcx), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	8(%rax,%r14), %rax
	movq	8(%rax), %rsi
	movq	(%rcx), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	callq	_GX2Invalidate
	jmp	LBB0_19
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_WARN
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.35:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	$1, %r14d
	cmpl	$0, 4(%rax)
	je	LBB0_5
## %bb.21:
	xorl	%r13d, %r13d
	leaq	-64(%rbp), %r15
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	32(%rcx,%rbx), %rax
	leaq	-64(%rbp), %r15
LBB0_27:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	_GX2_INVALIDATE_MODE_CPU_TEXTURE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	24(%rcx,%rbx), %edx
	movq	%rax, %rsi
	callq	_GX2Invalidate
	movq	%r15, %rdi
	callq	_image_texture_free
LBB0_28:                                ##   in Loop: Header=BB0_22 Depth=1
	incq	%r13
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	cmpq	%rcx, %r13
	jae	LBB0_5
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_25 Depth 2
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	8(%rax), %rax
	movl	(%rax,%r13,4), %esi
	movq	%r15, %rdi
	callq	_image_texture_load
	testq	%rax, %rax
	je	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	-64(%rbp), %eax
	movq	(%r12), %rcx
	movq	%r13, %rbx
	shlq	$6, %rbx
	movl	%eax, 8(%rcx,%rbx)
	movl	-60(%rbp), %eax
	movl	%eax, 12(%rcx,%rbx)
	movl	$1, 16(%rcx,%rbx)
	movq	_GX2_SURFACE_DIM_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rcx,%rbx)
	movq	_GX2_TILE_MODE_LINEAR_ALIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rcx,%rbx)
	movl	$1, (%rcx,%rbx)
	movq	_GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rcx,%rbx)
	movq	__G@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	__B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	__A@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	__R@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_GX2_COMP_SEL
	movq	(%r12), %rcx
	movl	%eax, 56(%rcx,%rbx)
	leaq	(%rcx,%rbx), %rdi
	addq	$8, %rdi
	callq	_GX2CalcSurfaceSizeAndAlignment
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	callq	_GX2InitTextureRegs
	movq	(%r12), %rax
	movl	24(%rax,%rbx), %edi
	movl	40(%rax,%rbx), %esi
	callq	_MEM2_alloc
	movq	(%r12), %rcx
	movq	%rax, 32(%rcx,%rbx)
	cmpl	$0, -60(%rbp)
	jle	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_25:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	12(%rcx,%rbx), %r15d
	jge	LBB0_26
## %bb.34:                              ##   in Loop: Header=BB0_25 Depth=2
	movslq	20(%rcx,%rbx), %rax
	movslq	%r15d, %rdi
	imulq	%rax, %rdi
	shlq	$2, %rdi
	addq	32(%rcx,%rbx), %rdi
	movl	-64(%rbp), %edx
	movl	%edx, %eax
	imull	%r15d, %eax
	movslq	%eax, %rsi
	addq	-56(%rbp), %rsi
	shll	$3, %edx
	callq	_memcpy
	incl	%r15d
	movq	(%r12), %rcx
	cmpl	-60(%rbp), %r15d
	jl	LBB0_25
	jmp	LBB0_26
LBB0_36:
	movq	%rsi, %rdi
	callq	_free
	movq	$0, 8(%r12)
	jmp	LBB0_5
LBB0_29:
	movq	%r12, %rdi
	callq	_wiiu_free_shader_preset
	xorl	%r14d, %r14d
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RARCH_SHADER_SLANG,4,2         ## @RARCH_SHADER_SLANG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GX2] Only Slang shaders are supported. Falling back to stock.\n"

	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_GX2_UNIFORM_BLOCK_ALIGNMENT,4,2 ## @GX2_UNIFORM_BLOCK_ALIGNMENT
	.comm	_GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK,4,2 ## @GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK
	.comm	_GX2_SURFACE_DIM_TEXTURE_2D,4,2 ## @GX2_SURFACE_DIM_TEXTURE_2D
	.comm	_GX2_TILE_MODE_LINEAR_ALIGNED,4,2 ## @GX2_TILE_MODE_LINEAR_ALIGNED
	.comm	_GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8,4,2 ## @GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8
	.comm	__G,4,2                         ## @_G
	.comm	__B,4,2                         ## @_B
	.comm	__A,4,2                         ## @_A
	.comm	__R,4,2                         ## @_R
	.comm	_GX2_INVALIDATE_MODE_CPU_TEXTURE,4,2 ## @GX2_INVALIDATE_MODE_CPU_TEXTURE
	.no_dead_strip	_wiiu_gfx_set_shader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiiu_gfx_set_shader
_wiiu_gfx_set_shader:                   ; @wiiu_gfx_set_shader
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	cbz	x0, LBB0_23
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_GX2DrawDone
	mov	x0, x19
	bl	_wiiu_free_shader_preset
	mov	x0, x20
	bl	_string_is_empty
	cbz	x0, LBB0_3
LBB0_2:
	mov	w0, #1
	b	LBB0_23
LBB0_3:
Lloh3:
	adrp	x8, _RARCH_SHADER_SLANG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RARCH_SHADER_SLANG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_21
; %bb.4:
	mov	x0, x20
	bl	_video_shader_read_preset
	cbz	x0, LBB0_23
; %bb.5:
	mov	x20, x0
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x1, x0
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_video_shader_read_conf_preset
	ldr	x1, [x19, #8]
	cbz	w0, LBB0_36
; %bb.6:
	ldr	w8, [x1]
	cbz	w8, LBB0_9
; %bb.7:
	mov	x21, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x1, #16]
	ldr	w0, [x8, x21, lsl #2]
	bl	_slang_preprocess_parse_parameters
	add	x21, x21, #1
	ldr	x1, [x19, #8]
	ldr	w8, [x1]
	cmp	x21, x8
	b.lo	LBB0_8
LBB0_9:
	mov	x0, x20
	bl	_video_shader_resolve_current_parameters
	mov	x0, x20
	bl	_config_file_free
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	cbz	w9, LBB0_25
; %bb.10:
	mov	x21, #0
	mov	x22, #0
Lloh6:
	adrp	x23, _PATH_MAX_LENGTH@GOTPAGE
Lloh7:
	ldr	x23, [x23, _PATH_MAX_LENGTH@GOTPAGEOFF]
	mov	w24, #26414
	movk	w24, #26739, lsl #16
Lloh8:
	adrp	x25, _GX2_UNIFORM_BLOCK_ALIGNMENT@GOTPAGE
Lloh9:
	ldr	x25, [x25, _GX2_UNIFORM_BLOCK_ALIGNMENT@GOTPAGEOFF]
Lloh10:
	adrp	x26, _GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK@GOTPAGE
Lloh11:
	ldr	x26, [x26, _GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	sp, x27
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	add	x21, x21, #24
	cmp	x22, x9
	b.hs	LBB0_25
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x27, sp
	ldr	w8, [x23]
	mov	x9, x8
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	ldr	w1, [x8, x22, lsl #2]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_strncpy
	mov	x0, x20
	mov	w1, #46
	bl	_strrchr
	cbnz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	bl	_strlen
	add	x0, x20, w0, sxtw
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	str	w24, [x0]
	strb	wzr, [x0, #4]
	mov	x0, x20
	bl	_gfd_open
	ldr	x8, [x19, #16]
	str	x0, [x8, x21]
	cbz	x0, LBB0_37
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x0, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x8, #8]
	ldr	w0, [x8]
	ldr	w1, [x25]
	bl	_MEM2_alloc
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x8, [x8, #16]
	str	x0, [x8]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x9, [x8, #16]
	ldr	x0, [x9]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x26]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x9, [x8, #16]
	ldr	x1, [x9]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8]
	bl	_GX2Invalidate
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21]
	ldr	x8, [x0, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.le	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x25]
	bl	_MEM2_alloc
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x8, [x8, #16]
	str	x0, [x8, #8]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x9, [x8, #16]
	ldr	x0, [x9, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #4]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x26]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x9, [x8, #16]
	ldr	x1, [x9, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #4]
	bl	_GX2Invalidate
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21]
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x8, #8]
	ldr	w0, [x8]
	ldr	w1, [x25]
	bl	_MEM2_alloc
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x8, [x8, #8]
	str	x0, [x8]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldp	x8, x9, [x8]
	ldr	x0, [x9]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x26]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldp	x8, x9, [x8]
	ldr	x1, [x9]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8]
	bl	_GX2Invalidate
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x21]
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.le	LBB0_11
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x25]
	bl	_MEM2_alloc
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x8, [x8, #8]
	str	x0, [x8, #8]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldp	x8, x9, [x8]
	ldr	x0, [x9, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #4]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x26]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldp	x8, x9, [x8]
	ldr	x1, [x9, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #4]
	bl	_GX2Invalidate
	b	LBB0_11
LBB0_21:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_WARN
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_38
; %bb.24:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_25:
	ldr	w9, [x8, #4]
	mov	w20, #1
	cbz	w9, LBB0_2
; %bb.26:
	mov	x21, #0
Lloh19:
	adrp	x24, _GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8@GOTPAGE
Lloh20:
	ldr	x24, [x24, _GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8@GOTPAGEOFF]
Lloh21:
	adrp	x25, __G@GOTPAGE
Lloh22:
	ldr	x25, [x25, __G@GOTPAGEOFF]
Lloh23:
	adrp	x26, __B@GOTPAGE
Lloh24:
	ldr	x26, [x26, __B@GOTPAGEOFF]
Lloh25:
	adrp	x27, __A@GOTPAGE
Lloh26:
	ldr	x27, [x27, __A@GOTPAGEOFF]
Lloh27:
	adrp	x28, __R@GOTPAGE
Lloh28:
	ldr	x28, [x28, __R@GOTPAGEOFF]
Lloh29:
	adrp	x22, _GX2_INVALIDATE_MODE_CPU_TEXTURE@GOTPAGE
Lloh30:
	ldr	x22, [x22, _GX2_INVALIDATE_MODE_CPU_TEXTURE@GOTPAGEOFF]
	b	LBB0_30
LBB0_27:                                ;   in Loop: Header=BB0_30 Depth=1
	mov	x1, x0
LBB0_28:                                ;   in Loop: Header=BB0_30 Depth=1
	ldr	w0, [x22]
	add	x8, x8, x21, lsl #6
	ldr	w2, [x8, #24]
	bl	_GX2Invalidate
	sub	x0, x29, #104
	bl	_image_texture_free
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=1
	add	x21, x21, #1
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #4]
	mov	w0, #1
	cmp	x21, x9
	b.hs	LBB0_23
LBB0_30:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_33 Depth 2
	stp	xzr, xzr, [x29, #-104]
	ldr	x8, [x8, #8]
	ldr	w1, [x8, x21, lsl #2]
	sub	x0, x29, #104
	bl	_image_texture_load
	cbz	x0, LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	x8, [x19]
	lsl	x23, x21, #6
	add	x8, x8, x23
	ldur	d0, [x29, #-104]
	str	d0, [x8, #8]
	str	w20, [x8, #16]
Lloh31:
	adrp	x9, _GX2_SURFACE_DIM_TEXTURE_2D@GOTPAGE
Lloh32:
	ldr	x9, [x9, _GX2_SURFACE_DIM_TEXTURE_2D@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	str	w9, [x8, #52]
Lloh34:
	adrp	x9, _GX2_TILE_MODE_LINEAR_ALIGNED@GOTPAGE
Lloh35:
	ldr	x9, [x9, _GX2_TILE_MODE_LINEAR_ALIGNED@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	str	w9, [x8, #48]
	str	w20, [x8]
	ldr	w9, [x24]
	str	w9, [x8, #44]
	ldr	w0, [x25]
	ldr	w1, [x26]
	ldr	w2, [x27]
	ldr	w3, [x28]
	bl	_GX2_COMP_SEL
	ldr	x8, [x19]
	add	x8, x8, x23
	str	w0, [x8, #56]
	add	x0, x8, #8
	bl	_GX2CalcSurfaceSizeAndAlignment
	ldr	x8, [x19]
	add	x0, x8, x23
	bl	_GX2InitTextureRegs
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	w0, [x8, #24]
	ldr	w1, [x8, #40]
	bl	_MEM2_alloc
	ldr	x8, [x19]
	add	x9, x8, x23
	str	x0, [x9, #32]
	ldur	w9, [x29, #-100]
	cmp	w9, #1
	b.lt	LBB0_27
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	w23, #0
LBB0_33:                                ;   Parent Loop BB0_30 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x9, x8, x21, lsl #6
	ldr	w10, [x9, #12]
	cmp	w23, w10
	b.ge	LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=2
	ldr	x8, [x9, #32]
	ldr	w9, [x9, #20]
	mul	w9, w9, w23
	add	x0, x8, w9, sxtw #2
	ldur	x8, [x29, #-96]
	ldur	w9, [x29, #-104]
	mul	w10, w9, w23
	add	x1, x8, w10, sxtw
	lsl	w2, w9, #3
	bl	_memcpy
	add	w23, w23, #1
	ldur	w9, [x29, #-100]
	ldr	x8, [x19]
	cmp	w23, w9
	b.lt	LBB0_33
LBB0_35:                                ;   in Loop: Header=BB0_30 Depth=1
	add	x9, x8, x21, lsl #6
	ldr	x1, [x9, #32]
	b	LBB0_28
LBB0_36:
	mov	x0, x1
	bl	_free
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_23
LBB0_37:
	mov	x0, x19
	bl	_wiiu_free_shader_preset
	mov	sp, x27
	b	LBB0_22
LBB0_38:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_RARCH_SHADER_SLANG,4,2         ; @RARCH_SHADER_SLANG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GX2] Only Slang shaders are supported. Falling back to stock.\n"

	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_GX2_UNIFORM_BLOCK_ALIGNMENT,4,2 ; @GX2_UNIFORM_BLOCK_ALIGNMENT
	.comm	_GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK,4,2 ; @GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK
	.comm	_GX2_SURFACE_DIM_TEXTURE_2D,4,2 ; @GX2_SURFACE_DIM_TEXTURE_2D
	.comm	_GX2_TILE_MODE_LINEAR_ALIGNED,4,2 ; @GX2_TILE_MODE_LINEAR_ALIGNED
	.comm	_GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8,4,2 ; @GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8
	.comm	__G,4,2                         ; @_G
	.comm	__B,4,2                         ; @_B
	.comm	__A,4,2                         ; @_A
	.comm	__R,4,2                         ; @_R
	.comm	_GX2_INVALIDATE_MODE_CPU_TEXTURE,4,2 ; @GX2_INVALIDATE_MODE_CPU_TEXTURE
	.no_dead_strip	_wiiu_gfx_set_shader
.subsections_via_symbols
