	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvts_bumpenvmat
_nvts_bumpenvmat:                       ## @nvts_bumpenvmat
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_STATE_TEXTURESTAGE
	subl	%eax, %ebx
	movq	_WINED3D_HIGHEST_TEXTURE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	incl	%ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movslq	%eax, %rbx
	movq	(%r12), %rax
	movq	8(%r12), %r15
	movl	4(%rax,%rbx,4), %edx
	cmpl	8(%r15), %edx
	jge	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_context_active_texture
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movq	_WINED3D_TSS_BUMPENV_MAT00@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	(%rax,%rcx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -64(%rbp)
	movq	_WINED3D_TSS_BUMPENV_MAT01@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	(%rax,%rcx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -56(%rbp)
	movq	_WINED3D_TSS_BUMPENV_MAT10@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	(%rax,%rcx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -60(%rbp)
	movq	_WINED3D_TSS_BUMPENV_MAT11@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	(%rax,%rcx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -52(%rbp)
	movq	_GL_TEXTURE_SHADER_NV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_OFFSET_TEXTURE_MATRIX_NV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	*(%r15)
	leaq	L_.str(%rip), %rdi
	callq	_checkGLcall
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ## @WINED3D_HIGHEST_TEXTURE_STATE
	.comm	_WINED3D_TSS_BUMPENV_MAT00,8,3  ## @WINED3D_TSS_BUMPENV_MAT00
	.comm	_WINED3D_TSS_BUMPENV_MAT01,8,3  ## @WINED3D_TSS_BUMPENV_MAT01
	.comm	_WINED3D_TSS_BUMPENV_MAT10,8,3  ## @WINED3D_TSS_BUMPENV_MAT10
	.comm	_WINED3D_TSS_BUMPENV_MAT11,8,3  ## @WINED3D_TSS_BUMPENV_MAT11
	.comm	_GL_TEXTURE_SHADER_NV,4,2       ## @GL_TEXTURE_SHADER_NV
	.comm	_GL_OFFSET_TEXTURE_MATRIX_NV,4,2 ## @GL_OFFSET_TEXTURE_MATRIX_NV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, mat)"

	.no_dead_strip	_nvts_bumpenvmat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvts_bumpenvmat
_nvts_bumpenvmat:                       ; @nvts_bumpenvmat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	w0, #0
	mov	w1, #0
	bl	_STATE_TEXTURESTAGE
	sub	w8, w20, w0
Lloh3:
	adrp	x9, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w9, w9, #1
	sdiv	w8, w8, w9
	ldp	x9, x20, [x21]
	add	x9, x9, w8, sxtw #2
	ldr	w2, [x9, #4]
	ldr	w9, [x20, #8]
	cmp	w2, w9
	b.ge	LBB0_2
; %bb.1:
	sxtw	x22, w8
	mov	x0, x21
	mov	x1, x20
	bl	_context_active_texture
	ldr	x8, [x19]
	ldr	x8, [x8, x22, lsl #3]
Lloh6:
	adrp	x9, _WINED3D_TSS_BUMPENV_MAT00@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_TSS_BUMPENV_MAT00@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	s0, [x8, x9, lsl #2]
Lloh9:
	adrp	x9, _WINED3D_TSS_BUMPENV_MAT01@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WINED3D_TSS_BUMPENV_MAT01@GOTPAGEOFF]
	str	s0, [sp, #8]
Lloh11:
	ldr	x9, [x9]
	ldr	s0, [x8, x9, lsl #2]
Lloh12:
	adrp	x9, _WINED3D_TSS_BUMPENV_MAT10@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WINED3D_TSS_BUMPENV_MAT10@GOTPAGEOFF]
	str	s0, [sp, #16]
Lloh14:
	ldr	x9, [x9]
	ldr	s0, [x8, x9, lsl #2]
Lloh15:
	adrp	x9, _WINED3D_TSS_BUMPENV_MAT11@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WINED3D_TSS_BUMPENV_MAT11@GOTPAGEOFF]
	str	s0, [sp, #12]
Lloh17:
	ldr	x9, [x9]
	ldr	s0, [x8, x9, lsl #2]
	str	s0, [sp, #20]
	ldr	x8, [x20]
Lloh18:
	adrp	x9, _GL_TEXTURE_SHADER_NV@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GL_TEXTURE_SHADER_NV@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x9]
Lloh21:
	adrp	x9, _GL_OFFSET_TEXTURE_MATRIX_NV@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GL_OFFSET_TEXTURE_MATRIX_NV@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x9]
	add	x2, sp, #8
	blr	x8
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_checkGLcall
LBB0_2:
	ldr	x8, [sp, #24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ; @WINED3D_HIGHEST_TEXTURE_STATE
	.comm	_WINED3D_TSS_BUMPENV_MAT00,8,3  ; @WINED3D_TSS_BUMPENV_MAT00
	.comm	_WINED3D_TSS_BUMPENV_MAT01,8,3  ; @WINED3D_TSS_BUMPENV_MAT01
	.comm	_WINED3D_TSS_BUMPENV_MAT10,8,3  ; @WINED3D_TSS_BUMPENV_MAT10
	.comm	_WINED3D_TSS_BUMPENV_MAT11,8,3  ; @WINED3D_TSS_BUMPENV_MAT11
	.comm	_GL_TEXTURE_SHADER_NV,4,2       ; @GL_TEXTURE_SHADER_NV
	.comm	_GL_OFFSET_TEXTURE_MATRIX_NV,4,2 ; @GL_OFFSET_TEXTURE_MATRIX_NV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, mat)"

	.no_dead_strip	_nvts_bumpenvmat
.subsections_via_symbols
