// File: /workspace/github_c_makefile_star2_O0/iciamyplant[P]Cub3d-Linux/src/keys_draw.c
// Function: ft_draw_texture
void	ft_draw_texture(t_recup *recup, int x, int y)
{
	y = recup->ray.drawstart - 1;
	ft_init_texture(recup);
	recup->t.step = 1.0 * recup->texture[0].height / recup->ray.lineheight;
	recup->t.texx = (int)(recup->t.wallx * (double)recup->texture
			[recup->t.texdir].width);
	if (recup->ray.side == 0 && recup->ray.raydirx > 0)
		recup->t.texx = recup->texture[recup->t.texdir].width -
			recup->t.texx - 1;
	if (recup->ray.side == 1 && recup->ray.raydiry < 0)
		recup->t.texx = recup->texture[recup->t.texdir].width -
			recup->t.texx - 1;
	recup->t.texpos = (recup->ray.drawstart - recup->ry / 2 +
			recup->ray.lineheight / 2) * recup->t.step;
	while (++y <= recup->ray.drawend)
	{
		recup->t.texy = (int)recup->t.texpos &
			(recup->texture[recup->t.texdir].height - 1);
		recup->t.texpos += recup->t.step;
		if (y < recup->ry && x < recup->rx)
			recup->data.addr[y * recup->data.line_length / 4 + x] =
				recup->texture[recup->t.texdir].addr[recup->t.texy *
					recup->texture[recup->t.texdir].line_length /
					4 + recup->t.texx];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x364(%rax), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9280
movq -0x8(%rbp), %rax
cvtsi2sdl 0xe4(%rax), %xmm1
movsd 0x7321(%rip), %xmm0     # 0x100a0
mulsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x360(%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x3a0(%rax)
movq -0x8(%rbp), %rax
movsd 0x390(%rax), %xmm0
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq -0x8(%rbp), %rcx
movslq 0x388(%rcx), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cvtsi2sdl 0x48(%rax), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x398(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x354(%rax)
jne 0x8e36
movq -0x8(%rbp), %rax
movsd 0x308(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x8e36
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq -0x8(%rbp), %rcx
movslq 0x388(%rcx), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl 0x48(%rax), %ecx
movq -0x8(%rbp), %rax
subl 0x398(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x398(%rax)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x354(%rax)
jne 0x8e8a
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
ucomisd 0x310(%rax), %xmm0
jbe 0x8e8a
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq -0x8(%rbp), %rcx
movslq 0x388(%rcx), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl 0x48(%rax), %ecx
movq -0x8(%rbp), %rax
subl 0x398(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x398(%rax)
movq -0x8(%rbp), %rax
movl 0x364(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x360(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x14(%rbp), %eax
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
movq -0x8(%rbp), %rax
mulsd 0x3a0(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x3a8(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
cmpl 0x368(%rcx), %eax
jg 0x9023
movq -0x8(%rbp), %rax
cvttsd2si 0x3a8(%rax), %ecx
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq -0x8(%rbp), %rdx
movslq 0x388(%rdx), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl 0x4c(%rax), %eax
subl $0x1, %eax
andl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x39c(%rax)
movq -0x8(%rbp), %rax
movsd 0x3a0(%rax), %xmm0
movq -0x8(%rbp), %rax
addsd 0x3a8(%rax), %xmm0
movsd %xmm0, 0x3a8(%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x901e
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x901e
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq -0x8(%rbp), %rcx
movslq 0x388(%rcx), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x39c(%rax), %eax
movq -0x8(%rbp), %rcx
addq $0x98, %rcx
movq -0x8(%rbp), %rdx
movslq 0x388(%rdx), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rcx
imull 0x24(%rcx), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdx
addl 0x398(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x290(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x29c(%rcx), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl -0x24(%rbp), %edx
movl %eax, %ecx
movq -0x20(%rbp), %rax
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x8ee5
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)