I'd start by splitting the query up in two separate queries. One query for t1.istmp = 1 and one for t1.istmp <> 1. You can most likely reintegrate them later, but you might as well reduce complexity while trying to find the bottleneck(s). But, there is also a chance that the query will execute slower due to your istmp CASEs, since the query has to start querying table t1, even if it would be more efficient querying another table or tables first (which seems impossible to do if the joined tables depend on this field).
After that, I'd also rewrite your "comma + where" joins into regular join syntax. There is no real difference. This is definitely a matter of personal perference, but at least I find it easier to read the query and see what's used in joins etc.
SELECT stuff
FROM t1
INNER JOIN t2 ON t1.field_a1 = t2.field_a2 AND t1.field_b1 = t2.field_b2
INNER JOIN t3 ON t1.field_a1 = t3.field_a3
...
WHERE non_join_field = @some_value
After this, make sure that you have indeices for anything used in either a join clause or the where clause. If you are using compound fields for joins/where, then you should also check if you have a usable index for this.
For example, if you have an index over (field1, field2, field3) this can be used if one or more fields are used for joins/where, assuming the first N fields are included. That is, if you have a join on either just field1 or both field1 and field2, the index is used, but if you have just field2 or field2 and field3, then the index can't be used and you'd need to add a new index for (field2, field3).
Once these things are sorted, have a look at the output of
EXPLAIN [your query]
(without the brackets, [ and ]