// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: gltexapplyprops
void gltexapplyprops (void)
{
	int i;
	PTIter iter;
	PTHead * pth;

	if (glinfo.maxanisotropy > 1.0)
	{
		if (glanisotropy <= 0 || glanisotropy > glinfo.maxanisotropy) glanisotropy = (int)glinfo.maxanisotropy;
	}

	if (gltexfiltermode < 0) gltexfiltermode = 0;
	else if (gltexfiltermode >= (int)numglfiltermodes) gltexfiltermode = numglfiltermodes-1;

	iter = PTIterNew();
	while ((pth = PTIterNext(iter)) != 0) {
		for (i = 0; i < PTHPIC_SIZE; i++) {
			if (pth->pic[i] == 0 || pth->pic[i]->glpic == 0) {
				continue;
			}
			glfunc.glBindTexture(GL_TEXTURE_2D,pth->pic[i]->glpic);
			glfunc.glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,glfiltermodes[gltexfiltermode].mag);
			glfunc.glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,glfiltermodes[gltexfiltermode].min);
#ifdef GL_EXT_texture_filter_anisotropic
			if (glinfo.maxanisotropy > 1.0) {
				glfunc.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,glanisotropy);
			}
#endif
		}
	}
	PTIterFree(iter);

	{
		int j;
		mdskinmap_t *sk;
		md2model *m;

		for (i=0;i<nextmodelid;i++)
		{
			m = (md2model *)models[i];
			if (m->mdnum < 2) continue;
			for (j=0;j<m->numskins*(HICEFFECTMASK+1);j++)
			{
				if (!m->tex[j] || !m->tex[j]->glpic) continue;
				glfunc.glBindTexture(GL_TEXTURE_2D,m->tex[j]->glpic);
				glfunc.glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,glfiltermodes[gltexfiltermode].mag);
				glfunc.glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,glfiltermodes[gltexfiltermode].min);
#ifdef GL_EXT_texture_filter_anisotropic
				if (glinfo.maxanisotropy > 1.0)
					glfunc.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,glanisotropy);
#endif
			}

			for (sk=m->skinmap;sk;sk=sk->next)
				for (j=0;j<(HICEFFECTMASK+1);j++)
				{
					if (!sk->tex[j] || !sk->tex[j]->glpic) continue;
					glfunc.glBindTexture(GL_TEXTURE_2D,sk->tex[j]->glpic);
					glfunc.glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,glfiltermodes[gltexfiltermode].mag);
					glfunc.glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,glfiltermodes[gltexfiltermode].min);
#ifdef GL_EXT_texture_filter_anisotropic
					if (glinfo.maxanisotropy > 1.0)
						glfunc.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,glanisotropy);
