// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_plotpixel
int polymost_plotpixel(int x, int y, unsigned char col)
{
	palette_t colour;
	struct polymostdrawauxcall draw;
	struct polymostvboitem vboitem[1];

	if ((rendmode != 3) || (qsetmode != 200)) return(-1);

	setpolymost2dview();	// disables blending, texturing, and depth testing
	glfunc.glDepthMask(GL_FALSE);	// disable writing to the z-buffer
	glfunc.glEnable(GL_BLEND);

	draw.mode = 2;	// Solid colour.

	colour = curpalette[col];
	if (!usegammabrightness) {
		colour.r = britable[curbrightness][ colour.r ];
		colour.g = britable[curbrightness][ colour.g ];
		colour.b = britable[curbrightness][ colour.b ];
	}
	draw.colour.r = colour.r / 255.f;
	draw.colour.g = colour.g / 255.f;
	draw.colour.b = colour.b / 255.f;
	draw.colour.a = 1.f;

	vboitem[0].v.x = (GLfloat)x;
	vboitem[0].v.y = (GLfloat)y;
	vboitem[0].v.z = 0.f;

	draw.indexcount = 1;
	draw.indexes = NULL;
	draw.elementcount = 1;
	draw.elementvbo = vboitem;

	polymost_drawaux_glcall(GL_POINTS, &draw);

	glfunc.glDepthMask(GL_TRUE);	// re-enable writing to the z-buffer

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
cmpl $0x3, 0x562453(%rip)    # 0x5ed920
jne 0x8b4de
leaq 0x16a0b2(%rip), %rax    # 0x1f5588
cmpl $0xc8, (%rax)
je 0x8b4ea
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8b64f
callq 0x5a810
xorl %edi, %edi
leaq 0x562218(%rip), %rax    # 0x5ed710
callq *0xa0(%rax)
movl $0xbe2, %edi            # imm = 0xBE2
leaq 0x562206(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
movl $0x2, -0x3c(%rbp)
movzbl -0xd(%rbp), %eax
movl %eax, %ecx
leaq 0x3e5cdf(%rip), %rax    # 0x471200
movl (%rax,%rcx,4), %eax
movl %eax, -0x11(%rbp)
leaq 0x5574e(%rip), %rax     # 0xe0c7c
cmpl $0x0, (%rax)
jne 0x8b599
leaq 0x16a02a(%rip), %rax    # 0x1f5564
movslq (%rax), %rcx
leaq 0x3e64bc(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movzbl -0x11(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
leaq 0x16a008(%rip), %rax    # 0x1f5564
movslq (%rax), %rcx
leaq 0x3e649a(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movzbl -0x10(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x10(%rbp)
leaq 0x169fe6(%rip), %rax    # 0x1f5564
movslq (%rax), %rcx
leaq 0x3e6478(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movzbl -0xf(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0xf(%rbp)
movzbl -0x11(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x2b02f(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movzbl -0x10(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x2b016(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movzbl -0xf(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x2affd(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movss 0x27814(%rip), %xmm0    # 0xb2e00
movss %xmm0, -0x50(%rbp)
cvtsi2ssl -0x8(%rbp), %xmm0
movss %xmm0, -0x80(%rbp)
cvtsi2ssl -0xc(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x78(%rbp)
movl $0x1, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x1, -0x28(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x20(%rbp)
xorl %edi, %edi
leaq -0x60(%rbp), %rsi
callq 0x8a450
movl $0x1, %edi
leaq 0x5620ce(%rip), %rax    # 0x5ed710
callq *0xa0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)