	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_glsl_sample_c
_shader_glsl_sample_c:                  ## @shader_glsl_sample_c
	.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, %r14
	movq	(%rdi), %r13
	movq	_WINED3DSIH_SAMPLE_C_LZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%ecx, %ecx
	cmpq	%r12, %r13
	movq	_WINED3D_GLSL_SAMPLE_LOD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str(%rip), %rax
	cmovneq	%rcx, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_wined3d_shader_instruction_has_texel_offset
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_WINED3D_GLSL_SAMPLE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	24(%r14), %rsi
	addq	$8, %rsi
	movq	%r14, %rdi
	callq	_shader_glsl_get_resource_info
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	%r12, %r13
	movl	$0, %eax
	cmovnel	%eax, %r15d
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	cmovel	%eax, %ebx
	orl	%r15d, %ebx
	movq	8(%r14), %rdi
	movq	24(%r14), %rax
	movq	8(%rax), %rcx
	movq	16(%rax), %rax
	movl	(%rcx), %r12d
	movl	(%rax), %r13d
	leaq	-48(%rbp), %r8
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_shader_glsl_get_sample_function
	movl	-48(%rbp), %edi
	callq	_shader_glsl_get_write_mask_size
	movl	%eax, %r15d
	movq	24(%r14), %rsi
	movl	-48(%rbp), %edx
	sarl	%edx
	leaq	-64(%rbp), %rcx
	movq	%r14, %rdi
	callq	_shader_glsl_add_src_param
	movq	24(%r14), %rsi
	addq	$24, %rsi
	movq	_WINED3DSP_WRITEMASK_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	movq	%r14, %rdi
	callq	_shader_glsl_add_src_param
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_shader_glsl_find_sampler
	movq	(%r14), %rcx
	movq	_WINED3DSIH_SAMPLE_C_LZ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.2:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	_WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	movq	_WINED3D_SHADER_RESOURCE_TEXTURE_CUBE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
LBB0_5:
	movq	_WINED3DSP_NOSWIZZLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	16(%r14), %r10
	movl	-64(%rbp), %r11d
	movl	-56(%rbp), %ebx
	leaq	L_.str.1(%rip), %r12
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%r11
	pushq	%r15
	pushq	%r12
	pushq	%r10
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	callq	_shader_glsl_gen_sample_code
	addq	$48, %rsp
	jmp	LBB0_6
LBB0_4:
	movl	-64(%rbp), %r8d
	movl	-56(%rbp), %r9d
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r15d, %ecx
	callq	_shader_glsl_gen_sample_c_lz
LBB0_6:
	movq	8(%r14), %rdi
	leaq	-48(%rbp), %rsi
	callq	_shader_glsl_release_sample_function
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3DSIH_SAMPLE_C_LZ,8,3     ## @WINED3DSIH_SAMPLE_C_LZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0"

	.comm	_WINED3D_GLSL_SAMPLE_LOD,4,2    ## @WINED3D_GLSL_SAMPLE_LOD
	.comm	_WINED3D_GLSL_SAMPLE_OFFSET,4,2 ## @WINED3D_GLSL_SAMPLE_OFFSET
	.comm	_WINED3DSP_WRITEMASK_0,4,2      ## @WINED3DSP_WRITEMASK_0
	.comm	_WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY,8,3 ## @WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY
	.comm	_WINED3D_SHADER_RESOURCE_TEXTURE_CUBE,8,3 ## @WINED3D_SHADER_RESOURCE_TEXTURE_CUBE
	.comm	_WINED3DSP_NOSWIZZLE,4,2        ## @WINED3DSP_NOSWIZZLE
L_.str.1:                               ## @.str.1
	.asciz	"vec%u(%s, %s)"

	.no_dead_strip	_shader_glsl_sample_c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_glsl_sample_c
_shader_glsl_sample_c:                  ; @shader_glsl_sample_c
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x25, _WINED3DSIH_SAMPLE_C_LZ@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WINED3DSIH_SAMPLE_C_LZ@GOTPAGEOFF]
Lloh2:
	adrp	x8, _WINED3D_GLSL_SAMPLE_LOD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_GLSL_SAMPLE_LOD@GOTPAGEOFF]
	ldr	x26, [x25]
