flap_1:
#i've to do ((X/2)*K1)
movl %ebx, -4(%ebp) #X to stack
movl $2, -8(%ebp) #2 to stack
movl K1,%eax #move K1 to eax
movl %eax, -12(%ebp) #K1 to stack
fildl -12(%ebp) #cast to float
fildl -8(%ebp)
fildl -4(%ebp)
fdivp %st(0), %st(1) #X/2
fmulp %st(0), %st(1) #(X/2)*K1
fist -4(%ebp) #cast to int
movl -4(%ebp),%eax #move result to eax
movl %eax,TMP1 #move to TMP1
#i've to do ((Y/2)*K2)
movl %ecx,-4(%ebp) #Y to stack
movl $2,-8(%ebp) #2 to stack
movl K2,%eax #move K2 to eax
movl %eax,-12(%ebp) #K2 to stack
fildl -12(%ebp) #cast to float
fildl -8(%ebp)
fildl -4(%ebp)
fdivp %st(0),%st(1) #Y/2
fmulp %st(0),%st(1) #(Y/2)*K2
fist -4(%ebp) #cast to int
movl -4(%ebp),%eax #move result to eax
addl TMP1,%eax #add the two parts ((X/2)*K1)+((Y/2)*K2
jmp end