	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_glsl_sample
_shader_glsl_sample:                    ## @shader_glsl_sample
	.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	%rdi, %r14
	movl	(%rdi), %ecx
	movl	$0, %eax
	cmpl	$129, %ecx
	jne	LBB0_2
## %bb.1:
	movq	_WINED3D_GLSL_SAMPLE_GRAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movl	$0, %ebx
	cmpl	$128, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_WINED3D_GLSL_SAMPLE_LOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_4:
	orl	%eax, %ebx
	movq	%r14, %rdi
	callq	_wined3d_shader_instruction_has_texel_offset
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_WINED3D_GLSL_SAMPLE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	orl	%ecx, %ebx
	movq	8(%r14), %rdi
	movq	24(%r14), %rax
	movq	24(%rax), %rcx
	movq	40(%rax), %rax
	movl	(%rcx), %r12d
	movl	(%rax), %edx
	leaq	-48(%rbp), %r8
	movl	%r12d, %esi
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	callq	_shader_glsl_get_sample_function
	movq	24(%r14), %rsi
	movl	-44(%rbp), %edx
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	callq	_shader_glsl_add_src_param
	movl	(%r14), %edi
	leal	-128(%rdi), %eax
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	jmpq	*%rax
LBB0_9:
	movq	24(%r14), %rsi
	addq	$48, %rsi
	movq	_WINED3DSP_WRITEMASK_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	movq	%r14, %rdi
	callq	_shader_glsl_add_src_param
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rcx
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_10:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_debug_d3dshaderinstructionhandler
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_8:
	movq	24(%r14), %rsi
	addq	$48, %rsi
	movl	-48(%rbp), %edx
	leaq	-56(%rbp), %rcx
	movq	%r14, %rdi
	callq	_shader_glsl_add_src_param
	movq	24(%r14), %rsi
	addq	$64, %rsi
	movl	-48(%rbp), %edx
	leaq	-72(%rbp), %rcx
	movq	%r14, %rdi
	callq	_shader_glsl_add_src_param
	movq	-56(%rbp), %r13
	xorl	%ecx, %ecx
	movq	-72(%rbp), %r15
LBB0_11:
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	movl	%r12d, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movq	%rcx, %r12
	callq	_shader_glsl_find_sampler
	movq	24(%r14), %rcx
	movl	16(%rcx), %ecx
	leaq	16(%r14), %rbx
	leaq	L_.str.1(%rip), %r10
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r13, %r8
	movq	%r15, %r9
	pushq	-80(%rbp)
	pushq	%r10
	pushq	%rbx
	pushq	%r12
	callq	_shader_glsl_gen_sample_code
	addq	$32, %rsp
	movq	8(%r14), %rdi
	leaq	-48(%rbp), %rsi
	callq	_shader_glsl_release_sample_function
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_WINED3D_GLSL_SAMPLE_GRAD,4,2   ## @WINED3D_GLSL_SAMPLE_GRAD
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled opcode %s.\n"

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

	.no_dead_strip	_shader_glsl_sample
.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
_shader_glsl_sample:                    ; @shader_glsl_sample
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _WINED3D_GLSL_SAMPLE_GRAD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_GLSL_SAMPLE_GRAD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #129
	csel	w9, w9, wzr, eq
Lloh3:
	adrp	x10, _WINED3D_GLSL_SAMPLE_LOD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WINED3D_GLSL_SAMPLE_LOD@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, #128
	csel	w8, w10, wzr, eq
	orr	w20, w8, w9
	bl	_wined3d_shader_instruction_has_texel_offset
Lloh6:
	adrp	x8, _WINED3D_GLSL_SAMPLE_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WINED3D_GLSL_SAMPLE_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w3, w20, w8
	ldr	x8, [x19, #24]
	ldr	x9, [x8, #24]
	ldr	w20, [x9]
	ldr	x8, [x8, #40]
	ldr	w21, [x8]
	ldr	x0, [x19, #8]
	add	x4, sp, #16
	mov	x1, x20
	mov	x2, x21
	bl	_shader_glsl_get_sample_function
	ldr	x1, [x19, #24]
	ldr	w2, [sp, #20]
	add	x3, sp, #40
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	ldr	w0, [x19]
	sub	w8, w0, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	x22, #0
	mov	x24, #0
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	x8, [x19, #24]
	add	x1, x8, #48
Lloh11:
	adrp	x8, _WINED3DSP_WRITEMASK_0@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WINED3DSP_WRITEMASK_0@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #32
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	mov	x23, #0
	mov	x22, #0
	ldr	x24, [sp, #32]
	b	LBB0_5
LBB0_3:
	bl	_debug_d3dshaderinstructionhandler
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	mov	x23, #0
	mov	x22, #0
	mov	x24, #0
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #24]
	add	x1, x8, #48
	ldr	w2, [sp, #16]
	add	x3, sp, #32
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	ldr	x8, [x19, #24]
	add	x1, x8, #64
	ldr	w2, [sp, #16]
	add	x3, sp, #24
	mov	x0, x19
	bl	_shader_glsl_add_src_param
	mov	x24, #0
	ldp	x23, x22, [sp, #24]
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	mov	x1, x20
	mov	x2, x21
	bl	_shader_glsl_find_sampler
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	w3, [x8, #16]
	add	x7, x19, #16
	ldr	x8, [sp, #40]
Lloh16:
	adrp	x9, l_.str.1@PAGE
Lloh17:
	add	x9, x9, l_.str.1@PAGEOFF
	stp	x9, x8, [sp]
	add	x2, sp, #16
	mov	x0, x19
	mov	x4, x22
	mov	x5, x23
	mov	x6, x24
	bl	_shader_glsl_gen_sample_code
	ldr	x0, [x19, #8]
	add	x1, sp, #16
	bl	_shader_glsl_release_sample_function
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
                                        ; -- End function
	.comm	_WINED3D_GLSL_SAMPLE_GRAD,4,2   ; @WINED3D_GLSL_SAMPLE_GRAD
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled opcode %s.\n"

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

	.no_dead_strip	_shader_glsl_sample
.subsections_via_symbols
