	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_glsl_ld
_shader_glsl_ld:                        ## @shader_glsl_ld
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	_WINED3D_GLSL_SAMPLE_LOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	callq	_wined3d_shader_instruction_has_texel_offset
	movq	%rax, %r14
	movq	_WINED3D_GLSL_SAMPLE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	16(%r13), %rax
	movq	24(%rax), %rax
	movl	(%rax), %r15d
	movq	_WINED3D_SAMPLER_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jae	LBB0_7
## %bb.1:
	xorl	%eax, %eax
	testq	%r14, %r14
	cmovel	%eax, %ebx
	orl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	(%r12), %rax
	movl	(%rax,%r15,4), %edi
	callq	_is_mipmapped
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rdi
	leaq	-48(%rbp), %r8
	movl	%r15d, %esi
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_shader_glsl_get_sample_function
	movq	16(%r13), %rsi
	movl	-48(%rbp), %edx
	leaq	-72(%rbp), %rcx
	movq	%r13, %rdi
	callq	_shader_glsl_add_src_param
	movq	16(%r13), %rsi
	movq	_WINED3DSP_WRITEMASK_3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-88(%rbp), %rcx
	movq	%r13, %rdi
	callq	_shader_glsl_add_src_param
	leaq	8(%r12), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_shader_glsl_find_sampler
	movl	%eax, %r14d
	movq	(%r12), %rax
	movl	(%rax,%r15,4), %edi
	callq	_is_multisampled
	movq	16(%r13), %rsi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	addq	$32, %rsi
	movq	_WINED3DSP_WRITEMASK_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rcx
	movq	%r13, %rdi
	callq	_shader_glsl_add_src_param
	movq	16(%r13), %rax
	movl	16(%rax), %ecx
	leaq	8(%r13), %rbx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %r10
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pushq	-80(%rbp)
	pushq	-72(%rbp)
	pushq	%r10
	pushq	%rbx
	pushq	$0
	callq	_shader_glsl_gen_sample_code
	addq	$48, %rsp
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
LBB0_3:
	movl	16(%rsi), %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	movq	-88(%rbp), %rbx
LBB0_5:
	leaq	8(%r13), %r11
	leaq	L_.str.2(%rip), %r10
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pushq	-72(%rbp)
	pushq	%r10
	pushq	%r11
	pushq	%rbx
	callq	_shader_glsl_gen_sample_code
	addq	$32, %rsp
LBB0_6:
	movq	(%r13), %rdi
	leaq	-48(%rbp), %rsi
	callq	_shader_glsl_release_sample_function
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_GLSL_SAMPLE_LOAD,4,2   ## @WINED3D_GLSL_SAMPLE_LOAD
	.comm	_WINED3D_GLSL_SAMPLE_OFFSET,4,2 ## @WINED3D_GLSL_SAMPLE_OFFSET
	.comm	_WINED3D_SAMPLER_DEFAULT,4,2    ## @WINED3D_SAMPLER_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid resource index %u.\n"

	.comm	_WINED3DSP_WRITEMASK_3,4,2      ## @WINED3DSP_WRITEMASK_3
	.comm	_WINED3DSP_WRITEMASK_0,4,2      ## @WINED3DSP_WRITEMASK_0
L_.str.1:                               ## @.str.1
	.asciz	"%s, %s"

L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.no_dead_strip	_shader_glsl_ld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_glsl_ld
_shader_glsl_ld:                        ; @shader_glsl_ld
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x24, [x8]
Lloh0:
	adrp	x8, _WINED3D_GLSL_SAMPLE_LOAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_GLSL_SAMPLE_LOAD@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_wined3d_shader_instruction_has_texel_offset
	mov	x22, x0
Lloh3:
	adrp	x8, _WINED3D_GLSL_SAMPLE_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3D_GLSL_SAMPLE_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #24]
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _WINED3D_SAMPLER_DEFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WINED3D_SAMPLER_DEFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w20, w0
	b.hs	LBB0_3
; %bb.1:
	cmp	x22, #0
	csel	w8, wzr, w25, eq
	orr	w23, w8, w23
	ldr	x8, [x24]
	lsl	x25, x20, #2
	ldr	w0, [x8, x25]
	bl	_is_mipmapped
	mov	x22, x0
	ldr	x0, [x19]
	add	x4, sp, #32
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	bl	_shader_glsl_get_sample_function
	ldr	x1, [x19, #16]
	ldr	w2, [sp, #32]
	add	x3, sp, #56
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	ldr	x1, [x19, #16]
Lloh9:
	adrp	x8, _WINED3DSP_WRITEMASK_3@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WINED3DSP_WRITEMASK_3@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #48
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	add	x0, x24, #8
	mov	x1, x20
	mov	x2, x21
	bl	_shader_glsl_find_sampler
	mov	x20, x0
	ldr	x8, [x24]
	ldr	w0, [x8, x25]
	bl	_is_multisampled
	ldr	x8, [x19, #16]
	cbz	x0, LBB0_4
; %bb.2:
	add	x1, x8, #32
Lloh12:
	adrp	x8, _WINED3DSP_WRITEMASK_0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WINED3DSP_WRITEMASK_0@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, sp, #40
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	ldr	x8, [x19, #16]
	ldr	w3, [x8, #16]
	add	x7, x19, #8
	ldr	x8, [sp, #56]
	ldr	x9, [sp, #40]
	stp	x8, x9, [sp, #8]
Lloh15:
	adrp	x9, l_.str.1@PAGE
Lloh16:
	add	x9, x9, l_.str.1@PAGEOFF
	str	x9, [sp]
	add	x2, sp, #32
	mov	x0, x19
	mov	x1, x20
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	b	LBB0_5
LBB0_3:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_ERR
LBB0_4:
	ldr	w3, [x8, #16]
	ldr	x8, [sp, #48]
	cmp	x22, #0
	csel	x6, xzr, x8, eq
	add	x7, x19, #8
	ldr	x8, [sp, #56]
Lloh19:
	adrp	x9, l_.str.2@PAGE
Lloh20:
	add	x9, x9, l_.str.2@PAGEOFF
	stp	x9, x8, [sp]
	add	x2, sp, #32
	mov	x0, x19
	mov	x1, x20
	mov	x4, #0
	mov	x5, #0
LBB0_5:
	bl	_shader_glsl_gen_sample_code
	ldr	x0, [x19]
	add	x1, sp, #32
	bl	_shader_glsl_release_sample_function
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_GLSL_SAMPLE_LOAD,4,2   ; @WINED3D_GLSL_SAMPLE_LOAD
	.comm	_WINED3D_GLSL_SAMPLE_OFFSET,4,2 ; @WINED3D_GLSL_SAMPLE_OFFSET
	.comm	_WINED3D_SAMPLER_DEFAULT,4,2    ; @WINED3D_SAMPLER_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid resource index %u.\n"

	.comm	_WINED3DSP_WRITEMASK_3,4,2      ; @WINED3DSP_WRITEMASK_3
	.comm	_WINED3DSP_WRITEMASK_0,4,2      ; @WINED3DSP_WRITEMASK_0
l_.str.1:                               ; @.str.1
	.asciz	"%s, %s"

l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.no_dead_strip	_shader_glsl_ld
.subsections_via_symbols