Lloh4:
	ldr	w24, [x8]
Lloh5:
	adrp	x8, l_.str@PAGE
Lloh6:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x23, x26
	csel	x20, x8, xzr, eq
	bl	_wined3d_shader_instruction_has_texel_offset
	mov	x21, x0
Lloh7:
	adrp	x8, _WINED3D_GLSL_SAMPLE_OFFSET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WINED3D_GLSL_SAMPLE_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	w27, [x8]
	ldr	x8, [x19, #24]
	add	x1, x8, #8
	mov	x0, x19
	bl	_shader_glsl_get_resource_info
	cbz	x0, LBB0_7
; %bb.1:
	mov	x22, x0
	cmp	x23, x26
	csel	w8, w24, wzr, eq
	cmp	x21, #0
	csel	w9, wzr, w27, eq
	orr	w3, w9, w8
	ldr	x8, [x19, #24]
	ldp	x9, x8, [x8, #8]
	ldr	w23, [x9]
	ldr	w24, [x8]
	ldr	x0, [x19, #8]
	add	x4, sp, #24
	mov	x1, x23
	mov	x2, x24
	bl	_shader_glsl_get_sample_function
	ldr	w0, [sp, #24]
	bl	_shader_glsl_get_write_mask_size
	mov	x21, x0
	ldr	x1, [x19, #24]
	ldr	w8, [sp, #24]
	asr	w2, w8, #1
	add	x3, sp, #40
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	ldr	x8, [x19, #24]
	add	x1, x8, #24
Lloh10:
	adrp	x8, _WINED3DSP_WRITEMASK_0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WINED3DSP_WRITEMASK_0@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x3, sp, #32
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	mov	x1, x23
	mov	x2, x24
	bl	_shader_glsl_find_sampler
	mov	x1, x0
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x22]
Lloh13:
	adrp	x9, _WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:
Lloh16:
	adrp	x9, _WINED3D_SHADER_RESOURCE_TEXTURE_CUBE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WINED3D_SHADER_RESOURCE_TEXTURE_CUBE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _WINED3DSP_NOSWIZZLE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WINED3DSP_NOSWIZZLE@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	add	x7, x19, #16
	ldr	w8, [sp, #40]
	ldr	w9, [sp, #32]
	stp	w8, w9, [sp, #12]
	str	w21, [sp, #8]
Lloh22:
	adrp	x8, l_.str.1@PAGE
Lloh23:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [sp]
	add	x2, sp, #24
	mov	x0, x19
	mov	x4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_shader_glsl_gen_sample_code
	b	LBB0_6
LBB0_5:
	ldr	w4, [sp, #40]
	ldr	w5, [sp, #32]
	add	x2, sp, #24
	mov	x0, x19
	mov	x3, x21
	bl	_shader_glsl_gen_sample_c_lz
LBB0_6:
	ldr	x0, [x19, #8]
	add	x1, sp, #24
	bl	_shader_glsl_release_sample_function
LBB0_7:
	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
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3DSIH_SAMPLE_C_LZ,8,3     ; @WINED3DSIH_SAMPLE_C_LZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0"

	.comm	_WINED3D_GLSL_SAMPLE_LOD,4,2    ; @WINED3D_GLSL_SAMPLE_LOD
	.comm	_WINED3D_GLSL_SAMPLE_OFFSET,4,2 ; @WINED3D_GLSL_SAMPLE_OFFSET
	.comm	_WINED3DSP_WRITEMASK_0,4,2      ; @WINED3DSP_WRITEMASK_0
	.comm	_WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY,8,3 ; @WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY
	.comm	_WINED3D_SHADER_RESOURCE_TEXTURE_CUBE,8,3 ; @WINED3D_SHADER_RESOURCE_TEXTURE_CUBE
	.comm	_WINED3DSP_NOSWIZZLE,4,2        ; @WINED3DSP_NOSWIZZLE
l_.str.1:                               ; @.str.1
	.asciz	"vec%u(%s, %s)"

	.no_dead_strip	_shader_glsl_sample_c
.subsections_via_symbols