#endif
				}
			}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x1488e1(%rip), %rax    # 0x1badb0
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3f4f0(%rip), %xmm1    # 0xb19d0
ucomisd %xmm1, %xmm0
jbe 0x72518
cmpl $0x0, 0x57b467(%rip)    # 0x5ed954
jle 0x72504
cvtsi2ssl 0x57b45d(%rip), %xmm0 # 0x5ed954
leaq 0x1488b2(%rip), %rax    # 0x1badb0
ucomiss 0x14(%rax), %xmm0
jbe 0x72516
leaq 0x1488a5(%rip), %rax    # 0x1badb0
cvttss2si 0x14(%rax), %eax
movl %eax, 0x57b43e(%rip)    # 0x5ed954
jmp 0x72518
cmpl $0x0, 0x6f6a5(%rip)     # 0xe1bc4
jge 0x7252d
movl $0x0, 0x6f699(%rip)     # 0xe1bc4
jmp 0x72542
cmpl $0x6, 0x6f690(%rip)     # 0xe1bc4
jl 0x72540
movl $0x5, 0x6f684(%rip)     # 0xe1bc4
jmp 0x72542
callq 0x9aa10
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9aa30
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x72674
movl $0x0, -0x4(%rbp)
cmpl $0x6, -0x4(%rbp)
jge 0x7266f
movq -0x18(%rbp), %rax
movslq -0x4(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x72593
movq -0x18(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, (%rax)
jne 0x72598
jmp 0x72661
leaq 0x57b171(%rip), %rax    # 0x5ed710
movq 0xc8(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x4(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rcx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq *%rax
leaq 0x57b14e(%rip), %rax    # 0x5ed710
movq 0xe8(%rax), %rax
movslq 0x6f5f4(%rip), %rdx     # 0xe1bc4
leaq 0x6f589(%rip), %rcx     # 0xe1b60
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %edx
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
callq *%rax
leaq 0x57b11c(%rip), %rax    # 0x5ed710
movq 0xe8(%rax), %rax
movslq 0x6f5c2(%rip), %rdx     # 0xe1bc4
leaq 0x6f557(%rip), %rcx     # 0xe1b60
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %edx
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
callq *%rax
leaq 0x14878a(%rip), %rax    # 0x1badb0
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3f399(%rip), %xmm1    # 0xb19d0
ucomisd %xmm1, %xmm0
jbe 0x7265f
leaq 0x57b0cc(%rip), %rax    # 0x5ed710
movq 0xe0(%rax), %rax
cvtsi2ssl 0x57b301(%rip), %xmm0 # 0x5ed954
movl $0xde1, %edi            # imm = 0xDE1
movl $0x84fe, %esi           # imm = 0x84FE
callq *%rax
jmp 0x72661
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x72569
jmp 0x7254b
movq -0x10(%rbp), %rdi
callq 0x9aab0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x5c9976(%rip), %rcx    # 0x63c004
cmpl (%rcx), %eax
jge 0x72928
leaq 0x5c996b(%rip), %rax    # 0x63c008
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x2, (%rax)
jge 0x726ba
jmp 0x7291a
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x30(%rbp), %rcx
movl 0x50(%rcx), %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jge 0x727de
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x726fe
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, (%rax)
jne 0x72703
jmp 0x727d0
leaq 0x57b006(%rip), %rax    # 0x5ed710
movq 0xc8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rcx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq *%rax
leaq 0x57afdf(%rip), %rax    # 0x5ed710
movq 0xe8(%rax), %rax
movslq 0x6f485(%rip), %rdx     # 0xe1bc4
leaq 0x6f41a(%rip), %rcx     # 0xe1b60
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %edx
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
callq *%rax
leaq 0x57afad(%rip), %rax    # 0x5ed710
movq 0xe8(%rax), %rax
movslq 0x6f453(%rip), %rdx     # 0xe1bc4
leaq 0x6f3e8(%rip), %rcx     # 0xe1b60
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %edx
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
callq *%rax
leaq 0x14861b(%rip), %rax    # 0x1badb0
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3f22a(%rip), %xmm1    # 0xb19d0
ucomisd %xmm1, %xmm0
jbe 0x727ce
leaq 0x57af5d(%rip), %rax    # 0x5ed710
movq 0xe0(%rax), %rax
cvtsi2ssl 0x57b192(%rip), %xmm0 # 0x5ed954
movl $0xde1, %edi            # imm = 0xDE1
movl $0x84fe, %esi           # imm = 0x84FE
callq *%rax
jmp 0x727d0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x726c1
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x72918
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0x72905
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
je 0x72828
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpl $0x0, (%rax)
jne 0x7282d
jmp 0x728f7
leaq 0x57aedc(%rip), %rax    # 0x5ed710
movq 0xc8(%rax), %rax
movq -0x28(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movq 0x18(%rcx,%rdx,8), %rcx
movl (%rcx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq *%rax
leaq 0x57aeb8(%rip), %rax    # 0x5ed710
movq 0xe8(%rax), %rax
movslq 0x6f35e(%rip), %rdx     # 0xe1bc4
leaq 0x6f2f3(%rip), %rcx     # 0xe1b60
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %edx
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
callq *%rax
leaq 0x57ae86(%rip), %rax    # 0x5ed710
movq 0xe8(%rax), %rax
movslq 0x6f32c(%rip), %rdx     # 0xe1bc4
leaq 0x6f2c1(%rip), %rcx     # 0xe1b60
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %edx
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
callq *%rax
leaq 0x1484f4(%rip), %rax    # 0x1badb0
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3f103(%rip), %xmm1    # 0xb19d0
ucomisd %xmm1, %xmm0
jbe 0x728f5
leaq 0x57ae36(%rip), %rax    # 0x5ed710
movq 0xe0(%rax), %rax
cvtsi2ssl 0x57b06b(%rip), %xmm0 # 0x5ed954
movl $0xde1, %edi            # imm = 0xDE1
movl $0x84fe, %esi           # imm = 0x84FE
callq *%rax
jmp 0x728f7
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x727fc
jmp 0x72907
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x727ea
jmp 0x7291a
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x72684
addq $0x30, %rsp
popq %rbp
retq
nop