	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function set_bumpmat
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.long	0x3f800000                      ## float 1
	.long	0x3f800000                      ## float 1
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x3f000000                      ## float 0.5
	.long	0x3f000000                      ## float 0.5
	.long	0x3f000000                      ## float 0.5
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_set_bumpmat:                           ## @set_bumpmat
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	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
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.1:
	movq	(%rcx), %rcx
	movslq	%eax, %rdi
	movq	(%rcx,%rdi,8), %rax
	movq	_ATIFS_CONSTANT_BUMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movq	(%rax,%rdi,8), %rax
	movq	_WINED3D_TSS_BUMPENV_MAT00@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_WINED3D_TSS_BUMPENV_MAT01@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_WINED3D_TSS_BUMPENV_MAT10@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_WINED3D_TSS_BUMPENV_MAT11@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movss	(%rax,%rcx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	insertps	$16, (%rax,%rsi,4), %xmm0       ## xmm0 = xmm0[0],mem[0],xmm0[2,3]
	insertps	$32, (%rax,%rdx,4), %xmm0       ## xmm0 = xmm0[0,1],mem[0],xmm0[3]
	insertps	$48, (%rax,%rbx,4), %xmm0       ## xmm0 = xmm0[0,1,2],mem[0]
	addps	LCPI0_0(%rip), %xmm0
	mulps	LCPI0_1(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ATIFS_CONST_BUMPMAT
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_glSetFragmentShaderConstantATI
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str(%rip), %rdi
	callq	_checkGLcall
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ## @WINED3D_HIGHEST_TEXTURE_STATE
	.comm	_ATIFS_CONSTANT_BUMP,8,3        ## @ATIFS_CONSTANT_BUMP
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glSetFragmentShaderConstantATI(ATIFS_CONST_BUMPMAT(stage), mat)"

	.no_dead_strip	_set_bumpmat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_bumpmat
_set_bumpmat:                           ; @set_bumpmat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	w0, #0
	mov	w1, #0
	bl	_STATE_TEXTURESTAGE
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	sub	w9, w20, w0
Lloh0:
	adrp	x10, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	add	w10, w10, #1
	sdiv	w0, w9, w10
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
Lloh3:
	adrp	x9, _ATIFS_CONSTANT_BUMP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATIFS_CONSTANT_BUMP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	sxtw	x8, w0
	ldr	x9, [x19]
	ldr	x8, [x9, x8, lsl #3]
Lloh6:
	adrp	x9, _WINED3D_TSS_BUMPENV_MAT00@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_TSS_BUMPENV_MAT00@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _WINED3D_TSS_BUMPENV_MAT01@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WINED3D_TSS_BUMPENV_MAT01@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	add	x10, x8, x10, lsl #2
Lloh12:
	adrp	x11, _WINED3D_TSS_BUMPENV_MAT10@GOTPAGE
Lloh13:
	ldr	x11, [x11, _WINED3D_TSS_BUMPENV_MAT10@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	add	x11, x8, x11, lsl #2
Lloh15:
	adrp	x12, _WINED3D_TSS_BUMPENV_MAT11@GOTPAGE
Lloh16:
	ldr	x12, [x12, _WINED3D_TSS_BUMPENV_MAT11@GOTPAGEOFF]
Lloh17:
	ldr	x12, [x12]
	add	x12, x8, x12, lsl #2
	ldr	s0, [x8, x9, lsl #2]
	ld1.s	{ v0 }[1], [x11]
	ld1.s	{ v0 }[2], [x10]
	ld1.s	{ v0 }[3], [x12]
	fmov.4s	v1, #1.00000000
	fadd.4s	v0, v0, v1
	movi.4s	v1, #63, lsl #24
	fmul.4s	v0, v0, v1
	str	q0, [sp]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ATIFS_CONST_BUMPMAT
	mov	x1, sp
	bl	_glSetFragmentShaderConstantATI
	bl	_GL_EXTCALL
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_checkGLcall
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ; @WINED3D_HIGHEST_TEXTURE_STATE
	.comm	_ATIFS_CONSTANT_BUMP,8,3        ; @ATIFS_CONSTANT_BUMP
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glSetFragmentShaderConstantATI(ATIFS_CONST_BUMPMAT(stage), mat)"

	.no_dead_strip	_set_bumpmat
.subsections_via_symbols
