name
string
code
string
asm
string
file
string
Catch::Clara::Detail::BoundLambda<Catch::makeCommandLineParser(Catch::ConfigData&)::$_2>::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto setValue( std::string const& arg ) -> ParserResult override { return invokeLambda<typename UnaryLambdaTraits<L>::ArgType>( m_lambda, arg ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) leaq 0x28(%rsp), %rdi movq %rdx, %rsi callq 0x12290 xorl %eax, %eax leaq 0x88(%rsp), %rbp movq %rax, -0x18(%rbp) leaq 0xfeee1(%rip), %rcx # 0x146fb8 movq %rcx, -0x20(%rbp) movq %rbp, -0x10(%rbp) movq %rax, -0x8(%rbp) movb %al, (%rbp) leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movabsq $0x646572616c636564, %rcx # imm = 0x646572616C636564 movq %rcx, (%r14) movq $0x8, -0x8(%r14) movb %al, 0x8(%r14) movq 0x30(%rsp), %r12 cmpq $0x8, %r12 ja 0x48134 testq %r12, %r12 je 0x4821a movq 0x28(%rsp), %rdi movq %r14, %rsi movq %r12, %rdx callq 0x125b0 testl %eax, %eax je 0x4821a movq %r14, 0x8(%rsp) movl $0x6978656c, 0x18(%rsp) # imm = 0x6978656C movl $0x6c616369, 0x1b(%rsp) # imm = 0x6C616369 movq $0x7, 0x10(%rsp) movb $0x0, 0x1f(%rsp) cmpq $0x7, %r12 ja 0x4817e testq %r12, %r12 je 0x4821e movq 0x28(%rsp), %rdi movq %r14, %rsi movq %r12, %rdx callq 0x125b0 testl %eax, %eax je 0x4821e movq %r14, 0x8(%rsp) movl $0x646e6172, 0x18(%rsp) # imm = 0x646E6172 movw $0x6d6f, 0x1c(%rsp) # imm = 0x6D6F movq $0x6, 0x10(%rsp) movb $0x0, 0x1e(%rsp) cmpq $0x6, %r12 ja 0x481bf testq %r12, %r12 je 0x48225 movq 0x28(%rsp), %rdi movq %r14, %rsi movq %r12, %rdx callq 0x125b0 testl %eax, %eax je 0x48225 leaq 0xb4400(%rip), %rsi # 0xfc5c6 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x4b301 leaq 0x48(%rsp), %rdi movq 0x8(%rdi), %rsi movl $0x1, %ecx xorl %edx, %edx movl $0x27, %r8d leaq 0xfedc6(%rip), %r15 # 0x146fb8 callq 0x12a30 movq %r14, 0x8(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x48253 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x4825a xorl %eax, %eax jmp 0x4822a movl $0x1, %eax jmp 0x4822a movl $0x2, %eax movq 0x8(%r15), %rcx movl %eax, 0x58(%rcx) xorl %eax, %eax movq %rax, 0x8(%rbx) leaq 0xfed7a(%rip), %r15 # 0x146fb8 movq %r15, (%rbx) leaq 0x20(%rbx), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) movb $0x0, 0x20(%rbx) jmp 0x482b5 movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rsi leaq 0x8(%rsp), %rdx movq %rsi, 0x8(%rdx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi movl $0x2, %esi callq 0x5662e movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x4829a movq 0x18(%rsp), %rsi incq %rsi callq 0x12570 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x482b5 movq 0x58(%rsp), %rsi incq %rsi callq 0x12570 movq %r15, 0x68(%rsp) movq 0x78(%rsp), %rdi cmpq %rbp, %rdi je 0x482d4 movq 0x88(%rsp), %rsi incq %rsi callq 0x12570 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x482eb movq 0x38(%rsp), %rsi incq %rsi callq 0x12570 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x4831f movq 0x18(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x4831f movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4833f movq 0x58(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x4833f movq %rax, %rbx leaq 0xfec72(%rip), %rax # 0x146fb8 movq %rax, 0x68(%rsp) movq 0x78(%rsp), %rdi cmpq %rbp, %rdi je 0x48365 movq 0x88(%rsp), %rsi incq %rsi callq 0x12570 leaq 0xfeca4(%rip), %rax # 0x147010 movq %rax, 0x68(%rsp) jmp 0x48376 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x4838d movq 0x38(%rsp), %rsi incq %rsi callq 0x12570 movq %rbx, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BasicResult<Catch::Clara::Detail::ParseState>::BasicResult<Catch::Clara::ParseResultType>(Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> const&)
explicit BasicResult( BasicResult<U> const& other ): ResultValueBase<T>( other.type() ), m_errorMessage( other.errorMessage() ) { assert( type() != ResultType::Ok ); }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x8(%rsi), %eax movl %eax, 0x8(%rdi) leaq 0xfb9fc(%rip), %rax # 0x146ec8 movq %rax, (%rdi) addq $0x40, %rdi leaq 0x50(%rbx), %rax movq %rax, 0x40(%rbx) movq 0x10(%rsi), %rax movq 0x18(%rsi), %rdx addq %rax, %rdx movq %rax, %rsi callq 0x53b7e cmpl $0x0, 0x8(%rbx) je 0x4b4fc addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0xb0c99(%rip), %rdi # 0xfc19c leaq 0xaf72d(%rip), %rsi # 0xfac37 leaq 0xb0d3e(%rip), %rcx # 0xfc24f movl $0x1226, %edx # imm = 0x1226 callq 0x12340 movq %rax, %r14 leaq 0xfb9fb(%rip), %rax # 0x146f20 movq %rax, (%rbx) cmpl $0x0, 0x8(%rbx) jne 0x4b53a addq $0x28, %rbx movq %rbx, %rdi callq 0x4b2a6 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Detail::unique_ptr<Catch::Detail::EnumInfo>::~unique_ptr()
~unique_ptr() { delete m_ptr; }
pushq %rbx movq (%rdi), %rbx testq %rbx, %rbx je 0x4bfaa movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x4bf9c movq 0x20(%rbx), %rsi subq %rdi, %rsi callq 0x12570 movl $0x28, %esi movq %rbx, %rdi popq %rbx jmp 0x12570 popq %rbx retq
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::operator==(Catch::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, Catch::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
bool some() const { return nullableValue != nullptr; }
movq (%rdi), %rcx movb $0x1, %al movq (%rsi), %rdx orq %rcx, %rdx je 0x4c191 testq %rcx, %rcx je 0x4c192 movq (%rsi), %rsi testq %rsi, %rsi je 0x4c192 movq 0x8(%rcx), %rdx cmpq 0x8(%rsi), %rdx jne 0x4c192 testq %rdx, %rdx je 0x4c191 pushq %rax movq (%rsi), %rsi movq (%rcx), %rdi callq 0x125b0 testl %eax, %eax sete %al addq $0x8, %rsp retq xorl %eax, %eax retq nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::XmlWriter& Catch::XmlWriter::writeAttribute<unsigned long, void>(Catch::StringRef, unsigned long const&)
XmlWriter& writeAttribute( StringRef name, T const& attribute ) { ReusableStringStream rss; rss << attribute; return writeAttribute( name, rss.str() ); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rcx, %r13 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x5b04c leaq 0x8(%rax), %rdi callq 0x4c260 movq %rax, %r12 movq %rax, (%rsp) callq 0x5b04c movq 0x8(%rax), %rax movq (%rax,%r12,8), %r12 movq %r12, 0x8(%rsp) movq (%r13), %rsi movq %r12, %rdi callq 0x12380 addq $0x8, %r12 leaq 0x10(%rsp), %rdi movq %r12, %rsi callq 0x12870 movq 0x10(%rsp), %rcx movq 0x18(%rsp), %r8 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x36bb0 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4d526 movq 0x20(%rsp), %rsi incq %rsi callq 0x12570 movq %rsp, %rdi callq 0x2fb24 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4d564 movq 0x20(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x4d564 jmp 0x4d561 movq %rax, %rbx movq %rsp, %rdi callq 0x2fb24 movq %rbx, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Matchers::HasSizeMatcher::~HasSizeMatcher()
explicit HasSizeMatcher(std::size_t target_size): m_target_size(target_size) {}
pushq %rbx movq %rdi, %rbx leaq 0xf6689(%rip), %rax # 0x144240 movq %rax, (%rdi) movq 0x8(%rdi), %rdi leaq 0x18(%rbx), %rax cmpq %rax, %rdi je 0x4dbd2 movq (%rax), %rsi incq %rsi callq 0x12570 movl $0x30, %esi movq %rbx, %rdi popq %rbx jmp 0x12570
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::JunitReporter::~JunitReporter()
~JunitReporter() override = default;
pushq %rbx movq %rdi, %rbx movq 0x120(%rdi), %rdi leaq 0x130(%rbx), %rax cmpq %rax, %rdi je 0x4e570 movq (%rax), %rsi incq %rsi callq 0x12570 movq 0x100(%rbx), %rdi leaq 0x110(%rbx), %rax cmpq %rax, %rdi je 0x4e58e movq (%rax), %rsi incq %rsi callq 0x12570 leaq 0xb0(%rbx), %rdi callq 0x36d2e movq %rbx, %rdi popq %rbx jmp 0x3daba nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Benchmark::Estimate<double> Catch::Benchmark::Detail::bootstrap<double (*&)(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>)>(double, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>, std::vector<double, std::allocator<double>> const&, double (*&)(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>))
Estimate<double> bootstrap( double confidence_level, std::vector<double>::iterator first, std::vector<double>::iterator last, sample const& resample, Estimator&& estimator ) { auto n_samples = last - first; double point = estimator(first, last); // Degenerate case with a single sample if (n_samples == 1) return { point, point, point, confidence_level }; sample jack = jackknife(estimator, first, last); double jack_mean = mean(jack.begin(), jack.end()); double sum_squares = 0, sum_cubes = 0; for (double x : jack) { auto difference = jack_mean - x; auto square = difference * difference; auto cube = square * difference; sum_squares += square; sum_cubes += cube; } double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5)); long n = static_cast<long>(resample.size()); double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / static_cast<double>(n); // degenerate case with uniform samples if ( directCompare( prob_n, 0. ) ) { return { point, point, point, confidence_level }; } double bias = normal_quantile(prob_n); double z1 = normal_quantile((1. - confidence_level) / 2.); auto cumn = [n]( double x ) -> long { return std::lround( normal_cdf( x ) * static_cast<double>(n) ); }; auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); }; double b1 = bias + z1; double b2 = bias - z1; double a1 = a(b1); double a2 = a(b2); auto lo = static_cast<size_t>((std::max)(cumn(a1), 0l)); auto hi = static_cast<size_t>((std::min)(cumn(a2), n - 1)); return { point, resample[lo], resample[hi], confidence_level }; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r12 movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movsd %xmm0, 0x8(%rsp) movq %rdi, %rbx movq %rdx, %rbp subq %rsi, %rbp movq %rsi, %rdi movq %rdx, %rsi callq *(%r8) cmpq $0x8, %rbp jne 0x4e6a5 movsd %xmm0, (%rbx) movsd %xmm0, 0x8(%rbx) movsd %xmm0, 0x10(%rbx) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x18(%rbx) jmp 0x4e8ee movsd %xmm0, 0x18(%rsp) leaq 0x40(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi movq %r13, %rdx movq %r15, %rcx callq 0x4f14d movq (%rbp), %rax movq 0x8(%rbp), %rcx xorpd %xmm4, %xmm4 xorpd %xmm1, %xmm1 cmpq %rcx, %rax je 0x4e6e6 movq %rax, %rdx addsd (%rdx), %xmm1 addq $0x8, %rdx cmpq %rcx, %rdx jne 0x4e6d9 movq %rcx, %rdx xorpd %xmm0, %xmm0 subq %rax, %rdx je 0x4e72f sarq $0x3, %rdx xorps %xmm0, %xmm0 cvtsi2sd %rdx, %xmm0 divsd %xmm0, %xmm1 xorpd %xmm0, %xmm0 xorpd %xmm4, %xmm4 movapd %xmm1, %xmm2 subsd (%rax), %xmm2 movapd %xmm2, %xmm3 mulsd %xmm2, %xmm3 mulsd %xmm3, %xmm2 addsd %xmm2, %xmm4 addsd %xmm3, %xmm0 addq $0x8, %rax cmpq %rcx, %rax jne 0x4e70a movapd %xmm4, 0x20(%rsp) movsd 0xa7ce3(%rip), %xmm1 # 0xf6420 callq 0x129b0 movapd %xmm0, %xmm4 movq (%r14), %rax movq 0x8(%r14), %rcx movq %rcx, %r15 subq %rax, %r15 sarq $0x3, %r15 xorpd %xmm1, %xmm1 xorpd %xmm0, %xmm0 cmpq %rax, %rcx movsd 0x18(%rsp), %xmm2 je 0x4e78a xorl %edx, %edx xorl %esi, %esi ucomisd (%rax), %xmm2 seta %sil addq %rsi, %rdx addq $0x8, %rax cmpq %rcx, %rax jne 0x4e76c xorps %xmm0, %xmm0 cvtsi2sd %rdx, %xmm0 xorps %xmm3, %xmm3 cvtsi2sd %r15, %xmm3 divsd %xmm3, %xmm0 ucomisd %xmm1, %xmm0 jne 0x4e7b1 jp 0x4e7b1 movsd %xmm2, (%rbx) movsd %xmm2, 0x8(%rbx) movsd %xmm2, 0x10(%rbx) jmp 0x4e8cc mulsd 0xa7eef(%rip), %xmm4 # 0xf66a8 movsd %xmm4, 0x38(%rsp) movsd %xmm3, 0x10(%rsp) callq 0x1b0d7 movsd %xmm0, 0x30(%rsp) movsd 0xa7c50(%rip), %xmm0 # 0xf6428 subsd 0x8(%rsp), %xmm0 mulsd 0xa7e52(%rip), %xmm0 # 0xf6638 callq 0x1b0d7 movsd 0x30(%rsp), %xmm2 movapd %xmm2, %xmm1 addsd %xmm0, %xmm1 movapd %xmm2, %xmm3 movapd %xmm2, %xmm4 subsd %xmm0, %xmm3 movapd 0x20(%rsp), %xmm2 xorpd 0xa7ead(%rip), %xmm2 # 0xf66c0 divsd 0x38(%rsp), %xmm2 movapd %xmm2, %xmm0 mulsd %xmm1, %xmm0 movsd 0xa7bff(%rip), %xmm5 # 0xf6428 addsd %xmm5, %xmm0 divsd %xmm0, %xmm1 addsd %xmm4, %xmm1 mulsd %xmm3, %xmm2 addsd %xmm5, %xmm2 divsd %xmm2, %xmm3 addsd %xmm4, %xmm3 movsd %xmm3, 0x20(%rsp) divsd 0xa7e5d(%rip), %xmm1 # 0xf66b0 movapd %xmm1, %xmm0 callq 0x129a0 mulsd 0xa7dd4(%rip), %xmm0 # 0xf6638 mulsd 0x10(%rsp), %xmm0 callq 0x12060 xorl %r12d, %r12d testq %rax, %rax cmovgq %rax, %r12 movsd 0x20(%rsp), %xmm0 divsd 0xa7e29(%rip), %xmm0 # 0xf66b0 callq 0x129a0 mulsd 0xa7da4(%rip), %xmm0 # 0xf6638 mulsd 0x10(%rsp), %xmm0 callq 0x12060 decq %r15 cmpq %rax, %r15 cmovgeq %rax, %r15 movsd 0x18(%rsp), %xmm0 movsd %xmm0, (%rbx) movq (%r14), %rax movsd (%rax,%r12,8), %xmm0 movsd %xmm0, 0x8(%rbx) movsd (%rax,%r15,8), %xmm0 movsd %xmm0, 0x10(%rbx) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x18(%rbx) movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x4e8ee movq 0x50(%rsp), %rsi subq %rdi, %rsi callq 0x12570 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::reset()
void reset() { if ( nullableValue ) { nullableValue->~T(); } nullableValue = nullptr; }
pushq %rbx movq %rdi, %rbx movq (%rdi), %rax testq %rax, %rax je 0x500fb movq (%rax), %rdi addq $0x10, %rax cmpq %rax, %rdi je 0x500fb movq (%rax), %rsi incq %rsi callq 0x12570 movq $0x0, (%rbx) popq %rbx retq
/jbaldwin[P]libcappuccino/test/catch.hpp
std::set<Catch::TestCaseHandle const*, std::less<Catch::TestCaseHandle const*>, std::allocator<Catch::TestCaseHandle const*>> Catch::createShard<std::set<Catch::TestCaseHandle const*, std::less<Catch::TestCaseHandle const*>, std::allocator<Catch::TestCaseHandle const*>>>(std::set<Catch::TestCaseHandle const*, std::less<Catch::TestCaseHandle const*>, std::allocator<Catch::TestCaseHandle const*>> const&, unsigned long, unsigned long)
Container createShard(Container const& container, std::size_t const shardCount, std::size_t const shardIndex) { assert(shardCount > shardIndex); if (shardCount == 1) { return container; } const std::size_t totalTestCount = container.size(); const std::size_t shardSize = totalTestCount / shardCount; const std::size_t leftoverTests = totalTestCount % shardCount; const std::size_t startIndex = shardIndex * shardSize + (std::min)(shardIndex, leftoverTests); const std::size_t endIndex = (shardIndex + 1) * shardSize + (std::min)(shardIndex + 1, leftoverTests); auto startIterator = std::next(container.begin(), static_cast<std::ptrdiff_t>(startIndex)); auto endIterator = std::next(container.begin(), static_cast<std::ptrdiff_t>(endIndex)); return Container(startIterator, endIterator); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rcx, %r14 cmpq %rcx, %rdx jbe 0x512bb movq %rdx, %rcx movq %rdi, %rbx cmpq $0x1, %rdx jne 0x51216 movq %rbx, %rdi callq 0x515cc jmp 0x512ae movq 0x18(%rsi), %r15 movq 0x28(%rsi), %rax xorl %edx, %edx divq %rcx movq %rax, %rcx imulq %r14, %rcx cmpq %r14, %rdx movq %r14, %r13 cmovbq %rdx, %r13 addq %rcx, %r13 incq %r14 imulq %r14, %rax cmpq %r14, %rdx cmovbq %rdx, %r14 addq %rax, %r14 movq %r15, %r12 testq %r13, %r13 jle 0x51262 movq %r12, %rdi callq 0x12650 movq %rax, %r12 decq %r13 jne 0x51250 jmp 0x51277 je 0x51277 movq %r15, %r12 movq %r12, %rdi callq 0x122e0 movq %rax, %r12 incq %r13 jne 0x51267 testq %r14, %r14 jle 0x5128e movq %r15, %rdi callq 0x12650 movq %rax, %r15 decq %r14 jne 0x5127c jmp 0x512a0 je 0x512a0 movq %r15, %rdi callq 0x122e0 movq %rax, %r15 incq %r14 jne 0x51290 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x51582 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0xa9e1c(%rip), %rdi # 0xfb0de leaq 0xa996e(%rip), %rsi # 0xfac37 leaq 0xa9e26(%rip), %rcx # 0xfb0f6 movl $0x26ba, %edx # imm = 0x26BA callq 0x12340
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType>::~BasicResult()
explicit BasicResult( BasicResult<U> const& other ): ResultValueBase<T>( other.type() ), m_errorMessage( other.errorMessage() ) { assert( type() != ResultType::Ok ); }
pushq %rbx movq %rdi, %rbx leaq 0xf557b(%rip), %rax # 0x146fb8 movq %rax, (%rdi) movq 0x10(%rdi), %rdi leaq 0x20(%rbx), %rax cmpq %rax, %rdi je 0x51a58 movq (%rax), %rsi incq %rsi callq 0x12570 leaq 0xf55b1(%rip), %rax # 0x147010 movq %rax, (%rbx) movl $0x30, %esi movq %rbx, %rdi popq %rbx jmp 0x12570
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType>::enforceOk() const
void enforceOk() const override { // Errors shouldn't reach this point, but if they do // the actual error message will be in m_errorMessage assert( m_type != ResultType::LogicError ); assert( m_type != ResultType::RuntimeError ); if ( m_type != ResultType::Ok ) std::abort(); }
pushq %rax movl 0x8(%rdi), %eax testl %eax, %eax jne 0x51a7a popq %rax retq cmpl $0x2, %eax je 0x51aa3 cmpl $0x1, %eax jne 0x51ac2 leaq 0xa93c1(%rip), %rdi # 0xfae4c leaq 0xa91a5(%rip), %rsi # 0xfac37 leaq 0xa9820(%rip), %rcx # 0xfb2b9 movl $0x1244, %edx # imm = 0x1244 callq 0x12340 leaq 0xa944e(%rip), %rdi # 0xfaef8 leaq 0xa9186(%rip), %rsi # 0xfac37 leaq 0xa9801(%rip), %rcx # 0xfb2b9 movl $0x1245, %edx # imm = 0x1245 callq 0x12340 callq 0x122b0 nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BasicResult<void>::enforceOk() const
void enforceOk() const override { // Errors shouldn't reach this point, but if they do // the actual error message will be in m_errorMessage assert( m_type != ResultType::LogicError ); assert( m_type != ResultType::RuntimeError ); if ( m_type != ResultType::Ok ) std::abort(); }
pushq %rax movl 0x8(%rdi), %eax testl %eax, %eax jne 0x51b12 popq %rax retq cmpl $0x2, %eax je 0x51b3b cmpl $0x1, %eax jne 0x51b5a leaq 0xa9329(%rip), %rdi # 0xfae4c leaq 0xa910d(%rip), %rsi # 0xfac37 leaq 0xa980d(%rip), %rcx # 0xfb33e movl $0x1244, %edx # imm = 0x1244 callq 0x12340 leaq 0xa93b6(%rip), %rdi # 0xfaef8 leaq 0xa90ee(%rip), %rsi # 0xfac37 leaq 0xa97ee(%rip), %rcx # 0xfb33e movl $0x1245, %edx # imm = 0x1245 callq 0x12340 callq 0x122b0 nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::ResultValueBase<Catch::Clara::Detail::ParseState>::operator=(Catch::Clara::Detail::ResultValueBase<Catch::Clara::Detail::ParseState> const&)
auto operator=( ResultValueBase const& other ) -> ResultValueBase& { if ( m_type == ResultType::Ok ) m_value.~T(); ResultBase::operator=( other ); if ( m_type == ResultType::Ok ) new ( &m_value ) T( other.m_value ); return *this; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) jne 0x51c13 leaq 0x28(%rbx), %rdi callq 0x4b2a6 movl 0x8(%r14), %eax movl %eax, 0x8(%rbx) testl %eax, %eax jne 0x51c3e movl 0x10(%r14), %eax movl %eax, 0x10(%rbx) movups 0x18(%r14), %xmm0 movups %xmm0, 0x18(%rbx) leaq 0x28(%rbx), %rdi addq $0x28, %r14 movq %r14, %rsi callq 0x518a4 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BoundValueRef<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto setValue( std::string const& arg ) -> ParserResult override { T temp; auto result = convertInto( arg, temp ); if ( result ) m_ref.push_back( temp ); return result; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rsp, %rdi movq %rdx, %rsi callq 0x12290 xorl %eax, %eax movq %rax, 0x8(%rbx) leaq 0xf5208(%rip), %r13 # 0x146fb8 movq %r13, (%rbx) leaq 0x20(%rbx), %r12 movq %r12, 0x10(%rbx) movq %rax, 0x18(%rbx) movb $0x0, 0x20(%rbx) movq 0x8(%r14), %rdi movq %rsp, %rsi callq 0x4cae4 movq (%rsp), %rdi cmpq %r15, %rdi je 0x51de5 movq 0x10(%rsp), %rsi incq %rsi callq 0x12570 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %r13, (%rbx) movq 0x10(%rbx), %rdi cmpq %r12, %rdi je 0x51e11 movq (%r12), %rsi incq %rsi callq 0x12570 leaq 0xf51f8(%rip), %rax # 0x147010 movq %rax, (%rbx) jmp 0x51e20 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x51e36 movq 0x10(%rsp), %rsi incq %rsi callq 0x12570 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Optional<Catch::ReporterSpec>::reset()
void reset() { if ( nullableValue ) { nullableValue->~T(); } nullableValue = nullptr; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %r14 testq %r14, %r14 je 0x582c0 leaq 0x58(%r14), %rdi callq 0x4f6f6 movq $0x0, 0x48(%r14) leaq 0x20(%r14), %rdi callq 0x500d8 movq (%r14), %rdi addq $0x10, %r14 cmpq %r14, %rdi je 0x582c0 movq (%r14), %rsi incq %rsi callq 0x12570 movq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> Catch::Clara::Detail::convertInto<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&)
ParserResult convertInto( std::string const& source, T& target ) { std::stringstream ss( source ); ss >> target; if ( ss.fail() ) { return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" ); } else { return ParserResult::ok( ParseResultType::Matched ); } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1c8, %rsp # imm = 0x1C8 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x40(%rsp), %r12 movq %r12, %rdi movl $0x18, %edx callq 0x12880 movq %r12, %rdi movq %r15, %rsi callq 0x122f0 movq 0x40(%rsp), %rax movq -0x18(%rax), %rax testb $0x5, 0x60(%rsp,%rax) je 0x5835e leaq 0xa41ef(%rip), %rsi # 0xfc509 leaq 0x20(%rsp), %rdi movq %r14, %rdx callq 0x4b301 leaq 0xa41ef(%rip), %rsi # 0xfc51d leaq 0x20(%rsp), %rdi callq 0x12a80 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x58380 movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) jmp 0x58387 xorl %eax, %eax movq %rax, 0x8(%rbx) leaq 0xeec4d(%rip), %rcx # 0x146fb8 movq %rcx, (%rbx) leaq 0x20(%rbx), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) movb $0x0, 0x20(%rbx) jmp 0x583df movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rsi movq %rsp, %rdx movq %rsi, 0x8(%rdx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi movl $0x2, %esi callq 0x5662e movq (%rsp), %rdi cmpq %r14, %rdi je 0x583c4 movq 0x10(%rsp), %rsi incq %rsi callq 0x12570 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x583df movq 0x30(%rsp), %rsi incq %rsi callq 0x12570 movq 0xefb32(%rip), %rsi # 0x147f18 leaq 0x40(%rsp), %rdi callq 0x12410 leaq 0xc0(%rsp), %rdi callq 0x12180 movq %rbx, %rax addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x5842d movq 0x10(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x5842d movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5844f movq 0x30(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x5844f jmp 0x5844c movq %rax, %rbx movq 0xefac2(%rip), %rsi # 0x147f18 leaq 0x40(%rsp), %rdi callq 0x12410 leaq 0xc0(%rsp), %rdi callq 0x12180 movq %rbx, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> Catch::Clara::Detail::convertInto<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double&)
ParserResult convertInto( std::string const& source, T& target ) { std::stringstream ss( source ); ss >> target; if ( ss.fail() ) { return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" ); } else { return ParserResult::ok( ParseResultType::Matched ); } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1c8, %rsp # imm = 0x1C8 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x40(%rsp), %r12 movq %r12, %rdi movl $0x18, %edx callq 0x12880 movq %r12, %rdi movq %r15, %rsi callq 0x12350 movq 0x40(%rsp), %rax movq -0x18(%rax), %rax testb $0x5, 0x60(%rsp,%rax) je 0x58637 leaq 0xa3f16(%rip), %rsi # 0xfc509 leaq 0x20(%rsp), %rdi movq %r14, %rdx callq 0x4b301 leaq 0xa3f16(%rip), %rsi # 0xfc51d leaq 0x20(%rsp), %rdi callq 0x12a80 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x58659 movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) jmp 0x58660 xorl %eax, %eax movq %rax, 0x8(%rbx) leaq 0xee974(%rip), %rcx # 0x146fb8 movq %rcx, (%rbx) leaq 0x20(%rbx), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) movb $0x0, 0x20(%rbx) jmp 0x586b8 movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rsi movq %rsp, %rdx movq %rsi, 0x8(%rdx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi movl $0x2, %esi callq 0x5662e movq (%rsp), %rdi cmpq %r14, %rdi je 0x5869d movq 0x10(%rsp), %rsi incq %rsi callq 0x12570 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x586b8 movq 0x30(%rsp), %rsi incq %rsi callq 0x12570 movq 0xef859(%rip), %rsi # 0x147f18 leaq 0x40(%rsp), %rdi callq 0x12410 leaq 0xc0(%rsp), %rdi callq 0x12180 movq %rbx, %rax addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x58706 movq 0x10(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x58706 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x58728 movq 0x30(%rsp), %rsi incq %rsi callq 0x12570 jmp 0x58728 jmp 0x58725 movq %rax, %rbx movq 0xef7e9(%rip), %rsi # 0x147f18 leaq 0x40(%rsp), %rdi callq 0x12410 leaq 0xc0(%rsp), %rdi callq 0x12180 movq %rbx, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::ParserRefImpl<Catch::Clara::Opt>::ParserRefImpl<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, void>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ParserRefImpl( T& ref, std::string const& hint ): m_ref( std::make_shared<BoundValueRef<T>>( ref ) ), m_hint( hint ) {}
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0xee4a7(%rip), %rax # 0x146f48 movq %rax, (%rdi) movl $0x0, 0x8(%rdi) movl $0x20, %edi callq 0x12540 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xee5c6(%rip), %rcx # 0x147090 movq %rcx, (%rax) leaq 0x10(%rax), %rcx leaq 0xee668(%rip), %rdx # 0x147140 movq %rdx, 0x10(%rax) movq %r15, 0x18(%rax) movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x53b7e leaq 0x50(%rbx), %rax movq %rax, 0x40(%rbx) movq $0x0, 0x48(%rbx) movb $0x0, 0x50(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x58b2e callq 0x4fb08 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/test/catch.hpp
Catch::Clara::Detail::ParserRefImpl<Catch::Clara::Opt>::ParserRefImpl<unsigned int, void>(unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ParserRefImpl( T& ref, std::string const& hint ): m_ref( std::make_shared<BoundValueRef<T>>( ref ) ), m_hint( hint ) {}
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0xee3fd(%rip), %rax # 0x146f48 movq %rax, (%rdi) movl $0x0, 0x8(%rdi) movl $0x20, %edi callq 0x12540 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xee814(%rip), %rcx # 0x147388 movq %rcx, (%rax) leaq 0x10(%rax), %rcx leaq 0xee856(%rip), %rdx # 0x1473d8 movq %rdx, 0x10(%rax) movq %r15, 0x18(%rax) movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x53b7e leaq 0x50(%rbx), %rax movq %rax, 0x40(%rbx) movq $0x0, 0x48(%rbx) movb $0x0, 0x50(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x58bd8 callq 0x4fb08 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/test/catch.hpp
cappuccino::mru_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::mru_cache(unsigned long, float)
explicit mru_cache(size_t capacity, float max_load_factor = 1.0f) : m_elements(capacity), m_mru_list(capacity) { std::iota(m_mru_list.begin(), m_mru_list.end(), 0); m_mru_end = m_mru_list.begin(); m_keyed_elements.max_load_factor(max_load_factor); m_keyed_elements.reserve(capacity); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movss %xmm0, 0xc(%rsp) movq %rsi, %r13 movq %rdi, %r12 leaq 0x30(%rdi), %rbx xorpd %xmm0, %xmm0 movupd %xmm0, 0x20(%rdi) movupd %xmm0, 0x10(%rdi) movupd %xmm0, (%rdi) leaq 0xb(%rsp), %rdx movq %rbx, %rdi callq 0xac8fc leaq 0x48(%r12), %r14 leaq 0x78(%r12), %rax movq %rax, 0x48(%r12) movq $0x1, 0x50(%r12) xorpd %xmm0, %xmm0 movupd %xmm0, 0x58(%r12) movl $0x3f800000, 0x68(%r12) # imm = 0x3F800000 movupd %xmm0, 0x70(%r12) leaq 0x80(%r12), %r15 leaq 0xa(%rsp), %rdx movq %r15, %rdi movq %r13, %rsi callq 0x9f702 movq $0x0, 0x98(%r12) movq 0x80(%r12), %rax cmpq %r15, %rax je 0xac734 xorl %ecx, %ecx movq %rax, %rdx movq %rcx, 0x10(%rdx) incq %rcx movq (%rdx), %rdx cmpq %r15, %rdx jne 0xac725 movq %rax, 0x98(%r12) movss 0xc(%rsp), %xmm2 movss %xmm2, 0x68(%r12) movq %r13, %xmm1 punpckldq 0x49f9a(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] movq $0x0, 0x70(%r12) subpd 0x49f99(%rip), %xmm1 # 0xf6700 movapd %xmm1, %xmm0 unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1] addsd %xmm1, %xmm0 xorps %xmm1, %xmm1 cvtss2sd %xmm2, %xmm1 divsd %xmm1, %xmm0 callq 0x120f0 cvttsd2si %xmm0, %rax movq %rax, %rcx sarq $0x3f, %rcx subsd 0x526c9(%rip), %xmm0 # 0xfee60 cvttsd2si %xmm0, %rsi andq %rcx, %rsi orq %rax, %rsi movq %r14, %rdi callq 0x9f80c addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r12 movq (%r15), %rdi cmpq %r15, %rdi je 0xac7dd movq (%rdi), %r13 movl $0x18, %esi callq 0x12570 movq %r13, %rdi cmpq %r15, %r13 jne 0xac7c3 jmp 0xac7dd movq %rax, %r12 movq %r14, %rdi callq 0x9f9d8 movq %rbx, %rdi callq 0xac998 movq %r12, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/inc/cappuccino/mru_cache.hpp
cappuccino::rr_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::rr_cache(unsigned long, float)
explicit rr_cache(size_t capacity, float max_load_factor = 1.0f) : m_elements(capacity), m_open_list(capacity), m_random_device(), m_mt(m_random_device()) { std::iota(m_open_list.begin(), m_open_list.end(), 0); m_keyed_elements.max_load_factor(max_load_factor); m_keyed_elements.reserve(capacity); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movss %xmm0, 0x4(%rsp) movq %rsi, %rbp movq %rdi, %r15 xorpd %xmm0, %xmm0 movupd %xmm0, 0x10(%rdi) movupd %xmm0, (%rdi) movq $0x0, 0x20(%rdi) leaq 0x28(%rdi), %rbx leaq 0x3(%rsp), %rdx movq %rbx, %rdi callq 0xb74a6 leaq 0x40(%r15), %r14 leaq 0x70(%r15), %rax movq %rax, 0x40(%r15) movq $0x1, 0x48(%r15) xorpd %xmm0, %xmm0 movupd %xmm0, 0x50(%r15) movl $0x3f800000, 0x60(%r15) # imm = 0x3F800000 movupd %xmm0, 0x68(%r15) leaq 0x78(%r15), %r12 leaq 0x2(%rsp), %rdx movq %r12, %rdi movq %rbp, %rsi callq 0xb7542 movq $0x0, 0x90(%r15) leaq 0x98(%r15), %r13 movq %r13, %rdi callq 0x4a8de movq %r13, %rdi callq 0x12770 movl %eax, %ecx movq %rcx, 0x1420(%r15) xorl %eax, %eax movq %rcx, %rdx shrq $0x1e, %rdx xorl %ecx, %edx imull $0x6c078965, %edx, %ecx # imm = 0x6C078965 addl %eax, %ecx incl %ecx movq %rcx, 0x1428(%r15,%rax,8) incq %rax cmpq $0x26f, %rax # imm = 0x26F jne 0xb7294 movq $0x270, 0x27a0(%r15) # imm = 0x270 movq 0x78(%r15), %rax movq 0x80(%r15), %rcx cmpq %rcx, %rax je 0xb72e6 xorl %edx, %edx movq %rdx, (%rax) incq %rdx addq $0x8, %rax cmpq %rcx, %rax jne 0xb72d7 movss 0x4(%rsp), %xmm2 movss %xmm2, 0x60(%r15) movq %rbp, %xmm1 punpckldq 0x3f3f1(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] movq $0x0, 0x68(%r15) subpd 0x3f3f1(%rip), %xmm1 # 0xf6700 movapd %xmm1, %xmm0 unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1] addsd %xmm1, %xmm0 xorps %xmm1, %xmm1 cvtss2sd %xmm2, %xmm1 divsd %xmm1, %xmm0 callq 0x120f0 cvttsd2si %xmm0, %rax movq %rax, %rcx sarq $0x3f, %rcx subsd 0x47b21(%rip), %xmm0 # 0xfee60 cvttsd2si %xmm0, %rsi andq %rcx, %rsi orq %rax, %rsi movq %r14, %rdi callq 0x9f80c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbp jmp 0xb7376 movq %rax, %rbp jmp 0xb738e movq %rax, %rbp movq %r13, %rdi callq 0x12500 movq (%r12), %rdi testq %rdi, %rdi je 0xb738e movq 0x88(%r15), %rsi subq %rdi, %rsi callq 0x12570 movq %r14, %rdi callq 0x9f9d8 movq %rbx, %rdi callq 0xb75cc movq %rbp, %rdi callq 0x129d0 movq %rax, %rdi callq 0x1a51a
/jbaldwin[P]libcappuccino/inc/cappuccino/rr_cache.hpp
unsigned long cappuccino::rr_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::insert_range<std::vector<std::pair<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(std::vector<std::pair<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&&, cappuccino::allow)
auto insert_range(range_type&& key_value_range, allow a = allow::insert_or_update) -> size_t { size_t inserted{0}; { std::lock_guard guard{m_lock}; for (auto& [key, value] : key_value_range) { if (do_insert_update(key, std::move(value), a)) { ++inserted; } } } return inserted; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xb78f7 movq (%r15), %rsi movq 0x8(%r15), %r13 xorl %r15d, %r15d cmpq %r13, %rsi je 0xb78e2 leaq 0x8(%rsi), %r12 movq %rbx, %rdi movq %r12, %rdx movq %r14, %rcx callq 0xb764e movzbl %al, %eax addq %rax, %r15 addq $0x20, %r12 movq %r12, %rsi cmpq %r13, %r12 jne 0xb78be movq %rbx, %rdi callq 0x12420 movq %r15, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/inc/cappuccino/rr_cache.hpp
unsigned long cappuccino::rr_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::erase_range<std::vector<unsigned long, std::allocator<unsigned long>>>(std::vector<unsigned long, std::allocator<unsigned long>> const&)
auto erase_range(const range_type& key_range) -> size_t { size_t deleted_elements{0}; std::lock_guard guard{m_lock}; for (auto& key : key_range) { auto keyed_position = m_keyed_elements.find(key); if (keyed_position != m_keyed_elements.end()) { ++deleted_elements; do_erase(keyed_position->second); } } return deleted_elements; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xb7a16 movq (%r14), %r15 movq 0x8(%r14), %r13 cmpq %r13, %r15 je 0xb79fe leaq 0x40(%rbx), %r12 xorl %r14d, %r14d movq (%r15), %rcx movq %rcx, %rax xorl %edx, %edx divq 0x48(%rbx) movq %r12, %rdi movq %rdx, %rsi movq %r15, %rdx callq 0x9fbd2 testq %rax, %rax je 0xb79dd movq (%rax), %rax jmp 0xb79df xorl %eax, %eax testq %rax, %rax je 0xb79f3 movq 0x10(%rax), %rsi movq %rbx, %rdi callq 0xb77cc incq %r14 addq $0x8, %r15 cmpq %r13, %r15 jne 0xb79b9 jmp 0xb7a01 xorl %r14d, %r14d movq %rbx, %rdi callq 0x12420 movq %r14, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/rr_cache.hpp
cappuccino::tlru_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::tlru_cache(unsigned long, float)
explicit tlru_cache(size_t capacity, float max_load_factor = 1.0f) : m_elements(capacity), m_lru_list(capacity) { std::iota(m_lru_list.begin(), m_lru_list.end(), 0); m_lru_end = m_lru_list.begin(); m_keyed_elements.max_load_factor(max_load_factor); m_keyed_elements.reserve(capacity); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movss %xmm0, 0x4(%rsp) movq %rsi, %r13 movq %rdi, %r12 leaq 0x30(%rdi), %rbx xorpd %xmm0, %xmm0 movupd %xmm0, 0x20(%rdi) movupd %xmm0, 0x10(%rdi) movupd %xmm0, (%rdi) leaq 0x3(%rsp), %rdx movq %rbx, %rdi callq 0xc574e leaq 0x48(%r12), %r14 leaq 0x78(%r12), %rax movq %rax, 0x48(%r12) movq $0x1, 0x50(%r12) xorpd %xmm0, %xmm0 movupd %xmm0, 0x58(%r12) movl $0x3f800000, 0x68(%r12) # imm = 0x3F800000 movupd %xmm0, 0x70(%r12) leaq 0x80(%r12), %r15 leaq 0x2(%rsp), %rdx movq %r15, %rdi movq %r13, %rsi callq 0x9f702 leaq 0xa0(%r12), %rax movl $0x0, 0xa0(%r12) movq $0x0, 0xa8(%r12) movq %rax, 0xb0(%r12) movq %rax, 0xb8(%r12) xorpd %xmm0, %xmm0 movupd %xmm0, 0xc0(%r12) movq 0x80(%r12), %rax cmpq %r15, %rax je 0xc553a xorl %ecx, %ecx movq %rax, %rdx movq %rcx, 0x10(%rdx) incq %rcx movq (%rdx), %rdx cmpq %r15, %rdx jne 0xc552b leaq 0x98(%r12), %rbp movq %rax, 0xc8(%r12) movss 0x4(%rsp), %xmm2 movss %xmm2, 0x68(%r12) movq %r13, %xmm1 punpckldq 0x3118c(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] movq $0x0, 0x70(%r12) subpd 0x3118b(%rip), %xmm1 # 0xf6700 movapd %xmm1, %xmm0 unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1] addsd %xmm1, %xmm0 xorps %xmm1, %xmm1 cvtss2sd %xmm2, %xmm1 divsd %xmm1, %xmm0 callq 0x120f0 cvttsd2si %xmm0, %rax movq %rax, %rcx sarq $0x3f, %rcx subsd 0x398bb(%rip), %xmm0 # 0xfee60 cvttsd2si %xmm0, %rsi andq %rcx, %rsi orq %rax, %rsi movq %r14, %rdi callq 0x9f80c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 movq %rbp, %rdi callq 0xc585e movq (%r15), %rdi cmpq %r15, %rdi je 0xc55f4 movq (%rdi), %r13 movl $0x18, %esi callq 0x12570 movq %r13, %rdi cmpq %r15, %r13 jne 0xc55da jmp 0xc55f4 movq %rax, %r12 movq %r14, %rdi callq 0x9f9d8 movq %rbx, %rdi callq 0xc57e6 movq %r12, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/tlru_cache.hpp
std::vector<std::pair<unsigned long, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::pair<unsigned long, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>> cappuccino::tlru_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::find_range<std::vector<unsigned long, std::allocator<unsigned long>>>(std::vector<unsigned long, std::allocator<unsigned long>> const&, cappuccino::peek)
auto find_range(const range_type& key_range, peek peek = peek::no) -> std::vector<std::pair<key_type, std::optional<value_type>>> { std::vector<std::pair<key_type, std::optional<value_type>>> output; output.reserve(std::size(key_range)); auto now = std::chrono::steady_clock::now(); { std::lock_guard guard{m_lock}; for (auto& key : key_range) { output.emplace_back(key, do_find(key, now, peek)); } } return output; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %ecx, %ebp movq %rdx, %r13 movq %rsi, %r14 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x8(%rdx), %rsi subq (%rdx), %rsi sarq $0x3, %rsi movq %rdi, 0x8(%rsp) callq 0x79046 callq 0x12720 movq %rax, %r15 movq %r14, %rdi callq 0x127f0 testl %eax, %eax jne 0xc6240 movq (%r13), %r12 movq 0x8(%r13), %rbx cmpq %rbx, %r12 je 0xc6224 leaq 0x10(%rsp), %r13 movq %r13, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %rcx movl %ebp, %r8d callq 0xc5ca4 movq 0x8(%rsp), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x790f6 cmpb $0x1, 0x30(%rsp) jne 0xc621b movb $0x0, 0x30(%rsp) movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xc621b movq 0x20(%rsp), %rsi incq %rsi callq 0x12570 addq $0x8, %r12 cmpq %rbx, %r12 jne 0xc61cf movq %r14, %rdi callq 0x12420 movq 0x8(%rsp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x12360 jmp 0xc6249 movq %rax, %r15 jmp 0xc6286 movq %rax, %r15 jmp 0xc627e movq %rax, %r15 cmpb $0x1, 0x30(%rsp) jne 0xc627e movb $0x0, 0x30(%rsp) movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xc627e movq 0x20(%rsp), %rsi incq %rsi callq 0x12570 movq %r14, %rdi callq 0x12420 movq 0x8(%rsp), %rdi callq 0x78f14 movq %r15, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/tlru_cache.hpp
cappuccino::ut_map<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::clean_expired_values()
auto clean_expired_values() -> size_t { std::lock_guard guard{m_lock}; const auto now = std::chrono::steady_clock::now(); return do_prune(now); }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xd91ea callq 0x12720 movq %rbx, %rdi movq %rax, %rsi callq 0xd87ba movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<unsigned long, unsigned long, (cappuccino::thread_safe)1>::insert(unsigned long const&, unsigned long, cappuccino::allow)
auto insert(const key_type& key, value_type value, allow a = allow::insert_or_update) -> bool { std::lock_guard guard{m_lock}; const auto now = std::chrono::steady_clock::now(); const auto expire_time = now + m_uniform_ttl; do_prune(now); return do_insert_update(key, std::move(value), expire_time, a); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdx, (%rsp) callq 0x127f0 testl %eax, %eax jne 0xd9272 callq 0x12720 movq %rax, %r12 movq 0x70(%rbx), %r13 movq %rbx, %rdi movq %rax, %rsi callq 0xd9378 imulq $0xf4240, %r13, %rcx # imm = 0xF4240 addq %r12, %rcx movq %rsp, %rdx movq %rbx, %rdi movq %r15, %rsi movq %r14, %r8 callq 0xd93ee movl %eax, %ebp movq %rbx, %rdi callq 0x12420 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<unsigned long, unsigned long, (cappuccino::thread_safe)1>::clean_expired_values()
auto clean_expired_values() -> size_t { std::lock_guard guard{m_lock}; const auto now = std::chrono::steady_clock::now(); return do_prune(now); }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xd92c2 callq 0x12720 movq %rbx, %rdi movq %rax, %rsi callq 0xd9378 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<unsigned long, unsigned long, (cappuccino::thread_safe)1>::do_prune(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)
auto do_prune(std::chrono::steady_clock::time_point now) -> size_t { const auto ttl_begin = m_ttl_list.begin(); const auto ttl_end = m_ttl_list.end(); ttl_iterator ttl_iter; size_t deleted{0}; // Delete the keyed elements from the map. Not using do_erase to take // advantage of iterator range delete for TTLs. for (ttl_iter = ttl_begin; ttl_iter != ttl_end && now >= ttl_iter->m_expire_time; ++ttl_iter) { m_keyed_elements.erase(ttl_iter->m_keyed_elements_position); ++deleted; } // Delete the range of TTLs. if (ttl_iter != ttl_begin) { m_ttl_list.erase(ttl_begin, ttl_iter); } return deleted; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax leaq 0x58(%rdi), %rbx movq 0x58(%rdi), %r14 cmpq %rbx, %r14 je 0xd93c2 movq %rsi, %r13 movq %rdi, %rbp addq $0x28, %rbp xorl %r15d, %r15d movq %r14, %r12 cmpq %r13, 0x10(%r12) jg 0xd93c8 movq 0x18(%r12), %rsi movq %rbp, %rdi callq 0xd94d6 incq %r15 movq (%r12), %r12 cmpq %rbx, %r12 jne 0xd93a0 jmp 0xd93c8 xorl %r15d, %r15d movq %r14, %r12 cmpq %r14, %r12 je 0xd93db movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0xd948c movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<unsigned long, unsigned long, (cappuccino::thread_safe)1>::do_insert_update(unsigned long const&, unsigned long&&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, cappuccino::allow)
auto do_insert_update( const key_type& key, value_type&& value, std::chrono::steady_clock::time_point expire_time, allow a) -> bool { const auto keyed_position = m_keyed_elements.find(key); if (keyed_position != m_keyed_elements.end()) { if (update_allowed(a)) { do_update(keyed_position, std::move(value), expire_time); return true; } } else { if (insert_allowed(a)) { do_insert(key, std::move(value), expire_time); return true; } } return false; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %r9 leaq 0x30(%rdi), %rax movq %rax, %rdi testq %r9, %r9 je 0xd9424 movq (%rsi), %r10 movq %rax, %rdi xorl %r11d, %r11d cmpq %r10, 0x20(%r9) setb %r11b cmovaeq %r9, %rdi movq 0x10(%r9,%r11,8), %r9 testq %r9, %r9 jne 0xd940b movq %rax, %r14 cmpq %rax, %rdi je 0xd943a movq (%rsi), %r9 cmpq 0x20(%rdi), %r9 cmovbq %rax, %rdi movq %rdi, %r14 cmpq %rax, %r14 je 0xd9470 testb $0x2, %r8b je 0xd9476 movq (%rdx), %rax movq %rax, 0x28(%r14) movq 0x30(%r14), %rax movq %rcx, 0x10(%rax) leaq 0x58(%rbx), %rdi movq %rdi, %rsi movq %rdi, %rdx movq %rax, %rcx callq 0xd957e movq 0x60(%rbx), %rax movq %rax, 0x30(%r14) jmp 0xd9482 testb $0x1, %r8b jne 0xd947a xorl %eax, %eax jmp 0xd9484 movq %rbx, %rdi callq 0xd9512 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<unsigned long, unsigned long, (cappuccino::thread_safe)1>::do_insert(unsigned long const&, unsigned long&&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)
auto do_insert(const key_type& key, value_type&& value, std::chrono::steady_clock::time_point expire_time) -> void { keyed_element element; element.m_value = std::move(value); auto keyed_position = m_keyed_elements.emplace(key, std::move(element)).first; m_ttl_list.emplace_back(expire_time, keyed_position); // Update the elements iterator to ttl_element. keyed_position->second.m_ttl_position = std::prev(m_ttl_list.end()); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rdi, %r14 leaq 0x8(%rsp), %rax movq $0x0, 0x8(%rax) movq (%rdx), %rcx movq %rcx, (%rax) addq $0x28, %rdi movq %rax, %rdx callq 0xd95b8 movq %rax, %r15 leaq 0x58(%r14), %r12 movl $0x20, %edi callq 0x12540 movq %rbx, 0x10(%rax) movq %r15, 0x18(%rax) movq %rax, %rdi movq %r12, %rsi callq 0x120a0 incq 0x68(%r14) movq 0x60(%r14), %rax movq %rax, 0x30(%r15) addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long, (cappuccino::thread_safe)1>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto find(const key_type& key) -> std::optional<value_type> { std::lock_guard guard{m_lock}; const auto now = std::chrono::steady_clock::now(); do_prune(now); return do_find(key); }
pushq %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xd9893 callq 0x12720 movq %rbx, %rdi movq %rax, %rsi callq 0xd98ea leaq 0x28(%rbx), %rdi movq %r14, %rsi callq 0xd9b06 leaq 0x30(%rbx), %rcx cmpq %rcx, %rax je 0xd987f movq 0x40(%rax), %r14 movb $0x1, %bpl jmp 0xd9881 xorl %ebp, %ebp movq %rbx, %rdi callq 0x12420 movq %r14, %rax movl %ebp, %edx popq %rbx popq %r14 popq %rbp retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long, (cappuccino::thread_safe)1>::do_insert_update(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, cappuccino::allow)
auto do_insert_update( const key_type& key, value_type&& value, std::chrono::steady_clock::time_point expire_time, allow a) -> bool { const auto keyed_position = m_keyed_elements.find(key); if (keyed_position != m_keyed_elements.end()) { if (update_allowed(a)) { do_update(keyed_position, std::move(value), expire_time); return true; } } else { if (insert_allowed(a)) { do_insert(key, std::move(value), expire_time); return true; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r13 movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %rbp movq %rdi, %rbx addq $0x28, %rdi callq 0xd9b06 movq %rax, %r12 leaq 0x30(%rbx), %rax cmpq %rax, %r12 je 0xd99c0 testb $0x2, %r13b je 0xd99c6 movq (%r15), %rax movq %rax, 0x40(%r12) movq 0x48(%r12), %rcx movq %r14, 0x10(%rcx) leaq 0x58(%rbx), %rdi movq %rdi, %rsi movq %rdi, %rdx callq 0xd9b90 movq 0x60(%rbx), %rax movq %rax, 0x48(%r12) jmp 0xd99db testb $0x1, %r13b jne 0xd99ca xorl %eax, %eax jmp 0xd99dd movq %rbx, %rdi movq %rbp, %rsi movq %r15, %rdx movq %r14, %rcx callq 0xd9a9a movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::monostate, (cappuccino::thread_safe)1>::do_prune(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)
auto do_prune(std::chrono::steady_clock::time_point now) -> size_t { const auto ttl_begin = m_ttl_list.begin(); const auto ttl_end = m_ttl_list.end(); ttl_iterator ttl_iter; size_t deleted{0}; // Delete the keyed elements from the map. Not using do_erase to take // advantage of iterator range delete for TTLs. for (ttl_iter = ttl_begin; ttl_iter != ttl_end && now >= ttl_iter->m_expire_time; ++ttl_iter) { m_keyed_elements.erase(ttl_iter->m_keyed_elements_position); ++deleted; } // Delete the range of TTLs. if (ttl_iter != ttl_begin) { m_ttl_list.erase(ttl_begin, ttl_iter); } return deleted; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax leaq 0x58(%rdi), %rbx movq 0x58(%rdi), %r14 cmpq %rbx, %r14 je 0xd9f2a movq %rsi, %r13 movq %rdi, %rbp addq $0x28, %rbp xorl %r15d, %r15d movq %r14, %r12 cmpq %r13, 0x10(%r12) jg 0xd9f30 movq 0x18(%r12), %rsi movq %rbp, %rdi callq 0xda024 incq %r15 movq (%r12), %r12 cmpq %rbx, %r12 jne 0xd9f08 jmp 0xd9f30 xorl %r15d, %r15d movq %r14, %r12 cmpq %r14, %r12 je 0xd9f43 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0xd9fda movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_map.hpp
cappuccino::ut_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, cappuccino::allow)
auto insert(const key_type& key, allow a = allow::insert_or_update) -> bool { std::lock_guard guard{m_lock}; const auto now = std::chrono::steady_clock::now(); const auto expire_time = now + m_uniform_ttl; do_prune(now); return do_insert_update(key, expire_time, a); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xe4019 callq 0x12720 movq %rax, %r12 movq 0x70(%rbx), %r13 movq %rbx, %rdi movq %rax, %rsi callq 0xe4124 imulq $0xf4240, %r13, %rdx # imm = 0xF4240 addq %r12, %rdx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rcx callq 0xe419a movl %eax, %ebp movq %rbx, %rdi callq 0x12420 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_set.hpp
cappuccino::ut_set<unsigned long, (cappuccino::thread_safe)1>::insert(unsigned long const&, cappuccino::allow)
auto insert(const key_type& key, allow a = allow::insert_or_update) -> bool { std::lock_guard guard{m_lock}; const auto now = std::chrono::steady_clock::now(); const auto expire_time = now + m_uniform_ttl; do_prune(now); return do_insert_update(key, expire_time, a); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x127f0 testl %eax, %eax jne 0xe48b9 callq 0x12720 movq %rax, %r12 movq 0x70(%rbx), %r13 movq %rbx, %rdi movq %rax, %rsi callq 0xe4706 imulq $0xf4240, %r13, %rdx # imm = 0xF4240 addq %r12, %rdx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rcx callq 0xe48d4 movl %eax, %ebp movq %rbx, %rdi callq 0x12420 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0 nop
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_set.hpp
cappuccino::ut_set<unsigned long, (cappuccino::thread_safe)1>::do_insert_update(unsigned long const&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, cappuccino::allow)
auto do_insert_update(const key_type& key, std::chrono::steady_clock::time_point expire_time, allow a) -> bool { const auto keyed_position = m_keyed_elements.find(key); if (keyed_position != m_keyed_elements.end()) { if (update_allowed(a)) { do_update(keyed_position, expire_time); return true; } } else { if (insert_allowed(a)) { do_insert(key, expire_time); return true; } } return false; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %r8 leaq 0x30(%rdi), %rax movq %rax, %rdi testq %r8, %r8 je 0xe490a movq (%rsi), %r9 movq %rax, %rdi xorl %r10d, %r10d cmpq %r9, 0x20(%r8) setb %r10b cmovaeq %r8, %rdi movq 0x10(%r8,%r10,8), %r8 testq %r8, %r8 jne 0xe48f1 movq %rax, %r14 cmpq %rax, %rdi je 0xe4920 movq (%rsi), %r8 cmpq 0x20(%rdi), %r8 cmovbq %rax, %rdi movq %rdi, %r14 cmpq %rax, %r14 je 0xe494b testb $0x2, %cl je 0xe4950 movq 0x28(%r14), %rcx movq %rdx, 0x10(%rcx) leaq 0x58(%rbx), %rdi movq %rdi, %rsi movq %rdi, %rdx callq 0xe49c4 movq 0x60(%rbx), %rax movq %rax, 0x28(%r14) jmp 0xe495c testb $0x1, %cl jne 0xe4954 xorl %eax, %eax jmp 0xe495e movq %rbx, %rdi callq 0xe4966 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq
/jbaldwin[P]libcappuccino/inc/cappuccino/ut_set.hpp
cappuccino::utlru_cache<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, (cappuccino::thread_safe)1>::insert(unsigned long const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, cappuccino::allow)
auto insert(const key_type& key, value_type value, allow a = allow::insert_or_update) -> bool { auto now = std::chrono::steady_clock::now(); auto expire_time = now + m_ttl; std::lock_guard guard{m_lock}; return do_insert_update(key, std::move(value), now, expire_time, a); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0x12720 movq %rax, %r13 movq 0x28(%rbx), %rbp movq %rbx, %rdi callq 0x127f0 testl %eax, %eax jne 0xf4152 imulq $0xf4240, %rbp, %r8 # imm = 0xF4240 addq %r13, %r8 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx movq %r14, %r9 callq 0xf43e2 movl %eax, %ebp movq %rbx, %rdi callq 0x12420 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x12360 movq %rax, %r14 movq %rbx, %rdi callq 0x12420 movq %r14, %rdi callq 0x129d0
/jbaldwin[P]libcappuccino/inc/cappuccino/utlru_cache.hpp
cappuccino::to_string[abi:cxx11](cappuccino::allow)
auto to_string(allow a) -> const std::string& { switch (a) { case allow::insert_or_update: return allow_insert_or_update; case allow::insert: return allow_insert; case allow::update: return allow_update; default: return allow_invalid_value; } }
leaq -0x1(%rdi), %rax cmpq $0x2, %rax ja 0xf527f leaq 0x52a67(%rip), %rax # 0x147ce0 movq -0x8(%rax,%rdi,8), %rax retq leaq 0x55022(%rip), %rax # 0x14a2a8 retq nop
/jbaldwin[P]libcappuccino/src/allow.cpp
cappuccino::to_string[abi:cxx11](cappuccino::thread_safe)
auto to_string(thread_safe ts) -> const std::string& { switch (ts) { case thread_safe::no: return thread_safe_no; case thread_safe::yes: return thread_safe_yes; default: return thread_safe_invalid_value; } }
cmpl $0x1, %edi leaq 0x550d6(%rip), %rax # 0x14a368 leaq 0x5508f(%rip), %rcx # 0x14a328 cmoveq %rax, %rcx testl %edi, %edi leaq 0x550a2(%rip), %rax # 0x14a348 cmovneq %rcx, %rax retq nop
/jbaldwin[P]libcappuccino/src/lock.cpp
rtcForwardIntersect4Ex
RTC_API void rtcForwardIntersect4Ex(const int* valid, const RTCIntersectFunctionNArguments* args, RTCScene hscene, RTCRay4* iray, unsigned int instID, unsigned int instPrimID) { Scene* scene = (Scene*) hscene; RTC_CATCH_BEGIN; RTC_TRACE(rtcForwardIntersect4); rtcForwardIntersectN<RTCRay4,RTCRayHit4,4>(valid,args,hscene,iray,instID,instPrimID); RTC_CATCH_END2(scene); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movq 0x18(%rsi), %r15 movq 0x20(%rsi), %r14 movups (%r14), %xmm0 movaps %xmm0, 0x70(%rsp) movups 0x10(%r14), %xmm0 movaps %xmm0, 0x60(%rsp) movups 0x20(%r14), %xmm0 movaps %xmm0, 0x50(%rsp) movups 0x40(%r14), %xmm0 movaps %xmm0, 0x40(%rsp) movups 0x50(%r14), %xmm0 movaps %xmm0, 0x30(%rsp) movups 0x60(%r14), %xmm0 movaps %xmm0, 0x20(%rsp) movups (%rcx), %xmm0 movups %xmm0, (%r14) movups 0x10(%rcx), %xmm0 movups %xmm0, 0x10(%r14) movups 0x20(%rcx), %xmm0 movups %xmm0, 0x20(%r14) movups 0x40(%rcx), %xmm0 movups %xmm0, 0x40(%r14) movups 0x50(%rcx), %xmm0 movups %xmm0, 0x50(%r14) movups 0x60(%rcx), %xmm0 movups %xmm0, 0x60(%r14) movq 0x40(%rsi), %rax movq %rdx, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %rax, 0x18(%rsp) cmpl $-0x1, (%r15) jne 0x6adbd movl %r8d, (%r15) movl %r9d, 0x4(%r15) leaq 0x58(%rbx), %rsi leaq 0x8(%rsp), %rcx movq %r14, %rdx callq *0x98(%rbx) orq $-0x1, (%r15) movaps 0x70(%rsp), %xmm0 movups %xmm0, (%r14) movaps 0x60(%rsp), %xmm0 movups %xmm0, 0x10(%r14) movaps 0x50(%rsp), %xmm0 movups %xmm0, 0x20(%r14) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x40(%r14) movaps 0x30(%rsp), %xmm0 movups %xmm0, 0x50(%r14) movaps 0x20(%rsp), %xmm0 movups %xmm0, 0x60(%r14) addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rdx, %r14 movq %rax, %rdi cmpl $0x4, %r14d jne 0x6ae3b callq 0x6a0d0 testq %rbx, %rbx je 0x6ae6d movq 0x188(%rbx), %rdi jmp 0x6ae6f cmpl $0x3, %r14d jne 0x6ae54 callq 0x6a0d0 testq %rbx, %rbx je 0x6ae8e movq 0x188(%rbx), %rbx jmp 0x6ae90 callq 0x6a0d0 cmpl $0x2, %r14d jne 0x6ae80 testq %rbx, %rbx je 0x6aeab movq 0x188(%rbx), %rbx jmp 0x6aead xorl %edi, %edi leaq 0x1e81957(%rip), %rdx # 0x1eec7cd pushq $0x4 popq %rsi callq 0x8d65f4 jmp 0x6aed7 testq %rbx, %rbx je 0x6aec6 movq 0x188(%rbx), %rdi jmp 0x6aec8 xorl %ebx, %ebx movl 0x8(%rax), %ebp movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) movq %rbx, %rdi movl %ebp, %esi movq %rax, %rdx callq 0x8d65f4 jmp 0x6aed7 xorl %ebx, %ebx movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) pushq $0x1 popq %rsi movq %rbx, %rdi movq %rax, %rdx callq 0x8d65f4 jmp 0x6aed7 xorl %edi, %edi leaq 0x1e818e5(%rip), %rdx # 0x1eec7b4 pushq $0x1 popq %rsi callq 0x8d65f4 callq 0x6a7a0 jmp 0x6ae0e movq %rax, %rbx callq 0x6a7a0 jmp 0x6af07 movq %rax, %rbx callq 0x6a7a0 jmp 0x6af07 movq %rax, %rbx callq 0x6a7a0 jmp 0x6af07 movq %rax, %rbx callq 0x6a7a0 movq %rbx, %rdi callq 0x6a600 movq %rax, %rdi callq 0x8d6de8
/embree[P]embree/kernels/common/rtcore.cpp
rtcForwardIntersect16Ex
RTC_API void rtcForwardIntersect16Ex(const int* valid, const RTCIntersectFunctionNArguments* args, RTCScene hscene, RTCRay16* iray, unsigned int instID, unsigned int instPrimID) { Scene* scene = (Scene*) hscene; RTC_CATCH_BEGIN; RTC_TRACE(rtcForwardIntersect16Ex); rtcForwardIntersectN<RTCRay16,RTCRayHit16,16>(valid,args,hscene,iray,instID,instPrimID); RTC_CATCH_END2(scene); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x1a8, %rsp # imm = 0x1A8 movq %rdx, %rbx movq 0x18(%rsi), %r15 movq 0x20(%rsi), %r14 movups (%r14), %xmm0 movaps %xmm0, 0x190(%rsp) movups 0x10(%r14), %xmm0 movaps %xmm0, 0x180(%rsp) movups 0x20(%r14), %xmm0 movaps %xmm0, 0x170(%rsp) movups 0x30(%r14), %xmm0 movaps %xmm0, 0x160(%rsp) movups 0x40(%r14), %xmm0 movaps %xmm0, 0x150(%rsp) movups 0x50(%r14), %xmm0 movaps %xmm0, 0x140(%rsp) movups 0x60(%r14), %xmm0 movaps %xmm0, 0x130(%rsp) movups 0x70(%r14), %xmm0 movaps %xmm0, 0x120(%rsp) movups 0x80(%r14), %xmm0 movaps %xmm0, 0x110(%rsp) movups 0x90(%r14), %xmm0 movaps %xmm0, 0x100(%rsp) movups 0xa0(%r14), %xmm0 movaps %xmm0, 0xf0(%rsp) movups 0xb0(%r14), %xmm0 movaps %xmm0, 0xe0(%rsp) movups 0x100(%r14), %xmm0 movaps %xmm0, 0xd0(%rsp) movups 0x110(%r14), %xmm0 movaps %xmm0, 0xc0(%rsp) movups 0x120(%r14), %xmm0 movaps %xmm0, 0xb0(%rsp) movups 0x130(%r14), %xmm0 movaps %xmm0, 0xa0(%rsp) movups 0x140(%r14), %xmm0 movaps %xmm0, 0x90(%rsp) movups 0x150(%r14), %xmm0 movaps %xmm0, 0x80(%rsp) movups 0x160(%r14), %xmm0 movaps %xmm0, 0x70(%rsp) movups 0x170(%r14), %xmm0 movaps %xmm0, 0x60(%rsp) movups 0x180(%r14), %xmm0 movaps %xmm0, 0x50(%rsp) movups 0x190(%r14), %xmm0 movaps %xmm0, 0x40(%rsp) movups 0x1a0(%r14), %xmm0 movaps %xmm0, 0x30(%rsp) movups 0x1b0(%r14), %xmm0 movaps %xmm0, 0x20(%rsp) movups (%rcx), %xmm0 movups %xmm0, (%r14) movups 0x10(%rcx), %xmm0 movups %xmm0, 0x10(%r14) movups 0x20(%rcx), %xmm0 movups %xmm0, 0x20(%r14) movups 0x30(%rcx), %xmm0 movups %xmm0, 0x30(%r14) movups 0x40(%rcx), %xmm0 movups %xmm0, 0x40(%r14) movups 0x50(%rcx), %xmm0 movups %xmm0, 0x50(%r14) movups 0x60(%rcx), %xmm0 movups %xmm0, 0x60(%r14) movups 0x70(%rcx), %xmm0 movups %xmm0, 0x70(%r14) movups 0x80(%rcx), %xmm0 movups %xmm0, 0x80(%r14) movups 0x90(%rcx), %xmm0 movups %xmm0, 0x90(%r14) movups 0xa0(%rcx), %xmm0 movups %xmm0, 0xa0(%r14) movups 0xb0(%rcx), %xmm0 movups %xmm0, 0xb0(%r14) movups 0x100(%rcx), %xmm0 movups %xmm0, 0x100(%r14) movups 0x110(%rcx), %xmm0 movups %xmm0, 0x110(%r14) movups 0x120(%rcx), %xmm0 movups %xmm0, 0x120(%r14) movups 0x130(%rcx), %xmm0 movups %xmm0, 0x130(%r14) movups 0x140(%rcx), %xmm0 movups %xmm0, 0x140(%r14) movups 0x150(%rcx), %xmm0 movups %xmm0, 0x150(%r14) movups 0x160(%rcx), %xmm0 movups %xmm0, 0x160(%r14) movups 0x170(%rcx), %xmm0 movups %xmm0, 0x170(%r14) movups 0x180(%rcx), %xmm0 movups %xmm0, 0x180(%r14) movups 0x190(%rcx), %xmm0 movups %xmm0, 0x190(%r14) movups 0x1a0(%rcx), %xmm0 movups %xmm0, 0x1a0(%r14) movups 0x1b0(%rcx), %xmm0 movups %xmm0, 0x1b0(%r14) movq 0x40(%rsi), %rax movq %rdx, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %rax, 0x18(%rsp) cmpl $-0x1, (%r15) jne 0x6b4f5 movl %r8d, (%r15) movl %r9d, 0x4(%r15) leaq 0x58(%rbx), %rsi leaq 0x8(%rsp), %rcx movq %r14, %rdx callq *0x128(%rbx) orq $-0x1, (%r15) movaps 0x190(%rsp), %xmm0 movups %xmm0, (%r14) movaps 0x180(%rsp), %xmm0 movups %xmm0, 0x10(%r14) movaps 0x170(%rsp), %xmm0 movups %xmm0, 0x20(%r14) movaps 0x160(%rsp), %xmm0 movups %xmm0, 0x30(%r14) movaps 0x150(%rsp), %xmm0 movups %xmm0, 0x40(%r14) movaps 0x140(%rsp), %xmm0 movups %xmm0, 0x50(%r14) movaps 0x130(%rsp), %xmm0 movups %xmm0, 0x60(%r14) movaps 0x120(%rsp), %xmm0 movups %xmm0, 0x70(%r14) movaps 0x110(%rsp), %xmm0 movups %xmm0, 0x80(%r14) movaps 0x100(%rsp), %xmm0 movups %xmm0, 0x90(%r14) movaps 0xf0(%rsp), %xmm0 movups %xmm0, 0xa0(%r14) movaps 0xe0(%rsp), %xmm0 movups %xmm0, 0xb0(%r14) movaps 0xd0(%rsp), %xmm0 movups %xmm0, 0x100(%r14) movaps 0xc0(%rsp), %xmm0 movups %xmm0, 0x110(%r14) movaps 0xb0(%rsp), %xmm0 movups %xmm0, 0x120(%r14) movaps 0xa0(%rsp), %xmm0 movups %xmm0, 0x130(%r14) movaps 0x90(%rsp), %xmm0 movups %xmm0, 0x140(%r14) movaps 0x80(%rsp), %xmm0 movups %xmm0, 0x150(%r14) movaps 0x70(%rsp), %xmm0 movups %xmm0, 0x160(%r14) movaps 0x60(%rsp), %xmm0 movups %xmm0, 0x170(%r14) movaps 0x50(%rsp), %xmm0 movups %xmm0, 0x180(%r14) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x190(%r14) movaps 0x30(%rsp), %xmm0 movups %xmm0, 0x1a0(%r14) movaps 0x20(%rsp), %xmm0 movups %xmm0, 0x1b0(%r14) addq $0x1a8, %rsp # imm = 0x1A8 popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rdx, %r14 movq %rax, %rdi cmpl $0x4, %r14d jne 0x6b68d callq 0x6a0d0 testq %rbx, %rbx je 0x6b6bf movq 0x188(%rbx), %rdi jmp 0x6b6c1 cmpl $0x3, %r14d jne 0x6b6a6 callq 0x6a0d0 testq %rbx, %rbx je 0x6b6e0 movq 0x188(%rbx), %rbx jmp 0x6b6e2 callq 0x6a0d0 cmpl $0x2, %r14d jne 0x6b6d2 testq %rbx, %rbx je 0x6b6fd movq 0x188(%rbx), %rbx jmp 0x6b6ff xorl %edi, %edi leaq 0x1e81105(%rip), %rdx # 0x1eec7cd pushq $0x4 popq %rsi callq 0x8d65f4 jmp 0x6b729 testq %rbx, %rbx je 0x6b718 movq 0x188(%rbx), %rdi jmp 0x6b71a xorl %ebx, %ebx movl 0x8(%rax), %ebp movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) movq %rbx, %rdi movl %ebp, %esi movq %rax, %rdx callq 0x8d65f4 jmp 0x6b729 xorl %ebx, %ebx movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) pushq $0x1 popq %rsi movq %rbx, %rdi movq %rax, %rdx callq 0x8d65f4 jmp 0x6b729 xorl %edi, %edi leaq 0x1e81093(%rip), %rdx # 0x1eec7b4 pushq $0x1 popq %rsi callq 0x8d65f4 callq 0x6a7a0 jmp 0x6b660 movq %rax, %rbx callq 0x6a7a0 jmp 0x6b759 movq %rax, %rbx callq 0x6a7a0 jmp 0x6b759 movq %rax, %rbx callq 0x6a7a0 jmp 0x6b759 movq %rax, %rbx callq 0x6a7a0 movq %rbx, %rdi callq 0x6a600 movq %rax, %rdi callq 0x8d6de8
/embree[P]embree/kernels/common/rtcore.cpp
rtcForwardOccluded8Ex
RTC_API void rtcForwardOccluded8Ex(const int* valid, const RTCOccludedFunctionNArguments* args, RTCScene hscene, RTCRay8* iray, unsigned int instID, unsigned int instPrimID) { Scene* scene = (Scene*) hscene; RTC_CATCH_BEGIN; RTC_TRACE(rtcForwardOccluded8Ex); rtcForwardOccludedN<RTCRay8,8>(valid, args, hscene, iray, instID, instPrimID); RTC_CATCH_END2(scene); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xe8, %rsp movq %rdx, %rbx movq 0x18(%rsi), %r15 movq 0x20(%rsi), %r14 movups (%r14), %xmm0 movaps %xmm0, 0xd0(%rsp) movups 0x10(%r14), %xmm0 movaps %xmm0, 0xc0(%rsp) movups 0x20(%r14), %xmm0 movaps %xmm0, 0xb0(%rsp) movups 0x30(%r14), %xmm0 movaps %xmm0, 0xa0(%rsp) movups 0x40(%r14), %xmm0 movaps %xmm0, 0x90(%rsp) movups 0x50(%r14), %xmm0 movaps %xmm0, 0x80(%rsp) movups 0x80(%r14), %xmm0 movaps %xmm0, 0x70(%rsp) movups 0x90(%r14), %xmm0 movaps %xmm0, 0x60(%rsp) movups 0xa0(%r14), %xmm0 movaps %xmm0, 0x50(%rsp) movups 0xb0(%r14), %xmm0 movaps %xmm0, 0x40(%rsp) movups 0xc0(%r14), %xmm0 movaps %xmm0, 0x30(%rsp) movups 0xd0(%r14), %xmm0 movaps %xmm0, 0x20(%rsp) movups (%rcx), %xmm0 movups %xmm0, (%r14) movups 0x10(%rcx), %xmm0 movups %xmm0, 0x10(%r14) movups 0x20(%rcx), %xmm0 movups %xmm0, 0x20(%r14) movups 0x30(%rcx), %xmm0 movups %xmm0, 0x30(%r14) movups 0x40(%rcx), %xmm0 movups %xmm0, 0x40(%r14) movups 0x50(%rcx), %xmm0 movups %xmm0, 0x50(%r14) movups 0x80(%rcx), %xmm0 movups %xmm0, 0x80(%r14) movups 0x90(%rcx), %xmm0 movups %xmm0, 0x90(%r14) movups 0xa0(%rcx), %xmm0 movups %xmm0, 0xa0(%r14) movups 0xb0(%rcx), %xmm0 movups %xmm0, 0xb0(%r14) movups 0xc0(%rcx), %xmm0 movups %xmm0, 0xc0(%r14) movups 0xd0(%rcx), %xmm0 movups %xmm0, 0xd0(%r14) movq 0x40(%rsi), %rax movq %rdx, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %rax, 0x18(%rsp) cmpl $-0x1, (%r15) jne 0x6bacb movl %r8d, (%r15) movl %r9d, 0x4(%r15) leaq 0x58(%rbx), %rsi leaq 0x8(%rsp), %rcx movq %r14, %rdx callq *0xe8(%rbx) orq $-0x1, (%r15) movaps 0xd0(%rsp), %xmm0 movups %xmm0, (%r14) movaps 0xc0(%rsp), %xmm0 movups %xmm0, 0x10(%r14) movaps 0xb0(%rsp), %xmm0 movups %xmm0, 0x20(%r14) movaps 0xa0(%rsp), %xmm0 movups %xmm0, 0x30(%r14) movaps 0x90(%rsp), %xmm0 movups %xmm0, 0x40(%r14) movaps 0x80(%rsp), %xmm0 movups %xmm0, 0x50(%r14) movaps 0x70(%rsp), %xmm0 movups %xmm0, 0x80(%r14) movaps 0x60(%rsp), %xmm0 movups %xmm0, 0x90(%r14) movaps 0x50(%rsp), %xmm0 movups %xmm0, 0xa0(%r14) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0xb0(%r14) movaps 0x30(%rsp), %xmm0 movups %xmm0, 0xc0(%r14) movaps 0x20(%rsp), %xmm0 movups %xmm0, 0xd0(%r14) addq $0xe8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rdx, %r14 movq %rax, %rdi cmpl $0x4, %r14d jne 0x6bba9 callq 0x6a0d0 testq %rbx, %rbx je 0x6bbdb movq 0x188(%rbx), %rdi jmp 0x6bbdd cmpl $0x3, %r14d jne 0x6bbc2 callq 0x6a0d0 testq %rbx, %rbx je 0x6bbfc movq 0x188(%rbx), %rbx jmp 0x6bbfe callq 0x6a0d0 cmpl $0x2, %r14d jne 0x6bbee testq %rbx, %rbx je 0x6bc19 movq 0x188(%rbx), %rbx jmp 0x6bc1b xorl %edi, %edi leaq 0x1e80be9(%rip), %rdx # 0x1eec7cd pushq $0x4 popq %rsi callq 0x8d65f4 jmp 0x6bc45 testq %rbx, %rbx je 0x6bc34 movq 0x188(%rbx), %rdi jmp 0x6bc36 xorl %ebx, %ebx movl 0x8(%rax), %ebp movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) movq %rbx, %rdi movl %ebp, %esi movq %rax, %rdx callq 0x8d65f4 jmp 0x6bc45 xorl %ebx, %ebx movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) pushq $0x1 popq %rsi movq %rbx, %rdi movq %rax, %rdx callq 0x8d65f4 jmp 0x6bc45 xorl %edi, %edi leaq 0x1e80b77(%rip), %rdx # 0x1eec7b4 pushq $0x1 popq %rsi callq 0x8d65f4 callq 0x6a7a0 jmp 0x6bb7c movq %rax, %rbx callq 0x6a7a0 jmp 0x6bc75 movq %rax, %rbx callq 0x6a7a0 jmp 0x6bc75 movq %rax, %rbx callq 0x6a7a0 jmp 0x6bc75 movq %rax, %rbx callq 0x6a7a0 movq %rbx, %rdi callq 0x6a600 movq %rax, %rdi callq 0x8d6de8
/embree[P]embree/kernels/common/rtcore.cpp
embree::FastAllocator::Block::malloc(embree::MemoryMonitorInterface*, unsigned long&, unsigned long, bool)
void* malloc(MemoryMonitorInterface* device, size_t& bytes_in, size_t align, bool partial) { size_t bytes = bytes_in; assert(align <= maxAlignment); bytes = (bytes+(align-1)) & ~(align-1); if (unlikely(cur+bytes > reserveEnd && !partial)) return nullptr; const size_t i = cur.fetch_add(bytes); if (unlikely(i+bytes > reserveEnd && !partial)) return nullptr; if (unlikely(i > reserveEnd)) return nullptr; bytes_in = bytes = min(bytes,reserveEnd-i); if (i+bytes > allocEnd) { if (device) device->memoryMonitor(i+bytes-max(i,allocEnd),true); } return &data[i]; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorb $0x1, %r8b movq (%rdx), %rax addq %rcx, %rax decq %rax negq %rcx andq %rax, %rcx movq (%rdi), %rax addq %rcx, %rax movq 0x10(%rdi), %rdi cmpq %rdi, %rax seta %al testb %r8b, %al jne 0x6c2ab movq %rcx, %r14 lock xaddq %r14, (%rbx) leaq (%r14,%rcx), %rax movq 0x10(%rbx), %rdi cmpq %rdi, %rax seta %al testb %r8b, %al jne 0x6c2ab movq 0x10(%rbx), %rax cmpq %rax, %r14 ja 0x6c2ab movq 0x10(%rbx), %rax subq %r14, %rax cmpq %rax, %rcx cmovbq %rcx, %rax movq %rax, (%rdx) movq 0x8(%rbx), %rcx testq %rsi, %rsi je 0x6c29b addq %r14, %rax cmpq %rcx, %rax jbe 0x6c29b movq 0x8(%rbx), %rcx cmpq %rcx, %r14 cmovaq %r14, %rcx subq %rcx, %rax movq (%rsi), %rcx pushq $0x1 popq %rdx movq %rsi, %rdi movq %rax, %rsi callq *(%rcx) leaq (%rbx,%r14), %rax addq $0x40, %rax addq $0x8, %rsp popq %rbx popq %r14 retq xorl %eax, %eax jmp 0x6c2a3 nop
/embree[P]embree/kernels/common/alloc.h
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMiMBIntersectorKMoeller<4, 4, true>>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x19d8, %rsp # imm = 0x19D8 movq %rcx, %r10 movq %rsi, %rcx movq (%rsi), %rsi cmpq $0x8, 0x70(%rsi) je 0x14cd93 movq %rdx, %rbx pcmpeqd %xmm2, %xmm2 movdqa (%rdi), %xmm0 pcmpeqd %xmm2, %xmm0 movaps 0x80(%rdx), %xmm3 xorps %xmm4, %xmm4 movaps %xmm3, %xmm9 cmpnltps %xmm4, %xmm9 andps %xmm0, %xmm9 movmskps %xmm9, %eax testl %eax, %eax je 0x14cd93 movaps (%rbx), %xmm0 movaps %xmm0, 0x1d0(%rsp) movaps 0x10(%rbx), %xmm0 movaps %xmm0, 0x1e0(%rsp) movaps 0x20(%rbx), %xmm0 movaps %xmm0, 0x1f0(%rsp) movaps 0x40(%rbx), %xmm7 movaps %xmm7, 0x200(%rsp) movaps 0x50(%rbx), %xmm1 movaps %xmm1, 0x210(%rsp) movaps 0x60(%rbx), %xmm5 movaps %xmm5, 0x220(%rsp) movaps 0x1da1064(%rip), %xmm8 # 0x1eec6c0 movaps %xmm7, %xmm0 andps %xmm8, %xmm0 movaps 0x1da66d6(%rip), %xmm6 # 0x1ef1d40 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm7 movaps %xmm1, %xmm0 andps %xmm8, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm1 movaps %xmm5, %xmm0 andps %xmm8, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm5 rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1da136f(%rip), %xmm8 # 0x1eeca10 movaps %xmm8, %xmm6 subps %xmm7, %xmm6 mulps %xmm0, %xmm6 addps %xmm0, %xmm6 rcpps %xmm1, %xmm7 mulps %xmm7, %xmm1 movaps %xmm8, %xmm0 subps %xmm1, %xmm0 mulps %xmm7, %xmm0 addps %xmm7, %xmm0 rcpps %xmm5, %xmm7 mulps %xmm7, %xmm5 movaps %xmm8, %xmm1 subps %xmm5, %xmm1 mulps %xmm7, %xmm1 addps %xmm7, %xmm1 movaps %xmm6, 0x230(%rsp) movaps %xmm0, 0x240(%rsp) movaps %xmm1, 0x250(%rsp) cmpltps %xmm4, %xmm6 andps 0x1dd47c9(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm4, %xmm0 movaps 0x1dd47ce(%rip), %xmm5 # 0x1f1fed0 blendvps %xmm0, 0x1db1b05(%rip), %xmm5 # 0x1efd210 movaps %xmm6, 0x260(%rsp) movaps %xmm5, 0x270(%rsp) cmpnltps %xmm4, %xmm1 movaps 0x1dd47ca(%rip), %xmm5 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dd47ae(%rip), %xmm5 # 0x1f1fee0 movaps %xmm5, 0x280(%rsp) movaps 0x30(%rbx), %xmm5 maxps %xmm4, %xmm5 movaps %xmm9, %xmm0 movaps 0x1da02a3(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm15, %xmm1 blendvps %xmm0, %xmm5, %xmm1 maxps %xmm4, %xmm3 movaps %xmm1, 0x290(%rsp) movaps 0x1da0298(%rip), %xmm4 # 0x1eeba00 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, 0x2a0(%rsp) movaps %xmm9, 0x2d0(%rsp) pxor %xmm9, %xmm2 movdqa %xmm2, 0xe0(%rsp) cmpq $0x0, 0x8(%r10) movq %rcx, 0x108(%rsp) je 0x14b7af movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r9d, %r9d cmpb $0x1, %al adcq $0x2, %r9 jmp 0x14b7b3 pushq $0x3 popq %r9 leaq 0x340(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0xae0(%rsp), %r12 movaps %xmm15, -0x20(%r12) movq 0x70(%rsi), %rax movq %rax, -0x8(%r15) movaps %xmm1, -0x10(%r12) leaq 0x200479a(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x2c0(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x2b0(%rsp) addq $-0x10, %r12 movq -0x8(%r15), %r13 addq $-0x8, %r15 cmpq $-0x8, %r13 je 0x14cc99 movaps (%r12), %xmm14 movaps %xmm14, %xmm0 cmpltps 0x2a0(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14ccaa movzbl %al, %ebp popcntl %ebp, %r14d xorl %eax, %eax cmpq %r9, %r14 jbe 0x14ccae cmpq %r9, %r14 pushq $0x8 popq %r14 jbe 0x14cc9c testb $0x8, %r13b jne 0x14bacf movaps 0x2a0(%rsp), %xmm1 movq %r13, %rax andq $-0x10, %rax andl $0x7, %r13d movl %r13d, %ecx cmpnleps %xmm14, %xmm1 xorl %edx, %edx movq %r14, %r13 movaps %xmm15, %xmm14 movq (%rax,%rdx,8), %r8 cmpq $0x8, %r8 je 0x14ba45 movss 0x80(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x20(%rax,%rdx,4), %xmm3 movss 0x30(%rax,%rdx,4), %xmm7 movss 0x40(%rax,%rdx,4), %xmm4 movss 0x50(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0x70(%rbx), %xmm2 mulps %xmm2, %xmm0 addps %xmm3, %xmm0 movss 0xa0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm3 addps %xmm4, %xmm3 movss 0xc0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm5, %xmm4 movss 0x90(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm7, %xmm5 movss 0xb0(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm7 addps %xmm6, %xmm7 movss 0xd0(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm2, %xmm6 addps %xmm8, %xmm6 movaps 0x1d0(%rsp), %xmm8 movaps 0x1e0(%rsp), %xmm9 movaps 0x1f0(%rsp), %xmm10 movaps 0x230(%rsp), %xmm11 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 subps %xmm9, %xmm3 movaps 0x240(%rsp), %xmm12 mulps %xmm12, %xmm3 subps %xmm10, %xmm4 movaps 0x250(%rsp), %xmm13 mulps %xmm13, %xmm4 subps %xmm8, %xmm5 mulps %xmm11, %xmm5 subps %xmm9, %xmm7 mulps %xmm12, %xmm7 subps %xmm10, %xmm6 mulps %xmm13, %xmm6 movaps %xmm0, %xmm8 pminsd %xmm5, %xmm8 movaps %xmm3, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm8, %xmm9 movaps %xmm4, %xmm8 pminsd %xmm6, %xmm8 pmaxsd %xmm9, %xmm8 pmaxsd %xmm0, %xmm5 pmaxsd %xmm3, %xmm7 pminsd %xmm5, %xmm7 pmaxsd %xmm4, %xmm6 pminsd %xmm7, %xmm6 movdqa 0x290(%rsp), %xmm0 pmaxsd %xmm8, %xmm0 pminsd 0x2a0(%rsp), %xmm6 cmpleps %xmm6, %xmm0 cmpl $0x6, %ecx je 0x14ba5e andps %xmm1, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x14ba45 movaps %xmm15, %xmm2 blendvps %xmm0, %xmm8, %xmm2 cmpq $0x8, %r13 je 0x14ba3e movq %r13, (%r15) addq $0x8, %r15 movaps %xmm14, (%r12) addq $0x10, %r12 movaps %xmm2, %xmm14 movq %r8, %r13 cmpq $0x8, %r8 je 0x14ba88 leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x14b881 jmp 0x14ba88 movss 0xe0(%rax,%rdx,4), %xmm3 movss 0xf0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] cmpleps %xmm2, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpltps %xmm4, %xmm2 andps %xmm3, %xmm2 andps %xmm2, %xmm0 jmp 0x14ba0f xorl %eax, %eax cmpq $0x8, %r13 je 0x14bac8 movaps 0x2a0(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r9 jae 0x14bab8 testb %cl, %cl jne 0x14b853 jmp 0x14cc9c movq %r13, (%r15) addq $0x8, %r15 movaps %xmm14, (%r12) addq $0x10, %r12 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x14baab cmpq $-0x8, %r13 je 0x14cc99 movaps 0x2a0(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14ccaa movl %r13d, %eax andl $0xf, %eax movaps 0xe0(%rsp), %xmm0 addq $-0x8, %rax movq %rax, 0x1b0(%rsp) je 0x14cc64 movq %r9, 0xc8(%rsp) andq $-0x10, %r13 xorps 0x1da02fc(%rip), %xmm0 # 0x1eebe20 xorl %eax, %eax movq %rax, 0x1b8(%rsp) imulq $0x60, %rax, %r11 addq %r13, %r11 movmskps %xmm0, %eax movq %rax, 0x40(%rsp) xorl %ebp, %ebp movaps %xmm0, %xmm13 movaps %xmm0, 0xb0(%rsp) movl 0x50(%r11,%rbp,4), %eax cmpl $-0x1, %eax je 0x14cc31 movq (%r10), %rdx movl 0x40(%r11,%rbp,4), %ecx movq 0x1e8(%rdx), %rdx movq (%rdx,%rcx,8), %r14 movss 0x28(%r14), %xmm4 movss 0x2c(%r14), %xmm1 movss 0x30(%r14), %xmm2 subss %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm4, %xmm3 shufps $0x0, %xmm4, %xmm3 # xmm3 = xmm3[0,0],xmm4[0,0] movaps 0x70(%rbx), %xmm15 subps %xmm1, %xmm15 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] divps %xmm2, %xmm15 mulps %xmm3, %xmm15 roundps $0x1, %xmm15, %xmm1 addss 0x1da4e1b(%rip), %xmm4 # 0x1ef09cc shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] minps %xmm4, %xmm1 maxps 0x1d9fe51(%rip), %xmm1 # 0x1eeba10 subps %xmm1, %xmm15 cvtps2dq %xmm1, %xmm2 movapd %xmm2, 0x60(%rsp) movq 0x40(%rsp), %rdx bsfq %rdx, %rdx movslq 0x60(%rsp,%rdx,4), %r8 movd %r8d, %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pcmpeqd %xmm2, %xmm1 pandn %xmm0, %xmm1 movmskps %xmm1, %edi testl %edi, %edi movaps %xmm13, 0x50(%rsp) jne 0x14c09a movq 0xe0(%r14), %rdi imulq $0x38, %r8, %r8 movq (%rdi,%r8), %rdx movq 0x38(%rdi,%r8), %r9 movl (%r11,%rbp,4), %r8d movl 0x10(%r11,%rbp,4), %edi movups (%rdx,%r8,4), %xmm11 movups (%r9,%r8,4), %xmm4 movaps %xmm11, %xmm13 shufps $0x0, %xmm11, %xmm13 # xmm13 = xmm13[0,0],xmm11[0,0] movaps %xmm11, %xmm14 shufps $0x55, %xmm11, %xmm14 # xmm14 = xmm14[1,1],xmm11[1,1] shufps $0xaa, %xmm11, %xmm11 # xmm11 = xmm11[2,2,2,2] movaps %xmm4, %xmm5 shufps $0x0, %xmm4, %xmm5 # xmm5 = xmm5[0,0],xmm4[0,0] movaps %xmm4, %xmm6 shufps $0x55, %xmm4, %xmm6 # xmm6 = xmm6[1,1],xmm4[1,1] shufps $0xaa, %xmm4, %xmm4 # xmm4 = xmm4[2,2,2,2] movaps 0x1da0dbb(%rip), %xmm3 # 0x1eeca10 subps %xmm15, %xmm3 mulps %xmm15, %xmm5 mulps %xmm15, %xmm6 mulps %xmm15, %xmm4 mulps %xmm3, %xmm13 addps %xmm5, %xmm13 mulps %xmm3, %xmm14 addps %xmm6, %xmm14 mulps %xmm3, %xmm11 addps %xmm4, %xmm11 movups (%rdx,%rdi,4), %xmm8 movups (%r9,%rdi,4), %xmm4 movaps %xmm8, %xmm0 shufps $0x0, %xmm8, %xmm0 # xmm0 = xmm0[0,0],xmm8[0,0] movaps %xmm8, %xmm1 shufps $0x55, %xmm8, %xmm1 # xmm1 = xmm1[1,1],xmm8[1,1] shufps $0xaa, %xmm8, %xmm8 # xmm8 = xmm8[2,2,2,2] movaps %xmm4, %xmm5 shufps $0x0, %xmm4, %xmm5 # xmm5 = xmm5[0,0],xmm4[0,0] movaps %xmm4, %xmm6 shufps $0x55, %xmm4, %xmm6 # xmm6 = xmm6[1,1],xmm4[1,1] shufps $0xaa, %xmm4, %xmm4 # xmm4 = xmm4[2,2,2,2] mulps %xmm15, %xmm5 mulps %xmm15, %xmm6 mulps %xmm15, %xmm4 mulps %xmm3, %xmm0 addps %xmm5, %xmm0 mulps %xmm3, %xmm1 addps %xmm6, %xmm1 mulps %xmm3, %xmm8 addps %xmm4, %xmm8 movl 0x20(%r11,%rbp,4), %edi movups (%rdx,%rdi,4), %xmm10 movups (%r9,%rdi,4), %xmm4 movaps %xmm10, %xmm7 shufps $0x0, %xmm10, %xmm7 # xmm7 = xmm7[0,0],xmm10[0,0] movaps %xmm10, %xmm9 shufps $0x55, %xmm10, %xmm9 # xmm9 = xmm9[1,1],xmm10[1,1] shufps $0xaa, %xmm10, %xmm10 # xmm10 = xmm10[2,2,2,2] movaps %xmm4, %xmm5 shufps $0x0, %xmm4, %xmm5 # xmm5 = xmm5[0,0],xmm4[0,0] movaps %xmm4, %xmm6 shufps $0x55, %xmm4, %xmm6 # xmm6 = xmm6[1,1],xmm4[1,1] shufps $0xaa, %xmm4, %xmm4 # xmm4 = xmm4[2,2,2,2] mulps %xmm15, %xmm5 mulps %xmm15, %xmm6 mulps %xmm15, %xmm4 mulps %xmm3, %xmm7 addps %xmm5, %xmm7 movaps %xmm7, 0x30(%rsp) mulps %xmm3, %xmm9 addps %xmm6, %xmm9 movaps %xmm9, 0xa0(%rsp) mulps %xmm3, %xmm10 addps %xmm4, %xmm10 movaps %xmm10, 0x10(%rsp) movl 0x30(%r11,%rbp,4), %edi movups (%r9,%rdi,4), %xmm4 movaps %xmm4, %xmm5 shufps $0x0, %xmm4, %xmm5 # xmm5 = xmm5[0,0],xmm4[0,0] movaps %xmm4, %xmm6 shufps $0x55, %xmm4, %xmm6 # xmm6 = xmm6[1,1],xmm4[1,1] shufps $0xaa, %xmm4, %xmm4 # xmm4 = xmm4[2,2,2,2] mulps %xmm15, %xmm5 mulps %xmm15, %xmm6 mulps %xmm15, %xmm4 movups (%rdx,%rdi,4), %xmm7 movaps %xmm7, %xmm10 shufps $0x0, %xmm7, %xmm10 # xmm10 = xmm10[0,0],xmm7[0,0] mulps %xmm3, %xmm10 addps %xmm5, %xmm10 movaps %xmm7, %xmm12 shufps $0x55, %xmm7, %xmm12 # xmm12 = xmm12[1,1],xmm7[1,1] mulps %xmm3, %xmm12 addps %xmm6, %xmm12 shufps $0xaa, %xmm7, %xmm7 # xmm7 = xmm7[2,2,2,2] mulps %xmm3, %xmm7 addps %xmm4, %xmm7 movaps %xmm7, %xmm15 movaps %xmm13, %xmm3 movaps %xmm0, 0x1a0(%rsp) subps %xmm0, %xmm3 movaps %xmm14, %xmm0 movaps %xmm1, 0x310(%rsp) subps %xmm1, %xmm0 movaps %xmm11, %xmm2 movaps %xmm8, 0xf0(%rsp) subps %xmm8, %xmm2 movaps %xmm10, 0x300(%rsp) subps %xmm13, %xmm10 movaps %xmm12, 0x2f0(%rsp) subps %xmm14, %xmm12 movaps %xmm15, 0x320(%rsp) movaps %xmm15, %xmm8 subps %xmm11, %xmm8 movaps %xmm0, %xmm6 mulps %xmm8, %xmm6 movaps %xmm12, %xmm5 mulps %xmm2, %xmm5 subps %xmm6, %xmm5 movaps %xmm10, %xmm7 mulps %xmm2, %xmm7 movaps %xmm3, %xmm6 mulps %xmm8, %xmm6 subps %xmm7, %xmm6 movaps %xmm3, 0x20(%rsp) movaps %xmm3, %xmm9 mulps %xmm12, %xmm9 movaps %xmm10, %xmm4 movaps %xmm0, 0x2e0(%rsp) mulps %xmm0, %xmm4 subps %xmm9, %xmm4 subps (%rbx), %xmm13 subps 0x10(%rbx), %xmm14 subps 0x20(%rbx), %xmm11 movaps 0x40(%rbx), %xmm9 movaps 0x50(%rbx), %xmm3 movaps 0x60(%rbx), %xmm0 movaps %xmm14, %xmm1 movaps %xmm11, %xmm14 mulps %xmm3, %xmm14 movaps %xmm13, %xmm7 movaps %xmm1, %xmm13 mulps %xmm0, %xmm13 subps %xmm14, %xmm13 movaps %xmm7, %xmm15 mulps %xmm0, %xmm15 movaps %xmm11, %xmm14 mulps %xmm9, %xmm14 subps %xmm15, %xmm14 movaps %xmm1, 0xd0(%rsp) mulps %xmm9, %xmm1 movaps %xmm7, %xmm15 mulps %xmm3, %xmm15 subps %xmm1, %xmm15 mulps %xmm4, %xmm0 mulps %xmm6, %xmm3 addps %xmm0, %xmm3 mulps %xmm5, %xmm9 addps %xmm3, %xmm9 mulps %xmm15, %xmm8 mulps %xmm14, %xmm12 addps %xmm8, %xmm12 movaps %xmm9, %xmm8 andps 0x1da080e(%rip), %xmm8 # 0x1eec6d0 mulps %xmm13, %xmm10 addps %xmm12, %xmm10 xorps %xmm8, %xmm10 movaps %xmm10, %xmm12 cmpnltps 0x1d9fb35(%rip), %xmm12 # 0x1eeba10 andps 0x50(%rsp), %xmm12 movmskps %xmm12, %edx testl %edx, %edx jne 0x14c4f3 movaps 0x1d9fafb(%rip), %xmm15 # 0x1eeb9f0 movaps 0x30(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x10(%rsp), %xmm12 movaps 0x50(%rsp), %xmm13 movmskps %xmm13, %eax testl %eax, %eax je 0x14c072 movaps %xmm3, %xmm1 subps 0x300(%rsp), %xmm1 movaps %xmm4, %xmm6 subps 0x2f0(%rsp), %xmm6 movaps %xmm12, %xmm5 subps 0x320(%rsp), %xmm5 movaps 0x1a0(%rsp), %xmm14 subps %xmm3, %xmm14 movaps %xmm13, 0x50(%rsp) movaps 0x310(%rsp), %xmm13 subps %xmm4, %xmm13 movaps 0xf0(%rsp), %xmm2 subps %xmm12, %xmm2 movaps %xmm6, %xmm0 mulps %xmm2, %xmm0 movaps %xmm5, %xmm7 mulps %xmm13, %xmm7 subps %xmm0, %xmm7 movaps %xmm5, 0xf0(%rsp) movaps %xmm5, %xmm0 mulps %xmm14, %xmm0 movaps %xmm1, %xmm5 mulps %xmm2, %xmm5 subps %xmm0, %xmm5 movaps %xmm1, 0x30(%rsp) movaps %xmm1, %xmm0 mulps %xmm13, %xmm0 movaps %xmm6, 0xa0(%rsp) movaps %xmm6, %xmm1 mulps %xmm14, %xmm1 subps %xmm0, %xmm1 subps (%rbx), %xmm3 subps 0x10(%rbx), %xmm4 subps 0x20(%rbx), %xmm12 movaps %xmm12, 0x10(%rsp) movaps 0x40(%rbx), %xmm0 movaps 0x50(%rbx), %xmm6 movaps 0x60(%rbx), %xmm11 movaps %xmm12, %xmm9 mulps %xmm6, %xmm9 movaps %xmm4, %xmm8 mulps %xmm11, %xmm8 subps %xmm9, %xmm8 movaps %xmm3, %xmm10 mulps %xmm11, %xmm10 movaps %xmm12, %xmm9 mulps %xmm0, %xmm9 subps %xmm10, %xmm9 movaps %xmm4, %xmm12 mulps %xmm0, %xmm12 movaps %xmm3, %xmm10 mulps %xmm6, %xmm10 subps %xmm12, %xmm10 mulps %xmm1, %xmm11 mulps %xmm5, %xmm6 addps %xmm11, %xmm6 mulps %xmm7, %xmm0 addps %xmm6, %xmm0 mulps %xmm10, %xmm2 mulps %xmm9, %xmm13 addps %xmm2, %xmm13 movaps %xmm0, %xmm6 andps 0x1da06a0(%rip), %xmm6 # 0x1eec6d0 mulps %xmm8, %xmm14 addps %xmm13, %xmm14 movaps 0x50(%rsp), %xmm13 xorps %xmm6, %xmm14 movaps %xmm14, %xmm11 cmpnltps 0x1d9f9c1(%rip), %xmm11 # 0x1eeba10 andps %xmm13, %xmm11 movmskps %xmm11, %eax testl %eax, %eax jne 0x14c599 movaps 0xb0(%rsp), %xmm0 movmskps %xmm13, %eax testl %eax, %eax setne %al jmp 0x14c07c xorl %eax, %eax movaps 0xb0(%rsp), %xmm0 testb %al, %al je 0x14cc31 leaq 0x1(%rbp), %rax cmpq $0x3, %rbp movq %rax, %rbp jb 0x14bb4b jmp 0x14cc31 movq %r11, 0x20(%rsp) movq %rsi, (%rsp) movq %r10, 0x8(%rsp) cmpq $0x0, 0x40(%rsp) je 0x14c14d movq 0xe0(%r14), %rsi movq %rsi, 0x30(%rsp) addq $0x38, %rsi movq %rsi, 0x10(%rsp) movq 0x20(%rsp), %rdi movl (%rdi,%rbp,4), %r8d movq 0x40(%rsp), %r9 movq %rdx, %r10 movslq 0x60(%rsp,%r10,4), %r11 imulq $0x38, %r11, %r11 movq 0x30(%rsp), %rsi movq (%rsi,%r11), %rdi movq 0x10(%rsp), %rsi movq (%rsi,%r11), %r11 movups (%rdi,%r8,4), %xmm0 movups (%r11,%r8,4), %xmm1 movss %xmm0, 0x110(%rsp,%r10,4) extractps $0x1, %xmm0, 0x120(%rsp,%r10,4) extractps $0x2, %xmm0, 0x130(%rsp,%r10,4) movss %xmm1, 0x70(%rsp,%r10,4) extractps $0x1, %xmm1, 0x80(%rsp,%r10,4) extractps $0x2, %xmm1, 0x90(%rsp,%r10,4) btcq %r10, %r9 bsfq %r9, %r10 testq %r9, %r9 jne 0x14c0da movaps 0x1da08bc(%rip), %xmm3 # 0x1eeca10 subps %xmm15, %xmm3 movaps 0x110(%rsp), %xmm0 mulps %xmm3, %xmm0 movaps 0x120(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps 0x130(%rsp), %xmm2 mulps %xmm3, %xmm2 movaps 0x70(%rsp), %xmm4 mulps %xmm15, %xmm4 movaps 0x80(%rsp), %xmm5 mulps %xmm15, %xmm5 movaps 0x90(%rsp), %xmm6 mulps %xmm15, %xmm6 cmpq $0x0, 0x40(%rsp) je 0x14c240 movq 0xe0(%r14), %rsi movq %rsi, 0x30(%rsp) addq $0x38, %rsi movq %rsi, 0x10(%rsp) movq 0x20(%rsp), %rdi movl 0x10(%rdi,%rbp,4), %r8d movq 0x40(%rsp), %r9 movq %rdx, %r10 movslq 0x60(%rsp,%r10,4), %r11 imulq $0x38, %r11, %r11 movq 0x30(%rsp), %rsi movq (%rsi,%r11), %rdi movq 0x10(%rsp), %rsi movq (%rsi,%r11), %r11 movups (%rdi,%r8,4), %xmm7 movups (%r11,%r8,4), %xmm8 movss %xmm7, 0x110(%rsp,%r10,4) extractps $0x1, %xmm7, 0x120(%rsp,%r10,4) extractps $0x2, %xmm7, 0x130(%rsp,%r10,4) movss %xmm8, 0x70(%rsp,%r10,4) extractps $0x1, %xmm8, 0x80(%rsp,%r10,4) extractps $0x2, %xmm8, 0x90(%rsp,%r10,4) btcq %r10, %r9 bsfq %r9, %r10 testq %r9, %r9 jne 0x14c1cd movaps %xmm1, 0xd0(%rsp) movaps %xmm0, 0x1a0(%rsp) movaps 0x110(%rsp), %xmm0 mulps %xmm3, %xmm0 movaps 0x120(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps 0x130(%rsp), %xmm7 mulps %xmm3, %xmm7 movaps %xmm7, 0xf0(%rsp) movaps 0x70(%rsp), %xmm7 mulps %xmm15, %xmm7 movaps 0x80(%rsp), %xmm8 mulps %xmm15, %xmm8 movaps 0x90(%rsp), %xmm9 mulps %xmm15, %xmm9 cmpq $0x0, 0x40(%rsp) je 0x14c342 movq 0xe0(%r14), %rsi movq %rsi, 0x30(%rsp) addq $0x38, %rsi movq %rsi, 0x10(%rsp) movq 0x20(%rsp), %rdi movl 0x20(%rdi,%rbp,4), %r8d movq 0x40(%rsp), %r9 movq %rdx, %r10 movslq 0x60(%rsp,%r10,4), %r11 imulq $0x38, %r11, %r11 movq 0x30(%rsp), %rsi movq (%rsi,%r11), %rdi movq 0x10(%rsp), %rsi movq (%rsi,%r11), %r11 movups (%rdi,%r8,4), %xmm10 movups (%r11,%r8,4), %xmm11 movss %xmm10, 0x110(%rsp,%r10,4) extractps $0x1, %xmm10, 0x120(%rsp,%r10,4) extractps $0x2, %xmm10, 0x130(%rsp,%r10,4) movss %xmm11, 0x70(%rsp,%r10,4) extractps $0x1, %xmm11, 0x80(%rsp,%r10,4) extractps $0x2, %xmm11, 0x90(%rsp,%r10,4) btcq %r10, %r9 bsfq %r9, %r10 testq %r9, %r9 jne 0x14c2cf movaps 0x110(%rsp), %xmm10 mulps %xmm3, %xmm10 movaps %xmm10, 0x30(%rsp) movaps 0x120(%rsp), %xmm10 mulps %xmm3, %xmm10 movaps %xmm10, 0xa0(%rsp) movaps 0x130(%rsp), %xmm10 mulps %xmm3, %xmm10 movaps %xmm10, 0x10(%rsp) movaps 0x70(%rsp), %xmm10 mulps %xmm15, %xmm10 movaps 0x80(%rsp), %xmm11 mulps %xmm15, %xmm11 movaps 0x90(%rsp), %xmm12 mulps %xmm15, %xmm12 cmpq $0x0, 0x40(%rsp) je 0x14c431 movq 0xe0(%r14), %rsi leaq 0x38(%rsi), %rdi movq 0x20(%rsp), %r8 movl 0x30(%r8,%rbp,4), %r8d movq 0x40(%rsp), %r9 movslq 0x60(%rsp,%rdx,4), %r10 imulq $0x38, %r10, %r10 movq (%rsi,%r10), %r11 movq (%rdi,%r10), %r10 movups (%r11,%r8,4), %xmm13 movups (%r10,%r8,4), %xmm14 movss %xmm13, 0x110(%rsp,%rdx,4) extractps $0x1, %xmm13, 0x120(%rsp,%rdx,4) extractps $0x2, %xmm13, 0x130(%rsp,%rdx,4) movss %xmm14, 0x70(%rsp,%rdx,4) extractps $0x1, %xmm14, 0x80(%rsp,%rdx,4) extractps $0x2, %xmm14, 0x90(%rsp,%rdx,4) btcq %rdx, %r9 bsfq %r9, %rdx testq %r9, %r9 jne 0x14c3c8 movaps 0x1a0(%rsp), %xmm13 addps %xmm4, %xmm13 movaps 0xd0(%rsp), %xmm14 addps %xmm5, %xmm14 addps %xmm6, %xmm2 addps %xmm7, %xmm0 addps %xmm8, %xmm1 movaps 0xf0(%rsp), %xmm8 addps %xmm9, %xmm8 movaps 0x30(%rsp), %xmm4 addps %xmm10, %xmm4 movaps %xmm4, 0x30(%rsp) movaps 0xa0(%rsp), %xmm4 addps %xmm11, %xmm4 movaps %xmm2, %xmm11 movaps %xmm4, 0xa0(%rsp) movaps 0x10(%rsp), %xmm4 addps %xmm12, %xmm4 movaps %xmm4, 0x10(%rsp) movaps 0x110(%rsp), %xmm4 mulps %xmm3, %xmm4 movaps 0x120(%rsp), %xmm5 mulps %xmm3, %xmm5 mulps 0x130(%rsp), %xmm3 movaps 0x70(%rsp), %xmm10 mulps %xmm15, %xmm10 addps %xmm4, %xmm10 movaps 0x80(%rsp), %xmm12 mulps %xmm15, %xmm12 addps %xmm5, %xmm12 mulps 0x90(%rsp), %xmm15 addps %xmm3, %xmm15 movq 0x8(%rsp), %r10 movq (%rsp), %rsi movq 0x20(%rsp), %r11 jmp 0x14bd9a movaps %xmm6, 0x1c0(%rsp) movaps 0xd0(%rsp), %xmm6 mulps %xmm15, %xmm2 movaps 0x2e0(%rsp), %xmm3 mulps %xmm14, %xmm3 addps %xmm2, %xmm3 movaps 0x20(%rsp), %xmm2 mulps %xmm13, %xmm2 addps %xmm3, %xmm2 xorps %xmm8, %xmm2 movaps %xmm2, %xmm13 cmpnltps 0x1d9f4dd(%rip), %xmm13 # 0x1eeba10 andps %xmm12, %xmm13 movmskps %xmm13, %edx testl %edx, %edx je 0x14beed movaps %xmm11, %xmm0 movq %r11, 0x20(%rsp) movq %rsi, (%rsp) movq %r10, 0x8(%rsp) movaps %xmm9, %xmm12 andps 0x1da015f(%rip), %xmm12 # 0x1eec6c0 movaps %xmm12, %xmm11 subps %xmm10, %xmm11 cmpnltps %xmm2, %xmm11 andps %xmm13, %xmm11 movmskps %xmm11, %edx testl %edx, %edx jne 0x14c648 movq 0x8(%rsp), %r10 movq (%rsp), %rsi movaps 0x1d9f461(%rip), %xmm15 # 0x1eeb9f0 movq 0x20(%rsp), %r11 jmp 0x14bef5 movaps %xmm5, %xmm12 movaps 0xf0(%rsp), %xmm2 mulps %xmm10, %xmm2 movaps 0xa0(%rsp), %xmm5 mulps %xmm9, %xmm5 addps %xmm2, %xmm5 movaps 0x30(%rsp), %xmm9 mulps %xmm8, %xmm9 addps %xmm5, %xmm9 xorps %xmm6, %xmm9 movaps %xmm9, %xmm8 cmpnltps 0x1d9f439(%rip), %xmm8 # 0x1eeba10 andps %xmm11, %xmm8 movmskps %xmm8, %eax testl %eax, %eax je 0x14c05f movaps %xmm1, %xmm13 movaps %xmm7, %xmm11 movq %r11, 0x20(%rsp) movq %rsi, (%rsp) movq %r10, %r14 movaps %xmm0, %xmm7 andps 0x1da00bb(%rip), %xmm7 # 0x1eec6c0 movaps %xmm7, %xmm1 subps %xmm14, %xmm1 cmpnltps %xmm9, %xmm1 andps %xmm8, %xmm1 movmskps %xmm1, %eax testl %eax, %eax jne 0x14c71d movq %r14, %r10 movq (%rsp), %rsi movaps 0x1d9f3c1(%rip), %xmm15 # 0x1eeb9f0 movaps 0xb0(%rsp), %xmm0 movdqa 0x50(%rsp), %xmm13 movq 0x20(%rsp), %r11 jmp 0x14c067 movaps %xmm5, %xmm1 movaps %xmm7, %xmm5 movaps %xmm1, %xmm7 movaps %xmm2, %xmm3 mulps %xmm4, %xmm0 mulps 0x1c0(%rsp), %xmm6 addps %xmm0, %xmm6 mulps %xmm1, %xmm5 addps %xmm6, %xmm5 xorps %xmm5, %xmm8 movaps 0x30(%rbx), %xmm1 mulps %xmm12, %xmm1 cmpltps %xmm8, %xmm1 movaps 0x80(%rbx), %xmm0 movaps %xmm12, %xmm2 movaps %xmm0, 0xd0(%rsp) mulps %xmm0, %xmm2 movaps %xmm8, %xmm0 cmpleps %xmm2, %xmm0 andps %xmm1, %xmm0 andps %xmm11, %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x14c57e cmpneqps 0x1d9f35e(%rip), %xmm9 # 0x1eeba10 andps %xmm0, %xmm9 movmskps %xmm9, %edx testl %edx, %edx je 0x14c57e movd 0x34(%r14), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd 0x1d9f333(%rip), %xmm1 # 0x1eeba10 pandn %xmm9, %xmm1 movmskps %xmm1, %edx testl %edx, %edx je 0x14c57e movq 0x8(%rsp), %rdx movq 0x10(%rdx), %rdx cmpq $0x0, 0x10(%rdx) jne 0x14c825 cmpq $0x0, 0x48(%r14) jne 0x14c825 pandn 0x50(%rsp), %xmm1 movdqa %xmm1, 0x50(%rsp) jmp 0x14c57e movaps %xmm9, %xmm5 movaps 0x10(%rsp), %xmm2 mulps %xmm13, %xmm2 mulps %xmm12, %xmm4 addps %xmm2, %xmm4 mulps %xmm11, %xmm3 addps %xmm4, %xmm3 xorps %xmm3, %xmm6 movaps 0x30(%rbx), %xmm9 mulps %xmm7, %xmm9 cmpltps %xmm6, %xmm9 movaps 0x80(%rbx), %xmm2 movaps %xmm7, %xmm10 movaps %xmm2, 0x30(%rsp) mulps %xmm2, %xmm10 movaps %xmm6, %xmm8 cmpleps %xmm10, %xmm8 andps %xmm9, %xmm8 andps %xmm1, %xmm8 movmskps %xmm8, %eax testl %eax, %eax je 0x14c620 cmpneqps 0x1d9f28e(%rip), %xmm0 # 0x1eeba10 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14c620 movq (%r14), %rcx movq 0x20(%rsp), %rax movl 0x40(%rax,%rbp,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %rcx movq %rcx, 0x10(%rsp) movd 0x34(%rcx), %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd 0x1d9f249(%rip), %xmm1 # 0x1eeba10 pandn %xmm0, %xmm1 movmskps %xmm1, %ecx testl %ecx, %ecx je 0x14c620 movq 0x20(%rsp), %rcx movl 0x50(%rcx,%rbp,4), %ecx movq 0x10(%r14), %rdx cmpq $0x0, 0x10(%rdx) jne 0x14c9f4 movq 0x10(%rsp), %rdx cmpq $0x0, 0x48(%rdx) jne 0x14c9f4 pandn 0x50(%rsp), %xmm1 movdqa %xmm1, %xmm13 movq %r14, %r10 movq (%rsp), %rsi movaps 0x1d9f1d8(%rip), %xmm15 # 0x1eeb9f0 movaps 0xb0(%rsp), %xmm0 jmp 0x14c63e rcpps %xmm12, %xmm0 mulps %xmm0, %xmm12 movaps 0x1da01db(%rip), %xmm9 # 0x1eeca10 movaps %xmm9, %xmm2 subps %xmm12, %xmm2 mulps %xmm0, %xmm2 addps %xmm0, %xmm2 mulps %xmm2, %xmm10 minps %xmm9, %xmm10 movaps %xmm3, %xmm5 mulps %xmm2, %xmm5 minps %xmm9, %xmm5 movaps %xmm9, %xmm3 subps %xmm10, %xmm3 subps %xmm5, %xmm9 movaps 0x2c0(%rsp), %xmm0 blendvps %xmm0, %xmm3, %xmm10 blendvps %xmm0, %xmm9, %xmm5 movq 0x8(%rsp), %rsi movq 0x8(%rsi), %rdx movd %ecx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd %eax, %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm7, 0x110(%rsp) movaps 0x1c0(%rsp), %xmm6 movaps %xmm6, 0x120(%rsp) movaps %xmm4, 0x130(%rsp) movaps %xmm10, 0x140(%rsp) movaps %xmm5, 0x150(%rsp) movdqa %xmm3, 0x160(%rsp) movdqa %xmm0, 0x170(%rsp) mulps %xmm8, %xmm2 leaq 0x180(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x180(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x190(%rsp) movaps 0xd0(%rsp), %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x80(%rbx) movaps %xmm1, 0x60(%rsp) leaq 0x60(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%r14), %rax movq %rax, 0x78(%rsp) movq 0x8(%rsi), %rax movq %rax, 0x80(%rsp) movq %rbx, 0x88(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0x90(%rsp) movl $0x4, 0x98(%rsp) movq 0x48(%r14), %rax testq %rax, %rax je 0x14c980 leaq 0x70(%rsp), %rdi callq *%rax movdqa 0x60(%rsp), %xmm2 ptest %xmm2, %xmm2 je 0x14cbb6 movq 0x8(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x14c9b6 testb $0x2, (%rcx) jne 0x14c9af testb $0x40, 0x3e(%r14) je 0x14c9b6 leaq 0x70(%rsp), %rdi callq *%rax movdqa 0x60(%rsp), %xmm0 pcmpeqd 0x1d9f04c(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d9f450(%rip), %xmm2 # 0x1eebe20 movq 0x88(%rsp), %rax movaps 0x1d9f021(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x14cbc6 rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1da000e(%rip), %xmm9 # 0x1eeca10 movaps %xmm9, %xmm8 subps %xmm7, %xmm8 mulps %xmm0, %xmm8 addps %xmm0, %xmm8 mulps %xmm8, %xmm14 minps %xmm9, %xmm14 mulps %xmm8, %xmm5 minps %xmm9, %xmm5 movaps %xmm9, %xmm7 subps %xmm14, %xmm7 subps %xmm5, %xmm9 movaps 0x2b0(%rsp), %xmm0 blendvps %xmm0, %xmm7, %xmm14 blendvps %xmm0, %xmm9, %xmm5 movq 0x8(%r14), %rdx movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd %ecx, %xmm7 pshufd $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movaps %xmm11, 0x110(%rsp) movaps %xmm12, 0x120(%rsp) movaps %xmm13, 0x130(%rsp) movaps %xmm14, 0x140(%rsp) movaps %xmm5, 0x150(%rsp) movdqa %xmm7, 0x160(%rsp) movdqa %xmm0, 0x170(%rsp) mulps %xmm6, %xmm8 leaq 0x180(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x180(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x190(%rsp) movaps 0x30(%rsp), %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm8, %xmm2 movaps %xmm2, 0x80(%rbx) movaps %xmm1, 0x60(%rsp) leaq 0x60(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x10(%rsp), %rcx movq 0x18(%rcx), %rax movq %rax, 0x78(%rsp) movq 0x8(%r14), %rax movq %rax, 0x80(%rsp) movq %rbx, 0x88(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0x90(%rsp) movl $0x4, 0x98(%rsp) movq 0x48(%rcx), %rax testq %rax, %rax je 0x14cb46 leaq 0x70(%rsp), %rdi callq *%rax movdqa 0x60(%rsp), %xmm2 ptest %xmm2, %xmm2 je 0x14cbf5 movq 0x10(%r14), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x14cb7b testb $0x2, (%rcx) jne 0x14cb74 movq 0x10(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x14cb7b leaq 0x70(%rsp), %rdi callq *%rax movdqa 0x60(%rsp), %xmm0 pcmpeqd 0x1d9ee87(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d9f28b(%rip), %xmm2 # 0x1eebe20 movq 0x88(%rsp), %rax movaps 0x1d9ee5c(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x14cc05 pcmpeqd 0x1d9ee52(%rip), %xmm2 # 0x1eeba10 pxor 0x1d9f25a(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 movaps 0xd0(%rsp), %xmm2 blendvps %xmm0, 0x80(%rbx), %xmm2 movaps %xmm2, 0x80(%rbx) jmp 0x14c70c pcmpeqd 0x1d9ee13(%rip), %xmm2 # 0x1eeba10 pxor 0x1d9f21b(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 movaps 0x30(%rsp), %xmm2 blendvps %xmm0, 0x80(%rbx), %xmm2 movaps %xmm2, 0x80(%rbx) jmp 0x14c7fe andps %xmm13, %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x1b8(%rsp), %rax je 0x14cc55 incq %rax cmpq 0x1b0(%rsp), %rax jb 0x14bb26 xorps 0x1d9f1c4(%rip), %xmm0 # 0x1eebe20 movq 0xc8(%rsp), %r9 orps 0xe0(%rsp), %xmm0 movaps %xmm0, 0xe0(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x14cc99 movaps 0x2a0(%rsp), %xmm1 blendvps %xmm0, 0x1d9ed73(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x2a0(%rsp) xorl %eax, %eax jmp 0x14cc9c pushq $0x3 popq %rax cmpl $0x3, %eax jne 0x14b800 jmp 0x14cd6c pushq $0x2 jmp 0x14cc9b movaps %xmm14, 0x10(%rsp) movq %r9, 0xc8(%rsp) movq 0x108(%rsp), %rdi movq %r10, 0x8(%rsp) movq %rsi, (%rsp) bsfq %rbp, %rcx movq %r13, %rdx movq %rcx, 0x50(%rsp) leaq 0x4f(%rsp), %r8 movq %rbx, %r9 pushq %r10 leaq 0x1d8(%rsp), %rax pushq %rax callq 0x197c48 popq %rcx popq %rdx testb %al, %al je 0x14cd04 movq 0x50(%rsp), %rax orl $-0x1, 0xe0(%rsp,%rax,4) leaq -0x1(%rbp), %rax andq %rax, %rbp movq 0x8(%rsp), %r10 movq 0x108(%rsp), %rdi movq (%rsp), %rsi jne 0x14cccd movaps 0xe0(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d9ecb9(%rip), %xmm15 # 0x1eeb9f0 movq 0xc8(%rsp), %r9 movaps 0x10(%rsp), %xmm14 je 0x14b846 movaps 0x2a0(%rsp), %xmm1 blendvps %xmm0, 0x1d9eca4(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x2a0(%rsp) pushq $0x2 popq %rax jmp 0x14b846 movaps 0x2d0(%rsp), %xmm0 andps 0xe0(%rsp), %xmm0 movaps 0x80(%rbx), %xmm1 blendvps %xmm0, 0x1d9ec74(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x19d8, %rsp # imm = 0x19D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMiMBIntersectorKPluecker<4, 4, true>>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x14cf3c pcmpeqd %xmm1, %xmm1 pcmpeqd (%rdi), %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x14cf3c movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movzbl %al, %ebp movaps (%rdx), %xmm0 leaq 0x10(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%rdx), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%rdx), %xmm0 movaps %xmm0, 0x20(%rax) movaps 0x40(%rdx), %xmm0 movaps %xmm0, 0x30(%rax) movaps 0x50(%rdx), %xmm4 movaps %xmm4, 0x40(%rax) movaps 0x60(%rdx), %xmm7 movaps %xmm7, 0x50(%rax) movaps 0x1d9f8a2(%rip), %xmm5 # 0x1eec6c0 movaps 0x1d9fbeb(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm6 divps %xmm0, %xmm6 andps %xmm5, %xmm0 movaps 0x1da4f0a(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps %xmm2, %xmm3 divps %xmm4, %xmm3 andps %xmm5, %xmm4 cmpltps %xmm8, %xmm4 andps %xmm7, %xmm5 cmpltps %xmm8, %xmm5 movaps 0x1dcfad7(%rip), %xmm8 # 0x1f1c930 blendvps %xmm0, %xmm8, %xmm6 divps %xmm7, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm8, %xmm3 movaps %xmm5, %xmm0 blendvps %xmm0, %xmm8, %xmm2 movaps %xmm6, 0x60(%rax) movaps %xmm3, 0x70(%rax) movaps %xmm2, 0x80(%rax) xorps %xmm4, %xmm4 cmpltps %xmm4, %xmm6 andps 0x1dd302f(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm4, %xmm3 movaps 0x1dd3034(%rip), %xmm5 # 0x1f1fed0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1db0368(%rip), %xmm5 # 0x1efd210 movaps %xmm6, 0x90(%rax) movaps %xmm5, 0xa0(%rax) cmpnltps %xmm4, %xmm2 movaps 0x1dd302f(%rip), %xmm3 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dd3013(%rip), %xmm3 # 0x1f1fee0 movaps %xmm3, 0xb0(%rax) movaps 0x30(%rdx), %xmm2 movaps 0x80(%rdx), %xmm3 maxps %xmm4, %xmm2 movaps 0x1d9eb07(%rip), %xmm5 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm5 maxps %xmm4, %xmm3 movaps %xmm5, 0xc0(%rax) movaps 0x1d9eafe(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r13 movq 0x70(%rbx), %rdx movq %r12, %rdi movq %rbx, %rsi leaq 0xf(%rsp), %r8 movq %r14, %r9 pushq %r15 leaq 0x18(%rsp), %rax pushq %rax callq 0x19928a popq %rax popq %rcx andq %r13, %rbp jne 0x14cf0e addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMiMBIntersectorKPluecker<4, 4, true>>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1ab8, %rsp # imm = 0x1AB8 movq %rcx, %r10 movq %rsi, %rcx movq (%rsi), %rsi cmpq $0x8, 0x70(%rsi) je 0x14ec30 movq %rdx, %rbx pcmpeqd %xmm5, %xmm5 movdqa (%rdi), %xmm0 pcmpeqd %xmm5, %xmm0 movaps 0x80(%rdx), %xmm6 xorps %xmm7, %xmm7 movaps %xmm6, %xmm12 cmpnltps %xmm7, %xmm12 andps %xmm0, %xmm12 movmskps %xmm12, %eax testl %eax, %eax je 0x14ec30 movaps (%rbx), %xmm0 movaps %xmm0, 0x290(%rsp) movaps 0x10(%rbx), %xmm0 movaps %xmm0, 0x2a0(%rsp) movaps 0x20(%rbx), %xmm0 movaps %xmm0, 0x2b0(%rsp) movaps 0x40(%rbx), %xmm0 movaps %xmm0, 0x2c0(%rsp) movaps 0x50(%rbx), %xmm4 movaps %xmm4, 0x2d0(%rsp) movaps 0x60(%rbx), %xmm2 movaps %xmm2, 0x2e0(%rsp) movaps 0x1d9f6cc(%rip), %xmm10 # 0x1eec6c0 movaps 0x1d9fa15(%rip), %xmm1 # 0x1eeca10 movaps %xmm1, %xmm8 divps %xmm0, %xmm8 andps %xmm10, %xmm0 movaps 0x1da4d31(%rip), %xmm11 # 0x1ef1d40 cmpltps %xmm11, %xmm0 movaps %xmm1, %xmm3 divps %xmm4, %xmm3 andps %xmm10, %xmm4 cmpltps %xmm11, %xmm4 divps %xmm2, %xmm1 movaps 0x1dcf902(%rip), %xmm9 # 0x1f1c930 blendvps %xmm0, %xmm9, %xmm8 andps %xmm10, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm9, %xmm3 cmpltps %xmm11, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm9, %xmm1 movaps %xmm8, 0x2f0(%rsp) movaps %xmm3, 0x300(%rsp) movaps %xmm1, 0x310(%rsp) cmpltps %xmm7, %xmm8 andps 0x1dd2e4b(%rip), %xmm8 # 0x1f1fec0 cmpnltps %xmm7, %xmm3 movaps 0x1dd2e50(%rip), %xmm2 # 0x1f1fed0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1db0184(%rip), %xmm2 # 0x1efd210 movaps %xmm8, 0x320(%rsp) movaps %xmm2, 0x330(%rsp) cmpnltps %xmm7, %xmm1 movaps 0x1dd2e48(%rip), %xmm2 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dd2e2c(%rip), %xmm2 # 0x1f1fee0 movaps %xmm2, 0x340(%rsp) movaps 0x30(%rbx), %xmm2 maxps %xmm7, %xmm2 movaps 0x1d9e925(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm15, %xmm1 movaps %xmm12, %xmm0 blendvps %xmm0, %xmm2, %xmm1 maxps %xmm7, %xmm6 movaps %xmm1, 0x350(%rsp) movaps 0x1d9e916(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm6, %xmm2 movaps %xmm2, 0x360(%rsp) pxor %xmm12, %xmm5 movdqa %xmm5, 0x100(%rsp) cmpq $0x0, 0x8(%r10) movq %rcx, 0x178(%rsp) je 0x14d128 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r9d, %r9d cmpb $0x1, %al adcq $0x2, %r9 jmp 0x14d12c pushq $0x3 popq %r9 leaq 0x420(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0xbc0(%rsp), %r12 movaps %xmm15, -0x20(%r12) movq 0x70(%rsi), %rax movq %rax, -0x8(%r15) movaps %xmm1, -0x10(%r12) leaq 0x2002e21(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x380(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x370(%rsp) movaps %xmm12, 0x390(%rsp) addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 cmpq $-0x8, %rbp je 0x14eb34 movaps (%r12), %xmm14 movaps %xmm14, %xmm0 cmpltps 0x360(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14eb45 movzbl %al, %r13d popcntl %r13d, %r14d xorl %eax, %eax cmpq %r9, %r14 jbe 0x14eb49 cmpq %r9, %r14 pushq $0x8 popq %r14 jbe 0x14eb37 testb $0x8, %bpl jne 0x14d45f movaps 0x360(%rsp), %xmm1 movq %rbp, %rax andq $-0x10, %rax andl $0x7, %ebp movl %ebp, %ecx cmpnleps %xmm14, %xmm1 xorl %edx, %edx movq %r14, %rbp movaps %xmm15, %xmm14 movq (%rax,%rdx,8), %r8 cmpq $0x8, %r8 je 0x14d3d5 movss 0x80(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x20(%rax,%rdx,4), %xmm3 movss 0x30(%rax,%rdx,4), %xmm7 movss 0x40(%rax,%rdx,4), %xmm4 movss 0x50(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0x70(%rbx), %xmm2 mulps %xmm2, %xmm0 addps %xmm3, %xmm0 movss 0xa0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm3 addps %xmm4, %xmm3 movss 0xc0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x60(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm6, %xmm4 movss 0x90(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm2, %xmm6 addps %xmm7, %xmm6 movss 0xb0(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm7 addps %xmm5, %xmm7 movss 0xd0(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm8, %xmm5 movaps 0x290(%rsp), %xmm8 movaps 0x2a0(%rsp), %xmm9 movaps 0x2b0(%rsp), %xmm10 movaps 0x2f0(%rsp), %xmm11 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 subps %xmm9, %xmm3 movaps 0x300(%rsp), %xmm12 mulps %xmm12, %xmm3 subps %xmm10, %xmm4 movaps 0x310(%rsp), %xmm13 mulps %xmm13, %xmm4 subps %xmm8, %xmm6 mulps %xmm11, %xmm6 subps %xmm9, %xmm7 mulps %xmm12, %xmm7 subps %xmm10, %xmm5 mulps %xmm13, %xmm5 movaps %xmm0, %xmm8 pminsd %xmm6, %xmm8 movaps %xmm3, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm8, %xmm9 movaps %xmm4, %xmm8 pminsd %xmm5, %xmm8 pmaxsd %xmm9, %xmm8 mulps 0x1da4a23(%rip), %xmm8 # 0x1ef1d80 pmaxsd %xmm0, %xmm6 pmaxsd %xmm3, %xmm7 pminsd %xmm6, %xmm7 pmaxsd %xmm4, %xmm5 pminsd %xmm7, %xmm5 mulps 0x1da4a13(%rip), %xmm5 # 0x1ef1d90 movdqa 0x350(%rsp), %xmm0 pmaxsd %xmm8, %xmm0 pminsd 0x360(%rsp), %xmm5 cmpleps %xmm5, %xmm0 cmpl $0x6, %ecx je 0x14d3ee andps %xmm1, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x14d3d5 movaps %xmm15, %xmm2 blendvps %xmm0, %xmm8, %xmm2 cmpq $0x8, %rbp je 0x14d3ce movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm14, (%r12) addq $0x10, %r12 movaps %xmm2, %xmm14 movq %r8, %rbp cmpq $0x8, %r8 je 0x14d418 leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x14d202 jmp 0x14d418 movss 0xe0(%rax,%rdx,4), %xmm3 movss 0xf0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] cmpleps %xmm2, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpltps %xmm4, %xmm2 andps %xmm3, %xmm2 andps %xmm2, %xmm0 jmp 0x14d39f xorl %eax, %eax cmpq $0x8, %rbp je 0x14d458 movaps 0x360(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r9 jae 0x14d448 testb %cl, %cl jne 0x14d1d6 jmp 0x14eb37 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm14, (%r12) addq $0x10, %r12 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x14d43b cmpq $-0x8, %rbp je 0x14eb34 movaps 0x360(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14eb45 movl %ebp, %eax andl $0xf, %eax movaps 0x100(%rsp), %xmm0 addq $-0x8, %rax movq %rax, 0x280(%rsp) je 0x14eaff movq %r9, 0xe8(%rsp) andq $-0x10, %rbp xorps 0x1d9e96d(%rip), %xmm0 # 0x1eebe20 movaps %xmm0, 0x110(%rsp) xorl %eax, %eax movq %r10, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rax, 0x288(%rsp) imulq $0x60, %rax, %r11 addq %rbp, %r11 movaps 0x110(%rsp), %xmm0 movmskps %xmm0, %eax movq %rax, 0x28(%rsp) xorl %r13d, %r13d movaps %xmm0, %xmm9 movl 0x50(%r11,%r13,4), %eax cmpl $-0x1, %eax je 0x14eab4 movq (%r10), %rdx movl 0x40(%r11,%r13,4), %ecx movq 0x1e8(%rdx), %rdx movq (%rdx,%rcx,8), %r14 movss 0x28(%r14), %xmm0 movss 0x2c(%r14), %xmm1 movss 0x30(%r14), %xmm2 subss %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm0, %xmm3 shufps $0x0, %xmm0, %xmm3 # xmm3 = xmm3[0,0],xmm0[0,0] movaps 0x70(%rbx), %xmm12 subps %xmm1, %xmm12 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] divps %xmm2, %xmm12 mulps %xmm3, %xmm12 roundps $0x1, %xmm12, %xmm1 addss 0x1da3479(%rip), %xmm0 # 0x1ef09cc shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] minps %xmm0, %xmm1 xorps %xmm0, %xmm0 maxps %xmm0, %xmm1 subps %xmm1, %xmm12 cvtps2dq %xmm1, %xmm0 movapd %xmm0, 0x60(%rsp) movq 0x28(%rsp), %rdx bsfq %rdx, %rdx movslq 0x60(%rsp,%rdx,4), %r8 movd %r8d, %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pcmpeqd %xmm0, %xmm1 pandn 0x110(%rsp), %xmm1 movmskps %xmm1, %edi testl %edi, %edi movaps %xmm9, 0x30(%rsp) jne 0x14e57f movq 0xe0(%r14), %rdi imulq $0x38, %r8, %r8 movq (%rdi,%r8), %rdx movq 0x38(%rdi,%r8), %r9 movl (%r11,%r13,4), %r8d movl 0x10(%r11,%r13,4), %edi movups (%rdx,%r8,4), %xmm10 movups (%r9,%r8,4), %xmm1 movaps %xmm10, %xmm13 shufps $0x0, %xmm10, %xmm13 # xmm13 = xmm13[0,0],xmm10[0,0] movaps %xmm10, %xmm11 shufps $0x55, %xmm10, %xmm11 # xmm11 = xmm11[1,1],xmm10[1,1] shufps $0xaa, %xmm10, %xmm10 # xmm10 = xmm10[2,2,2,2] movaps %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0] movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] shufps $0xaa, %xmm1, %xmm1 # xmm1 = xmm1[2,2,2,2] movaps 0x1d9f415(%rip), %xmm0 # 0x1eeca10 subps %xmm12, %xmm0 mulps %xmm12, %xmm2 mulps %xmm12, %xmm3 mulps %xmm12, %xmm1 mulps %xmm0, %xmm13 addps %xmm2, %xmm13 mulps %xmm0, %xmm11 addps %xmm3, %xmm11 mulps %xmm0, %xmm10 addps %xmm1, %xmm10 movups (%rdx,%rdi,4), %xmm8 movups (%r9,%rdi,4), %xmm1 movaps %xmm8, %xmm15 shufps $0x0, %xmm8, %xmm15 # xmm15 = xmm15[0,0],xmm8[0,0] movaps %xmm8, %xmm7 shufps $0x55, %xmm8, %xmm7 # xmm7 = xmm7[1,1],xmm8[1,1] shufps $0xaa, %xmm8, %xmm8 # xmm8 = xmm8[2,2,2,2] movaps %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0] movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] shufps $0xaa, %xmm1, %xmm1 # xmm1 = xmm1[2,2,2,2] mulps %xmm12, %xmm2 mulps %xmm12, %xmm3 mulps %xmm12, %xmm1 mulps %xmm0, %xmm15 addps %xmm2, %xmm15 mulps %xmm0, %xmm7 addps %xmm3, %xmm7 mulps %xmm0, %xmm8 addps %xmm1, %xmm8 movl 0x20(%r11,%r13,4), %edi movups (%rdx,%rdi,4), %xmm6 movups (%r9,%rdi,4), %xmm1 movaps %xmm6, %xmm4 shufps $0x0, %xmm6, %xmm4 # xmm4 = xmm4[0,0],xmm6[0,0] movaps %xmm6, %xmm5 shufps $0x55, %xmm6, %xmm5 # xmm5 = xmm5[1,1],xmm6[1,1] shufps $0xaa, %xmm6, %xmm6 # xmm6 = xmm6[2,2,2,2] movaps %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0] movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] shufps $0xaa, %xmm1, %xmm1 # xmm1 = xmm1[2,2,2,2] mulps %xmm12, %xmm2 mulps %xmm12, %xmm3 mulps %xmm12, %xmm1 mulps %xmm0, %xmm4 addps %xmm2, %xmm4 movaps %xmm4, 0x210(%rsp) mulps %xmm0, %xmm5 addps %xmm3, %xmm5 movaps %xmm5, 0xb0(%rsp) mulps %xmm0, %xmm6 addps %xmm1, %xmm6 movaps %xmm6, 0xd0(%rsp) movl 0x30(%r11,%r13,4), %edi movups (%r9,%rdi,4), %xmm1 movaps %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0] movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] shufps $0xaa, %xmm1, %xmm1 # xmm1 = xmm1[2,2,2,2] mulps %xmm12, %xmm2 mulps %xmm12, %xmm3 mulps %xmm12, %xmm1 movups (%rdx,%rdi,4), %xmm4 movaps %xmm4, %xmm6 shufps $0x0, %xmm4, %xmm6 # xmm6 = xmm6[0,0],xmm4[0,0] mulps %xmm0, %xmm6 addps %xmm2, %xmm6 movaps %xmm4, %xmm14 shufps $0x55, %xmm4, %xmm14 # xmm14 = xmm14[1,1],xmm4[1,1] mulps %xmm0, %xmm14 addps %xmm3, %xmm14 shufps $0xaa, %xmm4, %xmm4 # xmm4 = xmm4[2,2,2,2] mulps %xmm0, %xmm4 addps %xmm1, %xmm4 movaps %xmm4, %xmm12 movaps (%rbx), %xmm1 movaps 0x10(%rbx), %xmm3 movaps 0x20(%rbx), %xmm5 movaps 0x40(%rbx), %xmm0 movaps %xmm0, 0x230(%rsp) movaps 0x50(%rbx), %xmm0 movaps %xmm0, 0xf0(%rsp) subps %xmm1, %xmm13 subps %xmm3, %xmm11 subps %xmm5, %xmm10 movaps %xmm15, 0x260(%rsp) movaps %xmm15, %xmm4 subps %xmm1, %xmm4 movaps %xmm7, 0x240(%rsp) subps %xmm3, %xmm7 movaps %xmm7, 0xa0(%rsp) movaps %xmm8, 0x250(%rsp) subps %xmm5, %xmm8 movaps %xmm8, 0x120(%rsp) movaps %xmm6, 0x160(%rsp) subps %xmm1, %xmm6 movaps %xmm14, 0xc0(%rsp) movaps %xmm11, %xmm1 movaps %xmm14, %xmm11 subps %xmm3, %xmm11 movaps %xmm12, 0x10(%rsp) movaps %xmm12, %xmm7 subps %xmm5, %xmm7 movaps %xmm6, %xmm14 subps %xmm13, %xmm14 movaps %xmm1, %xmm12 movaps %xmm11, %xmm2 subps %xmm1, %xmm2 movaps %xmm7, %xmm1 subps %xmm10, %xmm1 movaps %xmm6, %xmm3 addps %xmm13, %xmm3 movaps %xmm11, %xmm5 addps %xmm12, %xmm5 movaps %xmm7, %xmm8 addps %xmm10, %xmm8 movaps %xmm14, %xmm9 mulps %xmm5, %xmm9 mulps %xmm1, %xmm5 movaps %xmm2, %xmm15 mulps %xmm8, %xmm15 subps %xmm5, %xmm15 movaps %xmm14, 0x270(%rsp) mulps %xmm14, %xmm8 movaps %xmm3, %xmm5 movaps %xmm1, 0x400(%rsp) mulps %xmm1, %xmm5 subps %xmm8, %xmm5 movaps 0x60(%rbx), %xmm1 movaps %xmm1, 0x220(%rsp) movaps %xmm2, 0x3f0(%rsp) mulps %xmm2, %xmm3 subps %xmm3, %xmm9 movaps %xmm13, %xmm0 subps %xmm4, %xmm0 mulps %xmm1, %xmm9 movaps 0xf0(%rsp), %xmm1 mulps %xmm1, %xmm5 addps %xmm9, %xmm5 movaps %xmm12, %xmm14 movaps 0xa0(%rsp), %xmm9 subps %xmm9, %xmm14 movaps 0x230(%rsp), %xmm2 mulps %xmm2, %xmm15 addps %xmm5, %xmm15 movaps %xmm10, %xmm8 movaps 0x120(%rsp), %xmm5 subps %xmm5, %xmm8 movaps %xmm12, 0x140(%rsp) movaps %xmm12, %xmm3 addps %xmm9, %xmm3 movaps %xmm10, 0x130(%rsp) addps %xmm5, %xmm10 movaps %xmm0, %xmm12 mulps %xmm3, %xmm12 mulps %xmm8, %xmm3 movaps %xmm14, %xmm9 mulps %xmm10, %xmm9 subps %xmm3, %xmm9 movaps %xmm13, 0x150(%rsp) addps %xmm4, %xmm13 movaps %xmm0, 0x3d0(%rsp) mulps %xmm0, %xmm10 movaps %xmm13, %xmm3 movaps %xmm8, 0x3e0(%rsp) mulps %xmm8, %xmm3 movaps %xmm14, %xmm8 subps %xmm10, %xmm3 mulps %xmm14, %xmm13 subps %xmm13, %xmm12 movaps 0x220(%rsp), %xmm0 mulps %xmm0, %xmm12 mulps %xmm1, %xmm3 movaps %xmm1, %xmm14 addps %xmm12, %xmm3 mulps %xmm2, %xmm9 movaps %xmm2, %xmm13 addps %xmm3, %xmm9 movaps %xmm4, %xmm3 subps %xmm6, %xmm3 addps %xmm4, %xmm6 movaps 0xa0(%rsp), %xmm2 movaps %xmm2, %xmm1 subps %xmm11, %xmm1 addps %xmm2, %xmm11 movaps %xmm5, %xmm10 subps %xmm7, %xmm10 addps %xmm5, %xmm7 movaps %xmm3, %xmm4 mulps %xmm11, %xmm4 mulps %xmm10, %xmm11 movaps %xmm1, %xmm12 mulps %xmm7, %xmm12 subps %xmm11, %xmm12 mulps %xmm3, %xmm7 movaps %xmm6, %xmm2 mulps %xmm10, %xmm2 subps %xmm7, %xmm2 movaps %xmm1, 0xa0(%rsp) mulps %xmm1, %xmm6 subps %xmm6, %xmm4 mulps %xmm0, %xmm4 mulps %xmm14, %xmm2 addps %xmm4, %xmm2 mulps %xmm13, %xmm12 addps %xmm2, %xmm12 movaps %xmm15, %xmm2 addps %xmm9, %xmm2 addps %xmm12, %xmm2 movaps %xmm15, %xmm0 minps %xmm9, %xmm0 minps %xmm12, %xmm0 movaps %xmm15, 0x120(%rsp) movaps %xmm15, %xmm6 movaps %xmm9, 0x3c0(%rsp) maxps %xmm9, %xmm6 maxps %xmm12, %xmm6 movaps %xmm2, %xmm4 movaps 0x1d9ece7(%rip), %xmm13 # 0x1eec6c0 andps %xmm13, %xmm4 movaps %xmm4, %xmm1 mulps 0x1da4389(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm6 xorps 0x1d9ecde(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm6 andps 0x30(%rsp), %xmm6 movmskps %xmm6, %edx testl %edx, %edx je 0x14e0de movaps %xmm4, 0x3a0(%rsp) movaps %xmm2, 0x3b0(%rsp) movaps %xmm8, %xmm0 movaps 0x400(%rsp), %xmm7 mulps %xmm7, %xmm0 movaps 0x3d0(%rsp), %xmm14 movaps %xmm14, %xmm1 movaps 0x3f0(%rsp), %xmm11 mulps %xmm11, %xmm1 movaps 0xa0(%rsp), %xmm9 movaps %xmm9, %xmm4 movaps 0x3e0(%rsp), %xmm5 mulps %xmm5, %xmm4 movaps %xmm3, %xmm12 mulps %xmm8, %xmm12 mulps %xmm5, %xmm11 subps %xmm0, %xmm11 movaps 0x270(%rsp), %xmm15 movaps %xmm15, %xmm2 mulps %xmm8, %xmm15 mulps %xmm10, %xmm8 subps %xmm4, %xmm8 andps %xmm13, %xmm0 andps %xmm13, %xmm4 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm11, %xmm8 movaps %xmm14, %xmm0 mulps %xmm10, %xmm0 mulps %xmm5, %xmm2 mulps %xmm5, %xmm3 mulps %xmm14, %xmm7 subps %xmm2, %xmm7 subps %xmm0, %xmm3 andps %xmm13, %xmm2 andps %xmm13, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm7, %xmm3 mulps %xmm9, %xmm14 subps %xmm1, %xmm15 subps %xmm12, %xmm14 andps %xmm13, %xmm1 andps %xmm13, %xmm12 cmpltps %xmm12, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm15, %xmm14 movaps 0x220(%rsp), %xmm1 mulps %xmm14, %xmm1 movaps 0xf0(%rsp), %xmm0 mulps %xmm3, %xmm0 addps %xmm1, %xmm0 movaps 0x230(%rsp), %xmm4 mulps %xmm8, %xmm4 addps %xmm0, %xmm4 addps %xmm4, %xmm4 movaps 0x130(%rsp), %xmm0 mulps %xmm14, %xmm0 movaps 0x140(%rsp), %xmm1 mulps %xmm3, %xmm1 addps %xmm0, %xmm1 movaps 0x150(%rsp), %xmm5 mulps %xmm8, %xmm5 addps %xmm1, %xmm5 addps %xmm5, %xmm5 rcpps %xmm4, %xmm0 movaps %xmm4, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d9eec5(%rip), %xmm2 # 0x1eeca10 subps %xmm1, %xmm2 mulps %xmm0, %xmm2 addps %xmm0, %xmm2 mulps %xmm5, %xmm2 movaps 0x30(%rbx), %xmm0 movaps 0x80(%rbx), %xmm12 cmpleps %xmm2, %xmm0 movaps %xmm2, %xmm1 cmpleps %xmm12, %xmm1 andps %xmm0, %xmm1 xorps %xmm10, %xmm10 cmpneqps %xmm10, %xmm4 andps %xmm1, %xmm4 pslld $0x1f, %xmm4 psrad $0x1f, %xmm4 pand %xmm6, %xmm4 movmskps %xmm4, %edx testl %edx, %edx je 0x14e0de movd 0x34(%r14), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd %xmm10, %xmm1 pandn %xmm4, %xmm1 movmskps %xmm1, %edx testl %edx, %edx movaps 0x10(%rsp), %xmm7 movaps 0xd0(%rsp), %xmm13 je 0x14ea08 movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x14e100 cmpq $0x0, 0x48(%r14) jne 0x14e100 movdqa 0x30(%rsp), %xmm3 movaps 0xb0(%rsp), %xmm5 pandn %xmm3, %xmm1 movdqa %xmm1, %xmm9 movmskps %xmm9, %eax testl %eax, %eax je 0x14e0b6 movaps (%rbx), %xmm0 movaps 0x10(%rbx), %xmm1 movaps 0x20(%rbx), %xmm2 movaps 0x40(%rbx), %xmm4 movaps 0x50(%rbx), %xmm3 movaps %xmm3, 0xa0(%rsp) movaps 0x210(%rsp), %xmm10 subps %xmm0, %xmm10 subps %xmm1, %xmm5 subps %xmm2, %xmm13 movaps 0x160(%rsp), %xmm3 subps %xmm0, %xmm3 movaps %xmm3, 0x160(%rsp) movaps 0xc0(%rsp), %xmm3 subps %xmm1, %xmm3 movaps %xmm3, 0xc0(%rsp) subps %xmm2, %xmm7 movaps %xmm7, 0x10(%rsp) movaps %xmm9, 0x30(%rsp) movaps 0x260(%rsp), %xmm9 subps %xmm0, %xmm9 movaps 0x240(%rsp), %xmm12 subps %xmm1, %xmm12 movaps %xmm13, 0xd0(%rsp) movaps 0x250(%rsp), %xmm11 subps %xmm2, %xmm11 movaps %xmm9, %xmm6 subps %xmm10, %xmm6 movaps %xmm12, %xmm15 subps %xmm5, %xmm15 movaps %xmm11, %xmm8 subps %xmm13, %xmm8 movaps %xmm9, %xmm0 addps %xmm10, %xmm0 movaps %xmm12, %xmm1 addps %xmm5, %xmm1 movaps %xmm11, %xmm2 addps %xmm13, %xmm2 movaps %xmm6, %xmm3 mulps %xmm1, %xmm3 mulps %xmm8, %xmm1 movaps %xmm15, %xmm7 mulps %xmm2, %xmm7 subps %xmm1, %xmm7 movaps %xmm6, 0x230(%rsp) mulps %xmm6, %xmm2 movaps %xmm0, %xmm1 movaps %xmm8, 0x220(%rsp) mulps %xmm8, %xmm1 subps %xmm2, %xmm1 movaps 0x60(%rbx), %xmm2 movaps %xmm2, 0xf0(%rsp) movaps %xmm15, 0x150(%rsp) mulps %xmm15, %xmm0 subps %xmm0, %xmm3 movaps %xmm10, %xmm14 movaps 0x160(%rsp), %xmm15 subps %xmm15, %xmm14 mulps %xmm2, %xmm3 mulps 0xa0(%rsp), %xmm1 addps %xmm3, %xmm1 movaps %xmm5, %xmm8 movaps 0xc0(%rsp), %xmm2 subps %xmm2, %xmm8 mulps %xmm4, %xmm7 addps %xmm1, %xmm7 movaps %xmm5, %xmm0 movaps %xmm5, 0xb0(%rsp) movaps %xmm13, %xmm5 movaps 0x10(%rsp), %xmm3 subps %xmm3, %xmm5 addps %xmm2, %xmm0 addps %xmm3, %xmm13 movaps %xmm14, %xmm2 mulps %xmm0, %xmm2 mulps %xmm5, %xmm0 movaps %xmm8, %xmm6 mulps %xmm13, %xmm6 subps %xmm0, %xmm6 movaps %xmm10, 0x210(%rsp) movaps %xmm10, %xmm0 addps %xmm15, %xmm0 mulps %xmm14, %xmm13 movaps %xmm0, %xmm3 movaps %xmm5, 0x140(%rsp) mulps %xmm5, %xmm3 subps %xmm13, %xmm3 mulps %xmm8, %xmm0 subps %xmm0, %xmm2 mulps 0xf0(%rsp), %xmm2 mulps 0xa0(%rsp), %xmm3 addps %xmm2, %xmm3 mulps %xmm4, %xmm6 addps %xmm3, %xmm6 movaps %xmm15, %xmm10 subps %xmm9, %xmm10 addps %xmm15, %xmm9 movaps 0xc0(%rsp), %xmm0 movaps %xmm0, %xmm13 subps %xmm12, %xmm13 addps %xmm0, %xmm12 movaps 0x10(%rsp), %xmm0 movaps %xmm0, %xmm3 subps %xmm11, %xmm3 addps %xmm0, %xmm11 movaps %xmm10, %xmm1 mulps %xmm12, %xmm1 mulps %xmm3, %xmm12 movaps %xmm13, %xmm0 mulps %xmm11, %xmm0 subps %xmm12, %xmm0 mulps %xmm10, %xmm11 movaps %xmm9, %xmm2 movaps %xmm3, 0x10(%rsp) mulps %xmm3, %xmm2 subps %xmm11, %xmm2 mulps %xmm13, %xmm9 subps %xmm9, %xmm1 movaps 0x30(%rsp), %xmm9 mulps 0xf0(%rsp), %xmm1 mulps 0xa0(%rsp), %xmm2 addps %xmm1, %xmm2 mulps %xmm4, %xmm0 addps %xmm2, %xmm0 movaps %xmm7, %xmm2 addps %xmm6, %xmm2 addps %xmm0, %xmm2 movaps %xmm7, %xmm1 minps %xmm6, %xmm1 minps %xmm0, %xmm1 movaps %xmm7, 0x130(%rsp) movaps %xmm7, %xmm3 movaps %xmm6, 0xc0(%rsp) maxps %xmm6, %xmm3 maxps %xmm0, %xmm3 movaps %xmm2, %xmm5 movaps 0x1d9e840(%rip), %xmm7 # 0x1eec6c0 andps %xmm7, %xmm5 movaps %xmm5, %xmm0 mulps 0x1da3ee3(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm3 xorps 0x1d9e838(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm3 andps %xmm9, %xmm3 movmskps %xmm3, %eax testl %eax, %eax je 0x14ea5a movaps %xmm13, %xmm6 movaps %xmm5, 0x270(%rsp) movaps %xmm2, 0x120(%rsp) movaps %xmm8, %xmm0 movaps 0x220(%rsp), %xmm12 mulps %xmm12, %xmm0 movaps %xmm14, %xmm1 movaps 0x150(%rsp), %xmm11 mulps %xmm11, %xmm1 movaps %xmm6, 0x160(%rsp) movaps 0x140(%rsp), %xmm6 mulps %xmm6, %xmm13 movaps %xmm10, %xmm9 mulps %xmm8, %xmm9 mulps %xmm6, %xmm11 subps %xmm0, %xmm11 movaps 0x230(%rsp), %xmm5 movaps %xmm5, %xmm2 mulps %xmm8, %xmm5 movaps %xmm7, %xmm15 movaps 0x10(%rsp), %xmm7 mulps %xmm7, %xmm8 subps %xmm13, %xmm8 andps %xmm15, %xmm0 andps %xmm15, %xmm13 cmpltps %xmm13, %xmm0 blendvps %xmm0, %xmm11, %xmm8 movaps %xmm14, %xmm0 mulps %xmm7, %xmm0 mulps %xmm6, %xmm2 mulps %xmm6, %xmm10 mulps %xmm14, %xmm12 subps %xmm2, %xmm12 subps %xmm0, %xmm10 andps %xmm15, %xmm2 andps %xmm15, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm12, %xmm10 mulps 0x160(%rsp), %xmm14 subps %xmm1, %xmm5 subps %xmm9, %xmm14 andps %xmm15, %xmm1 andps %xmm15, %xmm9 cmpltps %xmm9, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm5, %xmm14 movaps 0xf0(%rsp), %xmm0 mulps %xmm14, %xmm0 movaps 0xa0(%rsp), %xmm1 mulps %xmm10, %xmm1 addps %xmm0, %xmm1 mulps %xmm8, %xmm4 addps %xmm1, %xmm4 addps %xmm4, %xmm4 movaps 0xd0(%rsp), %xmm0 mulps %xmm14, %xmm0 movaps 0xb0(%rsp), %xmm1 mulps %xmm10, %xmm1 addps %xmm0, %xmm1 movaps 0x210(%rsp), %xmm7 mulps %xmm8, %xmm7 addps %xmm1, %xmm7 addps %xmm7, %xmm7 rcpps %xmm4, %xmm0 movaps %xmm4, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d9ea1e(%rip), %xmm2 # 0x1eeca10 subps %xmm1, %xmm2 mulps %xmm0, %xmm2 addps %xmm0, %xmm2 mulps %xmm7, %xmm2 movaps 0x30(%rbx), %xmm0 movaps 0x80(%rbx), %xmm11 cmpleps %xmm2, %xmm0 movaps %xmm2, %xmm1 cmpleps %xmm11, %xmm1 andps %xmm0, %xmm1 xorps %xmm7, %xmm7 cmpneqps %xmm7, %xmm4 andps %xmm1, %xmm4 pslld $0x1f, %xmm4 psrad $0x1f, %xmm4 pand %xmm3, %xmm4 movmskps %xmm4, %eax testl %eax, %eax je 0x14ea67 movq (%r10), %rcx movl 0x40(%r11,%r13,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %r14 movd 0x34(%r14), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd %xmm7, %xmm1 pandn %xmm4, %xmm1 movmskps %xmm1, %ecx testl %ecx, %ecx movaps 0x1d9d979(%rip), %xmm15 # 0x1eeb9f0 je 0x14ea6f movl 0x50(%r11,%r13,4), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) movdqa 0x30(%rsp), %xmm7 jne 0x14e352 cmpq $0x0, 0x48(%r14) jne 0x14e352 pandn %xmm7, %xmm1 movdqa %xmm1, %xmm9 movmskps %xmm9, %eax testl %eax, %eax setne %al jmp 0x14e0c0 xorl %eax, %eax movaps 0x1d9d930(%rip), %xmm15 # 0x1eeb9f0 testb %al, %al je 0x14eab4 leaq 0x1(%r13), %rax cmpq $0x3, %r13 movq %rax, %r13 jb 0x14d4ed jmp 0x14eab4 movdqa 0x30(%rsp), %xmm9 movaps 0x10(%rsp), %xmm7 movaps 0xb0(%rsp), %xmm5 movaps 0xd0(%rsp), %xmm13 jmp 0x14dbfd movaps 0x3b0(%rsp), %xmm6 rcpps %xmm6, %xmm0 mulps %xmm0, %xmm6 movaps 0x1d9e8fb(%rip), %xmm5 # 0x1eeca10 movaps %xmm5, %xmm4 subps %xmm6, %xmm4 mulps %xmm0, %xmm4 addps %xmm0, %xmm4 movaps 0x3a0(%rsp), %xmm0 cmpnltps 0x1da3c0f(%rip), %xmm0 # 0x1ef1d40 andps %xmm4, %xmm0 movaps 0x120(%rsp), %xmm6 mulps %xmm0, %xmm6 minps %xmm5, %xmm6 movaps 0x3c0(%rsp), %xmm9 mulps %xmm0, %xmm9 minps %xmm5, %xmm9 movaps %xmm5, %xmm4 subps %xmm6, %xmm4 movaps 0x380(%rsp), %xmm0 blendvps %xmm0, %xmm4, %xmm6 subps %xmm9, %xmm5 blendvps %xmm0, %xmm5, %xmm9 movq 0x8(%r10), %rdx movd %ecx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm8, 0x180(%rsp) movaps %xmm3, 0x190(%rsp) movaps %xmm14, 0x1a0(%rsp) movaps %xmm6, 0x1b0(%rsp) movaps %xmm9, 0x1c0(%rsp) movdqa %xmm4, 0x1d0(%rsp) movdqa %xmm0, 0x1e0(%rsp) leaq 0x1f0(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x1f0(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x200(%rsp) movaps %xmm12, %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x80(%rbx) movaps %xmm1, 0x60(%rsp) leaq 0x60(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%r14), %rax movq %rax, 0x78(%rsp) movq 0x8(%r10), %rax movq %rax, 0x80(%rsp) movq %rbx, 0x88(%rsp) leaq 0x180(%rsp), %rax movq %rax, 0x90(%rsp) movl $0x4, 0x98(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %r11, 0x8(%rsp) movaps %xmm12, 0xa0(%rsp) je 0x14e2a0 leaq 0x70(%rsp), %rdi callq *%rax movaps 0xa0(%rsp), %xmm12 movaps 0xd0(%rsp), %xmm13 movaps 0x10(%rsp), %xmm7 movq 0x8(%rsp), %r11 xorps %xmm10, %xmm10 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %r10 movdqa 0x60(%rsp), %xmm2 ptest %xmm2, %xmm2 movdqa 0x30(%rsp), %xmm3 je 0x14ea1c movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax movaps 0xb0(%rsp), %xmm5 je 0x14e317 testb $0x2, (%rcx) jne 0x14e2d8 testb $0x40, 0x3e(%r14) je 0x14e317 leaq 0x70(%rsp), %rdi callq *%rax movaps 0xa0(%rsp), %xmm12 movaps 0xd0(%rsp), %xmm13 movaps 0xb0(%rsp), %xmm5 movaps 0x10(%rsp), %xmm7 movq 0x8(%rsp), %r11 movdqa 0x30(%rsp), %xmm3 xorps %xmm10, %xmm10 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %r10 movdqa 0x60(%rsp), %xmm0 pcmpeqd %xmm10, %xmm0 movdqa %xmm0, %xmm2 pxor 0x1d9daf2(%rip), %xmm2 # 0x1eebe20 movq 0x88(%rsp), %rax movaps 0x1d9d6c3(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x14ea31 movaps 0x120(%rsp), %xmm9 rcpps %xmm9, %xmm0 mulps %xmm0, %xmm9 movaps 0x1d9e6a6(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm3 subps %xmm9, %xmm3 mulps %xmm0, %xmm3 addps %xmm0, %xmm3 movaps 0x270(%rsp), %xmm0 cmpnltps 0x1da39b9(%rip), %xmm0 # 0x1ef1d40 andps %xmm3, %xmm0 movaps 0x130(%rsp), %xmm6 mulps %xmm0, %xmm6 minps %xmm4, %xmm6 movaps 0xc0(%rsp), %xmm9 mulps %xmm0, %xmm9 minps %xmm4, %xmm9 movaps %xmm4, %xmm3 subps %xmm6, %xmm3 movaps 0x370(%rsp), %xmm0 blendvps %xmm0, %xmm3, %xmm6 subps %xmm9, %xmm4 blendvps %xmm0, %xmm4, %xmm9 movq 0x8(%r10), %rdx movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd %ecx, %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm8, 0x180(%rsp) movaps %xmm10, 0x190(%rsp) movaps %xmm14, 0x1a0(%rsp) movaps %xmm6, 0x1b0(%rsp) movaps %xmm9, 0x1c0(%rsp) movdqa %xmm3, 0x1d0(%rsp) movdqa %xmm0, 0x1e0(%rsp) leaq 0x1f0(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x1f0(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x200(%rsp) movaps %xmm11, %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x80(%rbx) movaps %xmm1, 0x60(%rsp) leaq 0x60(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%r14), %rax movq %rax, 0x78(%rsp) movq 0x8(%r10), %rax movq %rax, 0x80(%rsp) movq %rbx, 0x88(%rsp) leaq 0x180(%rsp), %rax movq %rax, 0x90(%rsp) movl $0x4, 0x98(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %r11, 0x8(%rsp) movaps %xmm11, 0x10(%rsp) je 0x14e4ed leaq 0x70(%rsp), %rdi callq *%rax movaps 0x10(%rsp), %xmm11 movq 0x8(%rsp), %r11 movdqa 0x30(%rsp), %xmm7 movaps 0x1d9d50d(%rip), %xmm15 # 0x1eeb9f0 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %r10 movdqa 0x60(%rsp), %xmm2 ptest %xmm2, %xmm2 je 0x14ea7b movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x14e541 testb $0x2, (%rcx) jne 0x14e517 testb $0x40, 0x3e(%r14) je 0x14e541 leaq 0x70(%rsp), %rdi callq *%rax movaps 0x10(%rsp), %xmm11 movq 0x8(%rsp), %r11 movdqa 0x30(%rsp), %xmm7 movaps 0x1d9d4b9(%rip), %xmm15 # 0x1eeb9f0 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %r10 movdqa 0x60(%rsp), %xmm0 pcmpeqd 0x1d9d4c1(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d9d8c5(%rip), %xmm2 # 0x1eebe20 movq 0x88(%rsp), %rax movaps 0x1d9d496(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x14ea8b movq %r11, 0x8(%rsp) cmpq $0x0, 0x28(%rsp) je 0x14e630 movq 0xe0(%r14), %rsi movq %rsi, 0xc0(%rsp) addq $0x38, %rsi movq %rsi, 0x10(%rsp) movq 0x8(%rsp), %rdi movl (%rdi,%r13,4), %r8d movq 0x28(%rsp), %r9 movq %rdx, %r10 movslq 0x60(%rsp,%r10,4), %r11 imulq $0x38, %r11, %r11 movq 0xc0(%rsp), %rsi movq (%rsi,%r11), %rdi movq 0x10(%rsp), %rsi movq (%rsi,%r11), %r11 movupd (%rdi,%r8,4), %xmm0 movups (%r11,%r8,4), %xmm1 movss %xmm0, 0x180(%rsp,%r10,4) extractps $0x1, %xmm0, 0x190(%rsp,%r10,4) extractps $0x2, %xmm0, 0x1a0(%rsp,%r10,4) movss %xmm1, 0x70(%rsp,%r10,4) extractps $0x1, %xmm1, 0x80(%rsp,%r10,4) extractps $0x2, %xmm1, 0x90(%rsp,%r10,4) btcq %r10, %r9 bsfq %r9, %r10 testq %r9, %r9 jne 0x14e5b9 movaps 0x1d9e3d9(%rip), %xmm0 # 0x1eeca10 subps %xmm12, %xmm0 movaps 0x180(%rsp), %xmm6 mulps %xmm0, %xmm6 movaps 0x190(%rsp), %xmm1 mulps %xmm0, %xmm1 movaps %xmm1, 0x140(%rsp) movaps 0x1a0(%rsp), %xmm1 mulps %xmm0, %xmm1 movaps 0x70(%rsp), %xmm2 mulps %xmm12, %xmm2 movaps 0x80(%rsp), %xmm15 mulps %xmm12, %xmm15 movaps 0x90(%rsp), %xmm13 mulps %xmm12, %xmm13 cmpq $0x0, 0x28(%rsp) je 0x14e734 movq 0xe0(%r14), %rsi movq %rsi, 0xc0(%rsp) addq $0x38, %rsi movq %rsi, 0x10(%rsp) movq 0x8(%rsp), %rdi movl 0x10(%rdi,%r13,4), %r8d movq 0x28(%rsp), %r9 movq %rdx, %r10 movslq 0x60(%rsp,%r10,4), %r11 imulq $0x38, %r11, %r11 movq 0xc0(%rsp), %rsi movq (%rsi,%r11), %rdi movq 0x10(%rsp), %rsi movq (%rsi,%r11), %r11 movups (%rdi,%r8,4), %xmm3 movdqu (%r11,%r8,4), %xmm5 movss %xmm3, 0x180(%rsp,%r10,4) extractps $0x1, %xmm3, 0x190(%rsp,%r10,4) extractps $0x2, %xmm3, 0x1a0(%rsp,%r10,4) movd %xmm5, 0x70(%rsp,%r10,4) pextrd $0x1, %xmm5, 0x80(%rsp,%r10,4) pextrd $0x2, %xmm5, 0x90(%rsp,%r10,4) btcq %r10, %r9 bsfq %r9, %r10 testq %r9, %r9 jne 0x14e6bd movaps %xmm1, 0x130(%rsp) movaps %xmm6, 0x150(%rsp) movaps 0x180(%rsp), %xmm3 mulps %xmm0, %xmm3 movaps %xmm3, 0x260(%rsp) movaps 0x190(%rsp), %xmm3 mulps %xmm0, %xmm3 movaps %xmm3, 0x240(%rsp) movaps 0x1a0(%rsp), %xmm1 mulps %xmm0, %xmm1 movaps %xmm1, 0x250(%rsp) movaps 0x70(%rsp), %xmm3 mulps %xmm12, %xmm3 movaps 0x80(%rsp), %xmm5 mulps %xmm12, %xmm5 movaps 0x90(%rsp), %xmm6 mulps %xmm12, %xmm6 cmpq $0x0, 0x28(%rsp) je 0x14e84a movq 0xe0(%r14), %rsi movq %rsi, 0xc0(%rsp) addq $0x38, %rsi movq %rsi, 0x10(%rsp) movq 0x8(%rsp), %rdi movl 0x20(%rdi,%r13,4), %r8d movq 0x28(%rsp), %r9 movq %rdx, %r10 movslq 0x60(%rsp,%r10,4), %r11 imulq $0x38, %r11, %r11 movq 0xc0(%rsp), %rsi movq (%rsi,%r11), %rdi movq 0x10(%rsp), %rsi movq (%rsi,%r11), %r11 movups (%rdi,%r8,4), %xmm7 movups (%r11,%r8,4), %xmm8 movss %xmm7, 0x180(%rsp,%r10,4) extractps $0x1, %xmm7, 0x190(%rsp,%r10,4) extractps $0x2, %xmm7, 0x1a0(%rsp,%r10,4) movss %xmm8, 0x70(%rsp,%r10,4) extractps $0x1, %xmm8, 0x80(%rsp,%r10,4) extractps $0x2, %xmm8, 0x90(%rsp,%r10,4) btcq %r10, %r9 bsfq %r9, %r10 testq %r9, %r9 jne 0x14e7d4 movaps 0x180(%rsp), %xmm1 mulps %xmm0, %xmm1 movaps 0x190(%rsp), %xmm7 mulps %xmm0, %xmm7 movaps %xmm7, 0xb0(%rsp) movaps 0x1a0(%rsp), %xmm14 mulps %xmm0, %xmm14 movaps 0x70(%rsp), %xmm7 mulps %xmm12, %xmm7 movaps 0x80(%rsp), %xmm8 mulps %xmm12, %xmm8 movaps 0x90(%rsp), %xmm9 mulps %xmm12, %xmm9 cmpq $0x0, 0x28(%rsp) je 0x14e927 movq 0xe0(%r14), %rsi leaq 0x38(%rsi), %rdi movq 0x8(%rsp), %r8 movl 0x30(%r8,%r13,4), %r8d movq 0x28(%rsp), %r9 movslq 0x60(%rsp,%rdx,4), %r10 imulq $0x38, %r10, %r10 movq (%rsi,%r10), %r11 movq (%rdi,%r10), %r10 movups (%r11,%r8,4), %xmm10 movups (%r10,%r8,4), %xmm11 movss %xmm10, 0x180(%rsp,%rdx,4) extractps $0x1, %xmm10, 0x190(%rsp,%rdx,4) extractps $0x2, %xmm10, 0x1a0(%rsp,%rdx,4) movss %xmm11, 0x70(%rsp,%rdx,4) extractps $0x1, %xmm11, 0x80(%rsp,%rdx,4) extractps $0x2, %xmm11, 0x90(%rsp,%rdx,4) btcq %rdx, %r9 bsfq %r9, %rdx testq %r9, %r9 jne 0x14e8be movaps 0x150(%rsp), %xmm4 addps %xmm2, %xmm4 movaps 0x140(%rsp), %xmm2 addps %xmm15, %xmm2 movaps 0x130(%rsp), %xmm10 addps %xmm13, %xmm10 movaps 0x260(%rsp), %xmm15 addps %xmm3, %xmm15 movaps 0x240(%rsp), %xmm11 addps %xmm5, %xmm11 movaps 0x250(%rsp), %xmm3 addps %xmm6, %xmm3 addps %xmm7, %xmm1 movaps %xmm1, 0x210(%rsp) movaps %xmm4, %xmm13 movaps 0xb0(%rsp), %xmm1 addps %xmm8, %xmm1 movaps %xmm3, %xmm8 movaps %xmm1, 0xb0(%rsp) addps %xmm9, %xmm14 movaps %xmm11, %xmm7 movaps %xmm2, %xmm11 movaps %xmm14, 0xd0(%rsp) movaps 0x180(%rsp), %xmm1 mulps %xmm0, %xmm1 movaps 0x190(%rsp), %xmm2 mulps %xmm0, %xmm2 mulps 0x1a0(%rsp), %xmm0 movaps 0x70(%rsp), %xmm6 mulps %xmm12, %xmm6 addps %xmm1, %xmm6 movaps 0x80(%rsp), %xmm14 mulps %xmm12, %xmm14 addps %xmm2, %xmm14 mulps 0x90(%rsp), %xmm12 addps %xmm0, %xmm12 movq 0x50(%rsp), %r10 movq 0x48(%rsp), %rsi movq 0x8(%rsp), %r11 jmp 0x14d738 movdqa 0x30(%rsp), %xmm9 movaps 0xb0(%rsp), %xmm5 jmp 0x14dbfd pcmpeqd %xmm10, %xmm2 pxor 0x1d9d3f7(%rip), %xmm2 # 0x1eebe20 movaps 0xb0(%rsp), %xmm5 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%rbx), %xmm12 movaps %xmm12, 0x80(%rbx) jmp 0x14dbf4 movaps 0x1d9cf8e(%rip), %xmm15 # 0x1eeb9f0 jmp 0x14e0ab movaps 0x1d9cf81(%rip), %xmm15 # 0x1eeb9f0 movdqa 0x30(%rsp), %xmm9 jmp 0x14e0ab pcmpeqd 0x1d9cf8d(%rip), %xmm2 # 0x1eeba10 pxor 0x1d9d395(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%rbx), %xmm11 movaps %xmm11, 0x80(%rbx) jmp 0x14e0a2 movaps 0x110(%rsp), %xmm0 andps %xmm9, %xmm0 movaps %xmm0, 0x110(%rsp) movmskps %xmm0, %eax testl %eax, %eax movq 0x288(%rsp), %rax je 0x14eae8 incq %rax cmpq 0x280(%rsp), %rax jb 0x14d4c7 movaps 0x110(%rsp), %xmm0 xorps 0x1d9d329(%rip), %xmm0 # 0x1eebe20 movq 0xe8(%rsp), %r9 orps 0x100(%rsp), %xmm0 movaps %xmm0, 0x100(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x14eb34 movaps 0x360(%rsp), %xmm1 blendvps %xmm0, 0x1d9ced8(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x360(%rsp) xorl %eax, %eax jmp 0x14eb37 pushq $0x3 popq %rax cmpl $0x3, %eax jne 0x14d182 jmp 0x14ec09 pushq $0x2 jmp 0x14eb36 movaps %xmm14, 0x10(%rsp) movq %r9, 0xe8(%rsp) movq 0x178(%rsp), %rdi movq %r10, 0x50(%rsp) movq %rsi, 0x48(%rsp) bsfq %r13, %rcx movq %rbp, %rdx movq %rcx, 0x30(%rsp) leaq 0x5f(%rsp), %r8 movq %rbx, %r9 pushq %r10 leaq 0x298(%rsp), %rax pushq %rax callq 0x19b1f0 popq %rcx popq %rdx testb %al, %al je 0x14eba0 movq 0x30(%rsp), %rax orl $-0x1, 0x100(%rsp,%rax,4) leaq -0x1(%r13), %rax andq %rax, %r13 movq 0x50(%rsp), %r10 movq 0x178(%rsp), %rdi movq 0x48(%rsp), %rsi jne 0x14eb69 movaps 0x100(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d9ce1c(%rip), %xmm15 # 0x1eeb9f0 movq 0xe8(%rsp), %r9 movaps 0x10(%rsp), %xmm14 je 0x14d1c9 movaps 0x360(%rsp), %xmm1 blendvps %xmm0, 0x1d9ce07(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x360(%rsp) pushq $0x2 popq %rax jmp 0x14d1c9 movaps 0x390(%rsp), %xmm0 andps 0x100(%rsp), %xmm0 movaps 0x80(%rbx), %xmm1 blendvps %xmm0, 0x1d9cdd7(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x1ab8, %rsp # imm = 0x1AB8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 257, false, embree::sse42::VirtualCurveIntersectorK<4>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x14efcb movdqa (%rdi), %xmm1 pcmpeqd %xmm0, %xmm0 pcmpeqd %xmm1, %xmm0 movmskps %xmm0, %ebp testl %ebp, %ebp je 0x14efcb movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 leaq 0x10(%rsp), %rax movaps 0x40(%rdx), %xmm5 movaps 0x50(%rdx), %xmm4 movaps 0x60(%rdx), %xmm3 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 movaps %xmm4, %xmm2 mulps %xmm4, %xmm2 addps %xmm0, %xmm2 movaps %xmm5, %xmm0 mulps %xmm5, %xmm0 addps %xmm2, %xmm0 rsqrtps %xmm0, %xmm2 movaps 0x1da306c(%rip), %xmm6 # 0x1ef1d20 mulps %xmm2, %xmm6 mulps 0x1d9de22(%rip), %xmm0 # 0x1eecae0 mulps %xmm2, %xmm0 mulps %xmm2, %xmm2 mulps %xmm0, %xmm2 addps %xmm6, %xmm2 movaps %xmm2, -0x10(%rax) movaps 0x1d9d9fb(%rip), %xmm2 # 0x1eec6d0 xorps %xmm6, %xmm6 movss 0x1d9da38(%rip), %xmm7 # 0x1eec718 movss 0x1d9de97(%rip), %xmm8 # 0x1eecb80 movq %rbp, %rcx bsfq %rcx, %rdx movss 0x40(%r14,%rdx,4), %xmm9 insertps $0x1c, 0x50(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0],mem[0],zero,zero insertps $0x28, 0x60(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0,1],mem[0],zero movss (%rsp,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm9 movaps %xmm9, %xmm11 movshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3] xorps %xmm2, %xmm0 movaps %xmm9, %xmm12 unpckhps %xmm6, %xmm12 # xmm12 = xmm12[2],xmm6[2],xmm12[3],xmm6[3] blendps $0xe, %xmm6, %xmm0 # xmm0 = xmm0[0],xmm6[1,2,3] shufps $0x41, %xmm0, %xmm12 # xmm12 = xmm12[1,0],xmm0[0,1] movaps %xmm12, %xmm13 dpps $0x7f, %xmm12, %xmm13 unpckhpd %xmm9, %xmm11 # xmm11 = xmm11[1],xmm9[1] xorps %xmm2, %xmm11 insertps $0x2a, %xmm9, %xmm11 # xmm11 = xmm11[0],zero,xmm9[0],zero movaps %xmm11, %xmm0 dpps $0x7f, %xmm11, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm12, %xmm11 movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm0 mulss %xmm7, %xmm0 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm11, %xmm0 movaps %xmm0, %xmm11 shufps $0xc9, %xmm0, %xmm11 # xmm11 = xmm11[1,2],xmm0[0,3] movaps %xmm9, %xmm12 shufps $0xc9, %xmm9, %xmm12 # xmm12 = xmm12[1,2],xmm9[0,3] mulps %xmm0, %xmm12 mulps %xmm9, %xmm11 subps %xmm12, %xmm11 shufps $0xc9, %xmm11, %xmm11 # xmm11 = xmm11[1,2,0,3] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 leaq -0x1(%rcx), %rdi imulq $0x30, %rdx, %rdx movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm14 mulss %xmm7, %xmm14 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm11, %xmm14 mulps %xmm10, %xmm9 movaps %xmm0, %xmm10 unpcklps %xmm9, %xmm10 # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps %xmm14, %xmm9 unpcklps %xmm6, %xmm9 # xmm9 = xmm9[0],xmm6[0],xmm9[1],xmm6[1] unpckhps %xmm6, %xmm14 # xmm14 = xmm14[2],xmm6[2],xmm14[3],xmm6[3] unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] movaps %xmm10, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm10 # xmm10 = xmm10[2],xmm9[2],xmm10[3],xmm9[3] movaps %xmm11, (%rax,%rdx) movaps %xmm10, 0x10(%rax,%rdx) movaps %xmm0, 0x20(%rax,%rdx) andq %rdi, %rcx jne 0x14ecec movaps (%r14), %xmm0 leaq 0xd0(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rax) movaps %xmm5, 0x30(%rax) movaps %xmm4, 0x40(%rax) movaps 0x1d9d838(%rip), %xmm2 # 0x1eec6c0 movaps %xmm5, %xmm0 andps %xmm2, %xmm0 movaps 0x1da2eab(%rip), %xmm6 # 0x1ef1d40 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm5 movaps %xmm4, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm4 pcmpeqd %xmm7, %xmm7 movaps %xmm3, 0x50(%rax) andps %xmm3, %xmm2 cmpltps %xmm6, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm6, %xmm3 pcmpeqd %xmm7, %xmm1 rcpps %xmm5, %xmm0 mulps %xmm0, %xmm5 movaps 0x1d9db3b(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm6 subps %xmm5, %xmm6 mulps %xmm0, %xmm6 addps %xmm0, %xmm6 rcpps %xmm4, %xmm5 mulps %xmm5, %xmm4 movaps %xmm2, %xmm0 subps %xmm4, %xmm0 mulps %xmm5, %xmm0 addps %xmm5, %xmm0 rcpps %xmm3, %xmm4 mulps %xmm4, %xmm3 subps %xmm3, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 movaps %xmm6, 0x60(%rax) movaps %xmm0, 0x70(%rax) movaps %xmm2, 0x80(%rax) xorps %xmm3, %xmm3 cmpltps %xmm3, %xmm6 andps 0x1dd0fa1(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm3, %xmm0 movaps 0x1dd0fa6(%rip), %xmm4 # 0x1f1fed0 blendvps %xmm0, 0x1dae2dd(%rip), %xmm4 # 0x1efd210 movaps %xmm6, 0x90(%rax) movaps %xmm4, 0xa0(%rax) cmpnltps %xmm3, %xmm2 movaps 0x1dd0fa4(%rip), %xmm4 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dd0f88(%rip), %xmm4 # 0x1f1fee0 movaps %xmm4, 0xb0(%rax) movaps 0x30(%r14), %xmm2 movaps 0x80(%r14), %xmm4 maxps %xmm3, %xmm2 movaps 0x1d9ca7a(%rip), %xmm5 # 0x1eeb9f0 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm5 maxps %xmm3, %xmm4 movaps %xmm5, 0xc0(%rax) movaps 0x1d9ca70(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r15 movq 0x70(%rbx), %rdx movq %r13, %rdi movq %rbx, %rsi movq %rsp, %r8 movq %r14, %r9 pushq %r12 leaq 0xd8(%rsp), %rax pushq %rax callq 0x19ce0e popq %rax popq %rcx andq %r15, %rbp jne 0x14ef9c addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 257, false, embree::sse42::VirtualCurveIntersectorK<4>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18d8, %rsp # imm = 0x18D8 movq (%rsi), %r11 cmpq $0x8, 0x70(%r11) je 0x14fa07 movq %rdx, %r9 pcmpeqd %xmm0, %xmm0 pcmpeqd (%rdi), %xmm0 movaps 0x80(%rdx), %xmm2 xorps %xmm5, %xmm5 movaps %xmm2, %xmm1 cmpnltps %xmm5, %xmm1 andps %xmm0, %xmm1 movaps %xmm1, 0x50(%rsp) movmskps %xmm1, %eax testl %eax, %eax je 0x14fa07 movq %rcx, %r10 movzbl %al, %eax leaq 0x170(%rsp), %rcx movaps 0x40(%r9), %xmm4 movaps 0x50(%r9), %xmm1 movaps 0x60(%r9), %xmm3 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 movaps %xmm1, %xmm6 mulps %xmm1, %xmm6 addps %xmm0, %xmm6 movaps %xmm4, %xmm0 mulps %xmm4, %xmm0 addps %xmm6, %xmm0 rsqrtps %xmm0, %xmm6 movaps 0x1da2cb5(%rip), %xmm7 # 0x1ef1d20 mulps %xmm6, %xmm7 mulps 0x1d9da6b(%rip), %xmm0 # 0x1eecae0 mulps %xmm6, %xmm0 mulps %xmm6, %xmm6 mulps %xmm0, %xmm6 addps %xmm7, %xmm6 movaps %xmm6, -0x10(%rcx) movaps 0x1d9d643(%rip), %xmm14 # 0x1eec6d0 movss 0x1d9d683(%rip), %xmm6 # 0x1eec718 movss 0x1d9dae3(%rip), %xmm7 # 0x1eecb80 bsfq %rax, %rdx movss 0x40(%r9,%rdx,4), %xmm8 insertps $0x1c, 0x50(%r9,%rdx,4), %xmm8 # xmm8 = xmm8[0],mem[0],zero,zero insertps $0x28, 0x60(%r9,%rdx,4), %xmm8 # xmm8 = xmm8[0,1],mem[0],zero movss 0x160(%rsp,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm9, %xmm8 movaps %xmm8, %xmm10 movshdup %xmm8, %xmm0 # xmm0 = xmm8[1,1,3,3] xorps %xmm14, %xmm0 movaps %xmm8, %xmm11 unpckhps %xmm5, %xmm11 # xmm11 = xmm11[2],xmm5[2],xmm11[3],xmm5[3] blendps $0xe, %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[1,2,3] shufps $0x41, %xmm0, %xmm11 # xmm11 = xmm11[1,0],xmm0[0,1] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 unpckhpd %xmm8, %xmm10 # xmm10 = xmm10[1],xmm8[1] xorps %xmm14, %xmm10 insertps $0x2a, %xmm8, %xmm10 # xmm10 = xmm10[0],zero,xmm8[0],zero movaps %xmm10, %xmm0 dpps $0x7f, %xmm10, %xmm0 cmpltps %xmm12, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm11, %xmm10 movaps %xmm10, %xmm11 dpps $0x7f, %xmm10, %xmm11 movaps %xmm11, %xmm12 rsqrtss %xmm11, %xmm12 movaps %xmm12, %xmm0 mulss %xmm6, %xmm0 mulss %xmm7, %xmm11 mulss %xmm12, %xmm11 mulss %xmm12, %xmm12 mulss %xmm11, %xmm12 subss %xmm12, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm10, %xmm0 movaps %xmm0, %xmm10 shufps $0xc9, %xmm0, %xmm10 # xmm10 = xmm10[1,2],xmm0[0,3] movaps %xmm8, %xmm11 shufps $0xc9, %xmm8, %xmm11 # xmm11 = xmm11[1,2],xmm8[0,3] mulps %xmm0, %xmm11 mulps %xmm8, %xmm10 subps %xmm11, %xmm10 shufps $0xc9, %xmm10, %xmm10 # xmm10 = xmm10[1,2,0,3] movaps %xmm10, %xmm11 dpps $0x7f, %xmm10, %xmm11 leaq -0x1(%rax), %rdi imulq $0x30, %rdx, %rdx movaps %xmm11, %xmm12 rsqrtss %xmm11, %xmm12 movaps %xmm12, %xmm13 mulss %xmm6, %xmm13 mulss %xmm7, %xmm11 mulss %xmm12, %xmm11 mulss %xmm12, %xmm12 mulss %xmm11, %xmm12 subss %xmm12, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] mulps %xmm10, %xmm13 mulps %xmm9, %xmm8 movaps %xmm0, %xmm9 unpcklps %xmm8, %xmm9 # xmm9 = xmm9[0],xmm8[0],xmm9[1],xmm8[1] unpckhps %xmm8, %xmm0 # xmm0 = xmm0[2],xmm8[2],xmm0[3],xmm8[3] movaps %xmm13, %xmm8 unpcklps %xmm5, %xmm8 # xmm8 = xmm8[0],xmm5[0],xmm8[1],xmm5[1] unpckhps %xmm5, %xmm13 # xmm13 = xmm13[2],xmm5[2],xmm13[3],xmm5[3] unpcklps %xmm13, %xmm0 # xmm0 = xmm0[0],xmm13[0],xmm0[1],xmm13[1] movaps %xmm9, %xmm10 unpcklps %xmm8, %xmm10 # xmm10 = xmm10[0],xmm8[0],xmm10[1],xmm8[1] unpckhps %xmm8, %xmm9 # xmm9 = xmm9[2],xmm8[2],xmm9[3],xmm8[3] movaps %xmm10, (%rcx,%rdx) movaps %xmm9, 0x10(%rcx,%rdx) movaps %xmm0, 0x20(%rcx,%rdx) andq %rdi, %rax jne 0x14f09d movaps (%r9), %xmm0 movaps %xmm0, 0x70(%rsp) movaps 0x10(%r9), %xmm0 movaps %xmm0, 0x80(%rsp) movaps 0x20(%r9), %xmm0 movaps %xmm0, 0x90(%rsp) movaps %xmm4, 0xa0(%rsp) movaps %xmm1, 0xb0(%rsp) movaps 0x1d9d478(%rip), %xmm5 # 0x1eec6c0 movaps %xmm4, %xmm0 andps %xmm5, %xmm0 movaps 0x1da2aeb(%rip), %xmm6 # 0x1ef1d40 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm1, %xmm0 andps %xmm5, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm1 movaps %xmm3, 0xc0(%rsp) movaps %xmm3, %xmm0 andps %xmm5, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm3 rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps 0x1d9d77f(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm5 subps %xmm4, %xmm5 mulps %xmm0, %xmm5 addps %xmm0, %xmm5 rcpps %xmm1, %xmm4 mulps %xmm4, %xmm1 movaps %xmm6, %xmm0 subps %xmm1, %xmm0 mulps %xmm4, %xmm0 addps %xmm4, %xmm0 rcpps %xmm3, %xmm4 mulps %xmm4, %xmm3 movaps %xmm6, %xmm1 subps %xmm3, %xmm1 mulps %xmm4, %xmm1 addps %xmm4, %xmm1 movaps %xmm5, 0xd0(%rsp) movaps %xmm0, 0xe0(%rsp) xorps %xmm3, %xmm3 cmpltps %xmm3, %xmm5 andps 0x1dd0be1(%rip), %xmm5 # 0x1f1fec0 movaps %xmm1, 0xf0(%rsp) movaps %xmm5, 0x100(%rsp) cmpnltps %xmm3, %xmm0 movaps 0x1dd0bd6(%rip), %xmm4 # 0x1f1fed0 blendvps %xmm0, 0x1dadf0d(%rip), %xmm4 # 0x1efd210 movaps %xmm4, 0x110(%rsp) cmpnltps %xmm3, %xmm1 movaps 0x1dd0bda(%rip), %xmm4 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dd0bbe(%rip), %xmm4 # 0x1f1fee0 movaps %xmm4, 0x120(%rsp) movaps 0x30(%r9), %xmm4 maxps %xmm3, %xmm4 maxps %xmm3, %xmm2 movaps 0x1d9c6b3(%rip), %xmm12 # 0x1eeb9f0 movaps %xmm12, %xmm1 movdqa 0x50(%rsp), %xmm0 blendvps %xmm0, %xmm4, %xmm1 movaps %xmm1, 0x130(%rsp) movaps 0x1d9c6a5(%rip), %xmm3 # 0x1eeba00 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x140(%rsp) pcmpeqd %xmm2, %xmm2 pxor %xmm0, %xmm2 movdqa %xmm2, 0x30(%rsp) cmpq $0x0, 0x8(%r10) je 0x14f391 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r15d, %r15d cmpb $0x1, %al adcq $0x2, %r15 jmp 0x14f395 pushq $0x3 popq %r15 leaq 0x240(%rsp), %r12 movq $-0x8, -0x10(%r12) leaq 0x9e0(%rsp), %r14 movaps %xmm12, -0x20(%r14) movq 0x70(%r11), %rax movq %rax, -0x8(%r12) movaps %xmm1, -0x10(%r14) leaq 0x2000bb8(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x150(%rsp) movq %r9, 0x48(%rsp) movq %r10, 0x40(%rsp) addq $-0x10, %r14 movq -0x8(%r12), %rbp addq $-0x8, %r12 cmpq $-0x8, %rbp je 0x14f92e movaps (%r14), %xmm13 movaps %xmm13, %xmm0 cmpltps 0x140(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14f932 movzbl %al, %ebx popcntl %ebx, %r13d xorl %eax, %eax cmpq %r15, %r13 jbe 0x14f937 cmpq %r15, %r13 jbe 0x14f920 testb $0x8, %bpl pushq $0x8 popq %rbx jne 0x14f834 movq %rbp, %rax movq %rbp, %rcx andq $-0x10, %rcx xorl %edx, %edx movq %rbx, %rbp movaps %xmm12, %xmm13 movq (%rcx,%rdx,8), %r8 cmpq $0x8, %r8 je 0x14f581 testb $0x7, %al jne 0x14f5a1 movss 0x20(%rax,%rdx,4), %xmm2 movss 0x30(%rax,%rdx,4), %xmm0 movss 0x40(%rax,%rdx,4), %xmm1 movss 0x50(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps 0x70(%rsp), %xmm5 movaps 0x80(%rsp), %xmm7 movaps 0x90(%rsp), %xmm4 movaps 0xd0(%rsp), %xmm8 subps %xmm5, %xmm2 mulps %xmm8, %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] subps %xmm7, %xmm1 movaps 0xe0(%rsp), %xmm9 mulps %xmm9, %xmm1 movss 0x60(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm4, %xmm3 movaps 0xf0(%rsp), %xmm10 mulps %xmm10, %xmm3 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm5, %xmm0 mulps %xmm8, %xmm0 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm7, %xmm6 mulps %xmm9, %xmm6 movss 0x70(%rax,%rdx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] subps %xmm4, %xmm11 mulps %xmm10, %xmm11 movaps %xmm2, %xmm4 pminsd %xmm0, %xmm4 movaps %xmm1, %xmm5 pminsd %xmm6, %xmm5 pmaxsd %xmm4, %xmm5 movaps %xmm3, %xmm4 pminsd %xmm11, %xmm4 pmaxsd %xmm5, %xmm4 pmaxsd %xmm0, %xmm2 pmaxsd %xmm6, %xmm1 pminsd %xmm2, %xmm1 pmaxsd %xmm11, %xmm3 pminsd %xmm1, %xmm3 movdqa 0x130(%rsp), %xmm0 pminsd 0x140(%rsp), %xmm3 pmaxsd %xmm4, %xmm0 cmpleps %xmm3, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x14f581 movaps %xmm12, %xmm1 blendvps %xmm0, %xmm4, %xmm1 cmpq $0x8, %rbp je 0x14f57a movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm13, (%r14) addq $0x10, %r14 movaps %xmm1, %xmm13 movq %r8, %rbp cmpq $0x8, %r8 je 0x14f7e6 leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x14f44c jmp 0x14f7e6 movss 0x20(%rcx,%rdx,4), %xmm2 movss 0x30(%rcx,%rdx,4), %xmm1 movss 0x40(%rcx,%rdx,4), %xmm3 movss 0x50(%rcx,%rdx,4), %xmm5 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x60(%rcx,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x70(%rcx,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm4 movaps %xmm0, 0x10(%rsp) movss 0x80(%rcx,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x90(%rcx,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0xa0(%rcx,%rdx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movaps 0xb0(%rsp), %xmm6 movaps 0xc0(%rsp), %xmm0 movaps %xmm10, %xmm11 mulps %xmm0, %xmm11 movaps %xmm9, %xmm12 mulps %xmm0, %xmm12 movaps %xmm5, %xmm14 mulps %xmm6, %xmm14 addps %xmm11, %xmm14 movaps %xmm7, %xmm15 mulps %xmm6, %xmm15 addps %xmm12, %xmm15 movaps 0xa0(%rsp), %xmm12 mulps %xmm8, %xmm0 mulps %xmm4, %xmm6 addps %xmm0, %xmm6 movaps %xmm13, 0x20(%rsp) movaps %xmm2, %xmm13 mulps %xmm12, %xmm13 addps %xmm14, %xmm13 movaps 0x1d9d059(%rip), %xmm14 # 0x1eec6d0 movaps %xmm1, %xmm11 mulps %xmm12, %xmm11 addps %xmm15, %xmm11 mulps %xmm3, %xmm12 movaps %xmm13, %xmm0 movaps 0x1d9d02d(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 movaps 0x1da26a2(%rip), %xmm4 # 0x1ef1d40 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm4, %xmm13 movaps %xmm11, %xmm0 andps %xmm15, %xmm0 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm4, %xmm11 addps %xmm6, %xmm12 movaps %xmm12, %xmm0 andps %xmm15, %xmm0 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm4, %xmm12 rcpps %xmm13, %xmm6 mulps %xmm6, %xmm13 movaps 0x1d9d331(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm0 subps %xmm13, %xmm0 mulps %xmm6, %xmm0 addps %xmm6, %xmm0 rcpps %xmm11, %xmm13 mulps %xmm13, %xmm11 movaps %xmm4, %xmm6 subps %xmm11, %xmm6 mulps %xmm13, %xmm6 addps %xmm13, %xmm6 rcpps %xmm12, %xmm13 mulps %xmm13, %xmm12 movaps %xmm4, %xmm11 subps %xmm12, %xmm11 movss 0xb0(%rcx,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm13, %xmm11 addps %xmm13, %xmm11 movaps 0x90(%rsp), %xmm13 mulps %xmm13, %xmm10 addps %xmm12, %xmm10 movss 0xc0(%rcx,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm13, %xmm9 addps %xmm12, %xmm9 mulps %xmm13, %xmm8 movaps 0x20(%rsp), %xmm13 movss 0xd0(%rcx,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] addps %xmm12, %xmm8 movaps 0x80(%rsp), %xmm12 mulps %xmm12, %xmm5 addps %xmm10, %xmm5 mulps %xmm12, %xmm7 addps %xmm9, %xmm7 movaps 0x10(%rsp), %xmm4 mulps %xmm12, %xmm4 movaps 0x1d9c257(%rip), %xmm12 # 0x1eeb9f0 addps %xmm8, %xmm4 movaps 0x70(%rsp), %xmm8 mulps %xmm8, %xmm2 addps %xmm5, %xmm2 movaps %xmm0, %xmm5 xorps %xmm14, %xmm5 mulps %xmm5, %xmm2 mulps %xmm8, %xmm1 addps %xmm7, %xmm1 movaps %xmm6, %xmm5 xorps %xmm14, %xmm5 mulps %xmm5, %xmm1 mulps %xmm8, %xmm3 addps %xmm4, %xmm3 movaps %xmm11, %xmm4 xorps %xmm14, %xmm4 mulps %xmm4, %xmm3 addps %xmm2, %xmm0 addps %xmm1, %xmm6 addps %xmm3, %xmm11 jmp 0x14f4fb xorl %eax, %eax cmpq $0x8, %rbp je 0x14f82d movaps 0x140(%rsp), %xmm0 cmpnleps %xmm13, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r15 jae 0x14f81d testb %cl, %cl je 0x14f920 testb $0x8, %bpl je 0x14f439 jmp 0x14f834 movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm13, (%r14) addq $0x10, %r14 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x14f809 cmpq $-0x8, %rbp je 0x14f92e movq %r11, (%rsp) movaps 0x140(%rsp), %xmm0 cmpnleps %xmm13, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x14f9dc andq $-0x10, %rbp movaps 0x30(%rsp), %xmm1 movzbl (%rbp), %eax movq %rsi, 0x8(%rsp) movq 0x8(%rsi), %rcx movaps 0x150(%rsp), %xmm0 movaps %xmm0, 0x60(%rsp) movaps %xmm1, 0x10(%rsp) movmskps %xmm1, %edx xorl $0xf, %edx je 0x14f8d8 movzbl %dl, %ebx shll $0x6, %eax addq %rcx, %rax addq $0x18, %rax movq %rax, 0x20(%rsp) bsfq %rbx, %r13 leaq 0x160(%rsp), %rdi movq %r9, %rsi movq %r13, %rdx movq %r10, %rcx movq %rbp, %r8 movq 0x20(%rsp), %rax callq *(%rax) testb %al, %al je 0x14f8c5 orl $-0x1, 0x60(%rsp,%r13,4) leaq -0x1(%rbx), %rax andq %rax, %rbx movq 0x48(%rsp), %r9 movq 0x40(%rsp), %r10 jne 0x14f89c movaps 0x10(%rsp), %xmm0 orps 0x60(%rsp), %xmm0 movaps %xmm0, 0x30(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x14f90c movaps 0x140(%rsp), %xmm1 blendvps %xmm0, 0x1d9c100(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x140(%rsp) xorl %eax, %eax jmp 0x14f90f pushq $0x3 popq %rax movq 0x8(%rsp), %rsi movq (%rsp), %r11 movaps 0x1d9c0d0(%rip), %xmm12 # 0x1eeb9f0 cmpl $0x3, %eax jne 0x14f3dd jmp 0x14f9e4 pushq $0x3 jmp 0x14f934 pushq $0x2 popq %rax jmp 0x14f920 movaps %xmm13, 0x20(%rsp) movq %rsi, 0x8(%rsp) movq %r11, (%rsp) bsfq %rbx, %rcx movq %rsi, %rdi movq %r11, %rsi movq %rbp, %rdx movq %rcx, 0x10(%rsp) leaq 0x160(%rsp), %r8 pushq %r10 leaq 0x78(%rsp), %rax pushq %rax callq 0x19d564 popq %rcx popq %rdx testb %al, %al je 0x14f97d movq 0x10(%rsp), %rax orl $-0x1, 0x30(%rsp,%rax,4) leaq -0x1(%rbx), %rax andq %rax, %rbx movq 0x48(%rsp), %r9 movq 0x40(%rsp), %r10 movq 0x8(%rsp), %rsi movq (%rsp), %r11 jne 0x14f946 movaps 0x30(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d9c041(%rip), %xmm12 # 0x1eeb9f0 movaps 0x20(%rsp), %xmm13 je 0x14f423 movaps 0x140(%rsp), %xmm1 blendvps %xmm0, 0x1d9c034(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x140(%rsp) pushq $0x2 popq %rax jmp 0x14f423 pushq $0x2 popq %rax jmp 0x14f914 movaps 0x50(%rsp), %xmm0 andps 0x30(%rsp), %xmm0 movaps 0x80(%r9), %xmm1 blendvps %xmm0, 0x1d9c001(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%r9) addq $0x18d8, %rsp # imm = 0x18D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16781328, false, embree::sse42::VirtualCurveIntersectorK<4>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x14fda3 movdqa (%rdi), %xmm1 pcmpeqd %xmm0, %xmm0 pcmpeqd %xmm1, %xmm0 movmskps %xmm0, %ebp testl %ebp, %ebp je 0x14fda3 movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 leaq 0x10(%rsp), %rax movaps 0x40(%rdx), %xmm5 movaps 0x50(%rdx), %xmm4 movaps 0x60(%rdx), %xmm3 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 movaps %xmm4, %xmm2 mulps %xmm4, %xmm2 addps %xmm0, %xmm2 movaps %xmm5, %xmm0 mulps %xmm5, %xmm0 addps %xmm2, %xmm0 rsqrtps %xmm0, %xmm2 movaps 0x1da2294(%rip), %xmm6 # 0x1ef1d20 mulps %xmm2, %xmm6 mulps 0x1d9d04a(%rip), %xmm0 # 0x1eecae0 mulps %xmm2, %xmm0 mulps %xmm2, %xmm2 mulps %xmm0, %xmm2 addps %xmm6, %xmm2 movaps %xmm2, -0x10(%rax) movaps 0x1d9cc23(%rip), %xmm2 # 0x1eec6d0 xorps %xmm6, %xmm6 movss 0x1d9cc60(%rip), %xmm7 # 0x1eec718 movss 0x1d9d0bf(%rip), %xmm8 # 0x1eecb80 movq %rbp, %rcx bsfq %rcx, %rdx movss 0x40(%r14,%rdx,4), %xmm9 insertps $0x1c, 0x50(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0],mem[0],zero,zero insertps $0x28, 0x60(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0,1],mem[0],zero movss (%rsp,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm9 movaps %xmm9, %xmm11 movshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3] xorps %xmm2, %xmm0 movaps %xmm9, %xmm12 unpckhps %xmm6, %xmm12 # xmm12 = xmm12[2],xmm6[2],xmm12[3],xmm6[3] blendps $0xe, %xmm6, %xmm0 # xmm0 = xmm0[0],xmm6[1,2,3] shufps $0x41, %xmm0, %xmm12 # xmm12 = xmm12[1,0],xmm0[0,1] movaps %xmm12, %xmm13 dpps $0x7f, %xmm12, %xmm13 unpckhpd %xmm9, %xmm11 # xmm11 = xmm11[1],xmm9[1] xorps %xmm2, %xmm11 insertps $0x2a, %xmm9, %xmm11 # xmm11 = xmm11[0],zero,xmm9[0],zero movaps %xmm11, %xmm0 dpps $0x7f, %xmm11, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm12, %xmm11 movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm0 mulss %xmm7, %xmm0 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm11, %xmm0 movaps %xmm0, %xmm11 shufps $0xc9, %xmm0, %xmm11 # xmm11 = xmm11[1,2],xmm0[0,3] movaps %xmm9, %xmm12 shufps $0xc9, %xmm9, %xmm12 # xmm12 = xmm12[1,2],xmm9[0,3] mulps %xmm0, %xmm12 mulps %xmm9, %xmm11 subps %xmm12, %xmm11 shufps $0xc9, %xmm11, %xmm11 # xmm11 = xmm11[1,2,0,3] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 leaq -0x1(%rcx), %rdi imulq $0x30, %rdx, %rdx movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm14 mulss %xmm7, %xmm14 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm11, %xmm14 mulps %xmm10, %xmm9 movaps %xmm0, %xmm10 unpcklps %xmm9, %xmm10 # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps %xmm14, %xmm9 unpcklps %xmm6, %xmm9 # xmm9 = xmm9[0],xmm6[0],xmm9[1],xmm6[1] unpckhps %xmm6, %xmm14 # xmm14 = xmm14[2],xmm6[2],xmm14[3],xmm6[3] unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] movaps %xmm10, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm10 # xmm10 = xmm10[2],xmm9[2],xmm10[3],xmm9[3] movaps %xmm11, (%rax,%rdx) movaps %xmm10, 0x10(%rax,%rdx) movaps %xmm0, 0x20(%rax,%rdx) andq %rdi, %rcx jne 0x14fac4 movaps (%r14), %xmm0 leaq 0xd0(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rax) movaps %xmm5, 0x30(%rax) movaps %xmm4, 0x40(%rax) movaps 0x1d9ca60(%rip), %xmm2 # 0x1eec6c0 movaps %xmm5, %xmm0 andps %xmm2, %xmm0 movaps 0x1da20d3(%rip), %xmm6 # 0x1ef1d40 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm5 movaps %xmm4, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm4 pcmpeqd %xmm7, %xmm7 movaps %xmm3, 0x50(%rax) andps %xmm3, %xmm2 cmpltps %xmm6, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm6, %xmm3 pcmpeqd %xmm7, %xmm1 rcpps %xmm5, %xmm0 mulps %xmm0, %xmm5 movaps 0x1d9cd63(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm6 subps %xmm5, %xmm6 mulps %xmm0, %xmm6 addps %xmm0, %xmm6 rcpps %xmm4, %xmm5 mulps %xmm5, %xmm4 movaps %xmm2, %xmm0 subps %xmm4, %xmm0 mulps %xmm5, %xmm0 addps %xmm5, %xmm0 rcpps %xmm3, %xmm4 mulps %xmm4, %xmm3 subps %xmm3, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 movaps %xmm6, 0x60(%rax) movaps %xmm0, 0x70(%rax) movaps %xmm2, 0x80(%rax) xorps %xmm3, %xmm3 cmpltps %xmm3, %xmm6 andps 0x1dd01c9(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm3, %xmm0 movaps 0x1dd01ce(%rip), %xmm4 # 0x1f1fed0 blendvps %xmm0, 0x1dad505(%rip), %xmm4 # 0x1efd210 movaps %xmm6, 0x90(%rax) movaps %xmm4, 0xa0(%rax) cmpnltps %xmm3, %xmm2 movaps 0x1dd01cc(%rip), %xmm4 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dd01b0(%rip), %xmm4 # 0x1f1fee0 movaps %xmm4, 0xb0(%rax) movaps 0x30(%r14), %xmm2 movaps 0x80(%r14), %xmm4 maxps %xmm3, %xmm2 movaps 0x1d9bca2(%rip), %xmm5 # 0x1eeb9f0 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm5 maxps %xmm3, %xmm4 movaps %xmm5, 0xc0(%rax) movaps 0x1d9bc98(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r15 movq 0x70(%rbx), %rdx movq %r13, %rdi movq %rbx, %rsi movq %rsp, %r8 movq %r14, %r9 pushq %r12 leaq 0xd8(%rsp), %rax pushq %rax callq 0x19dae4 popq %rax popq %rcx andq %r15, %rbp jne 0x14fd74 addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16781328, false, embree::sse42::VirtualCurveIntersectorK<4>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1928, %rsp # imm = 0x1928 movq (%rsi), %r9 cmpq $0x8, 0x70(%r9) je 0x1509dd movq %rdx, %rbx pcmpeqd %xmm0, %xmm0 pcmpeqd (%rdi), %xmm0 movaps 0x80(%rdx), %xmm2 xorps %xmm5, %xmm5 movaps %xmm2, %xmm1 cmpnltps %xmm5, %xmm1 andps %xmm0, %xmm1 movaps %xmm1, 0x60(%rsp) movmskps %xmm1, %eax testl %eax, %eax je 0x1509dd movq %rcx, %r10 movzbl %al, %eax leaq 0x1c0(%rsp), %rcx movaps 0x40(%rbx), %xmm4 movaps 0x50(%rbx), %xmm1 movaps 0x60(%rbx), %xmm3 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 movaps %xmm1, %xmm6 mulps %xmm1, %xmm6 addps %xmm0, %xmm6 movaps %xmm4, %xmm0 mulps %xmm4, %xmm0 addps %xmm6, %xmm0 rsqrtps %xmm0, %xmm6 movaps 0x1da1ee0(%rip), %xmm7 # 0x1ef1d20 mulps %xmm6, %xmm7 mulps 0x1d9cc96(%rip), %xmm0 # 0x1eecae0 mulps %xmm6, %xmm0 mulps %xmm6, %xmm6 mulps %xmm0, %xmm6 addps %xmm7, %xmm6 movaps %xmm6, -0x10(%rcx) movaps 0x1d9c86f(%rip), %xmm6 # 0x1eec6d0 movss 0x1d9c8af(%rip), %xmm7 # 0x1eec718 movss 0x1d9cd0e(%rip), %xmm8 # 0x1eecb80 bsfq %rax, %rdx movss 0x40(%rbx,%rdx,4), %xmm9 insertps $0x1c, 0x50(%rbx,%rdx,4), %xmm9 # xmm9 = xmm9[0],mem[0],zero,zero insertps $0x28, 0x60(%rbx,%rdx,4), %xmm9 # xmm9 = xmm9[0,1],mem[0],zero movss 0x1b0(%rsp,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm9 movaps %xmm9, %xmm11 movshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3] xorps %xmm6, %xmm0 movaps %xmm9, %xmm12 unpckhps %xmm5, %xmm12 # xmm12 = xmm12[2],xmm5[2],xmm12[3],xmm5[3] blendps $0xe, %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[1,2,3] shufps $0x41, %xmm0, %xmm12 # xmm12 = xmm12[1,0],xmm0[0,1] movaps %xmm12, %xmm13 dpps $0x7f, %xmm12, %xmm13 unpckhpd %xmm9, %xmm11 # xmm11 = xmm11[1],xmm9[1] xorps %xmm6, %xmm11 insertps $0x2a, %xmm9, %xmm11 # xmm11 = xmm11[0],zero,xmm9[0],zero movaps %xmm11, %xmm0 dpps $0x7f, %xmm11, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm12, %xmm11 movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm0 mulss %xmm7, %xmm0 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm11, %xmm0 movaps %xmm0, %xmm11 shufps $0xc9, %xmm0, %xmm11 # xmm11 = xmm11[1,2],xmm0[0,3] movaps %xmm9, %xmm12 shufps $0xc9, %xmm9, %xmm12 # xmm12 = xmm12[1,2],xmm9[0,3] mulps %xmm0, %xmm12 mulps %xmm9, %xmm11 subps %xmm12, %xmm11 shufps $0xc9, %xmm11, %xmm11 # xmm11 = xmm11[1,2,0,3] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 leaq -0x1(%rax), %rdi imulq $0x30, %rdx, %rdx movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm14 mulss %xmm7, %xmm14 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm11, %xmm14 mulps %xmm10, %xmm9 movaps %xmm0, %xmm10 unpcklps %xmm9, %xmm10 # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps %xmm14, %xmm9 unpcklps %xmm5, %xmm9 # xmm9 = xmm9[0],xmm5[0],xmm9[1],xmm5[1] unpckhps %xmm5, %xmm14 # xmm14 = xmm14[2],xmm5[2],xmm14[3],xmm5[3] unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] movaps %xmm10, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm10 # xmm10 = xmm10[2],xmm9[2],xmm10[3],xmm9[3] movaps %xmm11, (%rcx,%rdx) movaps %xmm10, 0x10(%rcx,%rdx) movaps %xmm0, 0x20(%rcx,%rdx) andq %rdi, %rax jne 0x14fe72 movaps (%rbx), %xmm0 movaps %xmm0, 0x80(%rsp) movaps 0x10(%rbx), %xmm0 movaps %xmm0, 0x90(%rsp) movaps 0x20(%rbx), %xmm0 movaps %xmm0, 0xa0(%rsp) movaps %xmm4, 0xb0(%rsp) movaps %xmm1, 0xc0(%rsp) movaps 0x1d9c6a4(%rip), %xmm5 # 0x1eec6c0 movaps %xmm4, %xmm0 andps %xmm5, %xmm0 movaps 0x1da1d17(%rip), %xmm6 # 0x1ef1d40 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm1, %xmm0 andps %xmm5, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm1 movaps %xmm3, 0xd0(%rsp) movaps %xmm3, %xmm0 andps %xmm5, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm3 rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps 0x1d9c9ab(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm5 subps %xmm4, %xmm5 mulps %xmm0, %xmm5 addps %xmm0, %xmm5 rcpps %xmm1, %xmm4 mulps %xmm4, %xmm1 movaps %xmm6, %xmm0 subps %xmm1, %xmm0 mulps %xmm4, %xmm0 addps %xmm4, %xmm0 rcpps %xmm3, %xmm4 mulps %xmm4, %xmm3 movaps %xmm6, %xmm1 subps %xmm3, %xmm1 mulps %xmm4, %xmm1 addps %xmm4, %xmm1 movaps %xmm5, 0xe0(%rsp) movaps %xmm0, 0xf0(%rsp) xorps %xmm4, %xmm4 cmpltps %xmm4, %xmm5 andps 0x1dcfe0d(%rip), %xmm5 # 0x1f1fec0 movaps %xmm1, 0x100(%rsp) movaps %xmm5, 0x110(%rsp) cmpnltps %xmm4, %xmm0 movaps 0x1dcfe02(%rip), %xmm3 # 0x1f1fed0 blendvps %xmm0, 0x1dad139(%rip), %xmm3 # 0x1efd210 movaps %xmm3, 0x120(%rsp) cmpnltps %xmm4, %xmm1 movaps 0x1dcfe06(%rip), %xmm3 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dcfdea(%rip), %xmm3 # 0x1f1fee0 movaps %xmm3, 0x130(%rsp) movaps 0x30(%rbx), %xmm3 maxps %xmm4, %xmm3 maxps %xmm4, %xmm2 movaps 0x1d9b8e0(%rip), %xmm13 # 0x1eeb9f0 movaps %xmm13, %xmm1 movdqa 0x60(%rsp), %xmm0 blendvps %xmm0, %xmm3, %xmm1 movaps %xmm1, 0x140(%rsp) movaps 0x1d9b8d2(%rip), %xmm3 # 0x1eeba00 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x150(%rsp) pcmpeqd %xmm2, %xmm2 pxor %xmm0, %xmm2 movdqa %xmm2, 0x40(%rsp) cmpq $0x0, 0x8(%r10) je 0x150164 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r11d, %r11d cmpb $0x1, %al adcq $0x2, %r11 jmp 0x150168 pushq $0x3 popq %r11 leaq 0x290(%rsp), %r12 movq $-0x8, -0x10(%r12) leaq 0xa30(%rsp), %r14 movaps %xmm13, -0x20(%r14) movq 0x70(%r9), %rax movq %rax, -0x8(%r12) movaps %xmm1, -0x10(%r14) leaq 0x1fffde5(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x160(%rsp) movq %r10, 0x58(%rsp) addq $-0x10, %r14 movq -0x8(%r12), %rbp addq $-0x8, %r12 cmpq $-0x8, %rbp je 0x1508fb movaps (%r14), %xmm14 movaps %xmm14, %xmm0 cmpltps 0x150(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1508ff movzbl %al, %r15d popcntl %r15d, %r13d xorl %eax, %eax cmpq %r11, %r13 jbe 0x150904 cmpq %r11, %r13 jbe 0x1508ed pushq $0x8 popq %r15 testb $0x8, %bpl jne 0x1507fb movaps 0x150(%rsp), %xmm0 movq %rbp, %rax andq $-0x10, %rax movl %ebp, %ecx andl $0x7, %ecx cmpnleps %xmm14, %xmm0 movaps %xmm0, 0x30(%rsp) xorl %edx, %edx movq %r15, %rbp movaps %xmm13, %xmm14 movq (%rax,%rdx,8), %r8 cmpq $0x8, %r8 je 0x15079d cmpl $0x6, %ecx je 0x15024c cmpl $0x1, %ecx jne 0x1503f2 movss 0x80(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x20(%rax,%rdx,4), %xmm1 movss 0x30(%rax,%rdx,4), %xmm6 movss 0x40(%rax,%rdx,4), %xmm5 movss 0x50(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x70(%rbx), %xmm2 mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movss 0xa0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm3 addps %xmm5, %xmm3 movss 0xc0(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm1 addps %xmm5, %xmm1 movss 0x90(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm6, %xmm5 movss 0xb0(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm7 addps %xmm4, %xmm7 movss 0xd0(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm6 addps %xmm4, %xmm6 movaps 0x80(%rsp), %xmm4 movaps 0x90(%rsp), %xmm8 movaps 0xa0(%rsp), %xmm9 movaps 0xe0(%rsp), %xmm10 subps %xmm4, %xmm0 mulps %xmm10, %xmm0 subps %xmm8, %xmm3 movaps 0xf0(%rsp), %xmm11 mulps %xmm11, %xmm3 subps %xmm9, %xmm1 movaps 0x100(%rsp), %xmm12 mulps %xmm12, %xmm1 subps %xmm4, %xmm5 mulps %xmm10, %xmm5 subps %xmm8, %xmm7 mulps %xmm11, %xmm7 subps %xmm9, %xmm6 mulps %xmm12, %xmm6 movaps %xmm0, %xmm4 pminsd %xmm5, %xmm4 movaps %xmm3, %xmm8 pminsd %xmm7, %xmm8 pmaxsd %xmm4, %xmm8 movaps %xmm1, %xmm4 pminsd %xmm6, %xmm4 pmaxsd %xmm8, %xmm4 pmaxsd %xmm0, %xmm5 pmaxsd %xmm3, %xmm7 pminsd %xmm5, %xmm7 pmaxsd %xmm1, %xmm6 pminsd %xmm7, %xmm6 movdqa 0x140(%rsp), %xmm0 pmaxsd %xmm4, %xmm0 pminsd 0x150(%rsp), %xmm6 cmpleps %xmm6, %xmm0 cmpl $0x6, %ecx jne 0x150766 movss 0xe0(%rax,%rdx,4), %xmm1 movss 0xf0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cmpleps %xmm2, %xmm1 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] cmpltps %xmm3, %xmm2 andps %xmm1, %xmm2 andps %xmm2, %xmm0 jmp 0x150766 movss 0x20(%rax,%rdx,4), %xmm15 movss 0x30(%rax,%rdx,4), %xmm1 movss 0x40(%rax,%rdx,4), %xmm0 movss 0x50(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm15, 0x190(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, %xmm8 movaps %xmm1, 0x1a0(%rsp) shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm5 movaps %xmm0, 0x170(%rsp) shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, %xmm4 movaps %xmm3, 0x10(%rsp) movss 0x60(%rax,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm14, 0x20(%rsp) movaps %xmm0, %xmm14 movaps %xmm0, 0x180(%rsp) movss 0x80(%rax,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x90(%rax,%rdx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0xa0(%rax,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0xe0(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xf0(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps 0xc0(%rsp), %xmm0 movaps 0xd0(%rsp), %xmm2 movaps %xmm12, %xmm1 mulps %xmm2, %xmm1 movaps %xmm11, %xmm3 mulps %xmm2, %xmm3 mulps %xmm0, %xmm4 addps %xmm1, %xmm4 movaps %xmm9, %xmm13 mulps %xmm0, %xmm13 addps %xmm3, %xmm13 movaps 0xb0(%rsp), %xmm1 mulps %xmm10, %xmm2 mulps %xmm14, %xmm0 addps %xmm2, %xmm0 movaps %xmm15, %xmm3 mulps %xmm1, %xmm3 addps %xmm4, %xmm3 movaps %xmm8, %xmm2 mulps %xmm1, %xmm2 addps %xmm13, %xmm2 movss 0x100(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm5, %xmm1 addps %xmm0, %xmm1 movaps %xmm3, %xmm0 movaps 0x1d9c198(%rip), %xmm5 # 0x1eec6c0 andps %xmm5, %xmm0 movaps 0x1da180d(%rip), %xmm13 # 0x1ef1d40 cmpltps %xmm13, %xmm0 blendvps %xmm0, %xmm13, %xmm3 movaps %xmm2, %xmm0 andps %xmm5, %xmm0 cmpltps %xmm13, %xmm0 blendvps %xmm0, %xmm13, %xmm2 movaps %xmm1, %xmm0 andps %xmm5, %xmm0 cmpltps %xmm13, %xmm0 blendvps %xmm0, %xmm13, %xmm1 movss 0x110(%rax,%rdx,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x120(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x130(%rax,%rdx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movaps 0x70(%rbx), %xmm15 movaps 0x1d9c478(%rip), %xmm8 # 0x1eeca10 movaps %xmm8, %xmm0 subps %xmm15, %xmm0 mulps %xmm15, %xmm7 mulps %xmm15, %xmm6 mulps %xmm15, %xmm4 mulps %xmm15, %xmm14 mulps %xmm15, %xmm5 mulps %xmm15, %xmm13 addps %xmm0, %xmm14 addps %xmm0, %xmm5 addps %xmm0, %xmm13 movaps %xmm0, %xmm15 mulps 0x1d9b441(%rip), %xmm15 # 0x1eeba10 addps %xmm15, %xmm7 addps %xmm15, %xmm6 addps %xmm4, %xmm15 rcpps %xmm3, %xmm0 mulps %xmm0, %xmm3 movaps %xmm8, %xmm4 subps %xmm3, %xmm4 mulps %xmm0, %xmm4 addps %xmm0, %xmm4 rcpps %xmm2, %xmm0 mulps %xmm0, %xmm2 movaps %xmm8, %xmm3 subps %xmm2, %xmm3 mulps %xmm0, %xmm3 addps %xmm0, %xmm3 rcpps %xmm1, %xmm0 mulps %xmm0, %xmm1 movaps %xmm8, %xmm2 subps %xmm1, %xmm2 mulps %xmm0, %xmm2 addps %xmm0, %xmm2 movss 0xb0(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0xa0(%rsp), %xmm1 mulps %xmm1, %xmm12 addps %xmm0, %xmm12 movss 0xc0(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm1, %xmm11 addps %xmm0, %xmm11 mulps %xmm1, %xmm10 movss 0xd0(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] addps %xmm0, %xmm10 movaps 0x90(%rsp), %xmm0 movaps 0x10(%rsp), %xmm1 mulps %xmm0, %xmm1 addps %xmm12, %xmm1 movaps %xmm1, %xmm8 mulps %xmm0, %xmm9 addps %xmm11, %xmm9 movaps 0x180(%rsp), %xmm1 mulps %xmm0, %xmm1 addps %xmm10, %xmm1 movaps %xmm1, %xmm11 movaps 0x80(%rsp), %xmm0 movaps 0x190(%rsp), %xmm1 mulps %xmm0, %xmm1 addps %xmm8, %xmm1 movaps %xmm1, %xmm10 movaps 0x1a0(%rsp), %xmm1 mulps %xmm0, %xmm1 addps %xmm9, %xmm1 movaps %xmm1, %xmm8 movaps 0x170(%rsp), %xmm1 mulps %xmm0, %xmm1 addps %xmm11, %xmm1 subps %xmm10, %xmm7 subps %xmm10, %xmm14 mulps %xmm4, %xmm7 mulps %xmm4, %xmm14 subps %xmm8, %xmm6 subps %xmm8, %xmm5 mulps %xmm3, %xmm6 mulps %xmm3, %xmm5 subps %xmm1, %xmm15 mulps %xmm2, %xmm15 subps %xmm1, %xmm13 mulps %xmm2, %xmm13 movaps %xmm7, %xmm0 pminsd %xmm14, %xmm0 movaps %xmm6, %xmm1 pminsd %xmm5, %xmm1 pmaxsd %xmm0, %xmm1 movaps %xmm15, %xmm4 pminsd %xmm13, %xmm4 pmaxsd %xmm1, %xmm4 pmaxsd %xmm7, %xmm14 pmaxsd %xmm6, %xmm5 pminsd %xmm14, %xmm5 movaps 0x20(%rsp), %xmm14 pmaxsd %xmm15, %xmm13 pminsd %xmm5, %xmm13 movdqa 0x140(%rsp), %xmm0 pmaxsd %xmm4, %xmm0 pminsd 0x150(%rsp), %xmm13 cmpleps %xmm13, %xmm0 movaps 0x1d9b28a(%rip), %xmm13 # 0x1eeb9f0 andps 0x30(%rsp), %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x15079d movaps %xmm13, %xmm1 blendvps %xmm0, %xmm4, %xmm1 cmpq $0x8, %rbp je 0x150796 movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm14, (%r14) addq $0x10, %r14 movaps %xmm1, %xmm14 movq %r8, %rbp cmpq $0x8, %r8 je 0x1507b4 leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x150230 xorl %eax, %eax cmpq $0x8, %rbp je 0x1507f4 movaps 0x150(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r11 jae 0x1507e4 testb %cl, %cl jne 0x1501ff jmp 0x1508ed movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm14, (%r14) addq $0x10, %r14 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x1507d7 cmpq $-0x8, %rbp je 0x1508fb movq %r11, 0x10(%rsp) movq %r9, (%rsp) movaps 0x150(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1509b4 andq $-0x10, %rbp movaps 0x40(%rsp), %xmm1 movzbl (%rbp), %eax movq %rsi, 0x8(%rsp) movq 0x8(%rsi), %rcx movaps 0x160(%rsp), %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm1, 0x20(%rsp) movmskps %xmm1, %edx xorl $0xf, %edx je 0x1508a0 movzbl %dl, %r15d shll $0x6, %eax addq %rcx, %rax addq $0x18, %rax movq %rax, 0x30(%rsp) bsfq %r15, %r13 leaq 0x1b0(%rsp), %rdi movq %rbx, %rsi movq %r13, %rdx movq %r10, %rcx movq %rbp, %r8 movq 0x30(%rsp), %rax callq *(%rax) testb %al, %al je 0x150892 orl $-0x1, 0x70(%rsp,%r13,4) leaq -0x1(%r15), %rax andq %rax, %r15 movq 0x58(%rsp), %r10 jne 0x150869 movaps 0x20(%rsp), %xmm0 orps 0x70(%rsp), %xmm0 movaps %xmm0, 0x40(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x1508d4 movaps 0x150(%rsp), %xmm1 blendvps %xmm0, 0x1d9b138(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x150(%rsp) xorl %eax, %eax jmp 0x1508d7 pushq $0x3 popq %rax movq 0x8(%rsp), %rsi movq (%rsp), %r9 movaps 0x1d9b108(%rip), %xmm13 # 0x1eeb9f0 movq 0x10(%rsp), %r11 cmpl $0x3, %eax jne 0x1501ab jmp 0x1509bc pushq $0x3 jmp 0x150901 pushq $0x2 popq %rax jmp 0x1508ed movaps %xmm14, 0x20(%rsp) movq %r11, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %r9, (%rsp) bsfq %r15, %rcx movq %rsi, %rdi movq %r9, %rsi movq %rbp, %rdx movq %rcx, 0x30(%rsp) leaq 0x1b0(%rsp), %r8 movq %rbx, %r9 pushq %r10 leaq 0x88(%rsp), %rax pushq %rax callq 0x19e3b2 popq %rcx popq %rdx testb %al, %al je 0x150955 movq 0x30(%rsp), %rax orl $-0x1, 0x40(%rsp,%rax,4) leaq -0x1(%r15), %rax andq %rax, %r15 movq 0x58(%rsp), %r10 movq 0x8(%rsp), %rsi movq (%rsp), %r9 jne 0x150918 movaps 0x40(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d9b06e(%rip), %xmm13 # 0x1eeb9f0 movq 0x10(%rsp), %r11 movaps 0x20(%rsp), %xmm14 je 0x1501f2 movaps 0x150(%rsp), %xmm1 blendvps %xmm0, 0x1d9b05c(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x150(%rsp) pushq $0x2 popq %rax jmp 0x1501f2 pushq $0x2 popq %rax jmp 0x1508dc movaps 0x60(%rsp), %xmm0 andps 0x40(%rsp), %xmm0 movaps 0x80(%rbx), %xmm1 blendvps %xmm0, 0x1d9b02a(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x1928, %rsp # imm = 0x1928 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 257, true, embree::sse42::VirtualCurveIntersectorK<4>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x150d67 movdqa (%rdi), %xmm1 pcmpeqd %xmm0, %xmm0 pcmpeqd %xmm1, %xmm0 movmskps %xmm0, %ebp testl %ebp, %ebp je 0x150d67 movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 leaq 0x10(%rsp), %rax movaps 0x40(%rdx), %xmm4 movaps 0x50(%rdx), %xmm2 movaps 0x60(%rdx), %xmm6 movaps %xmm6, %xmm0 mulps %xmm6, %xmm0 movaps %xmm2, %xmm3 mulps %xmm2, %xmm3 addps %xmm0, %xmm3 movaps %xmm4, %xmm0 mulps %xmm4, %xmm0 addps %xmm3, %xmm0 rsqrtps %xmm0, %xmm3 movaps 0x1da12be(%rip), %xmm5 # 0x1ef1d20 mulps %xmm3, %xmm5 mulps 0x1d9c074(%rip), %xmm0 # 0x1eecae0 mulps %xmm3, %xmm0 mulps %xmm3, %xmm3 mulps %xmm0, %xmm3 addps %xmm5, %xmm3 movaps %xmm3, -0x10(%rax) movaps 0x1d9bc4d(%rip), %xmm3 # 0x1eec6d0 xorps %xmm5, %xmm5 movss 0x1d9bc8a(%rip), %xmm7 # 0x1eec718 movss 0x1d9c0e9(%rip), %xmm8 # 0x1eecb80 movq %rbp, %rcx bsfq %rcx, %rdx movss 0x40(%r14,%rdx,4), %xmm9 insertps $0x1c, 0x50(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0],mem[0],zero,zero insertps $0x28, 0x60(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0,1],mem[0],zero movss (%rsp,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm9 movaps %xmm9, %xmm11 movshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3] xorps %xmm3, %xmm0 movaps %xmm9, %xmm12 unpckhps %xmm5, %xmm12 # xmm12 = xmm12[2],xmm5[2],xmm12[3],xmm5[3] blendps $0xe, %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[1,2,3] shufps $0x41, %xmm0, %xmm12 # xmm12 = xmm12[1,0],xmm0[0,1] movaps %xmm12, %xmm13 dpps $0x7f, %xmm12, %xmm13 unpckhpd %xmm9, %xmm11 # xmm11 = xmm11[1],xmm9[1] xorps %xmm3, %xmm11 insertps $0x2a, %xmm9, %xmm11 # xmm11 = xmm11[0],zero,xmm9[0],zero movaps %xmm11, %xmm0 dpps $0x7f, %xmm11, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm12, %xmm11 movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm0 mulss %xmm7, %xmm0 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm11, %xmm0 movaps %xmm0, %xmm11 shufps $0xc9, %xmm0, %xmm11 # xmm11 = xmm11[1,2],xmm0[0,3] movaps %xmm9, %xmm12 shufps $0xc9, %xmm9, %xmm12 # xmm12 = xmm12[1,2],xmm9[0,3] mulps %xmm0, %xmm12 mulps %xmm9, %xmm11 subps %xmm12, %xmm11 shufps $0xc9, %xmm11, %xmm11 # xmm11 = xmm11[1,2,0,3] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 leaq -0x1(%rcx), %rdi imulq $0x30, %rdx, %rdx movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm14 mulss %xmm7, %xmm14 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm11, %xmm14 mulps %xmm10, %xmm9 movaps %xmm0, %xmm10 unpcklps %xmm9, %xmm10 # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps %xmm14, %xmm9 unpcklps %xmm5, %xmm9 # xmm9 = xmm9[0],xmm5[0],xmm9[1],xmm5[1] unpckhps %xmm5, %xmm14 # xmm14 = xmm14[2],xmm5[2],xmm14[3],xmm5[3] unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] movaps %xmm10, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm10 # xmm10 = xmm10[2],xmm9[2],xmm10[3],xmm9[3] movaps %xmm11, (%rax,%rdx) movaps %xmm10, 0x10(%rax,%rdx) movaps %xmm0, 0x20(%rax,%rdx) andq %rdi, %rcx jne 0x150a9a pcmpeqd %xmm0, %xmm0 pcmpeqd %xmm0, %xmm1 movaps (%r14), %xmm0 leaq 0xd0(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rax) movaps %xmm4, 0x30(%rax) movaps %xmm2, 0x40(%rax) movaps %xmm6, 0x50(%rax) movaps 0x1d9ba7e(%rip), %xmm5 # 0x1eec6c0 movaps %xmm4, %xmm0 andps %xmm5, %xmm0 movaps 0x1da10f0(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps 0x1d9bdb4(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm7 divps %xmm4, %xmm7 movaps %xmm3, %xmm4 divps %xmm2, %xmm4 andps %xmm5, %xmm2 cmpltps %xmm8, %xmm2 andps %xmm6, %xmm5 cmpltps %xmm8, %xmm5 movaps 0x1dcbcb0(%rip), %xmm8 # 0x1f1c930 blendvps %xmm0, %xmm8, %xmm7 divps %xmm6, %xmm3 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm8, %xmm4 movaps %xmm5, %xmm0 blendvps %xmm0, %xmm8, %xmm3 movaps %xmm7, 0x60(%rax) movaps %xmm4, 0x70(%rax) movaps %xmm3, 0x80(%rax) xorps %xmm2, %xmm2 cmpltps %xmm2, %xmm7 andps 0x1dcf208(%rip), %xmm7 # 0x1f1fec0 cmpnltps %xmm2, %xmm4 movaps 0x1dcf20d(%rip), %xmm5 # 0x1f1fed0 movaps %xmm4, %xmm0 blendvps %xmm0, 0x1dac541(%rip), %xmm5 # 0x1efd210 movaps %xmm7, 0x90(%rax) movaps %xmm5, 0xa0(%rax) cmpnltps %xmm2, %xmm3 movaps 0x1dcf208(%rip), %xmm4 # 0x1f1fef0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1dcf1ec(%rip), %xmm4 # 0x1f1fee0 movaps %xmm4, 0xb0(%rax) movaps 0x30(%r14), %xmm3 movaps 0x80(%r14), %xmm4 maxps %xmm2, %xmm3 movaps 0x1d9acde(%rip), %xmm5 # 0x1eeb9f0 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm3, %xmm5 maxps %xmm2, %xmm4 movaps %xmm5, 0xc0(%rax) movaps 0x1d9acd4(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r15 movq 0x70(%rbx), %rdx movq %r13, %rdi movq %rbx, %rsi movq %rsp, %r8 movq %r14, %r9 pushq %r12 leaq 0xd8(%rsp), %rax pushq %rax callq 0x19eaa2 popq %rax popq %rcx andq %r15, %rbp jne 0x150d38 addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 257, true, embree::sse42::VirtualCurveIntersectorK<4>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18d8, %rsp # imm = 0x18D8 movq (%rsi), %r8 cmpq $0x8, 0x70(%r8) je 0x15187a movq %rdx, %r9 pcmpeqd %xmm0, %xmm0 pcmpeqd (%rdi), %xmm0 movaps 0x80(%rdx), %xmm5 xorps %xmm4, %xmm4 movaps %xmm5, %xmm1 cmpnltps %xmm4, %xmm1 andps %xmm0, %xmm1 movaps %xmm1, 0x50(%rsp) movmskps %xmm1, %eax testl %eax, %eax je 0x15187a movq %rcx, %r10 movzbl %al, %eax leaq 0x170(%rsp), %rcx movaps 0x40(%r9), %xmm3 movaps 0x50(%r9), %xmm2 movaps 0x60(%r9), %xmm1 movaps %xmm1, %xmm0 mulps %xmm1, %xmm0 movaps %xmm2, %xmm6 mulps %xmm2, %xmm6 addps %xmm0, %xmm6 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 addps %xmm6, %xmm0 rsqrtps %xmm0, %xmm6 movaps 0x1da0f19(%rip), %xmm7 # 0x1ef1d20 mulps %xmm6, %xmm7 mulps 0x1d9bccf(%rip), %xmm0 # 0x1eecae0 mulps %xmm6, %xmm0 mulps %xmm6, %xmm6 mulps %xmm0, %xmm6 addps %xmm7, %xmm6 movaps %xmm6, -0x10(%rcx) movaps 0x1d9b8a7(%rip), %xmm14 # 0x1eec6d0 movss 0x1d9b8e7(%rip), %xmm6 # 0x1eec718 movss 0x1d9bd47(%rip), %xmm7 # 0x1eecb80 bsfq %rax, %rdx movss 0x40(%r9,%rdx,4), %xmm8 insertps $0x1c, 0x50(%r9,%rdx,4), %xmm8 # xmm8 = xmm8[0],mem[0],zero,zero insertps $0x28, 0x60(%r9,%rdx,4), %xmm8 # xmm8 = xmm8[0,1],mem[0],zero movss 0x160(%rsp,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm9, %xmm8 movaps %xmm8, %xmm10 movshdup %xmm8, %xmm0 # xmm0 = xmm8[1,1,3,3] xorps %xmm14, %xmm0 movaps %xmm8, %xmm11 unpckhps %xmm4, %xmm11 # xmm11 = xmm11[2],xmm4[2],xmm11[3],xmm4[3] blendps $0xe, %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[1,2,3] shufps $0x41, %xmm0, %xmm11 # xmm11 = xmm11[1,0],xmm0[0,1] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 unpckhpd %xmm8, %xmm10 # xmm10 = xmm10[1],xmm8[1] xorps %xmm14, %xmm10 insertps $0x2a, %xmm8, %xmm10 # xmm10 = xmm10[0],zero,xmm8[0],zero movaps %xmm10, %xmm0 dpps $0x7f, %xmm10, %xmm0 cmpltps %xmm12, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm11, %xmm10 movaps %xmm10, %xmm11 dpps $0x7f, %xmm10, %xmm11 movaps %xmm11, %xmm12 rsqrtss %xmm11, %xmm12 movaps %xmm12, %xmm0 mulss %xmm6, %xmm0 mulss %xmm7, %xmm11 mulss %xmm12, %xmm11 mulss %xmm12, %xmm12 mulss %xmm11, %xmm12 subss %xmm12, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm10, %xmm0 movaps %xmm0, %xmm10 shufps $0xc9, %xmm0, %xmm10 # xmm10 = xmm10[1,2],xmm0[0,3] movaps %xmm8, %xmm11 shufps $0xc9, %xmm8, %xmm11 # xmm11 = xmm11[1,2],xmm8[0,3] mulps %xmm0, %xmm11 mulps %xmm8, %xmm10 subps %xmm11, %xmm10 shufps $0xc9, %xmm10, %xmm10 # xmm10 = xmm10[1,2,0,3] movaps %xmm10, %xmm11 dpps $0x7f, %xmm10, %xmm11 leaq -0x1(%rax), %rdi imulq $0x30, %rdx, %rdx movaps %xmm11, %xmm12 rsqrtss %xmm11, %xmm12 movaps %xmm12, %xmm13 mulss %xmm6, %xmm13 mulss %xmm7, %xmm11 mulss %xmm12, %xmm11 mulss %xmm12, %xmm12 mulss %xmm11, %xmm12 subss %xmm12, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] mulps %xmm10, %xmm13 mulps %xmm9, %xmm8 movaps %xmm0, %xmm9 unpcklps %xmm8, %xmm9 # xmm9 = xmm9[0],xmm8[0],xmm9[1],xmm8[1] unpckhps %xmm8, %xmm0 # xmm0 = xmm0[2],xmm8[2],xmm0[3],xmm8[3] movaps %xmm13, %xmm8 unpcklps %xmm4, %xmm8 # xmm8 = xmm8[0],xmm4[0],xmm8[1],xmm4[1] unpckhps %xmm4, %xmm13 # xmm13 = xmm13[2],xmm4[2],xmm13[3],xmm4[3] unpcklps %xmm13, %xmm0 # xmm0 = xmm0[0],xmm13[0],xmm0[1],xmm13[1] movaps %xmm9, %xmm10 unpcklps %xmm8, %xmm10 # xmm10 = xmm10[0],xmm8[0],xmm10[1],xmm8[1] unpckhps %xmm8, %xmm9 # xmm9 = xmm9[2],xmm8[2],xmm9[3],xmm8[3] movaps %xmm10, (%rcx,%rdx) movaps %xmm9, 0x10(%rcx,%rdx) movaps %xmm0, 0x20(%rcx,%rdx) andq %rdi, %rax jne 0x150e39 movaps (%r9), %xmm0 movaps %xmm0, 0x70(%rsp) movaps 0x10(%r9), %xmm0 movaps %xmm0, 0x80(%rsp) movaps 0x20(%r9), %xmm0 movaps %xmm0, 0x90(%rsp) movaps %xmm3, 0xa0(%rsp) movaps %xmm2, 0xb0(%rsp) movaps %xmm1, 0xc0(%rsp) movaps 0x1d9b6d4(%rip), %xmm7 # 0x1eec6c0 movaps %xmm3, %xmm0 andps %xmm7, %xmm0 movaps 0x1da0d46(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps 0x1d9ba09(%rip), %xmm9 # 0x1eeca10 movaps %xmm9, %xmm6 divps %xmm3, %xmm6 movaps %xmm9, %xmm4 divps %xmm2, %xmm4 andps %xmm7, %xmm2 cmpltps %xmm8, %xmm2 movaps %xmm9, %xmm3 divps %xmm1, %xmm3 andps %xmm7, %xmm1 cmpltps %xmm8, %xmm1 movaps 0x1dcb8fd(%rip), %xmm7 # 0x1f1c930 blendvps %xmm0, %xmm7, %xmm6 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm7, %xmm4 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm3 movaps %xmm6, 0xd0(%rsp) movaps %xmm4, 0xe0(%rsp) xorps %xmm1, %xmm1 cmpltps %xmm1, %xmm6 andps 0x1dcee5a(%rip), %xmm6 # 0x1f1fec0 movaps %xmm3, 0xf0(%rsp) movaps %xmm6, 0x100(%rsp) cmpnltps %xmm1, %xmm4 movaps 0x1dcee4f(%rip), %xmm2 # 0x1f1fed0 movaps %xmm4, %xmm0 blendvps %xmm0, 0x1dac183(%rip), %xmm2 # 0x1efd210 movaps %xmm2, 0x110(%rsp) cmpnltps %xmm1, %xmm3 movaps 0x1dcee50(%rip), %xmm2 # 0x1f1fef0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1dcee34(%rip), %xmm2 # 0x1f1fee0 movaps %xmm2, 0x120(%rsp) movaps 0x30(%r9), %xmm2 maxps %xmm1, %xmm2 maxps %xmm1, %xmm5 movaps 0x1d9a929(%rip), %xmm11 # 0x1eeb9f0 movaps %xmm11, %xmm1 movdqa 0x50(%rsp), %xmm0 blendvps %xmm0, %xmm2, %xmm1 movaps %xmm1, 0x130(%rsp) movaps 0x1d9a91b(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0x140(%rsp) pcmpeqd %xmm2, %xmm2 pxor %xmm0, %xmm2 movdqa %xmm2, 0x20(%rsp) cmpq $0x0, 0x8(%r10) je 0x15111b movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r15d, %r15d cmpb $0x1, %al adcq $0x2, %r15 jmp 0x15111f pushq $0x3 popq %r15 leaq 0x240(%rsp), %r12 movq $-0x8, -0x10(%r12) leaq 0x9e0(%rsp), %r14 movaps %xmm11, -0x20(%r14) movq 0x70(%r8), %rax movq %rax, -0x8(%r12) movaps %xmm1, -0x10(%r14) leaq 0x1ffee2e(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x150(%rsp) pushq $0x3 popq %r11 movaps 0x1da0c17(%rip), %xmm12 # 0x1ef1d80 movaps 0x1da0c1f(%rip), %xmm13 # 0x1ef1d90 pmovsxbd 0x1dcf7a5(%rip), %xmm14 # 0x1f20920 movq %r9, 0x38(%rsp) movq %r10, 0x30(%rsp) addq $-0x10, %r14 movq -0x8(%r12), %rbp addq $-0x8, %r12 cmpq $-0x8, %rbp je 0x151847 movaps (%r14), %xmm2 movaps %xmm2, %xmm0 cmpltps 0x140(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15177d movzbl %al, %ebx popcntl %ebx, %r13d xorl %eax, %eax cmpq %r15, %r13 jbe 0x151782 cmpq %r15, %r13 jbe 0x15176f testb $0x8, %bpl pushq $0x8 popq %rbx jne 0x151651 movq %rbp, %rax movq %rbp, %rcx andq $-0x10, %rcx xorl %edx, %edx movq %rbx, %rbp movaps %xmm11, %xmm2 movq (%rcx,%rdx,8), %rdi cmpq $0x8, %rdi je 0x151327 movaps %xmm2, 0x10(%rsp) testb $0x7, %al jne 0x151347 movss 0x20(%rax,%rdx,4), %xmm1 movss 0x30(%rax,%rdx,4), %xmm2 movss 0x40(%rax,%rdx,4), %xmm0 movss 0x50(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x70(%rsp), %xmm6 movaps 0x80(%rsp), %xmm7 movaps 0x90(%rsp), %xmm4 movaps 0xd0(%rsp), %xmm8 subps %xmm6, %xmm1 mulps %xmm8, %xmm1 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm7, %xmm0 movaps 0xe0(%rsp), %xmm9 mulps %xmm9, %xmm0 movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm4, %xmm5 movaps 0xf0(%rsp), %xmm10 mulps %xmm10, %xmm5 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm6, %xmm2 mulps %xmm8, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm7, %xmm3 mulps %xmm9, %xmm3 movss 0x70(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm4, %xmm6 mulps %xmm10, %xmm6 movaps %xmm1, %xmm4 minps %xmm2, %xmm4 movaps %xmm0, %xmm7 minps %xmm3, %xmm7 maxps %xmm7, %xmm4 movaps %xmm5, %xmm7 minps %xmm6, %xmm7 maxps %xmm7, %xmm4 mulps %xmm12, %xmm4 maxps %xmm2, %xmm1 maxps %xmm3, %xmm0 minps %xmm0, %xmm1 maxps %xmm6, %xmm5 minps %xmm5, %xmm1 movaps %xmm4, %xmm0 maxps 0x130(%rsp), %xmm0 mulps %xmm13, %xmm1 minps 0x140(%rsp), %xmm1 cmpleps %xmm1, %xmm0 ptest %xmm14, %xmm0 je 0x1515fa pslld $0x1f, %xmm0 movaps %xmm11, %xmm1 blendvps %xmm0, %xmm4, %xmm1 cmpq $0x8, %rbp je 0x151321 movq %rbp, (%r12) addq $0x8, %r12 movdqa 0x10(%rsp), %xmm0 movdqa %xmm0, (%r14) addq $0x10, %r14 movaps %xmm1, %xmm2 movq %rdi, %rbp cmpq $0x8, %rdi je 0x151604 leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x1511f3 jmp 0x151604 movss 0x20(%rcx,%rdx,4), %xmm3 movss 0x30(%rcx,%rdx,4), %xmm2 movss 0x40(%rcx,%rdx,4), %xmm1 movss 0x50(%rcx,%rdx,4), %xmm5 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x60(%rcx,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rcx,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x80(%rcx,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x90(%rcx,%rdx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movss 0xa0(%rcx,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movaps 0xb0(%rsp), %xmm10 movaps 0xc0(%rsp), %xmm0 movaps %xmm9, %xmm11 mulps %xmm0, %xmm11 movaps %xmm8, %xmm12 mulps %xmm0, %xmm12 movaps %xmm5, %xmm13 mulps %xmm10, %xmm13 addps %xmm11, %xmm13 movaps %xmm6, %xmm14 mulps %xmm10, %xmm14 addps %xmm12, %xmm14 movaps 0xa0(%rsp), %xmm12 mulps %xmm7, %xmm0 mulps %xmm4, %xmm10 addps %xmm0, %xmm10 movaps %xmm3, %xmm11 mulps %xmm12, %xmm11 addps %xmm13, %xmm11 movaps %xmm2, %xmm13 mulps %xmm12, %xmm13 addps %xmm14, %xmm13 mulps %xmm1, %xmm12 movaps %xmm11, %xmm0 movaps 0x1d9b29d(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 movaps 0x1da0911(%rip), %xmm14 # 0x1ef1d40 cmpltps %xmm14, %xmm0 blendvps %xmm0, %xmm14, %xmm11 movaps %xmm13, %xmm0 andps %xmm15, %xmm0 cmpltps %xmm14, %xmm0 blendvps %xmm0, %xmm14, %xmm13 addps %xmm10, %xmm12 movaps %xmm12, %xmm0 andps %xmm15, %xmm0 movaps 0x1d9b26f(%rip), %xmm15 # 0x1eec6d0 cmpltps %xmm14, %xmm0 blendvps %xmm0, %xmm14, %xmm12 rcpps %xmm11, %xmm10 mulps %xmm10, %xmm11 movaps 0x1d9b594(%rip), %xmm14 # 0x1eeca10 movaps %xmm14, %xmm0 subps %xmm11, %xmm0 mulps %xmm10, %xmm0 addps %xmm10, %xmm0 rcpps %xmm13, %xmm10 mulps %xmm10, %xmm13 movaps %xmm14, %xmm11 subps %xmm13, %xmm11 mulps %xmm10, %xmm11 addps %xmm10, %xmm11 rcpps %xmm12, %xmm13 mulps %xmm13, %xmm12 movaps %xmm14, %xmm10 pmovsxbd 0x1dcf466(%rip), %xmm14 # 0x1f20920 subps %xmm12, %xmm10 movss 0xb0(%rcx,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm13, %xmm10 addps %xmm13, %xmm10 movaps 0x90(%rsp), %xmm13 mulps %xmm13, %xmm9 addps %xmm12, %xmm9 movss 0xc0(%rcx,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm13, %xmm8 addps %xmm12, %xmm8 mulps %xmm13, %xmm7 movaps 0x1da0887(%rip), %xmm13 # 0x1ef1d90 movss 0xd0(%rcx,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] addps %xmm12, %xmm7 movaps 0x80(%rsp), %xmm12 mulps %xmm12, %xmm5 addps %xmm9, %xmm5 mulps %xmm12, %xmm6 addps %xmm8, %xmm6 mulps %xmm12, %xmm4 movaps 0x1da083f(%rip), %xmm12 # 0x1ef1d80 addps %xmm7, %xmm4 movaps 0x70(%rsp), %xmm7 mulps %xmm7, %xmm3 addps %xmm5, %xmm3 movaps %xmm0, %xmm5 xorps %xmm15, %xmm5 mulps %xmm5, %xmm3 mulps %xmm7, %xmm2 addps %xmm6, %xmm2 movaps %xmm11, %xmm5 xorps %xmm15, %xmm5 mulps %xmm5, %xmm2 mulps %xmm7, %xmm1 movaps %xmm10, %xmm5 xorps %xmm15, %xmm5 addps %xmm4, %xmm1 mulps %xmm5, %xmm1 addps %xmm3, %xmm0 addps %xmm2, %xmm11 addps %xmm1, %xmm10 movaps %xmm3, %xmm4 pminsd %xmm0, %xmm4 movaps %xmm2, %xmm5 pminsd %xmm11, %xmm5 pmaxsd %xmm4, %xmm5 movaps %xmm1, %xmm4 pminsd %xmm10, %xmm4 pmaxsd %xmm5, %xmm4 pmaxsd %xmm3, %xmm0 pmaxsd %xmm2, %xmm11 pminsd %xmm0, %xmm11 pmaxsd %xmm1, %xmm10 pminsd %xmm11, %xmm10 movaps 0x1d9a421(%rip), %xmm11 # 0x1eeb9f0 mulps %xmm12, %xmm4 mulps %xmm13, %xmm10 movdqa 0x130(%rsp), %xmm0 pmaxsd %xmm4, %xmm0 pminsd 0x140(%rsp), %xmm10 cmpleps %xmm10, %xmm0 jmp 0x1512ea movaps 0x10(%rsp), %xmm2 jmp 0x151327 xorl %eax, %eax cmpq $0x8, %rbp je 0x15164a movaps 0x140(%rsp), %xmm0 cmpnleps %xmm2, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r15 jae 0x15163a testb %cl, %cl je 0x15176f testb $0x8, %bpl je 0x1511e0 jmp 0x151651 movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm2, (%r14) addq $0x10, %r14 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x151626 cmpq $-0x8, %rbp je 0x151843 movq %r8, (%rsp) movaps 0x140(%rsp), %xmm0 cmpnleps %xmm2, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15184f andq $-0x10, %rbp movaps 0x20(%rsp), %xmm1 movzbl (%rbp), %eax movq %rsi, 0x8(%rsp) movq 0x8(%rsi), %rcx movaps 0x150(%rsp), %xmm0 movaps %xmm0, 0x60(%rsp) movaps %xmm1, 0x40(%rsp) movmskps %xmm1, %edx xorl $0xf, %edx je 0x1516f4 movzbl %dl, %ebx shll $0x6, %eax addq %rcx, %rax addq $0x18, %rax movq %rax, 0x10(%rsp) bsfq %rbx, %r13 leaq 0x160(%rsp), %rdi movq %r9, %rsi movq %r13, %rdx movq %r10, %rcx movq %rbp, %r8 movq 0x10(%rsp), %rax callq *(%rax) testb %al, %al je 0x1516e1 orl $-0x1, 0x60(%rsp,%r13,4) leaq -0x1(%rbx), %rax andq %rax, %rbx movq 0x38(%rsp), %r9 movq 0x30(%rsp), %r10 jne 0x1516b8 movaps 0x40(%rsp), %xmm0 orps 0x60(%rsp), %xmm0 movaps %xmm0, 0x20(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x15173d movaps 0x140(%rsp), %xmm1 blendvps %xmm0, 0x1d9a2e4(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x140(%rsp) xorl %eax, %eax movq 0x8(%rsp), %rsi movq (%rsp), %r8 movaps 0x1d9a2b9(%rip), %xmm11 # 0x1eeb9f0 pushq $0x3 popq %r11 jmp 0x151755 pushq $0x3 popq %r11 movl %r11d, %eax movq 0x8(%rsp), %rsi movq (%rsp), %r8 movaps 0x1d9a29b(%rip), %xmm11 # 0x1eeb9f0 movaps 0x1da0623(%rip), %xmm12 # 0x1ef1d80 movaps 0x1da062b(%rip), %xmm13 # 0x1ef1d90 pmovsxbd 0x1dcf1b1(%rip), %xmm14 # 0x1f20920 cmpl $0x3, %eax jne 0x151185 jmp 0x151857 pushq $0x2 popq %rax jmp 0x15176f movaps %xmm2, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %r8, (%rsp) bsfq %rbx, %rcx movq %rsi, %rdi movq %r8, %rsi movq %rbp, %rdx movq %rcx, 0x40(%rsp) leaq 0x160(%rsp), %r8 pushq %r10 leaq 0x78(%rsp), %rax pushq %rax callq 0x19f284 popq %rcx popq %rdx testb %al, %al je 0x1517c7 movq 0x40(%rsp), %rax orl $-0x1, 0x20(%rsp,%rax,4) leaq -0x1(%rbx), %rax andq %rax, %rbx movq 0x38(%rsp), %r9 movq 0x30(%rsp), %r10 movq 0x8(%rsp), %rsi movq (%rsp), %r8 jne 0x151790 movaps 0x20(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %r11 movl %r11d, %eax cmpl $0xf, %ecx movaps 0x1d9a1f3(%rip), %xmm11 # 0x1eeb9f0 movaps 0x1da057b(%rip), %xmm12 # 0x1ef1d80 movaps 0x1da0583(%rip), %xmm13 # 0x1ef1d90 pmovsxbd 0x1dcf109(%rip), %xmm14 # 0x1f20920 movaps 0x10(%rsp), %xmm2 je 0x1511ca movaps 0x140(%rsp), %xmm1 blendvps %xmm0, 0x1d9a1cd(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x140(%rsp) pushq $0x2 popq %rax jmp 0x1511ca pushq $0x3 popq %r11 movl %r11d, %eax jmp 0x15176f pushq $0x2 popq %rax jmp 0x15172b movaps 0x50(%rsp), %xmm0 andps 0x20(%rsp), %xmm0 movaps 0x80(%r9), %xmm1 blendvps %xmm0, 0x1d9a18e(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%r9) addq $0x18d8, %rsp # imm = 0x18D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16781328, true, embree::sse42::VirtualCurveIntersectorK<4>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x151c03 movdqa (%rdi), %xmm1 pcmpeqd %xmm0, %xmm0 pcmpeqd %xmm1, %xmm0 movmskps %xmm0, %ebp testl %ebp, %ebp je 0x151c03 movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 leaq 0x10(%rsp), %rax movaps 0x40(%rdx), %xmm4 movaps 0x50(%rdx), %xmm2 movaps 0x60(%rdx), %xmm6 movaps %xmm6, %xmm0 mulps %xmm6, %xmm0 movaps %xmm2, %xmm3 mulps %xmm2, %xmm3 addps %xmm0, %xmm3 movaps %xmm4, %xmm0 mulps %xmm4, %xmm0 addps %xmm3, %xmm0 rsqrtps %xmm0, %xmm3 movaps 0x1da0422(%rip), %xmm5 # 0x1ef1d20 mulps %xmm3, %xmm5 mulps 0x1d9b1d8(%rip), %xmm0 # 0x1eecae0 mulps %xmm3, %xmm0 mulps %xmm3, %xmm3 mulps %xmm0, %xmm3 addps %xmm5, %xmm3 movaps %xmm3, -0x10(%rax) movaps 0x1d9adb1(%rip), %xmm3 # 0x1eec6d0 xorps %xmm5, %xmm5 movss 0x1d9adee(%rip), %xmm7 # 0x1eec718 movss 0x1d9b24d(%rip), %xmm8 # 0x1eecb80 movq %rbp, %rcx bsfq %rcx, %rdx movss 0x40(%r14,%rdx,4), %xmm9 insertps $0x1c, 0x50(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0],mem[0],zero,zero insertps $0x28, 0x60(%r14,%rdx,4), %xmm9 # xmm9 = xmm9[0,1],mem[0],zero movss (%rsp,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm9 movaps %xmm9, %xmm11 movshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3] xorps %xmm3, %xmm0 movaps %xmm9, %xmm12 unpckhps %xmm5, %xmm12 # xmm12 = xmm12[2],xmm5[2],xmm12[3],xmm5[3] blendps $0xe, %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[1,2,3] shufps $0x41, %xmm0, %xmm12 # xmm12 = xmm12[1,0],xmm0[0,1] movaps %xmm12, %xmm13 dpps $0x7f, %xmm12, %xmm13 unpckhpd %xmm9, %xmm11 # xmm11 = xmm11[1],xmm9[1] xorps %xmm3, %xmm11 insertps $0x2a, %xmm9, %xmm11 # xmm11 = xmm11[0],zero,xmm9[0],zero movaps %xmm11, %xmm0 dpps $0x7f, %xmm11, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm12, %xmm11 movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm0 mulss %xmm7, %xmm0 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm11, %xmm0 movaps %xmm0, %xmm11 shufps $0xc9, %xmm0, %xmm11 # xmm11 = xmm11[1,2],xmm0[0,3] movaps %xmm9, %xmm12 shufps $0xc9, %xmm9, %xmm12 # xmm12 = xmm12[1,2],xmm9[0,3] mulps %xmm0, %xmm12 mulps %xmm9, %xmm11 subps %xmm12, %xmm11 shufps $0xc9, %xmm11, %xmm11 # xmm11 = xmm11[1,2,0,3] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 leaq -0x1(%rcx), %rdi imulq $0x30, %rdx, %rdx movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm14 mulss %xmm7, %xmm14 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm11, %xmm14 mulps %xmm10, %xmm9 movaps %xmm0, %xmm10 unpcklps %xmm9, %xmm10 # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps %xmm14, %xmm9 unpcklps %xmm5, %xmm9 # xmm9 = xmm9[0],xmm5[0],xmm9[1],xmm5[1] unpckhps %xmm5, %xmm14 # xmm14 = xmm14[2],xmm5[2],xmm14[3],xmm5[3] unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] movaps %xmm10, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm10 # xmm10 = xmm10[2],xmm9[2],xmm10[3],xmm9[3] movaps %xmm11, (%rax,%rdx) movaps %xmm10, 0x10(%rax,%rdx) movaps %xmm0, 0x20(%rax,%rdx) andq %rdi, %rcx jne 0x151936 pcmpeqd %xmm0, %xmm0 pcmpeqd %xmm0, %xmm1 movaps (%r14), %xmm0 leaq 0xd0(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rax) movaps %xmm4, 0x30(%rax) movaps %xmm2, 0x40(%rax) movaps %xmm6, 0x50(%rax) movaps 0x1d9abe2(%rip), %xmm5 # 0x1eec6c0 movaps %xmm4, %xmm0 andps %xmm5, %xmm0 movaps 0x1da0254(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps 0x1d9af18(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm7 divps %xmm4, %xmm7 movaps %xmm3, %xmm4 divps %xmm2, %xmm4 andps %xmm5, %xmm2 cmpltps %xmm8, %xmm2 andps %xmm6, %xmm5 cmpltps %xmm8, %xmm5 movaps 0x1dcae14(%rip), %xmm8 # 0x1f1c930 blendvps %xmm0, %xmm8, %xmm7 divps %xmm6, %xmm3 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm8, %xmm4 movaps %xmm5, %xmm0 blendvps %xmm0, %xmm8, %xmm3 movaps %xmm7, 0x60(%rax) movaps %xmm4, 0x70(%rax) movaps %xmm3, 0x80(%rax) xorps %xmm2, %xmm2 cmpltps %xmm2, %xmm7 andps 0x1dce36c(%rip), %xmm7 # 0x1f1fec0 cmpnltps %xmm2, %xmm4 movaps 0x1dce371(%rip), %xmm5 # 0x1f1fed0 movaps %xmm4, %xmm0 blendvps %xmm0, 0x1dab6a5(%rip), %xmm5 # 0x1efd210 movaps %xmm7, 0x90(%rax) movaps %xmm5, 0xa0(%rax) cmpnltps %xmm2, %xmm3 movaps 0x1dce36c(%rip), %xmm4 # 0x1f1fef0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1dce350(%rip), %xmm4 # 0x1f1fee0 movaps %xmm4, 0xb0(%rax) movaps 0x30(%r14), %xmm3 movaps 0x80(%r14), %xmm4 maxps %xmm2, %xmm3 movaps 0x1d99e42(%rip), %xmm5 # 0x1eeb9f0 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm3, %xmm5 maxps %xmm2, %xmm4 movaps %xmm5, 0xc0(%rax) movaps 0x1d99e38(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r15 movq 0x70(%rbx), %rdx movq %r13, %rdi movq %rbx, %rsi movq %rsp, %r8 movq %r14, %r9 pushq %r12 leaq 0xd8(%rsp), %rax pushq %rax callq 0x19f89c popq %rax popq %rcx andq %r15, %rbp jne 0x151bd4 addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16781328, true, embree::sse42::VirtualCurveIntersectorK<4>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1948, %rsp # imm = 0x1948 movq (%rsi), %r9 cmpq $0x8, 0x70(%r9) je 0x1528b0 movq %rdx, %rbx pcmpeqd %xmm0, %xmm0 pcmpeqd (%rdi), %xmm0 movaps 0x80(%rdx), %xmm5 xorps %xmm4, %xmm4 movaps %xmm5, %xmm1 cmpnltps %xmm4, %xmm1 andps %xmm0, %xmm1 movaps %xmm1, 0x70(%rsp) movmskps %xmm1, %eax testl %eax, %eax je 0x1528b0 movq %rcx, %r10 movzbl %al, %eax leaq 0x1e0(%rsp), %rcx movaps 0x40(%rbx), %xmm3 movaps 0x50(%rbx), %xmm2 movaps 0x60(%rbx), %xmm1 movaps %xmm1, %xmm0 mulps %xmm1, %xmm0 movaps %xmm2, %xmm6 mulps %xmm2, %xmm6 addps %xmm0, %xmm6 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 addps %xmm6, %xmm0 rsqrtps %xmm0, %xmm6 movaps 0x1da0080(%rip), %xmm7 # 0x1ef1d20 mulps %xmm6, %xmm7 mulps 0x1d9ae36(%rip), %xmm0 # 0x1eecae0 mulps %xmm6, %xmm0 mulps %xmm6, %xmm6 mulps %xmm0, %xmm6 addps %xmm7, %xmm6 movaps %xmm6, -0x10(%rcx) movaps 0x1d9aa0f(%rip), %xmm6 # 0x1eec6d0 movss 0x1d9aa4f(%rip), %xmm7 # 0x1eec718 movss 0x1d9aeae(%rip), %xmm8 # 0x1eecb80 bsfq %rax, %rdx movss 0x40(%rbx,%rdx,4), %xmm9 insertps $0x1c, 0x50(%rbx,%rdx,4), %xmm9 # xmm9 = xmm9[0],mem[0],zero,zero insertps $0x28, 0x60(%rbx,%rdx,4), %xmm9 # xmm9 = xmm9[0,1],mem[0],zero movss 0x1d0(%rsp,%rdx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm9 movaps %xmm9, %xmm11 movshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3] xorps %xmm6, %xmm0 movaps %xmm9, %xmm12 unpckhps %xmm4, %xmm12 # xmm12 = xmm12[2],xmm4[2],xmm12[3],xmm4[3] blendps $0xe, %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[1,2,3] shufps $0x41, %xmm0, %xmm12 # xmm12 = xmm12[1,0],xmm0[0,1] movaps %xmm12, %xmm13 dpps $0x7f, %xmm12, %xmm13 unpckhpd %xmm9, %xmm11 # xmm11 = xmm11[1],xmm9[1] xorps %xmm6, %xmm11 insertps $0x2a, %xmm9, %xmm11 # xmm11 = xmm11[0],zero,xmm9[0],zero movaps %xmm11, %xmm0 dpps $0x7f, %xmm11, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] blendvps %xmm0, %xmm12, %xmm11 movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm0 mulss %xmm7, %xmm0 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm11, %xmm0 movaps %xmm0, %xmm11 shufps $0xc9, %xmm0, %xmm11 # xmm11 = xmm11[1,2],xmm0[0,3] movaps %xmm9, %xmm12 shufps $0xc9, %xmm9, %xmm12 # xmm12 = xmm12[1,2],xmm9[0,3] mulps %xmm0, %xmm12 mulps %xmm9, %xmm11 subps %xmm12, %xmm11 shufps $0xc9, %xmm11, %xmm11 # xmm11 = xmm11[1,2,0,3] movaps %xmm11, %xmm12 dpps $0x7f, %xmm11, %xmm12 leaq -0x1(%rax), %rdi imulq $0x30, %rdx, %rdx movaps %xmm12, %xmm13 rsqrtss %xmm12, %xmm13 movaps %xmm13, %xmm14 mulss %xmm7, %xmm14 mulss %xmm8, %xmm12 mulss %xmm13, %xmm12 mulss %xmm13, %xmm13 mulss %xmm12, %xmm13 subss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm11, %xmm14 mulps %xmm10, %xmm9 movaps %xmm0, %xmm10 unpcklps %xmm9, %xmm10 # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps %xmm14, %xmm9 unpcklps %xmm4, %xmm9 # xmm9 = xmm9[0],xmm4[0],xmm9[1],xmm4[1] unpckhps %xmm4, %xmm14 # xmm14 = xmm14[2],xmm4[2],xmm14[3],xmm4[3] unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] movaps %xmm10, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm10 # xmm10 = xmm10[2],xmm9[2],xmm10[3],xmm9[3] movaps %xmm11, (%rcx,%rdx) movaps %xmm10, 0x10(%rcx,%rdx) movaps %xmm0, 0x20(%rcx,%rdx) andq %rdi, %rax jne 0x151cd2 movaps (%rbx), %xmm0 movaps %xmm0, 0x90(%rsp) movaps 0x10(%rbx), %xmm0 movaps %xmm0, 0xa0(%rsp) movaps 0x20(%rbx), %xmm0 movaps %xmm0, 0xb0(%rsp) movaps %xmm3, 0xc0(%rsp) movaps %xmm2, 0xd0(%rsp) movaps %xmm1, 0xe0(%rsp) movaps 0x1d9a83c(%rip), %xmm7 # 0x1eec6c0 movaps %xmm3, %xmm0 andps %xmm7, %xmm0 movaps 0x1d9feae(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps 0x1d9ab71(%rip), %xmm9 # 0x1eeca10 movaps %xmm9, %xmm6 divps %xmm3, %xmm6 movaps %xmm9, %xmm4 divps %xmm2, %xmm4 andps %xmm7, %xmm2 cmpltps %xmm8, %xmm2 movaps %xmm9, %xmm3 divps %xmm1, %xmm3 andps %xmm7, %xmm1 cmpltps %xmm8, %xmm1 movaps 0x1dcaa65(%rip), %xmm7 # 0x1f1c930 blendvps %xmm0, %xmm7, %xmm6 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm7, %xmm4 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm3 movaps %xmm6, 0xf0(%rsp) movaps %xmm4, 0x100(%rsp) xorps %xmm7, %xmm7 cmpltps %xmm7, %xmm6 andps 0x1dcdfc2(%rip), %xmm6 # 0x1f1fec0 movaps %xmm3, 0x110(%rsp) movaps %xmm6, 0x120(%rsp) cmpnltps %xmm7, %xmm4 movaps 0x1dcdfb7(%rip), %xmm1 # 0x1f1fed0 movaps %xmm4, %xmm0 blendvps %xmm0, 0x1dab2eb(%rip), %xmm1 # 0x1efd210 movaps %xmm1, 0x130(%rsp) cmpnltps %xmm7, %xmm3 movaps 0x1dcdfb8(%rip), %xmm1 # 0x1f1fef0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1dcdf9c(%rip), %xmm1 # 0x1f1fee0 movaps %xmm1, 0x140(%rsp) movaps 0x30(%rbx), %xmm2 maxps %xmm7, %xmm2 maxps %xmm7, %xmm5 movaps 0x1d99a92(%rip), %xmm13 # 0x1eeb9f0 movaps %xmm13, %xmm1 movdqa 0x70(%rsp), %xmm0 blendvps %xmm0, %xmm2, %xmm1 movaps %xmm1, 0x150(%rsp) movaps 0x1d99a84(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0x160(%rsp) pcmpeqd %xmm2, %xmm2 pxor %xmm0, %xmm2 movdqa %xmm2, 0x50(%rsp) cmpq $0x0, 0x8(%r10) je 0x151fb2 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r11d, %r11d cmpb $0x1, %al adcq $0x2, %r11 jmp 0x151fb6 pushq $0x3 popq %r11 leaq 0x2b0(%rsp), %r12 movq $-0x8, -0x10(%r12) leaq 0xa50(%rsp), %r14 movaps %xmm13, -0x20(%r14) movq 0x70(%r9), %rax movq %rax, -0x8(%r12) movaps %xmm1, -0x10(%r14) leaq 0x1ffdf97(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x170(%rsp) movaps 0x1d9fd84(%rip), %xmm14 # 0x1ef1d80 movaps 0x1d9fd8c(%rip), %xmm15 # 0x1ef1d90 movq %r10, 0x68(%rsp) addq $-0x10, %r14 movq -0x8(%r12), %rbp addq $-0x8, %r12 cmpq $-0x8, %rbp je 0x1527be movaps (%r14), %xmm2 movaps %xmm2, %xmm0 cmpltps 0x160(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1527c2 movzbl %al, %r15d popcntl %r15d, %r13d xorl %eax, %eax cmpq %r11, %r13 jbe 0x1527c7 cmpq %r11, %r13 jbe 0x1527b0 pushq $0x8 popq %r15 testb $0x8, %bpl jne 0x1526a4 movaps 0x160(%rsp), %xmm0 movq %rbp, %rax andq $-0x10, %rax movl %ebp, %ecx andl $0x7, %ecx cmpnleps %xmm2, %xmm0 movaps %xmm0, 0x40(%rsp) xorl %edx, %edx movq %r15, %rbp movaps %xmm13, %xmm2 movq (%rax,%rdx,8), %r8 cmpq $0x8, %r8 je 0x15263e movaps %xmm2, 0x30(%rsp) cmpl $0x6, %ecx je 0x1520ad cmpl $0x1, %ecx jne 0x15225e movss 0x80(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x20(%rax,%rdx,4), %xmm3 movss 0x30(%rax,%rdx,4), %xmm6 movss 0x40(%rax,%rdx,4), %xmm4 movss 0x50(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0x70(%rbx), %xmm2 mulps %xmm2, %xmm0 addps %xmm3, %xmm0 movss 0xa0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm3 addps %xmm4, %xmm3 movss 0xc0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm5, %xmm4 movss 0x90(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm6, %xmm5 movss 0xb0(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm2, %xmm6 addps %xmm1, %xmm6 movss 0xd0(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm2, %xmm1 addps %xmm7, %xmm1 movaps 0x90(%rsp), %xmm7 movaps 0xa0(%rsp), %xmm8 movaps 0xb0(%rsp), %xmm9 movaps 0xf0(%rsp), %xmm10 subps %xmm7, %xmm0 mulps %xmm10, %xmm0 subps %xmm8, %xmm3 movaps 0x100(%rsp), %xmm11 mulps %xmm11, %xmm3 subps %xmm9, %xmm4 movaps 0x110(%rsp), %xmm12 mulps %xmm12, %xmm4 subps %xmm7, %xmm5 mulps %xmm10, %xmm5 subps %xmm8, %xmm6 mulps %xmm11, %xmm6 subps %xmm9, %xmm1 mulps %xmm12, %xmm1 movaps %xmm0, %xmm7 pminsd %xmm5, %xmm7 movaps %xmm3, %xmm9 pminsd %xmm6, %xmm9 pmaxsd %xmm7, %xmm9 movaps %xmm4, %xmm8 pminsd %xmm1, %xmm8 pmaxsd %xmm9, %xmm8 mulps %xmm14, %xmm8 pmaxsd %xmm0, %xmm5 pmaxsd %xmm3, %xmm6 pminsd %xmm5, %xmm6 pmaxsd %xmm4, %xmm1 pminsd %xmm6, %xmm1 mulps %xmm15, %xmm1 movdqa 0x150(%rsp), %xmm0 pmaxsd %xmm8, %xmm0 pminsd 0x160(%rsp), %xmm1 cmpleps %xmm1, %xmm0 cmpl $0x6, %ecx jne 0x152602 movss 0xe0(%rax,%rdx,4), %xmm1 movss 0xf0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cmpleps %xmm2, %xmm1 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] cmpltps %xmm3, %xmm2 andps %xmm1, %xmm2 andps %xmm2, %xmm0 jmp 0x152602 movss 0x20(%rax,%rdx,4), %xmm0 movss 0x50(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm8 movaps %xmm0, 0x1b0(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, %xmm13 movaps %xmm1, 0x190(%rsp) movss 0x60(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm9 movaps %xmm0, 0x1a0(%rsp) movss 0x80(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm14 movaps %xmm0, 0x10(%rsp) movss 0x90(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm4 movaps %xmm0, 0x180(%rsp) movss 0xe0(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, %xmm3 movss 0xf0(%rax,%rdx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x100(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x110(%rax,%rdx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x120(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x130(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps 0x70(%rbx), %xmm1 movaps 0x1d9a6e1(%rip), %xmm10 # 0x1eeca10 subps %xmm1, %xmm10 mulps %xmm1, %xmm3 mulps %xmm1, %xmm12 mulps %xmm1, %xmm0 mulps %xmm1, %xmm11 mulps %xmm1, %xmm7 mulps %xmm1, %xmm6 addps %xmm10, %xmm11 addps %xmm10, %xmm7 addps %xmm10, %xmm6 mulps 0x1d996b5(%rip), %xmm10 # 0x1eeba10 addps %xmm10, %xmm3 movaps %xmm3, 0x1c0(%rsp) addps %xmm10, %xmm12 addps %xmm0, %xmm10 movaps 0xd0(%rsp), %xmm3 movaps 0xe0(%rsp), %xmm5 movaps %xmm14, %xmm0 mulps %xmm5, %xmm0 movaps %xmm4, %xmm1 mulps %xmm5, %xmm1 movaps %xmm13, %xmm4 mulps %xmm3, %xmm4 addps %xmm0, %xmm4 movaps %xmm9, %xmm0 mulps %xmm3, %xmm0 addps %xmm1, %xmm0 movaps 0xc0(%rsp), %xmm2 movaps %xmm8, %xmm1 mulps %xmm2, %xmm1 addps %xmm4, %xmm1 movss 0x30(%rax,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movaps %xmm9, %xmm13 mulps %xmm2, %xmm13 addps %xmm0, %xmm13 movaps %xmm1, %xmm0 movaps 0x1d9a2eb(%rip), %xmm14 # 0x1eec6c0 andps %xmm14, %xmm0 movaps 0x1d9f95f(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 blendvps %xmm0, %xmm8, %xmm1 movaps %xmm13, %xmm0 andps %xmm14, %xmm0 cmpltps %xmm8, %xmm0 blendvps %xmm0, %xmm8, %xmm13 movss 0x70(%rax,%rdx,4), %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movss 0xa0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm4, %xmm5 mulps %xmm15, %xmm3 addps %xmm5, %xmm3 movss 0x40(%rax,%rdx,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm14, %xmm2 addps %xmm3, %xmm2 movaps %xmm2, %xmm0 andps 0x1d9a281(%rip), %xmm0 # 0x1eec6c0 cmpltps %xmm8, %xmm0 blendvps %xmm0, %xmm8, %xmm2 rcpps %xmm1, %xmm0 mulps %xmm0, %xmm1 movaps 0x1d9a5b8(%rip), %xmm8 # 0x1eeca10 movaps %xmm8, %xmm5 subps %xmm1, %xmm5 mulps %xmm0, %xmm5 addps %xmm0, %xmm5 rcpps %xmm13, %xmm0 mulps %xmm0, %xmm13 movaps %xmm8, %xmm3 subps %xmm13, %xmm3 mulps %xmm0, %xmm3 addps %xmm0, %xmm3 rcpps %xmm2, %xmm1 mulps %xmm1, %xmm2 movaps %xmm8, %xmm0 subps %xmm2, %xmm0 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 movss 0xb0(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0xb0(%rsp), %xmm2 movaps 0x10(%rsp), %xmm8 mulps %xmm2, %xmm8 addps %xmm1, %xmm8 movaps %xmm8, 0x10(%rsp) movss 0xc0(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x180(%rsp), %xmm8 mulps %xmm2, %xmm8 addps %xmm1, %xmm8 movaps %xmm8, %xmm13 mulps %xmm2, %xmm4 movss 0xd0(%rax,%rdx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] addps %xmm1, %xmm4 movaps 0xa0(%rsp), %xmm1 movaps 0x190(%rsp), %xmm2 mulps %xmm1, %xmm2 addps 0x10(%rsp), %xmm2 movaps %xmm2, %xmm8 movaps 0x1a0(%rsp), %xmm2 mulps %xmm1, %xmm2 addps %xmm13, %xmm2 movaps %xmm2, %xmm13 mulps %xmm1, %xmm15 addps %xmm4, %xmm15 movaps 0x90(%rsp), %xmm1 movaps 0x1b0(%rsp), %xmm2 mulps %xmm1, %xmm2 addps %xmm8, %xmm2 mulps %xmm1, %xmm9 addps %xmm13, %xmm9 movaps 0x1d994a6(%rip), %xmm13 # 0x1eeb9f0 mulps %xmm1, %xmm14 addps %xmm15, %xmm14 movaps 0x1d9f836(%rip), %xmm15 # 0x1ef1d90 movaps 0x1c0(%rsp), %xmm1 subps %xmm2, %xmm1 subps %xmm2, %xmm11 mulps %xmm5, %xmm1 movaps %xmm1, %xmm2 mulps %xmm5, %xmm11 subps %xmm9, %xmm12 subps %xmm9, %xmm7 mulps %xmm3, %xmm12 mulps %xmm3, %xmm7 subps %xmm14, %xmm10 mulps %xmm0, %xmm10 subps %xmm14, %xmm6 movaps 0x1d9f7ea(%rip), %xmm14 # 0x1ef1d80 mulps %xmm0, %xmm6 movaps %xmm1, %xmm0 pminsd %xmm11, %xmm0 movaps %xmm12, %xmm1 pminsd %xmm7, %xmm1 pmaxsd %xmm0, %xmm1 movaps %xmm10, %xmm8 pminsd %xmm6, %xmm8 pmaxsd %xmm1, %xmm8 pmaxsd %xmm2, %xmm11 pmaxsd %xmm12, %xmm7 pminsd %xmm11, %xmm7 pmaxsd %xmm10, %xmm6 pminsd %xmm7, %xmm6 mulps %xmm14, %xmm8 mulps %xmm15, %xmm6 movdqa 0x150(%rsp), %xmm0 pmaxsd %xmm8, %xmm0 pminsd 0x160(%rsp), %xmm6 cmpleps %xmm6, %xmm0 andps 0x40(%rsp), %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x152657 movaps %xmm13, %xmm1 blendvps %xmm0, %xmm8, %xmm1 cmpq $0x8, %rbp je 0x152638 movq %rbp, (%r12) addq $0x8, %r12 movaps 0x30(%rsp), %xmm0 movaps %xmm0, (%r14) addq $0x10, %r14 movaps %xmm1, %xmm2 movq %r8, %rbp cmpq $0x8, %r8 je 0x15265e leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x15208c jmp 0x15265e movaps 0x30(%rsp), %xmm2 jmp 0x15263e xorl %eax, %eax cmpq $0x8, %rbp je 0x15269d movaps 0x160(%rsp), %xmm0 cmpnleps %xmm2, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r11 jae 0x15268d testb %cl, %cl jne 0x15205c jmp 0x1527b0 movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm2, (%r14) addq $0x10, %r14 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x152680 cmpq $-0x8, %rbp je 0x1527be movq %r11, 0x10(%rsp) movq %r9, 0x8(%rsp) movaps 0x160(%rsp), %xmm0 cmpnleps %xmm2, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x152887 andq $-0x10, %rbp movaps 0x50(%rsp), %xmm1 movzbl (%rbp), %eax movq %rsi, 0x28(%rsp) movq 0x8(%rsi), %rcx movaps 0x170(%rsp), %xmm0 movaps %xmm0, 0x80(%rsp) movaps %xmm1, 0x40(%rsp) movmskps %xmm1, %edx xorl $0xf, %edx je 0x15274f movzbl %dl, %r15d shll $0x6, %eax addq %rcx, %rax addq $0x18, %rax movq %rax, 0x30(%rsp) bsfq %r15, %r13 leaq 0x1d0(%rsp), %rdi movq %rbx, %rsi movq %r13, %rdx movq %r10, %rcx movq %rbp, %r8 movq 0x30(%rsp), %rax callq *(%rax) testb %al, %al je 0x152741 orl $-0x1, 0x80(%rsp,%r13,4) leaq -0x1(%r15), %rax andq %rax, %r15 movq 0x68(%rsp), %r10 jne 0x152715 movaps 0x40(%rsp), %xmm0 orps 0x80(%rsp), %xmm0 movaps %xmm0, 0x50(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x152786 movaps 0x160(%rsp), %xmm1 blendvps %xmm0, 0x1d99286(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x160(%rsp) xorl %eax, %eax jmp 0x152789 pushq $0x3 popq %rax movq 0x28(%rsp), %rsi movq 0x8(%rsp), %r9 movaps 0x1d99255(%rip), %xmm13 # 0x1eeb9f0 movq 0x10(%rsp), %r11 movaps 0x1d9f5d8(%rip), %xmm14 # 0x1ef1d80 movaps 0x1d9f5e0(%rip), %xmm15 # 0x1ef1d90 cmpl $0x3, %eax jne 0x152009 jmp 0x15288f pushq $0x3 jmp 0x1527c4 pushq $0x2 popq %rax jmp 0x1527b0 movaps %xmm2, 0x30(%rsp) movq %r11, 0x10(%rsp) movq %rsi, 0x28(%rsp) movq %r9, 0x8(%rsp) bsfq %r15, %rcx movq %rsi, %rdi movq %r9, %rsi movq %rbp, %rdx movq %rcx, 0x40(%rsp) leaq 0x1d0(%rsp), %r8 movq %rbx, %r9 pushq %r10 leaq 0x98(%rsp), %rax pushq %rax callq 0x1a0204 popq %rcx popq %rdx testb %al, %al je 0x152818 movq 0x40(%rsp), %rax orl $-0x1, 0x50(%rsp,%rax,4) leaq -0x1(%r15), %rax andq %rax, %r15 movq 0x68(%rsp), %r10 movq 0x28(%rsp), %rsi movq 0x8(%rsp), %r9 jne 0x1527db movaps 0x50(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d991aa(%rip), %xmm13 # 0x1eeb9f0 movq 0x10(%rsp), %r11 movaps 0x1d9f52d(%rip), %xmm14 # 0x1ef1d80 movaps 0x1d9f535(%rip), %xmm15 # 0x1ef1d90 movaps 0x30(%rsp), %xmm2 je 0x15204f movaps 0x160(%rsp), %xmm1 blendvps %xmm0, 0x1d99189(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x160(%rsp) pushq $0x2 popq %rax jmp 0x15204f pushq $0x2 popq %rax jmp 0x15278e movaps 0x70(%rsp), %xmm0 andps 0x50(%rsp), %xmm0 movaps 0x80(%rbx), %xmm1 blendvps %xmm0, 0x1d99157(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x1948, %rsp # imm = 0x1948 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::SubdivPatch1IntersectorK<4>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq (%rsi), %r13 cmpq $0x8, 0x70(%r13) je 0x152a7a movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 cmpq $0x0, 0x8(%rcx) je 0x1528ff movq 0x10(%r15), %rax testb $0x1, 0x2(%rax) jne 0x152a8c pcmpeqd %xmm1, %xmm1 pcmpeqd (%rdi), %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x152a7a movq %rsp, %rcx andq $0x0, (%rcx) movzbl %al, %ebp movaps (%r14), %xmm0 leaq 0x10(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rax) movaps 0x40(%r14), %xmm0 movaps %xmm0, 0x30(%rax) movaps 0x50(%r14), %xmm3 movaps %xmm3, 0x40(%rax) movaps 0x60(%r14), %xmm7 movaps %xmm7, 0x50(%rax) movaps 0x1d99d64(%rip), %xmm4 # 0x1eec6c0 movaps 0x1d9a0ad(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm6 divps %xmm0, %xmm6 andps %xmm4, %xmm0 movaps 0x1d9f3cc(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps 0x1dc9faf(%rip), %xmm9 # 0x1f1c930 blendvps %xmm0, %xmm9, %xmm6 movaps %xmm2, %xmm5 divps %xmm3, %xmm5 andps %xmm4, %xmm3 cmpltps %xmm8, %xmm3 andps %xmm7, %xmm4 cmpltps %xmm8, %xmm4 movaps %xmm3, %xmm0 blendvps %xmm0, %xmm9, %xmm5 divps %xmm7, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm6, 0x60(%rax) movaps %xmm5, 0x70(%rax) xorps %xmm3, %xmm3 cmpltps %xmm3, %xmm6 andps 0x1dcd4f8(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm3, %xmm5 movaps 0x1dcd4fd(%rip), %xmm4 # 0x1f1fed0 movaps %xmm5, %xmm0 blendvps %xmm0, 0x1daa831(%rip), %xmm4 # 0x1efd210 movaps %xmm2, 0x80(%rax) movaps %xmm6, 0x90(%rax) cmpnltps %xmm3, %xmm2 movaps 0x1dcd4f8(%rip), %xmm5 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dcd4dc(%rip), %xmm5 # 0x1f1fee0 movaps %xmm4, 0xa0(%rax) movaps %xmm5, 0xb0(%rax) movaps 0x30(%r14), %xmm2 movaps 0x80(%r14), %xmm4 maxps %xmm3, %xmm2 maxps %xmm3, %xmm4 movaps 0x1d98fc4(%rip), %xmm3 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0xc0(%rax) movaps 0x1d98fbe(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %rbx movq 0x70(%r13), %rdx movq %r12, %rdi movq %r13, %rsi movq %rsp, %r8 movq %r14, %r9 pushq %r15 leaq 0x18(%rsp), %rax pushq %rax callq 0x1a2a76 popq %rax popq %rcx andq %rbx, %rbp jne 0x152a4e addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, %rsi movq %r14, %rdx movq %r15, %rcx addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1a0992 nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::SubdivPatch1IntersectorK<4>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b38, %rsp # imm = 0x1B38 movq (%rsi), %r9 cmpq $0x8, 0x70(%r9) je 0x15440c movq %rcx, %r10 movq %rdx, %rbx movq 0x8(%rcx), %rax testq %rax, %rax je 0x152ae8 movq 0x10(%r10), %rcx testb $0x1, 0x2(%rcx) jne 0x15441e pcmpeqd %xmm5, %xmm5 movdqa (%rdi), %xmm0 pcmpeqd %xmm5, %xmm0 movaps 0x80(%rbx), %xmm6 xorps %xmm7, %xmm7 movaps %xmm6, %xmm12 cmpnltps %xmm7, %xmm12 andps %xmm0, %xmm12 movmskps %xmm12, %ecx testl %ecx, %ecx je 0x15440c andq $0x0, 0x130(%rsp) movaps (%rbx), %xmm0 movaps %xmm0, 0x290(%rsp) movaps 0x10(%rbx), %xmm0 movaps %xmm0, 0x2a0(%rsp) movaps 0x20(%rbx), %xmm0 movaps %xmm0, 0x2b0(%rsp) movaps 0x40(%rbx), %xmm0 movaps %xmm0, 0x2c0(%rsp) movaps 0x50(%rbx), %xmm4 movaps %xmm4, 0x2d0(%rsp) movaps 0x60(%rbx), %xmm2 movaps %xmm2, 0x2e0(%rsp) movaps 0x1d99b51(%rip), %xmm10 # 0x1eec6c0 movaps 0x1d99e9a(%rip), %xmm1 # 0x1eeca10 movaps %xmm1, %xmm8 divps %xmm0, %xmm8 andps %xmm10, %xmm0 movaps 0x1d9f1b6(%rip), %xmm11 # 0x1ef1d40 cmpltps %xmm11, %xmm0 movaps %xmm1, %xmm3 divps %xmm4, %xmm3 andps %xmm10, %xmm4 cmpltps %xmm11, %xmm4 divps %xmm2, %xmm1 movaps 0x1dc9d87(%rip), %xmm9 # 0x1f1c930 blendvps %xmm0, %xmm9, %xmm8 andps %xmm10, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm9, %xmm3 cmpltps %xmm11, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm9, %xmm1 movaps %xmm8, 0x2f0(%rsp) movaps %xmm3, 0x300(%rsp) cmpltps %xmm7, %xmm8 andps 0x1dcd2d8(%rip), %xmm8 # 0x1f1fec0 cmpnltps %xmm7, %xmm3 movaps 0x1dcd2dd(%rip), %xmm2 # 0x1f1fed0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1daa611(%rip), %xmm2 # 0x1efd210 movaps %xmm1, 0x310(%rsp) movaps %xmm8, 0x320(%rsp) cmpnltps %xmm7, %xmm1 movaps 0x1dcd2d5(%rip), %xmm3 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dcd2b9(%rip), %xmm3 # 0x1f1fee0 movaps %xmm2, 0x330(%rsp) movaps %xmm3, 0x340(%rsp) movaps 0x30(%rbx), %xmm2 maxps %xmm7, %xmm2 maxps %xmm7, %xmm6 movaps 0x1d98da7(%rip), %xmm11 # 0x1eeb9f0 movaps %xmm11, %xmm1 movaps %xmm12, %xmm0 blendvps %xmm0, %xmm2, %xmm1 movaps %xmm1, 0x350(%rsp) movaps 0x1d98d9b(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm6, %xmm2 movaps %xmm2, 0x360(%rsp) pxor %xmm12, %xmm5 movdqa %xmm5, 0x100(%rsp) testq %rax, %rax je 0x152c99 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r11d, %r11d cmpb $0x1, %al adcq $0x2, %r11 jmp 0x152c9d pushq $0x3 popq %r11 leaq 0x4a0(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0xc40(%rsp), %r12 movaps %xmm11, -0x20(%r12) movq 0x70(%r9), %rax movq %rax, -0x8(%r15) movaps %xmm1, -0x10(%r12) leaq 0x1ffd2b0(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x370(%rsp) movaps 0x1d9f09d(%rip), %xmm13 # 0x1ef1d80 movaps 0x1d9f0a5(%rip), %xmm14 # 0x1ef1d90 movaps %xmm12, 0x30(%rsp) addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 cmpq $-0x8, %rbp je 0x1542ce movaps (%r12), %xmm15 movaps %xmm15, %xmm0 cmpltps 0x360(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1542df movzbl %al, %r13d popcntl %r13d, %r14d xorl %eax, %eax cmpq %r11, %r14 jbe 0x1542e3 cmpq %r11, %r14 jbe 0x1542d1 testb $0x8, %bpl pushq $0x8 popq %r14 jne 0x152ee1 movq %rbp, %rax movq %rbp, %rcx andq $-0x10, %rcx xorl %edx, %edx movaps %xmm11, %xmm15 movq %r14, %rbp movq (%rcx,%rdx,8), %r8 cmpq $0x8, %r8 je 0x152e7c movss 0x20(%rax,%rdx,4), %xmm1 movss 0x30(%rax,%rdx,4), %xmm2 movss 0x40(%rax,%rdx,4), %xmm0 movss 0x50(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x290(%rsp), %xmm6 movaps 0x2a0(%rsp), %xmm7 movaps 0x2b0(%rsp), %xmm5 movaps 0x2f0(%rsp), %xmm8 subps %xmm6, %xmm1 mulps %xmm8, %xmm1 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm7, %xmm0 movaps 0x300(%rsp), %xmm9 mulps %xmm9, %xmm0 movss 0x60(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm5, %xmm4 movaps 0x310(%rsp), %xmm10 mulps %xmm10, %xmm4 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm6, %xmm2 mulps %xmm8, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm7, %xmm3 mulps %xmm9, %xmm3 movss 0x70(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm5, %xmm6 mulps %xmm10, %xmm6 movaps %xmm1, %xmm5 minps %xmm2, %xmm5 movaps %xmm0, %xmm7 minps %xmm3, %xmm7 maxps %xmm7, %xmm5 movaps %xmm4, %xmm7 minps %xmm6, %xmm7 maxps %xmm7, %xmm5 mulps %xmm13, %xmm5 maxps %xmm2, %xmm1 maxps %xmm3, %xmm0 minps %xmm0, %xmm1 maxps %xmm6, %xmm4 minps %xmm4, %xmm1 mulps %xmm14, %xmm1 movaps %xmm5, %xmm0 maxps 0x350(%rsp), %xmm0 minps 0x360(%rsp), %xmm1 cmpleps %xmm1, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x152e7c movaps %xmm11, %xmm1 blendvps %xmm0, %xmm5, %xmm1 cmpq $0x8, %rbp je 0x152e75 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm15, (%r12) addq $0x10, %r12 movq %r8, %rbp movaps %xmm1, %xmm15 cmpq $0x8, %r8 je 0x152e93 leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x152d62 xorl %eax, %eax cmpq $0x8, %rbp je 0x152eda movaps 0x360(%rsp), %xmm0 cmpnleps %xmm15, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r11 jae 0x152eca testb %cl, %cl je 0x1542d1 testb $0x8, %bpl je 0x152d4f jmp 0x152ee1 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm15, (%r12) addq $0x10, %r12 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x152eb6 cmpq $-0x8, %rbp je 0x1542ce movaps 0x360(%rsp), %xmm0 cmpnleps %xmm15, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1542df movq %rsi, 0xc8(%rsp) movq %r11, 0x8(%rsp) movq %r9, 0xc0(%rsp) movl %ebp, %eax andl $0xf, %eax cmpl $0x8, %eax jne 0x1543c2 movaps 0x100(%rsp), %xmm7 xorps 0x1d98eeb(%rip), %xmm7 # 0x1eebe20 movq 0x130(%rsp), %rsi movl 0x14(%rsi), %eax movl 0xc(%rsi), %ecx movl 0x10(%rsi), %r13d xorl %edx, %edx cmpq $0x2, %rcx setne %dl movl 0x24(%rsi), %r11d imulq $0xc, %rax, %rdi leaq 0x4(,%rdx,4), %rdx movq %rdx, 0x58(%rsp) shrq $0x4, %rbp leaq (,%rcx,4), %rdx movq %rdx, 0x1e8(%rsp) leaq (%r11,%rbp,4), %rdx addq %rdx, %rdi leaq (%rdi,%rcx,4), %r8 leaq (%rsi,%r8), %r14 addq $0x2c, %r14 leaq (%rdx,%rax,8), %r8 leaq (%r8,%rcx,4), %r9 leaq 0x30(%rsi,%r9), %r9 movq %r9, 0xe8(%rsp) leaq (%rdx,%rax,4), %rax leaq (%rax,%rcx,4), %r9 leaq 0x30(%rsi,%r9), %r9 movq %r9, 0xe0(%rsp) leaq (%rdx,%rcx,4), %rcx leaq 0x30(%rsi,%rcx), %rcx movq %rcx, 0xd8(%rsp) leaq 0x30(%rsi,%rdi), %rcx movq %rcx, 0xd0(%rsp) movl %r13d, %edi leaq 0x30(%rsi,%r8), %rcx movq %rcx, 0x128(%rsp) movq 0x58(%rsp), %r8 movq %rsi, %r9 leaq 0x30(%rsi,%rax), %r13 movq %r14, %rsi leaq (%r11,%rbp,4), %rdx addq $0x2c, %rdx movq $0x0, 0x120(%rsp) movq 0x8(%rsp), %r11 movq %rdx, 0x1f0(%rsp) leaq (%r9,%rdx), %rax movq %rax, 0x1f8(%rsp) xorl %ebp, %ebp cmpq %rbp, %r8 je 0x1541fe movq 0x1f8(%rsp), %rax movss (%rax,%rbp), %xmm15 movss 0x4(%rax,%rbp), %xmm11 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movss -0x4(%r13,%rbp), %xmm10 movss (%r13,%rbp), %xmm4 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movq 0x128(%rsp), %rax movss -0x4(%rax,%rbp), %xmm14 movaps %xmm7, %xmm8 movss (%rax,%rbp), %xmm7 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movq 0xd8(%rsp), %rax movss -0x4(%rax,%rbp), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movq 0xe0(%rsp), %rax movss -0x4(%rax,%rbp), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movq 0xe8(%rsp), %rax movss -0x4(%rax,%rbp), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps (%rbx), %xmm1 movaps 0x10(%rbx), %xmm5 movaps 0x20(%rbx), %xmm6 subps %xmm1, %xmm15 subps %xmm5, %xmm10 subps %xmm6, %xmm14 movaps %xmm11, 0x480(%rsp) subps %xmm1, %xmm11 movaps %xmm4, 0x470(%rsp) subps %xmm5, %xmm4 movaps %xmm4, 0x80(%rsp) movaps %xmm7, 0x460(%rsp) subps %xmm6, %xmm7 movaps %xmm0, 0x90(%rsp) movaps %xmm0, %xmm4 subps %xmm1, %xmm4 movaps %xmm2, 0xa0(%rsp) movaps %xmm2, %xmm0 subps %xmm5, %xmm0 movaps %xmm3, 0x20(%rsp) movaps %xmm3, %xmm1 subps %xmm6, %xmm1 movaps %xmm4, %xmm3 subps %xmm15, %xmm3 movaps %xmm0, %xmm2 subps %xmm10, %xmm2 movaps %xmm1, %xmm12 subps %xmm14, %xmm12 movaps %xmm0, %xmm5 addps %xmm10, %xmm5 movaps %xmm1, %xmm6 addps %xmm14, %xmm6 movaps %xmm8, 0x10(%rsp) movaps %xmm3, %xmm8 mulps %xmm5, %xmm8 mulps %xmm12, %xmm5 movaps %xmm2, %xmm13 mulps %xmm6, %xmm13 subps %xmm5, %xmm13 movaps %xmm4, %xmm5 addps %xmm15, %xmm5 movaps %xmm3, 0x110(%rsp) mulps %xmm3, %xmm6 movaps %xmm5, %xmm9 movaps %xmm12, 0x1b0(%rsp) mulps %xmm12, %xmm9 subps %xmm6, %xmm9 movaps %xmm2, 0x1a0(%rsp) mulps %xmm2, %xmm5 subps %xmm5, %xmm8 movaps 0x60(%rbx), %xmm2 movaps %xmm2, 0x60(%rsp) mulps %xmm2, %xmm8 movaps 0x50(%rbx), %xmm2 movaps %xmm2, 0x70(%rsp) mulps %xmm2, %xmm9 addps %xmm8, %xmm9 movaps 0x40(%rbx), %xmm6 mulps %xmm6, %xmm13 addps %xmm9, %xmm13 movaps %xmm15, %xmm3 subps %xmm11, %xmm3 movaps %xmm10, %xmm9 movaps 0x80(%rsp), %xmm5 subps %xmm5, %xmm9 movaps %xmm14, %xmm2 subps %xmm7, %xmm2 movaps %xmm10, 0xf0(%rsp) addps %xmm5, %xmm10 movaps %xmm14, 0x1d0(%rsp) addps %xmm7, %xmm14 movaps %xmm3, %xmm8 mulps %xmm10, %xmm8 mulps %xmm2, %xmm10 movaps %xmm9, %xmm12 mulps %xmm14, %xmm12 subps %xmm10, %xmm12 movaps %xmm15, 0x1c0(%rsp) addps %xmm11, %xmm15 mulps %xmm3, %xmm14 movaps %xmm15, %xmm10 movaps %xmm2, 0x190(%rsp) mulps %xmm2, %xmm10 subps %xmm14, %xmm10 mulps %xmm9, %xmm15 subps %xmm15, %xmm8 mulps 0x60(%rsp), %xmm8 mulps 0x70(%rsp), %xmm10 addps %xmm8, %xmm10 mulps %xmm6, %xmm12 addps %xmm10, %xmm12 movaps %xmm11, %xmm10 subps %xmm4, %xmm10 addps %xmm11, %xmm4 movaps %xmm5, %xmm11 subps %xmm0, %xmm11 addps %xmm5, %xmm0 movaps %xmm7, %xmm15 subps %xmm1, %xmm15 addps %xmm7, %xmm1 movaps %xmm10, %xmm7 mulps %xmm0, %xmm7 mulps %xmm15, %xmm0 movaps %xmm11, %xmm14 mulps %xmm1, %xmm14 subps %xmm0, %xmm14 mulps %xmm10, %xmm1 movaps %xmm4, %xmm2 mulps %xmm15, %xmm2 subps %xmm1, %xmm2 mulps %xmm11, %xmm4 subps %xmm4, %xmm7 mulps 0x60(%rsp), %xmm7 mulps 0x70(%rsp), %xmm2 addps %xmm7, %xmm2 mulps %xmm6, %xmm14 addps %xmm2, %xmm14 movaps %xmm13, %xmm2 addps %xmm12, %xmm2 addps %xmm14, %xmm2 movaps %xmm13, %xmm0 minps %xmm12, %xmm0 minps %xmm14, %xmm0 movaps %xmm13, 0x80(%rsp) movaps %xmm13, %xmm7 maxps %xmm12, %xmm7 maxps %xmm14, %xmm7 movaps %xmm2, %xmm1 andps 0x1d993cc(%rip), %xmm1 # 0x1eec6c0 mulps 0x1d9ea75(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm7 xorps 0x1d993ca(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm7 andps 0x10(%rsp), %xmm7 movmskps %xmm7, %eax testl %eax, %eax je 0x15413d movaps %xmm2, 0x170(%rsp) movaps %xmm9, %xmm0 movaps 0x1b0(%rsp), %xmm8 mulps %xmm8, %xmm0 movaps %xmm3, %xmm1 movaps 0x1a0(%rsp), %xmm4 mulps %xmm4, %xmm1 movaps %xmm11, 0x180(%rsp) movaps 0x190(%rsp), %xmm5 mulps %xmm5, %xmm11 movaps %xmm10, %xmm14 mulps %xmm9, %xmm14 mulps %xmm5, %xmm4 subps %xmm0, %xmm4 movaps 0x110(%rsp), %xmm13 movaps %xmm13, %xmm2 mulps %xmm9, %xmm13 mulps %xmm15, %xmm9 subps %xmm11, %xmm9 movaps %xmm15, 0x110(%rsp) movaps 0x1d9932f(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 andps %xmm15, %xmm11 cmpltps %xmm11, %xmm0 blendvps %xmm0, %xmm4, %xmm9 movaps %xmm3, %xmm0 mulps 0x110(%rsp), %xmm0 mulps %xmm5, %xmm2 mulps %xmm5, %xmm10 mulps %xmm3, %xmm8 subps %xmm2, %xmm8 subps %xmm0, %xmm10 andps %xmm15, %xmm2 andps %xmm15, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm8, %xmm10 mulps 0x180(%rsp), %xmm3 subps %xmm1, %xmm13 subps %xmm14, %xmm3 andps %xmm15, %xmm1 andps %xmm15, %xmm14 cmpltps %xmm14, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm3 movaps 0x60(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps 0x70(%rsp), %xmm0 mulps %xmm10, %xmm0 addps %xmm1, %xmm0 mulps %xmm9, %xmm6 addps %xmm0, %xmm6 addps %xmm6, %xmm6 movaps 0x1d0(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps 0xf0(%rsp), %xmm0 mulps %xmm10, %xmm0 addps %xmm1, %xmm0 movaps 0x1c0(%rsp), %xmm4 mulps %xmm9, %xmm4 addps %xmm0, %xmm4 rcpps %xmm6, %xmm1 movaps %xmm6, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d995bc(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm4, %xmm4 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm4, %xmm0 movaps 0x30(%rbx), %xmm1 cmpleps %xmm0, %xmm1 movaps %xmm0, %xmm2 cmpleps 0x80(%rbx), %xmm2 andps %xmm1, %xmm2 cmpneqps 0x1d9858f(%rip), %xmm6 # 0x1eeba10 andps %xmm2, %xmm6 pslld $0x1f, %xmm6 psrad $0x1f, %xmm6 pand %xmm7, %xmm6 movmskps %xmm6, %eax testl %eax, %eax je 0x1534e4 movaps 0x80(%rsp), %xmm1 movaps %xmm1, 0x450(%rsp) movaps %xmm12, 0x440(%rsp) movaps 0x170(%rsp), %xmm1 movaps %xmm1, 0x430(%rsp) movaps %xmm0, 0x420(%rsp) movaps %xmm9, 0x410(%rsp) movaps %xmm10, 0x400(%rsp) movaps %xmm3, 0x3f0(%rsp) movaps 0x30(%rsp), %xmm12 movaps 0x90(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm9 movaps 0x20(%rsp), %xmm4 movdqa 0x10(%rsp), %xmm7 movq 0xd8(%rsp), %rax movss (%rax,%rbp), %xmm15 movq 0xe0(%rsp), %rax movss (%rax,%rbp), %xmm14 movq 0xe8(%rsp), %rax movss (%rax,%rbp), %xmm10 movq 0x130(%rsp), %rcx movl 0x18(%rcx), %eax movq (%r10), %rdx movq 0x1e8(%rdx), %rdx movq (%rdx,%rax,8), %r14 movd 0x34(%r14), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd 0x1d984ab(%rip), %xmm1 # 0x1eeba10 pandn %xmm6, %xmm1 movmskps %xmm1, %edx testl %edx, %edx je 0x153595 movl 0x1c(%rcx), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x153a82 cmpq $0x0, 0x48(%r14) jne 0x153a82 pandn %xmm7, %xmm1 movdqa %xmm1, %xmm7 movmskps %xmm7, %eax testl %eax, %eax je 0x1541e6 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movaps (%rbx), %xmm0 movaps 0x10(%rbx), %xmm1 movaps 0x20(%rbx), %xmm2 movaps 0x40(%rbx), %xmm3 movaps %xmm3, 0x90(%rsp) movaps 0x50(%rbx), %xmm5 movaps %xmm5, 0x60(%rsp) subps %xmm0, %xmm13 subps %xmm1, %xmm9 subps %xmm2, %xmm4 movaps %xmm4, 0x20(%rsp) movaps 0x480(%rsp), %xmm12 subps %xmm0, %xmm12 movaps %xmm13, %xmm3 movaps 0x470(%rsp), %xmm13 subps %xmm1, %xmm13 movaps 0x460(%rsp), %xmm5 subps %xmm2, %xmm5 subps %xmm0, %xmm15 subps %xmm1, %xmm14 subps %xmm2, %xmm10 movaps %xmm15, %xmm6 subps %xmm3, %xmm6 movaps %xmm9, %xmm8 movaps %xmm9, 0xa0(%rsp) movaps %xmm14, %xmm9 subps %xmm8, %xmm14 movaps %xmm7, 0x10(%rsp) movaps %xmm10, %xmm7 subps %xmm4, %xmm7 movaps %xmm15, %xmm0 addps %xmm3, %xmm0 movaps %xmm9, %xmm1 addps %xmm8, %xmm1 movaps %xmm10, %xmm2 addps %xmm4, %xmm2 movaps %xmm6, %xmm4 mulps %xmm1, %xmm4 mulps %xmm7, %xmm1 movaps %xmm14, %xmm11 mulps %xmm2, %xmm11 subps %xmm1, %xmm11 movaps %xmm6, 0x80(%rsp) mulps %xmm6, %xmm2 movaps %xmm0, %xmm1 movaps %xmm7, 0xf0(%rsp) mulps %xmm7, %xmm1 subps %xmm2, %xmm1 movaps 0x60(%rbx), %xmm2 movaps %xmm2, 0x70(%rsp) movaps %xmm14, 0x1d0(%rsp) mulps %xmm14, %xmm0 subps %xmm0, %xmm4 movaps %xmm3, %xmm7 subps %xmm12, %xmm7 mulps %xmm2, %xmm4 mulps 0x60(%rsp), %xmm1 addps %xmm4, %xmm1 movaps %xmm8, %xmm4 subps %xmm13, %xmm4 mulps 0x90(%rsp), %xmm11 addps %xmm1, %xmm11 movaps 0x20(%rsp), %xmm1 movaps %xmm1, %xmm6 subps %xmm5, %xmm6 addps %xmm13, %xmm8 addps %xmm5, %xmm1 movaps %xmm7, %xmm2 mulps %xmm8, %xmm2 mulps %xmm6, %xmm8 movaps %xmm4, %xmm14 mulps %xmm1, %xmm14 subps %xmm8, %xmm14 movaps %xmm3, %xmm0 addps %xmm12, %xmm0 movaps %xmm7, 0x110(%rsp) mulps %xmm7, %xmm1 movaps %xmm4, %xmm7 movaps %xmm0, %xmm4 movaps %xmm6, 0x1c0(%rsp) mulps %xmm6, %xmm4 subps %xmm1, %xmm4 mulps %xmm7, %xmm0 subps %xmm0, %xmm2 mulps 0x70(%rsp), %xmm2 movaps 0x60(%rsp), %xmm6 mulps %xmm6, %xmm4 addps %xmm2, %xmm4 movaps 0x90(%rsp), %xmm0 mulps %xmm0, %xmm14 addps %xmm4, %xmm14 movaps %xmm12, %xmm8 subps %xmm15, %xmm8 addps %xmm12, %xmm15 movaps %xmm13, %xmm4 subps %xmm9, %xmm4 addps %xmm13, %xmm9 movaps %xmm3, %xmm12 movaps %xmm0, %xmm3 movaps %xmm5, %xmm13 subps %xmm10, %xmm13 addps %xmm5, %xmm10 movaps %xmm8, %xmm1 mulps %xmm9, %xmm1 mulps %xmm13, %xmm9 movaps %xmm4, %xmm0 mulps %xmm10, %xmm0 subps %xmm9, %xmm0 mulps %xmm8, %xmm10 movaps %xmm15, %xmm2 mulps %xmm13, %xmm2 subps %xmm10, %xmm2 movaps %xmm4, %xmm5 mulps %xmm4, %xmm15 subps %xmm15, %xmm1 mulps 0x70(%rsp), %xmm1 mulps %xmm6, %xmm2 addps %xmm1, %xmm2 mulps %xmm3, %xmm0 addps %xmm2, %xmm0 movaps %xmm11, %xmm2 addps %xmm14, %xmm2 addps %xmm0, %xmm2 movaps %xmm11, %xmm1 minps %xmm14, %xmm1 minps %xmm0, %xmm1 movaps %xmm11, 0x1b0(%rsp) movaps %xmm11, %xmm4 maxps %xmm14, %xmm4 maxps %xmm0, %xmm4 movaps %xmm2, %xmm0 andps 0x1d98ee6(%rip), %xmm0 # 0x1eec6c0 mulps 0x1d9e58f(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm4 xorps 0x1d98ee4(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm4 andps 0x10(%rsp), %xmm4 movmskps %xmm4, %eax testl %eax, %eax je 0x154145 movaps %xmm2, 0x170(%rsp) movaps %xmm14, 0x180(%rsp) movaps %xmm7, %xmm0 movaps 0xf0(%rsp), %xmm14 mulps %xmm14, %xmm0 movaps 0x110(%rsp), %xmm6 movaps %xmm6, %xmm1 movaps 0x1d0(%rsp), %xmm9 mulps %xmm9, %xmm1 movaps %xmm5, 0x1a0(%rsp) movaps %xmm13, %xmm11 movaps %xmm13, 0x190(%rsp) movaps 0x1c0(%rsp), %xmm13 mulps %xmm13, %xmm5 movaps %xmm12, %xmm10 movaps %xmm8, %xmm12 mulps %xmm7, %xmm12 mulps %xmm13, %xmm9 subps %xmm0, %xmm9 movaps 0x80(%rsp), %xmm15 movaps %xmm15, %xmm2 mulps %xmm7, %xmm15 mulps %xmm11, %xmm7 subps %xmm5, %xmm7 movaps 0x1d98e2e(%rip), %xmm11 # 0x1eec6c0 andps %xmm11, %xmm0 andps %xmm11, %xmm5 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm9, %xmm7 movaps %xmm6, %xmm0 mulps 0x190(%rsp), %xmm0 mulps %xmm13, %xmm2 mulps %xmm13, %xmm8 mulps %xmm6, %xmm14 subps %xmm2, %xmm14 subps %xmm0, %xmm8 andps %xmm11, %xmm2 andps %xmm11, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm14, %xmm8 mulps 0x1a0(%rsp), %xmm6 subps %xmm1, %xmm15 subps %xmm12, %xmm6 andps %xmm11, %xmm1 andps %xmm11, %xmm12 cmpltps %xmm12, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm15, %xmm6 movaps 0x70(%rsp), %xmm0 mulps %xmm6, %xmm0 movaps 0x60(%rsp), %xmm1 mulps %xmm8, %xmm1 addps %xmm0, %xmm1 mulps %xmm7, %xmm3 addps %xmm1, %xmm3 addps %xmm3, %xmm3 movaps 0x20(%rsp), %xmm1 mulps %xmm6, %xmm1 movaps 0xa0(%rsp), %xmm0 mulps %xmm8, %xmm0 addps %xmm1, %xmm0 mulps %xmm7, %xmm10 addps %xmm0, %xmm10 rcpps %xmm3, %xmm1 movaps %xmm3, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d990c6(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm10, %xmm10 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm10, %xmm0 movaps 0x30(%rbx), %xmm1 cmpleps %xmm0, %xmm1 movaps %xmm0, %xmm2 cmpleps 0x80(%rbx), %xmm2 andps %xmm1, %xmm2 cmpneqps 0x1d98097(%rip), %xmm3 # 0x1eeba10 andps %xmm2, %xmm3 pslld $0x1f, %xmm3 psrad $0x1f, %xmm3 pand %xmm4, %xmm3 movmskps %xmm3, %eax testl %eax, %eax movaps %xmm11, %xmm4 je 0x1539e6 movaps 0x1b0(%rsp), %xmm1 movaps %xmm1, 0x3e0(%rsp) movaps 0x180(%rsp), %xmm1 movaps %xmm1, 0x3d0(%rsp) movaps 0x170(%rsp), %xmm1 movaps %xmm1, 0x3c0(%rsp) movaps %xmm0, 0x3b0(%rsp) movaps %xmm7, 0x3a0(%rsp) movaps %xmm8, 0x390(%rsp) movaps %xmm6, 0x380(%rsp) movaps 0x30(%rsp), %xmm12 movaps 0x1d97ffc(%rip), %xmm11 # 0x1eeb9f0 movaps 0x1d9e384(%rip), %xmm13 # 0x1ef1d80 movaps 0x1d9e38c(%rip), %xmm14 # 0x1ef1d90 movdqa 0x10(%rsp), %xmm7 movq 0x130(%rsp), %rcx movl 0x18(%rcx), %eax movq (%r10), %rdx movq 0x1e8(%rdx), %rdx movq (%rdx,%rax,8), %r14 movd 0x34(%r14), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd 0x1d97fd2(%rip), %xmm1 # 0x1eeba10 pandn %xmm3, %xmm1 movmskps %xmm1, %edx testl %edx, %edx je 0x153a6e movl 0x1c(%rcx), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x153e06 cmpq $0x0, 0x48(%r14) jne 0x153e06 pandn %xmm7, %xmm1 movdqa %xmm1, %xmm7 movmskps %xmm7, %eax addq $0x4, %rbp testl %eax, %eax jne 0x153023 jmp 0x1541fe movaps 0x430(%rsp), %xmm3 movaps %xmm3, %xmm2 movaps 0x1d98c2c(%rip), %xmm0 # 0x1eec6c0 andps %xmm0, %xmm2 rcpps %xmm3, %xmm0 mulps %xmm0, %xmm3 movaps 0x1d98f6c(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm4 subps %xmm3, %xmm4 mulps %xmm0, %xmm4 addps %xmm0, %xmm4 cmpnltps 0x1d9e288(%rip), %xmm2 # 0x1ef1d40 andps %xmm4, %xmm2 movaps 0x450(%rsp), %xmm0 mulps %xmm2, %xmm0 minps %xmm6, %xmm0 mulps 0x440(%rsp), %xmm2 minps %xmm6, %xmm2 movq 0xd0(%rsp), %rdx movss -0x4(%rdx,%rbp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss (%rsi,%rbp), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm4, %xmm5 psrld $0x10, %xmm5 pxor %xmm7, %xmm7 pblendw $0xaa, %xmm7, %xmm4 # xmm4 = xmm4[0],xmm7[1],xmm4[2],xmm7[3],xmm4[4],xmm7[5],xmm4[6],xmm7[7] cvtdq2ps %xmm4, %xmm4 movaps 0x1dc8e64(%rip), %xmm8 # 0x1f1c970 mulps %xmm8, %xmm4 cvtdq2ps %xmm5, %xmm5 mulps %xmm8, %xmm5 subps %xmm0, %xmm6 subps %xmm2, %xmm6 mulps %xmm6, %xmm4 mulps %xmm5, %xmm6 movaps %xmm3, %xmm5 pblendw $0xaa, %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[1],xmm3[2],xmm7[3],xmm3[4],xmm7[5],xmm3[6],xmm7[7] cvtdq2ps %xmm3, %xmm3 mulps %xmm8, %xmm3 mulps %xmm2, %xmm3 addps %xmm4, %xmm3 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm4 mulps %xmm8, %xmm4 mulps %xmm2, %xmm4 movss (%rdx,%rbp), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] addps %xmm6, %xmm4 movaps %xmm2, %xmm5 pblendw $0xaa, %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[1],xmm2[2],xmm7[3],xmm2[4],xmm7[5],xmm2[6],xmm7[7] cvtdq2ps %xmm2, %xmm2 mulps %xmm8, %xmm2 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm3 mulps %xmm8, %xmm3 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movq 0x8(%r10), %rdx movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x410(%rsp), %xmm4 movaps %xmm4, 0x200(%rsp) movaps 0x400(%rsp), %xmm4 movaps %xmm4, 0x210(%rsp) movaps 0x3f0(%rsp), %xmm4 movaps %xmm4, 0x220(%rsp) movaps %xmm2, 0x230(%rsp) movd %ecx, %xmm2 pshufd $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm3, 0x240(%rsp) movdqa %xmm2, 0x250(%rsp) movdqa %xmm0, 0x260(%rsp) leaq 0x270(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x270(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x280(%rsp) movaps 0x80(%rbx), %xmm3 movaps %xmm3, %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, 0x420(%rsp), %xmm2 movaps %xmm2, 0x80(%rbx) movaps %xmm1, 0xb0(%rsp) leaq 0xb0(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x18(%r14), %rax movq %rax, 0x148(%rsp) movq 0x8(%r10), %rax movq %rax, 0x150(%rsp) movq %rbx, 0x158(%rsp) leaq 0x200(%rsp), %rax movq %rax, 0x160(%rsp) movl $0x4, 0x168(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %r9, 0x50(%rsp) movl %edi, 0x4(%rsp) movq %rsi, 0x48(%rsp) movaps %xmm15, 0x70(%rsp) movaps %xmm10, 0x60(%rsp) movaps %xmm14, 0x80(%rsp) movaps %xmm3, 0xf0(%rsp) je 0x153d25 leaq 0x140(%rsp), %rdi movq %r10, 0x40(%rsp) callq *%rax movaps 0xf0(%rsp), %xmm3 movaps 0x80(%rsp), %xmm14 movaps 0x60(%rsp), %xmm10 movaps 0x70(%rsp), %xmm15 movaps 0xa0(%rsp), %xmm9 movaps 0x90(%rsp), %xmm13 movq 0x48(%rsp), %rsi movq 0x58(%rsp), %r8 movl 0x4(%rsp), %edi movq 0x8(%rsp), %r11 movaps 0x30(%rsp), %xmm12 movq 0x50(%rsp), %r9 movq 0x40(%rsp), %r10 movdqa 0xb0(%rsp), %xmm2 ptest %xmm2, %xmm2 movdqa 0x10(%rsp), %xmm7 movaps 0x20(%rsp), %xmm4 je 0x154178 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x153dc5 testb $0x2, (%rcx) jne 0x153d5d testb $0x40, 0x3e(%r14) je 0x153dc5 leaq 0x140(%rsp), %rdi movq %r10, %r14 callq *%rax movaps 0xf0(%rsp), %xmm3 movaps 0x80(%rsp), %xmm14 movaps 0x60(%rsp), %xmm10 movaps 0x70(%rsp), %xmm15 movaps 0x20(%rsp), %xmm4 movaps 0xa0(%rsp), %xmm9 movaps 0x90(%rsp), %xmm13 movq 0x48(%rsp), %rsi movq 0x58(%rsp), %r8 movl 0x4(%rsp), %edi movdqa 0x10(%rsp), %xmm7 movq 0x8(%rsp), %r11 movaps 0x30(%rsp), %xmm12 movq 0x50(%rsp), %r9 movq %r14, %r10 movdqa 0xb0(%rsp), %xmm0 pcmpeqd 0x1d97c3a(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d9803e(%rip), %xmm2 # 0x1eebe20 movq 0x158(%rsp), %rax movaps 0x1d97c0f(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x154188 movaps 0x3c0(%rsp), %xmm3 movaps %xmm3, %xmm2 andps %xmm4, %xmm2 rcpps %xmm3, %xmm0 mulps %xmm0, %xmm3 movaps 0x1d98bef(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm4 subps %xmm3, %xmm4 mulps %xmm0, %xmm4 addps %xmm0, %xmm4 cmpnltps 0x1d9df0b(%rip), %xmm2 # 0x1ef1d40 andps %xmm4, %xmm2 movaps 0x3e0(%rsp), %xmm0 mulps %xmm2, %xmm0 minps %xmm6, %xmm0 mulps 0x3d0(%rsp), %xmm2 minps %xmm6, %xmm2 movss (%rsi,%rbp), %xmm4 movss 0x4(%rsi,%rbp), %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm4, %xmm5 psrld $0x10, %xmm5 pxor %xmm7, %xmm7 pblendw $0xaa, %xmm7, %xmm4 # xmm4 = xmm4[0],xmm7[1],xmm4[2],xmm7[3],xmm4[4],xmm7[5],xmm4[6],xmm7[7] cvtdq2ps %xmm4, %xmm4 movaps 0x1dc8aef(%rip), %xmm8 # 0x1f1c970 mulps %xmm8, %xmm4 cvtdq2ps %xmm5, %xmm5 mulps %xmm8, %xmm5 subps %xmm0, %xmm6 subps %xmm2, %xmm6 mulps %xmm6, %xmm4 mulps %xmm5, %xmm6 movaps %xmm3, %xmm5 pblendw $0xaa, %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[1],xmm3[2],xmm7[3],xmm3[4],xmm7[5],xmm3[6],xmm7[7] cvtdq2ps %xmm3, %xmm3 mulps %xmm8, %xmm3 mulps %xmm2, %xmm3 addps %xmm4, %xmm3 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm4 mulps %xmm8, %xmm4 mulps %xmm2, %xmm4 movq 0xd0(%rsp), %rdx movss (%rdx,%rbp), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] addps %xmm6, %xmm4 movaps %xmm2, %xmm5 pblendw $0xaa, %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[1],xmm2[2],xmm7[3],xmm2[4],xmm7[5],xmm2[6],xmm7[7] cvtdq2ps %xmm2, %xmm2 mulps %xmm8, %xmm2 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm3 mulps %xmm8, %xmm3 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movq 0x8(%r10), %rdx movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x3a0(%rsp), %xmm4 movaps %xmm4, 0x200(%rsp) movaps 0x390(%rsp), %xmm4 movaps %xmm4, 0x210(%rsp) movaps 0x380(%rsp), %xmm4 movaps %xmm4, 0x220(%rsp) movaps %xmm2, 0x230(%rsp) movd %ecx, %xmm2 pshufd $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm3, 0x240(%rsp) movdqa %xmm2, 0x250(%rsp) movdqa %xmm0, 0x260(%rsp) leaq 0x270(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x270(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x280(%rsp) movaps 0x80(%rbx), %xmm3 movaps %xmm3, %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, 0x3b0(%rsp), %xmm2 movaps %xmm2, 0x80(%rbx) movaps %xmm1, 0xb0(%rsp) leaq 0xb0(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x18(%r14), %rax movq %rax, 0x148(%rsp) movq 0x8(%r10), %rax movq %rax, 0x150(%rsp) movq %rbx, 0x158(%rsp) leaq 0x200(%rsp), %rax movq %rax, 0x160(%rsp) movl $0x4, 0x168(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %r9, 0x50(%rsp) movl %edi, 0x4(%rsp) movq %rsi, 0x48(%rsp) movaps %xmm3, 0x20(%rsp) je 0x154078 leaq 0x140(%rsp), %rdi movq %r10, 0x40(%rsp) callq *%rax movaps 0x20(%rsp), %xmm3 movq 0x48(%rsp), %rsi movq 0x58(%rsp), %r8 movl 0x4(%rsp), %edi movaps 0x1d9dd3d(%rip), %xmm14 # 0x1ef1d90 movaps 0x1d9dd25(%rip), %xmm13 # 0x1ef1d80 movq 0x8(%rsp), %r11 movaps 0x1d97988(%rip), %xmm11 # 0x1eeb9f0 movaps 0x30(%rsp), %xmm12 movq 0x50(%rsp), %r9 movq 0x40(%rsp), %r10 movdqa 0xb0(%rsp), %xmm2 ptest %xmm2, %xmm2 movdqa 0x10(%rsp), %xmm7 je 0x1541af movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x1540fc testb $0x2, (%rcx) jne 0x1540ab testb $0x40, 0x3e(%r14) je 0x1540fc leaq 0x140(%rsp), %rdi movq %r10, %r14 callq *%rax movaps 0x20(%rsp), %xmm3 movq 0x48(%rsp), %rsi movq 0x58(%rsp), %r8 movl 0x4(%rsp), %edi movdqa 0x10(%rsp), %xmm7 movaps 0x1d9dcb7(%rip), %xmm14 # 0x1ef1d90 movaps 0x1d9dc9f(%rip), %xmm13 # 0x1ef1d80 movq 0x8(%rsp), %r11 movaps 0x1d97902(%rip), %xmm11 # 0x1eeb9f0 movaps 0x30(%rsp), %xmm12 movq 0x50(%rsp), %r9 movq %r14, %r10 movdqa 0xb0(%rsp), %xmm0 pcmpeqd 0x1d97903(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d97d07(%rip), %xmm2 # 0x1eebe20 movq 0x158(%rsp), %rax movaps 0x1d978d8(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x1541bf movaps %xmm7, %xmm6 jmp 0x1534e4 movaps %xmm4, %xmm3 movaps 0x1d98571(%rip), %xmm4 # 0x1eec6c0 movaps 0x1d97899(%rip), %xmm11 # 0x1eeb9f0 movaps 0x1d9dc21(%rip), %xmm13 # 0x1ef1d80 movaps 0x1d9dc29(%rip), %xmm14 # 0x1ef1d90 movdqa 0x10(%rsp), %xmm7 movaps 0x30(%rsp), %xmm12 jmp 0x153a0a pcmpeqd 0x1d97890(%rip), %xmm2 # 0x1eeba10 pxor 0x1d97c98(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%rbx), %xmm3 movaps %xmm3, 0x80(%rbx) jmp 0x15358d pcmpeqd 0x1d97859(%rip), %xmm2 # 0x1eeba10 pxor 0x1d97c61(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%rbx), %xmm3 movaps %xmm3, 0x80(%rbx) jmp 0x153a66 movaps 0x1d97802(%rip), %xmm11 # 0x1eeb9f0 movaps 0x1d9db8a(%rip), %xmm13 # 0x1ef1d80 movaps 0x1d9db92(%rip), %xmm14 # 0x1ef1d90 cmpl $0x2, %edi movq 0x1f0(%rsp), %rdx je 0x154261 movq 0x120(%rsp), %r14 leaq 0x1(%r14), %rax movq 0x1e8(%rsp), %rcx addq %rcx, %rsi addq %rcx, 0xe8(%rsp) addq %rcx, 0xe0(%rsp) addq %rcx, 0xd8(%rsp) addq %rcx, 0xd0(%rsp) addq %rcx, 0x128(%rsp) addq %rcx, %r13 addq %rcx, %rdx testq %r14, %r14 movq %rax, 0x120(%rsp) je 0x15300d xorps 0x1d97bb8(%rip), %xmm7 # 0x1eebe20 xorl %ecx, %ecx orps 0x100(%rsp), %xmm7 movaps %xmm7, 0x100(%rsp) movmskps %xmm7, %eax cmpl $0xf, %eax movq 0xc8(%rsp), %rsi movq 0xc0(%rsp), %r9 je 0x1542ce movaps 0x360(%rsp), %xmm1 movaps %xmm7, %xmm0 blendvps %xmm0, 0x1d9775a(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x360(%rsp) xorl %eax, %eax testq %rcx, %rcx je 0x1542d1 movq %rcx, (%r15) addq $0x8, %r15 movaps 0x1d9773d(%rip), %xmm0 # 0x1eeba00 movaps %xmm0, (%r12) addq $0x10, %r12 jmp 0x1542d1 pushq $0x3 popq %rax cmpl $0x3, %eax jne 0x152cf1 jmp 0x1543e8 pushq $0x2 jmp 0x1542d0 movaps %xmm15, 0x20(%rsp) movq %r11, 0x8(%rsp) movq %r10, 0x40(%rsp) movq %rsi, 0xc8(%rsp) movq %r9, 0xc0(%rsp) bsfq %r13, %rcx movq %rsi, %rdi movq %r9, %rsi movq %rbp, %rdx movq %rcx, 0x10(%rsp) leaq 0x130(%rsp), %r8 movq %rbx, %r9 pushq %r10 leaq 0x298(%rsp), %rax pushq %rax callq 0x1a6502 popq %rcx popq %rdx testb %al, %al je 0x154343 movq 0x10(%rsp), %rax orl $-0x1, 0x100(%rsp,%rax,4) leaq -0x1(%r13), %rax andq %rax, %r13 movq 0x40(%rsp), %r10 movq 0xc8(%rsp), %rsi movq 0xc0(%rsp), %r9 jne 0x154303 movaps 0x100(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x30(%rsp), %xmm12 movaps 0x1d97670(%rip), %xmm11 # 0x1eeb9f0 movq 0x8(%rsp), %r11 movaps 0x1d9d9f3(%rip), %xmm13 # 0x1ef1d80 movaps 0x1d9d9fb(%rip), %xmm14 # 0x1ef1d90 movaps 0x20(%rsp), %xmm15 je 0x152d38 movaps 0x360(%rsp), %xmm1 blendvps %xmm0, 0x1d9764e(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x360(%rsp) pushq $0x2 popq %rax jmp 0x152d38 andq $-0x10, %rbp movl 0x2c(%rbp), %eax movq 0x30(%rbp,%rax), %rcx movq %rbp, 0x130(%rsp) movaps 0x370(%rsp), %xmm7 movq 0x8(%rsp), %r11 jmp 0x15426a andps 0x100(%rsp), %xmm12 movaps 0x80(%rbx), %xmm1 movaps %xmm12, %xmm0 blendvps %xmm0, 0x1d975fb(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x1b38, %rsp # imm = 0x1B38 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdx movq %r10, %rcx addq $0x1b38, %rsp # imm = 0x1B38 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1a4700
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::SubdivPatch1MBIntersectorK<4>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq (%rsi), %r13 cmpq $0x8, 0x70(%r13) je 0x1545ea pcmpeqd %xmm1, %xmm1 pcmpeqd (%rdi), %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x1545ea movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movq %rsp, %rcx andq $0x0, (%rcx) movzbl %al, %ebp movaps (%rdx), %xmm0 leaq 0x10(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%rdx), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%rdx), %xmm0 movaps %xmm0, 0x20(%rax) movaps 0x40(%rdx), %xmm6 movaps %xmm6, 0x30(%rax) movaps 0x50(%rdx), %xmm4 movaps %xmm4, 0x40(%rax) movaps 0x60(%rdx), %xmm3 movaps 0x1d9820b(%rip), %xmm2 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm2, %xmm0 movaps 0x1d9d87e(%rip), %xmm5 # 0x1ef1d40 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm6 movaps %xmm4, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm3, 0x50(%rax) andps %xmm3, %xmm2 cmpltps %xmm5, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm3 rcpps %xmm6, %xmm0 mulps %xmm0, %xmm6 movaps 0x1d98516(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm5 subps %xmm6, %xmm5 mulps %xmm0, %xmm5 addps %xmm0, %xmm5 rcpps %xmm4, %xmm6 mulps %xmm6, %xmm4 movaps %xmm2, %xmm0 subps %xmm4, %xmm0 mulps %xmm6, %xmm0 addps %xmm6, %xmm0 rcpps %xmm3, %xmm4 mulps %xmm4, %xmm3 subps %xmm3, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 movaps %xmm5, 0x60(%rax) movaps %xmm0, 0x70(%rax) xorps %xmm3, %xmm3 cmpltps %xmm3, %xmm5 andps 0x1dcb983(%rip), %xmm5 # 0x1f1fec0 cmpnltps %xmm3, %xmm0 movaps 0x1dcb988(%rip), %xmm4 # 0x1f1fed0 blendvps %xmm0, 0x1da8cbf(%rip), %xmm4 # 0x1efd210 movaps %xmm2, 0x80(%rax) movaps %xmm5, 0x90(%rax) cmpnltps %xmm3, %xmm2 movaps 0x1dcb986(%rip), %xmm5 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dcb96a(%rip), %xmm5 # 0x1f1fee0 movaps %xmm4, 0xa0(%rax) movaps %xmm5, 0xb0(%rax) movaps 0x30(%rdx), %xmm2 movaps 0x80(%rdx), %xmm4 maxps %xmm3, %xmm2 maxps %xmm3, %xmm4 movaps 0x1d97454(%rip), %xmm3 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0xc0(%rax) movaps 0x1d9744e(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %rbx movq 0x70(%r13), %rdx movq %r12, %rdi movq %r13, %rsi movq %rsp, %r8 movq %r14, %r9 pushq %r15 leaq 0x18(%rsp), %rax pushq %rax callq 0x1a7e66 popq %rax popq %rcx andq %rbx, %rbp jne 0x1545be addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::SubdivPatch1MBIntersectorK<4>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c08, %rsp # imm = 0x1C08 movq (%rsi), %rax movq %rax, 0x1e8(%rsp) cmpq $0x8, 0x70(%rax) je 0x156444 movq %rdx, %rbx pcmpeqd %xmm2, %xmm2 movdqa (%rdi), %xmm0 pcmpeqd %xmm2, %xmm0 movaps 0x80(%rdx), %xmm3 xorps %xmm4, %xmm4 movaps %xmm3, %xmm8 cmpnltps %xmm4, %xmm8 andps %xmm0, %xmm8 movmskps %xmm8, %eax testl %eax, %eax je 0x156444 movq %rcx, %r10 andq $0x0, 0x1c0(%rsp) movaps (%rbx), %xmm0 movaps %xmm0, 0x330(%rsp) movaps 0x10(%rbx), %xmm0 movaps %xmm0, 0x340(%rsp) movaps 0x20(%rbx), %xmm0 movaps %xmm0, 0x350(%rsp) movaps 0x40(%rbx), %xmm7 movaps %xmm7, 0x360(%rsp) movaps 0x50(%rbx), %xmm1 movaps %xmm1, 0x370(%rsp) movaps 0x60(%rbx), %xmm5 movaps %xmm5, 0x380(%rsp) movaps 0x1d98011(%rip), %xmm6 # 0x1eec6c0 movaps %xmm7, %xmm0 andps %xmm6, %xmm0 movaps 0x1d9d683(%rip), %xmm9 # 0x1ef1d40 cmpltps %xmm9, %xmm0 blendvps %xmm0, %xmm9, %xmm7 movaps %xmm1, %xmm0 andps %xmm6, %xmm0 cmpltps %xmm9, %xmm0 blendvps %xmm0, %xmm9, %xmm1 movaps %xmm5, %xmm0 andps %xmm6, %xmm0 cmpltps %xmm9, %xmm0 blendvps %xmm0, %xmm9, %xmm5 rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1d98318(%rip), %xmm9 # 0x1eeca10 movaps %xmm9, %xmm6 subps %xmm7, %xmm6 mulps %xmm0, %xmm6 addps %xmm0, %xmm6 rcpps %xmm1, %xmm7 mulps %xmm7, %xmm1 movaps %xmm9, %xmm0 subps %xmm1, %xmm0 mulps %xmm7, %xmm0 addps %xmm7, %xmm0 rcpps %xmm5, %xmm7 mulps %xmm7, %xmm5 movaps %xmm9, %xmm1 subps %xmm5, %xmm1 mulps %xmm7, %xmm1 addps %xmm7, %xmm1 movaps %xmm6, 0x390(%rsp) movaps %xmm0, 0x3a0(%rsp) movaps %xmm1, 0x3b0(%rsp) cmpltps %xmm4, %xmm6 andps 0x1dcb772(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm4, %xmm0 movaps 0x1dcb777(%rip), %xmm5 # 0x1f1fed0 blendvps %xmm0, 0x1da8aae(%rip), %xmm5 # 0x1efd210 movaps %xmm6, 0x3c0(%rsp) movaps %xmm5, 0x3d0(%rsp) cmpnltps %xmm4, %xmm1 movaps 0x1dcb773(%rip), %xmm5 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dcb757(%rip), %xmm5 # 0x1f1fee0 movaps %xmm5, 0x3e0(%rsp) movaps 0x30(%rbx), %xmm5 maxps %xmm4, %xmm5 movaps 0x1d97250(%rip), %xmm14 # 0x1eeb9f0 movaps %xmm14, %xmm1 movaps %xmm8, %xmm0 blendvps %xmm0, %xmm5, %xmm1 maxps %xmm4, %xmm3 movaps %xmm1, 0x3f0(%rsp) movaps 0x1d97241(%rip), %xmm4 # 0x1eeba00 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, 0x400(%rsp) movaps %xmm8, 0x20(%rsp) pxor %xmm8, %xmm2 movdqa %xmm2, 0x1b0(%rsp) cmpq $0x0, 0x8(%rcx) je 0x154802 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %ecx, %ecx cmpb $0x1, %al adcq $0x2, %rcx movq %rcx, 0x88(%rsp) jmp 0x15480d pushq $0x3 popq %rax movq %rax, 0x88(%rsp) leaq 0x570(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0xd10(%rsp), %r12 movaps %xmm14, -0x20(%r12) movq 0x1e8(%rsp), %rax movq 0x70(%rax), %rax movq %rax, -0x8(%r15) movaps %xmm1, -0x10(%r12) leaq 0x1ffb738(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x410(%rsp) movq %r10, 0x38(%rsp) movaps 0x20(%rsp), %xmm1 addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 cmpq $-0x8, %rbp je 0x15630d movaps (%r12), %xmm15 movaps %xmm15, %xmm0 cmpltps 0x400(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15631e movzbl %al, %r13d popcntl %r13d, %r14d xorl %eax, %eax cmpq 0x88(%rsp), %r14 jbe 0x156322 cmpq 0x88(%rsp), %r14 jbe 0x156310 testb $0x8, %bpl jne 0x154b47 movaps 0x400(%rsp), %xmm1 movq %rbp, %rax andq $-0x10, %rax andl $0x7, %ebp movl %ebp, %ecx cmpnleps %xmm15, %xmm1 xorl %edx, %edx movaps %xmm14, %xmm15 pushq $0x8 popq %rbp movq (%rax,%rdx,8), %r8 cmpq $0x8, %r8 je 0x154aa7 movss 0x80(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x20(%rax,%rdx,4), %xmm3 movss 0x30(%rax,%rdx,4), %xmm7 movss 0x40(%rax,%rdx,4), %xmm4 movss 0x50(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0x70(%rbx), %xmm2 mulps %xmm2, %xmm0 addps %xmm3, %xmm0 movss 0xa0(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm3 addps %xmm4, %xmm3 movss 0xc0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm5, %xmm4 movss 0x90(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm7, %xmm5 movss 0xb0(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm7 addps %xmm6, %xmm7 movss 0xd0(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm2, %xmm6 addps %xmm8, %xmm6 movaps 0x330(%rsp), %xmm8 movaps 0x340(%rsp), %xmm9 movaps 0x350(%rsp), %xmm10 movaps 0x390(%rsp), %xmm11 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 subps %xmm9, %xmm3 movaps 0x3a0(%rsp), %xmm12 mulps %xmm12, %xmm3 subps %xmm10, %xmm4 movaps 0x3b0(%rsp), %xmm13 mulps %xmm13, %xmm4 subps %xmm8, %xmm5 mulps %xmm11, %xmm5 subps %xmm9, %xmm7 mulps %xmm12, %xmm7 subps %xmm10, %xmm6 mulps %xmm13, %xmm6 movaps %xmm0, %xmm8 pminsd %xmm5, %xmm8 movaps %xmm3, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm8, %xmm9 movaps %xmm4, %xmm8 pminsd %xmm6, %xmm8 pmaxsd %xmm9, %xmm8 pmaxsd %xmm0, %xmm5 pmaxsd %xmm3, %xmm7 pminsd %xmm5, %xmm7 pmaxsd %xmm4, %xmm6 pminsd %xmm7, %xmm6 movdqa 0x3f0(%rsp), %xmm0 pmaxsd %xmm8, %xmm0 pminsd 0x400(%rsp), %xmm6 cmpleps %xmm6, %xmm0 cmpl $0x6, %ecx je 0x154ac0 andps %xmm1, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x154aa7 movaps %xmm14, %xmm2 blendvps %xmm0, %xmm8, %xmm2 cmpq $0x8, %rbp je 0x154aa0 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm15, (%r12) addq $0x10, %r12 movq %r8, %rbp movaps %xmm2, %xmm15 cmpq $0x8, %r8 je 0x154aea leaq 0x1(%rdx), %rdi cmpq $0x3, %rdx movq %rdi, %rdx jb 0x1548e3 jmp 0x154aea movss 0xe0(%rax,%rdx,4), %xmm3 movss 0xf0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] cmpleps %xmm2, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpltps %xmm4, %xmm2 andps %xmm3, %xmm2 andps %xmm2, %xmm0 jmp 0x154a71 xorl %eax, %eax cmpq $0x8, %rbp je 0x154b24 movaps 0x400(%rsp), %xmm0 cmpnleps %xmm15, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, 0x88(%rsp) movaps 0x20(%rsp), %xmm1 jae 0x154b30 testb %cl, %cl jne 0x1548b7 jmp 0x156310 xorl %ecx, %ecx pushq $0x4 popq %rax movaps 0x20(%rsp), %xmm1 jmp 0x154b17 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm15, (%r12) addq $0x10, %r12 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x154b17 cmpq $-0x8, %rbp je 0x15630d movaps 0x400(%rsp), %xmm0 cmpnleps %xmm15, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15631e movl %ebp, %eax andl $0xf, %eax cmpl $0x8, %eax jne 0x1563d9 movaps 0x1b0(%rsp), %xmm2 movq 0x1c0(%rsp), %rax movl 0x8(%rax), %eax decl %eax cvtsi2ss %rax, %xmm1 movaps %xmm1, %xmm9 shufps $0x0, %xmm1, %xmm9 # xmm9 = xmm9[0,0],xmm1[0,0] mulps 0x70(%rbx), %xmm9 roundps $0x1, %xmm9, %xmm0 addss 0x1d9be1e(%rip), %xmm1 # 0x1ef09cc shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] minps %xmm1, %xmm0 maxps 0x1d96e54(%rip), %xmm0 # 0x1eeba10 cvtps2dq %xmm0, %xmm1 movapd %xmm1, 0x290(%rsp) movaps %xmm2, %xmm1 movmskps %xmm2, %eax xorl $0xf, %eax je 0x1562b3 movq %rsi, 0x120(%rsp) subps %xmm0, %xmm9 xorps 0x1d97235(%rip), %xmm1 # 0x1eebe20 movaps 0x1d97e1e(%rip), %xmm0 # 0x1eeca10 subps %xmm9, %xmm0 movaps %xmm0, 0x280(%rsp) movaps 0x290(%rsp), %xmm0 movaps %xmm0, 0x420(%rsp) shrq $0x2, %rbp andq $-0x4, %rbp movaps %xmm1, 0xb0(%rsp) movaps %xmm1, %xmm10 movaps 0x20(%rsp), %xmm1 movaps %xmm9, 0xc0(%rsp) movzbl %al, %eax andl $0xf, %eax bsfq %rax, %rax cltq movslq 0x290(%rsp,%rax,4), %rdi movd %edi, %xmm0 movq 0x1c0(%rsp), %rax movl 0x28(%rax), %r14d movl 0x14(%rax), %esi movl 0xc(%rax), %r13d xorl %ecx, %ecx cmpq $0x2, %r13 setne %cl movq %rcx, (%rsp) movl 0x24(%rax), %ecx movq %rax, 0x10(%rsp) movq %r14, %r11 imulq %rdi, %r11 imulq $0xc, %rsi, %r8 leaq (%rax,%rbp), %rdi andl $-0x4, %r14d leaq (%r14,%rcx), %rdx addq %r11, %rdx addq %rdx, %r8 movq %r8, 0x58(%rsp) leaq (%r8,%r13,4), %r8 addq %rdi, %r8 movq %r8, 0x128(%rsp) leaq (%r11,%rsi,8), %r9 addq %rcx, %r9 addq %r9, %r14 leaq (%r14,%r13,4), %r8 addq %rdi, %r8 movq %r8, 0x150(%rsp) leaq (%rdx,%rsi,4), %rax movq %rax, 0x130(%rsp) leaq (%rax,%r13,4), %r8 addq %rdi, %r8 movq %r8, 0x148(%rsp) leaq (%rdx,%r13,4), %r8 addq %rdi, %r8 movq %r8, 0x140(%rsp) movq 0x10(%rsp), %rax leaq (%rax,%rbp), %rdi addq $0x30, %rdi leaq (%r11,%r13,4), %rax addq %rdi, %rax addq %rcx, %rax movq %rax, 0x138(%rsp) movq %r11, %r8 leaq (%r9,%r13,4), %rax addq %rdi, %rax leaq (%r11,%rsi,4), %r11 movq %r14, %rsi addq %rcx, %r11 leaq (%r11,%r13,4), %r14 addq %rdi, %r14 addq %rdi, 0x58(%rsp) addq %rdi, %rsi addq %rdi, 0x130(%rsp) addq %rdi, %rdx movq %rdx, 0x208(%rsp) addq %rdi, %r9 movq %r9, 0x200(%rsp) addq %rdi, %r11 movq %r11, 0x1f8(%rsp) movq %r14, %r11 movq %rcx, %rdi pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] pcmpeqd 0x420(%rsp), %xmm0 pand %xmm10, %xmm0 movdqa %xmm0, %xmm2 pxor 0x1d970ac(%rip), %xmm2 # 0x1eebe20 movdqa %xmm2, 0x430(%rsp) movq 0x10(%rsp), %rcx addq %rcx, %r8 movl 0x10(%rcx), %ecx movl %ecx, 0x15c(%rsp) movq (%rsp), %rcx leaq 0x4(,%rcx,4), %rcx movq %rcx, 0x270(%rsp) leaq (,%r13,4), %rcx movq %rcx, 0x268(%rsp) movq %rax, %r9 addq $0x2c, %rdi movdqa %xmm0, 0x440(%rsp) movdqa %xmm0, 0x10(%rsp) movq $0x0, 0x1f0(%rsp) movaps %xmm10, 0x160(%rsp) leaq (%r8,%rbp), %rax addq %rdi, %rax movq %rax, 0x278(%rsp) xorl %r14d, %r14d cmpq %r14, 0x270(%rsp) je 0x1561d5 movq 0x278(%rsp), %rax movss (%rax,%r14), %xmm11 movss 0x4(%rax,%r14), %xmm1 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movq 0x1f8(%rsp), %rax movss -0x4(%rax,%r14), %xmm15 movss (%rax,%r14), %xmm0 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movq 0x200(%rsp), %rax movss -0x4(%rax,%r14), %xmm13 movss (%rax,%r14), %xmm8 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, 0x100(%rsp) shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1d0(%rsp) shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movq 0x138(%rsp), %rax movss -0x4(%rax,%r14), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss -0x4(%r11,%r14), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss -0x4(%r9,%r14), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movq 0x208(%rsp), %rax movss -0x4(%rax,%r14), %xmm5 movss (%rax,%r14), %xmm1 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movq 0x130(%rsp), %rax movss -0x4(%rax,%r14), %xmm7 movss (%rax,%r14), %xmm2 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss -0x4(%rsi,%r14), %xmm6 movss (%rsi,%r14), %xmm4 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movq 0x140(%rsp), %rax movss 0x2c(%rax,%r14), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm9, %xmm5 movaps 0x280(%rsp), %xmm3 mulps %xmm3, %xmm11 addps %xmm5, %xmm11 movaps %xmm11, (%rsp) movq 0x148(%rsp), %rax movss 0x2c(%rax,%r14), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm9, %xmm7 mulps %xmm3, %xmm15 addps %xmm7, %xmm15 movq 0x150(%rsp), %rax movss 0x2c(%rax,%r14), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm9, %xmm6 mulps %xmm3, %xmm13 addps %xmm6, %xmm13 mulps %xmm9, %xmm1 mulps %xmm9, %xmm2 mulps %xmm9, %xmm4 movaps 0x100(%rsp), %xmm11 mulps %xmm3, %xmm11 addps %xmm1, %xmm11 movaps 0x1d0(%rsp), %xmm1 mulps %xmm3, %xmm1 addps %xmm2, %xmm1 movaps %xmm1, %xmm2 mulps %xmm3, %xmm8 addps %xmm4, %xmm8 mulps %xmm9, %xmm0 mulps %xmm9, %xmm5 mulps %xmm9, %xmm7 mulps %xmm3, %xmm10 addps %xmm0, %xmm10 mulps %xmm3, %xmm12 addps %xmm5, %xmm12 mulps %xmm3, %xmm14 addps %xmm7, %xmm14 movaps (%rbx), %xmm1 movaps 0x10(%rbx), %xmm5 movaps 0x20(%rbx), %xmm6 movaps (%rsp), %xmm9 subps %xmm1, %xmm9 subps %xmm5, %xmm15 subps %xmm6, %xmm13 movaps %xmm11, 0x100(%rsp) movaps %xmm11, %xmm4 subps %xmm1, %xmm4 movaps %xmm2, 0x1d0(%rsp) movaps %xmm2, %xmm7 subps %xmm5, %xmm7 movaps %xmm8, 0x1a0(%rsp) subps %xmm6, %xmm8 movaps %xmm8, 0x60(%rsp) movaps %xmm10, 0xa0(%rsp) movaps %xmm10, %xmm0 subps %xmm1, %xmm0 movaps %xmm12, 0xf0(%rsp) movaps %xmm12, %xmm2 subps %xmm5, %xmm2 movaps %xmm14, 0xe0(%rsp) movaps %xmm14, %xmm1 subps %xmm6, %xmm1 movaps %xmm0, %xmm3 subps %xmm9, %xmm3 movaps %xmm9, %xmm11 movaps %xmm2, %xmm14 subps %xmm15, %xmm14 movaps %xmm1, %xmm10 subps %xmm13, %xmm10 movaps %xmm2, %xmm5 addps %xmm15, %xmm5 movaps %xmm1, %xmm6 addps %xmm13, %xmm6 movaps %xmm3, %xmm8 mulps %xmm5, %xmm8 mulps %xmm10, %xmm5 movaps %xmm14, %xmm12 mulps %xmm6, %xmm12 subps %xmm5, %xmm12 movaps %xmm0, %xmm5 addps %xmm9, %xmm5 movaps %xmm3, 0x90(%rsp) mulps %xmm3, %xmm6 movaps %xmm5, %xmm9 movaps %xmm10, 0x170(%rsp) mulps %xmm10, %xmm9 subps %xmm6, %xmm9 movaps %xmm14, 0x250(%rsp) mulps %xmm14, %xmm5 subps %xmm5, %xmm8 movaps 0x60(%rbx), %xmm3 movaps %xmm3, 0x190(%rsp) mulps %xmm3, %xmm8 movaps 0x50(%rbx), %xmm5 mulps %xmm5, %xmm9 addps %xmm8, %xmm9 movaps 0x40(%rbx), %xmm6 mulps %xmm6, %xmm12 addps %xmm9, %xmm12 movaps %xmm11, %xmm14 movaps %xmm11, %xmm3 subps %xmm4, %xmm3 movaps %xmm15, %xmm9 subps %xmm7, %xmm9 movaps %xmm13, %xmm11 movaps 0x60(%rsp), %xmm8 subps %xmm8, %xmm11 movaps %xmm15, 0xd0(%rsp) movaps %xmm15, %xmm10 movaps %xmm14, %xmm15 addps %xmm7, %xmm10 movaps %xmm13, 0x180(%rsp) movaps %xmm13, %xmm14 addps %xmm8, %xmm14 movaps %xmm3, %xmm8 mulps %xmm10, %xmm8 mulps %xmm11, %xmm10 movaps %xmm9, %xmm13 mulps %xmm14, %xmm13 subps %xmm10, %xmm13 movaps %xmm15, (%rsp) addps %xmm4, %xmm15 mulps %xmm3, %xmm14 movaps %xmm15, %xmm10 movaps %xmm11, 0x240(%rsp) mulps %xmm11, %xmm10 subps %xmm14, %xmm10 mulps %xmm9, %xmm15 subps %xmm15, %xmm8 movaps 0x190(%rsp), %xmm11 mulps %xmm11, %xmm8 mulps %xmm5, %xmm10 addps %xmm8, %xmm10 mulps %xmm6, %xmm13 addps %xmm10, %xmm13 movaps %xmm4, %xmm10 subps %xmm0, %xmm10 addps %xmm4, %xmm0 movaps %xmm7, %xmm15 subps %xmm2, %xmm15 addps %xmm7, %xmm2 movaps 0x60(%rsp), %xmm4 movaps %xmm4, %xmm8 subps %xmm1, %xmm8 addps %xmm4, %xmm1 movaps %xmm10, %xmm4 mulps %xmm2, %xmm4 mulps %xmm8, %xmm2 movaps %xmm15, %xmm14 mulps %xmm1, %xmm14 subps %xmm2, %xmm14 mulps %xmm10, %xmm1 movaps %xmm0, %xmm2 mulps %xmm8, %xmm2 subps %xmm1, %xmm2 mulps %xmm15, %xmm0 subps %xmm0, %xmm4 mulps %xmm11, %xmm4 movaps %xmm5, 0x60(%rsp) mulps %xmm5, %xmm2 addps %xmm4, %xmm2 mulps %xmm6, %xmm14 addps %xmm2, %xmm14 movaps %xmm12, %xmm2 addps %xmm13, %xmm2 addps %xmm14, %xmm2 movaps %xmm12, %xmm0 minps %xmm13, %xmm0 minps %xmm14, %xmm0 movaps %xmm12, 0x550(%rsp) movaps %xmm12, %xmm7 maxps %xmm13, %xmm7 maxps %xmm14, %xmm7 movaps %xmm2, %xmm1 andps 0x1d974b4(%rip), %xmm1 # 0x1eec6c0 mulps 0x1d9cb5d(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm7 xorps 0x1d974b2(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm7 andps 0x10(%rsp), %xmm7 movmskps %xmm7, %eax testl %eax, %eax je 0x15613e movaps %xmm13, 0x530(%rsp) movaps %xmm2, 0x540(%rsp) movaps %xmm9, %xmm0 movaps %xmm8, %xmm11 movaps 0x170(%rsp), %xmm8 mulps %xmm8, %xmm0 movaps %xmm3, %xmm1 movaps 0x250(%rsp), %xmm5 mulps %xmm5, %xmm1 movaps %xmm15, %xmm4 movaps 0x240(%rsp), %xmm13 mulps %xmm13, %xmm4 movaps %xmm10, %xmm14 mulps %xmm9, %xmm14 mulps %xmm13, %xmm5 subps %xmm0, %xmm5 movaps 0x90(%rsp), %xmm12 movaps %xmm12, %xmm2 mulps %xmm9, %xmm12 mulps %xmm11, %xmm9 subps %xmm4, %xmm9 movaps %xmm15, 0x90(%rsp) movaps 0x1d9740d(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 andps %xmm15, %xmm4 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm5, %xmm9 movaps %xmm3, %xmm0 mulps %xmm11, %xmm0 mulps %xmm13, %xmm2 mulps %xmm13, %xmm10 mulps %xmm3, %xmm8 subps %xmm2, %xmm8 subps %xmm0, %xmm10 andps %xmm15, %xmm2 andps %xmm15, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm8, %xmm10 mulps 0x90(%rsp), %xmm3 subps %xmm1, %xmm12 subps %xmm14, %xmm3 andps %xmm15, %xmm1 andps %xmm15, %xmm14 cmpltps %xmm14, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm12, %xmm3 movaps 0x190(%rsp), %xmm0 mulps %xmm3, %xmm0 movaps 0x60(%rsp), %xmm1 mulps %xmm10, %xmm1 addps %xmm0, %xmm1 mulps %xmm9, %xmm6 addps %xmm1, %xmm6 addps %xmm6, %xmm6 movaps 0x180(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps 0xd0(%rsp), %xmm0 mulps %xmm10, %xmm0 addps %xmm1, %xmm0 movaps (%rsp), %xmm4 mulps %xmm9, %xmm4 addps %xmm0, %xmm4 rcpps %xmm6, %xmm1 movaps %xmm6, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d9769f(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm4, %xmm4 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm4, %xmm0 movaps 0x30(%rbx), %xmm1 cmpleps %xmm0, %xmm1 movaps %xmm0, %xmm2 cmpleps 0x80(%rbx), %xmm2 andps %xmm1, %xmm2 cmpneqps 0x1d96672(%rip), %xmm6 # 0x1eeba10 andps %xmm2, %xmm6 pslld $0x1f, %xmm6 psrad $0x1f, %xmm6 pand %xmm7, %xmm6 movmskps %xmm6, %eax testl %eax, %eax je 0x155408 movaps 0x550(%rsp), %xmm1 movaps %xmm1, 0x520(%rsp) movaps 0x530(%rsp), %xmm1 movaps %xmm1, 0x510(%rsp) movaps 0x540(%rsp), %xmm1 movaps %xmm1, 0x500(%rsp) movaps %xmm0, 0x4f0(%rsp) movaps %xmm9, 0x4e0(%rsp) movaps %xmm10, 0x4d0(%rsp) movaps %xmm3, 0x4c0(%rsp) movaps 0xa0(%rsp), %xmm7 movaps 0xf0(%rsp), %xmm5 movaps 0xe0(%rsp), %xmm9 movq 0x138(%rsp), %rax movss (%rax,%r14), %xmm14 movd (%r11,%r14), %xmm11 movss (%r9,%r14), %xmm12 movq 0x140(%rsp), %rax movss 0x30(%rax,%r14), %xmm4 movq 0x148(%rsp), %rax movss 0x30(%rax,%r14), %xmm3 movq 0x150(%rsp), %rax movss 0x30(%rax,%r14), %xmm2 movq 0x1c0(%rsp), %rcx movl 0x18(%rcx), %eax movq (%r10), %rdx movq 0x1e8(%rdx), %rdx movq (%rdx,%rax,8), %r13 movd 0x34(%r13), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd 0x1d96574(%rip), %xmm1 # 0x1eeba10 pandn %xmm6, %xmm1 movmskps %xmm1, %edx testl %edx, %edx je 0x1554d0 movl 0x1c(%rcx), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x155a4e cmpq $0x0, 0x48(%r13) jne 0x155a4e pandn 0x10(%rsp), %xmm1 movdqa %xmm1, 0x10(%rsp) movaps 0x10(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x155a1c shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps 0xc0(%rsp), %xmm0 mulps %xmm0, %xmm4 mulps %xmm0, %xmm3 mulps %xmm0, %xmm2 movaps 0x280(%rsp), %xmm0 mulps %xmm0, %xmm14 addps %xmm4, %xmm14 mulps %xmm0, %xmm11 addps %xmm3, %xmm11 mulps %xmm0, %xmm12 addps %xmm2, %xmm12 movaps (%rbx), %xmm0 movaps 0x10(%rbx), %xmm1 movaps %xmm11, %xmm3 movaps 0x20(%rbx), %xmm2 movaps 0x40(%rbx), %xmm4 movaps %xmm4, 0x60(%rsp) movaps 0x50(%rbx), %xmm4 movaps %xmm4, (%rsp) subps %xmm0, %xmm7 subps %xmm1, %xmm5 subps %xmm2, %xmm9 movaps 0x100(%rsp), %xmm13 subps %xmm0, %xmm13 movaps 0x1d0(%rsp), %xmm10 subps %xmm1, %xmm10 movaps %xmm5, %xmm8 movaps %xmm5, 0xf0(%rsp) movaps 0x1a0(%rsp), %xmm5 subps %xmm2, %xmm5 movaps %xmm5, 0x1a0(%rsp) subps %xmm0, %xmm14 subps %xmm1, %xmm3 subps %xmm2, %xmm12 movaps %xmm14, %xmm6 subps %xmm7, %xmm6 movaps %xmm9, %xmm5 movaps %xmm3, %xmm11 subps %xmm8, %xmm11 movaps %xmm12, %xmm9 subps %xmm5, %xmm9 movaps %xmm14, %xmm0 addps %xmm7, %xmm0 movaps %xmm7, 0xa0(%rsp) movaps %xmm3, %xmm1 addps %xmm8, %xmm1 movaps %xmm12, %xmm2 addps %xmm5, %xmm2 movaps %xmm6, %xmm4 mulps %xmm1, %xmm4 mulps %xmm9, %xmm1 movaps %xmm11, %xmm15 mulps %xmm2, %xmm15 subps %xmm1, %xmm15 movaps %xmm6, 0x1d0(%rsp) mulps %xmm6, %xmm2 movaps %xmm0, %xmm1 movaps %xmm9, 0x190(%rsp) mulps %xmm9, %xmm1 subps %xmm2, %xmm1 movaps 0x60(%rbx), %xmm2 movaps %xmm2, 0x100(%rsp) movaps %xmm11, 0xd0(%rsp) mulps %xmm11, %xmm0 subps %xmm0, %xmm4 movaps %xmm7, %xmm9 subps %xmm13, %xmm9 mulps %xmm2, %xmm4 movaps (%rsp), %xmm6 mulps %xmm6, %xmm1 addps %xmm4, %xmm1 movaps %xmm8, %xmm4 subps %xmm10, %xmm4 movaps 0x60(%rsp), %xmm7 mulps %xmm7, %xmm15 addps %xmm1, %xmm15 movaps %xmm5, %xmm11 movaps 0x1a0(%rsp), %xmm2 subps %xmm2, %xmm11 addps %xmm10, %xmm8 movaps %xmm5, 0xe0(%rsp) movaps %xmm5, %xmm1 addps %xmm2, %xmm1 movaps %xmm9, %xmm2 mulps %xmm8, %xmm2 mulps %xmm11, %xmm8 movaps %xmm4, %xmm5 mulps %xmm1, %xmm5 subps %xmm8, %xmm5 movaps 0xa0(%rsp), %xmm0 addps %xmm13, %xmm0 movaps %xmm9, 0x90(%rsp) mulps %xmm9, %xmm1 movaps %xmm4, %xmm9 movaps %xmm0, %xmm4 movaps %xmm11, 0x180(%rsp) mulps %xmm11, %xmm4 subps %xmm1, %xmm4 mulps %xmm9, %xmm0 subps %xmm0, %xmm2 mulps 0x100(%rsp), %xmm2 mulps %xmm6, %xmm4 addps %xmm2, %xmm4 mulps %xmm7, %xmm5 addps %xmm4, %xmm5 movaps %xmm13, %xmm8 subps %xmm14, %xmm8 addps %xmm13, %xmm14 movaps %xmm10, %xmm11 subps %xmm3, %xmm11 addps %xmm10, %xmm3 movaps 0x1a0(%rsp), %xmm0 movaps %xmm0, %xmm6 subps %xmm12, %xmm6 addps %xmm0, %xmm12 movaps %xmm8, %xmm1 mulps %xmm3, %xmm1 mulps %xmm6, %xmm3 movaps %xmm11, %xmm0 mulps %xmm12, %xmm0 subps %xmm3, %xmm0 mulps %xmm8, %xmm12 movaps %xmm14, %xmm2 mulps %xmm6, %xmm2 subps %xmm12, %xmm2 mulps %xmm11, %xmm14 subps %xmm14, %xmm1 mulps 0x100(%rsp), %xmm1 mulps (%rsp), %xmm2 addps %xmm1, %xmm2 mulps %xmm7, %xmm0 addps %xmm2, %xmm0 movaps %xmm15, %xmm2 addps %xmm5, %xmm2 addps %xmm0, %xmm2 movaps %xmm15, %xmm1 minps %xmm5, %xmm1 minps %xmm0, %xmm1 movaps %xmm15, 0x1a0(%rsp) movaps %xmm15, %xmm4 maxps %xmm5, %xmm4 maxps %xmm0, %xmm4 movaps %xmm2, %xmm0 andps 0x1d96f54(%rip), %xmm0 # 0x1eec6c0 mulps 0x1d9c5fd(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm4 xorps 0x1d96f52(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm4 andps 0x10(%rsp), %xmm4 movmskps %xmm4, %eax testl %eax, %eax je 0x15618f movaps %xmm2, 0x240(%rsp) movaps %xmm5, 0x250(%rsp) movaps %xmm9, %xmm0 movaps 0x190(%rsp), %xmm13 mulps %xmm13, %xmm0 movaps %xmm6, %xmm14 movaps %xmm6, 0x170(%rsp) movaps 0x90(%rsp), %xmm6 movaps %xmm6, %xmm1 movaps 0xd0(%rsp), %xmm3 mulps %xmm3, %xmm1 movaps %xmm11, %xmm5 movaps 0x180(%rsp), %xmm15 mulps %xmm15, %xmm5 movaps 0xa0(%rsp), %xmm10 movaps %xmm8, %xmm12 mulps %xmm9, %xmm12 mulps %xmm15, %xmm3 subps %xmm0, %xmm3 movaps %xmm11, 0xd0(%rsp) movaps 0x1d0(%rsp), %xmm11 movaps %xmm11, %xmm2 mulps %xmm9, %xmm11 mulps %xmm14, %xmm9 subps %xmm5, %xmm9 movaps 0x1d96e95(%rip), %xmm14 # 0x1eec6c0 andps %xmm14, %xmm0 andps %xmm14, %xmm5 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm3, %xmm9 movaps %xmm6, %xmm0 mulps 0x170(%rsp), %xmm0 mulps %xmm15, %xmm2 mulps %xmm15, %xmm8 mulps %xmm6, %xmm13 subps %xmm2, %xmm13 subps %xmm0, %xmm8 andps %xmm14, %xmm2 andps %xmm14, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm13, %xmm8 mulps 0xd0(%rsp), %xmm6 subps %xmm1, %xmm11 subps %xmm12, %xmm6 andps %xmm14, %xmm1 andps %xmm14, %xmm12 cmpltps %xmm12, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm11, %xmm6 movaps 0x100(%rsp), %xmm1 mulps %xmm6, %xmm1 movaps (%rsp), %xmm0 mulps %xmm8, %xmm0 addps %xmm1, %xmm0 mulps %xmm9, %xmm7 addps %xmm0, %xmm7 addps %xmm7, %xmm7 movaps 0xe0(%rsp), %xmm1 mulps %xmm6, %xmm1 movaps 0xf0(%rsp), %xmm0 mulps %xmm8, %xmm0 addps %xmm1, %xmm0 mulps %xmm9, %xmm10 addps %xmm0, %xmm10 rcpps %xmm7, %xmm1 movaps %xmm7, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d97127(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm10, %xmm10 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm10, %xmm0 movaps 0x30(%rbx), %xmm1 cmpleps %xmm0, %xmm1 movaps %xmm0, %xmm2 cmpleps 0x80(%rbx), %xmm2 andps %xmm1, %xmm2 cmpneqps 0x1d960f8(%rip), %xmm7 # 0x1eeba10 andps %xmm2, %xmm7 pslld $0x1f, %xmm7 psrad $0x1f, %xmm7 pand %xmm4, %xmm7 movmskps %xmm7, %eax testl %eax, %eax movaps %xmm14, %xmm4 je 0x155986 movaps 0x1a0(%rsp), %xmm1 movaps %xmm1, 0x4b0(%rsp) movaps 0x250(%rsp), %xmm1 movaps %xmm1, 0x4a0(%rsp) movaps 0x240(%rsp), %xmm1 movaps %xmm1, 0x490(%rsp) movaps %xmm0, 0x480(%rsp) movaps %xmm9, 0x470(%rsp) movaps %xmm8, 0x460(%rsp) movaps %xmm6, 0x450(%rsp) movaps 0x1d96062(%rip), %xmm14 # 0x1eeb9f0 movaps 0xc0(%rsp), %xmm9 movaps 0x160(%rsp), %xmm10 movq 0x1c0(%rsp), %rcx movl 0x18(%rcx), %eax movq (%r10), %rdx movq 0x1e8(%rdx), %rdx movq (%rdx,%rax,8), %r13 movd 0x34(%r13), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rbx), %xmm1 pcmpeqd 0x1d9603c(%rip), %xmm1 # 0x1eeba10 pandn %xmm7, %xmm1 movmskps %xmm1, %edx testl %edx, %edx je 0x155a08 movl 0x1c(%rcx), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x155e0a cmpq $0x0, 0x48(%r13) jne 0x155e0a pandn 0x10(%rsp), %xmm1 movdqa %xmm1, 0x10(%rsp) movaps 0x10(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax setne %al movaps 0x20(%rsp), %xmm1 jmp 0x155a3d xorl %eax, %eax movaps 0x20(%rsp), %xmm1 movaps 0x1d95fc5(%rip), %xmm14 # 0x1eeb9f0 movaps 0xc0(%rsp), %xmm9 movaps 0x160(%rsp), %xmm10 addq $0x4, %r14 testb %al, %al jne 0x154df0 jmp 0x1561d5 movaps %xmm4, 0x60(%rsp) movaps %xmm3, (%rsp) movaps %xmm2, 0xd0(%rsp) movdqa %xmm11, 0x190(%rsp) movaps 0x500(%rsp), %xmm3 movaps %xmm3, %xmm2 andps 0x1d96c45(%rip), %xmm2 # 0x1eec6c0 rcpps %xmm3, %xmm0 mulps %xmm0, %xmm3 movaps 0x1d96f88(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm4 subps %xmm3, %xmm4 mulps %xmm0, %xmm4 addps %xmm0, %xmm4 cmpnltps 0x1d9c2a4(%rip), %xmm2 # 0x1ef1d40 andps %xmm4, %xmm2 movaps 0x520(%rsp), %xmm0 mulps %xmm2, %xmm0 minps %xmm6, %xmm0 mulps 0x510(%rsp), %xmm2 minps %xmm6, %xmm2 movq 0x58(%rsp), %rdx movss -0x4(%rdx,%r14), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movq 0x128(%rsp), %rdx movss 0x2c(%rdx,%r14), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm5, %xmm10 movaps %xmm4, %xmm5 psrld $0x10, %xmm5 pxor %xmm11, %xmm11 pblendw $0xaa, %xmm11, %xmm4 # xmm4 = xmm4[0],xmm11[1],xmm4[2],xmm11[3],xmm4[4],xmm11[5],xmm4[6],xmm11[7] cvtdq2ps %xmm4, %xmm4 movaps 0x1dc6e72(%rip), %xmm13 # 0x1f1c970 mulps %xmm13, %xmm4 cvtdq2ps %xmm5, %xmm5 mulps %xmm13, %xmm5 subps %xmm0, %xmm6 subps %xmm2, %xmm6 mulps %xmm6, %xmm4 mulps %xmm5, %xmm6 movaps %xmm3, %xmm5 pblendw $0xaa, %xmm11, %xmm3 # xmm3 = xmm3[0],xmm11[1],xmm3[2],xmm11[3],xmm3[4],xmm11[5],xmm3[6],xmm11[7] cvtdq2ps %xmm3, %xmm3 mulps %xmm13, %xmm3 mulps %xmm2, %xmm3 addps %xmm4, %xmm3 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm4 mulps %xmm13, %xmm4 mulps %xmm2, %xmm4 movq 0x58(%rsp), %rdx movss (%rdx,%r14), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] addps %xmm6, %xmm4 movaps %xmm2, %xmm5 pblendw $0xaa, %xmm11, %xmm2 # xmm2 = xmm2[0],xmm11[1],xmm2[2],xmm11[3],xmm2[4],xmm11[5],xmm2[6],xmm11[7] cvtdq2ps %xmm2, %xmm2 mulps %xmm13, %xmm2 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm3 movaps %xmm10, %xmm5 mulps %xmm13, %xmm3 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movq 0x8(%r10), %rdx movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x4e0(%rsp), %xmm4 movaps %xmm4, 0x2a0(%rsp) movaps 0x4d0(%rsp), %xmm4 movaps %xmm4, 0x2b0(%rsp) movaps 0x4c0(%rsp), %xmm4 movaps %xmm4, 0x2c0(%rsp) movaps %xmm2, 0x2d0(%rsp) movd %ecx, %xmm2 pshufd $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm3, 0x2e0(%rsp) movdqa %xmm2, 0x2f0(%rsp) movdqa %xmm0, 0x300(%rsp) leaq 0x310(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x310(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x320(%rsp) movaps 0x80(%rbx), %xmm6 movaps %xmm6, %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, 0x4f0(%rsp), %xmm2 movaps %xmm2, 0x80(%rbx) movaps %xmm1, 0x110(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0x210(%rsp) movq 0x18(%r13), %rax movq %rax, 0x218(%rsp) movq 0x8(%r10), %rax movq %rax, 0x220(%rsp) movq %rbx, 0x228(%rsp) leaq 0x2a0(%rsp), %rax movq %rax, 0x230(%rsp) movl $0x4, 0x238(%rsp) movq 0x48(%r13), %rax testq %rax, %rax movq %rsi, 0x80(%rsp) movq %rdi, 0x50(%rsp) movq %r8, 0x48(%rsp) movq %r9, 0x40(%rsp) movaps %xmm14, 0x180(%rsp) movaps %xmm12, 0x90(%rsp) movaps %xmm6, 0x170(%rsp) je 0x155d2b leaq 0x210(%rsp), %rdi movq %r11, 0x78(%rsp) callq *%rax movaps 0x170(%rsp), %xmm6 movaps 0x90(%rsp), %xmm12 movaps 0x180(%rsp), %xmm14 movaps 0xe0(%rsp), %xmm9 movaps 0xf0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm7 movq 0x78(%rsp), %r11 movq 0x40(%rsp), %r9 movq 0x48(%rsp), %r8 movq 0x50(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x38(%rsp), %r10 movdqa 0x110(%rsp), %xmm2 ptest %xmm2, %xmm2 movaps (%rsp), %xmm3 movaps 0x60(%rsp), %xmm4 je 0x156146 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x155dc9 testb $0x2, (%rcx) jne 0x155d61 testb $0x40, 0x3e(%r13) je 0x155dc9 leaq 0x210(%rsp), %rdi movq %r11, %r13 callq *%rax movaps 0x170(%rsp), %xmm6 movaps 0x60(%rsp), %xmm4 movaps (%rsp), %xmm3 movaps 0x90(%rsp), %xmm12 movaps 0x180(%rsp), %xmm14 movaps 0xe0(%rsp), %xmm9 movaps 0xf0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm7 movq %r13, %r11 movq 0x40(%rsp), %r9 movq 0x48(%rsp), %r8 movq 0x50(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x38(%rsp), %r10 movdqa 0x110(%rsp), %xmm0 pcmpeqd 0x1d95c36(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d9603a(%rip), %xmm2 # 0x1eebe20 movq 0x228(%rsp), %rax movaps 0x1d95c0b(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x156156 movaps 0x490(%rsp), %xmm3 movaps %xmm3, %xmm2 andps %xmm4, %xmm2 rcpps %xmm3, %xmm0 mulps %xmm0, %xmm3 movaps 0x1d96beb(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm4 subps %xmm3, %xmm4 mulps %xmm0, %xmm4 addps %xmm0, %xmm4 cmpnltps 0x1d9bf07(%rip), %xmm2 # 0x1ef1d40 andps %xmm4, %xmm2 movaps 0x4b0(%rsp), %xmm0 mulps %xmm2, %xmm0 minps %xmm6, %xmm0 mulps 0x4a0(%rsp), %xmm2 minps %xmm6, %xmm2 movq 0x128(%rsp), %rdx movss 0x2c(%rdx,%r14), %xmm4 movss 0x30(%rdx,%r14), %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm4, %xmm5 psrld $0x10, %xmm5 pxor %xmm7, %xmm7 pblendw $0xaa, %xmm7, %xmm4 # xmm4 = xmm4[0],xmm7[1],xmm4[2],xmm7[3],xmm4[4],xmm7[5],xmm4[6],xmm7[7] cvtdq2ps %xmm4, %xmm4 movaps 0x1dc6ae0(%rip), %xmm8 # 0x1f1c970 mulps %xmm8, %xmm4 cvtdq2ps %xmm5, %xmm5 mulps %xmm8, %xmm5 subps %xmm0, %xmm6 subps %xmm2, %xmm6 mulps %xmm6, %xmm4 mulps %xmm5, %xmm6 movaps %xmm3, %xmm5 pblendw $0xaa, %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[1],xmm3[2],xmm7[3],xmm3[4],xmm7[5],xmm3[6],xmm7[7] cvtdq2ps %xmm3, %xmm3 mulps %xmm8, %xmm3 mulps %xmm2, %xmm3 addps %xmm4, %xmm3 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm4 mulps %xmm8, %xmm4 mulps %xmm2, %xmm4 movq 0x58(%rsp), %rdx movss (%rdx,%r14), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] addps %xmm6, %xmm4 movaps %xmm2, %xmm5 pblendw $0xaa, %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[1],xmm2[2],xmm7[3],xmm2[4],xmm7[5],xmm2[6],xmm7[7] cvtdq2ps %xmm2, %xmm2 mulps %xmm8, %xmm2 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 psrld $0x10, %xmm5 cvtdq2ps %xmm5, %xmm3 mulps %xmm8, %xmm3 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movq 0x8(%r10), %rdx movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x470(%rsp), %xmm4 movaps %xmm4, 0x2a0(%rsp) movaps 0x460(%rsp), %xmm4 movaps %xmm4, 0x2b0(%rsp) movaps 0x450(%rsp), %xmm4 movaps %xmm4, 0x2c0(%rsp) movaps %xmm2, 0x2d0(%rsp) movd %ecx, %xmm2 pshufd $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm3, 0x2e0(%rsp) movdqa %xmm2, 0x2f0(%rsp) movdqa %xmm0, 0x300(%rsp) leaq 0x310(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x310(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x320(%rsp) movaps 0x80(%rbx), %xmm3 movaps %xmm3, %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, 0x480(%rsp), %xmm2 movaps %xmm2, 0x80(%rbx) movaps %xmm1, 0x110(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0x210(%rsp) movq 0x18(%r13), %rax movq %rax, 0x218(%rsp) movq 0x8(%r10), %rax movq %rax, 0x220(%rsp) movq %rbx, 0x228(%rsp) leaq 0x2a0(%rsp), %rax movq %rax, 0x230(%rsp) movl $0x4, 0x238(%rsp) movq 0x48(%r13), %rax testq %rax, %rax movq %rdi, 0x50(%rsp) movq %r8, 0x48(%rsp) movq %r9, 0x40(%rsp) movq %r11, 0x78(%rsp) movaps %xmm3, (%rsp) je 0x15608c leaq 0x210(%rsp), %rdi movq %rsi, 0x80(%rsp) callq *%rax movaps (%rsp), %xmm3 movq 0x78(%rsp), %r11 movq 0x40(%rsp), %r9 movq 0x48(%rsp), %r8 movq 0x50(%rsp), %rdi movq 0x80(%rsp), %rsi movaps 0x160(%rsp), %xmm10 movaps 0xc0(%rsp), %xmm9 movaps 0x1d95969(%rip), %xmm14 # 0x1eeb9f0 movq 0x38(%rsp), %r10 movdqa 0x110(%rsp), %xmm2 ptest %xmm2, %xmm2 je 0x15619e movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x156100 testb $0x2, (%rcx) jne 0x1560b9 testb $0x40, 0x3e(%r13) je 0x156100 leaq 0x210(%rsp), %rdi movq %rsi, %r13 callq *%rax movaps (%rsp), %xmm3 movq 0x78(%rsp), %r11 movq 0x40(%rsp), %r9 movq 0x48(%rsp), %r8 movq 0x50(%rsp), %rdi movq %r13, %rsi movaps 0x160(%rsp), %xmm10 movaps 0xc0(%rsp), %xmm9 movaps 0x1d958f5(%rip), %xmm14 # 0x1eeb9f0 movq 0x38(%rsp), %r10 movdqa 0x110(%rsp), %xmm0 pcmpeqd 0x1d958ff(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d95d03(%rip), %xmm2 # 0x1eebe20 movq 0x228(%rsp), %rax movaps 0x1d958d4(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x1561ae movaps %xmm7, %xmm6 jmp 0x155408 pcmpeqd 0x1d958c2(%rip), %xmm2 # 0x1eeba10 pxor 0x1d95cca(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%rbx), %xmm6 movaps %xmm6, 0x80(%rbx) movdqa 0x190(%rsp), %xmm11 movaps 0xd0(%rsp), %xmm2 jmp 0x1554c4 movaps %xmm4, %xmm7 movaps 0x1d96527(%rip), %xmm4 # 0x1eec6c0 jmp 0x155986 pcmpeqd 0x1d9586a(%rip), %xmm2 # 0x1eeba10 pxor 0x1d95c72(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%rbx), %xmm3 movaps %xmm3, 0x80(%rbx) jmp 0x1559fc cmpl $0x2, 0x15c(%rsp) je 0x15625d movq 0x268(%rsp), %rax addq %rax, 0x128(%rsp) addq %rax, 0x150(%rsp) addq %rax, 0x148(%rsp) addq %rax, 0x140(%rsp) addq %rax, %r9 addq %rax, %r11 addq %rax, 0x138(%rsp) addq %rax, 0x58(%rsp) addq %rax, %rsi addq %rax, 0x130(%rsp) addq %rax, 0x208(%rsp) addq %rax, 0x200(%rsp) addq %rax, 0x1f8(%rsp) addq %rax, %r8 movq 0x1f0(%rsp), %rax testq %rax, %rax leaq 0x1(%rax), %rax movq %rax, 0x1f0(%rsp) je 0x154dde xorps 0x440(%rsp), %xmm10 movaps 0x10(%rsp), %xmm2 orps 0x430(%rsp), %xmm2 movaps 0xb0(%rsp), %xmm0 andps %xmm2, %xmm0 movaps %xmm0, 0xb0(%rsp) movmskps %xmm10, %eax testl %eax, %eax jne 0x154c30 movaps 0xb0(%rsp), %xmm0 xorps 0x1d95b7f(%rip), %xmm0 # 0x1eebe20 movaps %xmm0, 0xb0(%rsp) movq 0x120(%rsp), %rsi jmp 0x1562c0 movaps %xmm1, 0xb0(%rsp) movaps 0x20(%rsp), %xmm1 xorl %ecx, %ecx movaps 0xb0(%rsp), %xmm0 orps 0x1b0(%rsp), %xmm0 movaps %xmm0, 0x1b0(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x15630d movaps 0x400(%rsp), %xmm1 blendvps %xmm0, 0x1d9570d(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x400(%rsp) xorl %eax, %eax testq %rcx, %rcx jne 0x156406 movaps 0x20(%rsp), %xmm1 jmp 0x156310 pushq $0x3 popq %rax cmpl $0x3, %eax jne 0x15485d jmp 0x156422 pushq $0x2 jmp 0x15630f movaps %xmm15, (%rsp) movq %rsi, 0x120(%rsp) bsfq %r13, %rcx movq %rsi, %rdi movq 0x1e8(%rsp), %rsi movq %rbp, %rdx movq %rcx, 0x10(%rsp) leaq 0x1c0(%rsp), %r8 movq %rbx, %r9 pushq %r10 leaq 0x338(%rsp), %rax pushq %rax callq 0x1a9f26 popq %rcx popq %rdx testb %al, %al je 0x156374 movq 0x10(%rsp), %rax orl $-0x1, 0x1b0(%rsp,%rax,4) leaq -0x1(%r13), %rax andq %rax, %r13 movq 0x38(%rsp), %r10 movq 0x120(%rsp), %rsi jne 0x15632f movaps 0x1b0(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x20(%rsp), %xmm1 movaps 0x1d95648(%rip), %xmm14 # 0x1eeb9f0 movaps (%rsp), %xmm15 je 0x1548a9 movaps 0x400(%rsp), %xmm1 blendvps %xmm0, 0x1d9563c(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x400(%rsp) movaps 0x20(%rsp), %xmm1 pushq $0x2 popq %rax jmp 0x1548a9 andq $-0x10, %rbp movq (%rbp), %rax movq (%rax), %rcx movq %rax, 0x1c0(%rsp) movaps 0x410(%rsp), %xmm0 movaps %xmm0, 0xb0(%rsp) movaps 0x20(%rsp), %xmm1 jmp 0x1562c2 movq %rcx, (%r15) addq $0x8, %r15 movaps 0x1d955ec(%rip), %xmm0 # 0x1eeba00 movaps %xmm0, (%r12) addq $0x10, %r12 jmp 0x156306 andps 0x1b0(%rsp), %xmm1 movaps %xmm1, %xmm0 movaps 0x80(%rbx), %xmm1 blendvps %xmm0, 0x1d955c3(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x1c08, %rsp # imm = 0x1C08 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::ObjectIntersectorK<4, false>>, false>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
movq (%rsi), %rax cmpq $0x8, 0x70(%rax) je 0x156a52 movq %rdx, %r11 cmpq $0x0, 0x8(%rcx) je 0x15647c movq 0x10(%rcx), %rdx testb $0x1, 0x2(%rdx) jne 0x156a53 movdqa (%rdi), %xmm1 pcmpeqd %xmm4, %xmm4 movdqa %xmm1, %xmm3 pcmpeqd %xmm4, %xmm3 movmskps %xmm3, %esi testl %esi, %esi je 0x156a52 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x17b8, %rsp # imm = 0x17B8 movaps (%r11), %xmm10 movaps 0x40(%r11), %xmm6 movaps 0x1d96208(%rip), %xmm2 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm2, %xmm0 movaps 0x1d9b87b(%rip), %xmm5 # 0x1ef1d40 cmpltps %xmm5, %xmm0 movaps %xmm6, %xmm7 blendvps %xmm0, %xmm5, %xmm7 movaps 0x50(%r11), %xmm8 movaps %xmm8, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm8 movaps 0x60(%r11), %xmm9 andps %xmm9, %xmm2 cmpltps %xmm5, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm9 rcpps %xmm7, %xmm11 mulps %xmm11, %xmm7 movaps 0x1d96504(%rip), %xmm0 # 0x1eeca10 movaps %xmm0, %xmm2 subps %xmm7, %xmm2 rcpps %xmm8, %xmm12 mulps %xmm12, %xmm8 movaps %xmm0, %xmm5 subps %xmm8, %xmm5 rcpps %xmm9, %xmm13 mulps %xmm13, %xmm9 subps %xmm9, %xmm0 xorps %xmm7, %xmm7 cmpltps %xmm7, %xmm6 andps 0x1d965e5(%rip), %xmm6 # 0x1eecb20 movaps 0x50(%r11), %xmm8 cmpltps %xmm7, %xmm8 andps 0x1dc99b3(%rip), %xmm8 # 0x1f1ff00 orps %xmm6, %xmm8 movaps 0x60(%r11), %xmm6 cmpltps %xmm7, %xmm6 movaps 0x10(%r11), %xmm9 pxor %xmm4, %xmm3 movaps 0x20(%r11), %xmm14 andps 0x1d9b8b1(%rip), %xmm6 # 0x1ef1e20 por %xmm6, %xmm3 movaps 0x30(%r11), %xmm4 mulps %xmm11, %xmm2 mulps %xmm12, %xmm5 mulps %xmm13, %xmm0 por %xmm8, %xmm3 movaps 0x80(%r11), %xmm6 movdqa %xmm3, 0x10(%rsp) bsfq %rsi, %rdx movd 0x10(%rsp,%rdx,4), %xmm7 pshufd $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] pcmpeqd %xmm3, %xmm7 movmskps %xmm7, %edx notq %rdx andq %rdx, %rsi jne 0x156597 pcmpeqd %xmm3, %xmm3 pcmpeqd %xmm3, %xmm1 addps %xmm2, %xmm11 addps %xmm5, %xmm12 addps %xmm0, %xmm13 xorps %xmm0, %xmm0 maxps %xmm0, %xmm4 maxps %xmm0, %xmm6 movaps 0x1d95416(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm15, %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm2 movaps 0x1d95412(%rip), %xmm3 # 0x1eeba00 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, (%rsp) leaq 0x120(%rsp), %r12 leaq 0x8c0(%rsp), %r13 por 0x10(%rsp), %xmm1 movdqa %xmm1, 0x10(%rsp) movq $-0x8, -0x10(%r12) movaps %xmm15, -0x20(%r13) movq 0x70(%rax), %rax movq %rax, -0x8(%r12) movaps %xmm2, 0xf0(%rsp) movaps %xmm2, -0x10(%r13) pushq $0x8 popq %r15 addq $-0x10, %r13 movq -0x8(%r12), %rbp addq $-0x8, %r12 movb $0x1, %al cmpq $-0x8, %rbp je 0x156a39 movaps (%r13), %xmm1 movaps %xmm1, %xmm0 cmpltps (%rsp), %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x156a37 testb $0x8, %bpl jne 0x1568a3 movq %rbp, %rdx movq %rbp, %rsi andq $-0x10, %rsi xorl %edi, %edi xorl %r10d, %r10d movq %r15, %rbp movaps %xmm15, %xmm1 movq (%rsi,%rdi,8), %r8 cmpq $0x8, %r8 je 0x1567b6 movss 0x20(%rdx,%rdi,4), %xmm3 movss 0x30(%rdx,%rdi,4), %xmm0 movss 0x40(%rdx,%rdi,4), %xmm4 movss 0x50(%rdx,%rdi,4), %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm10, %xmm3 mulps %xmm11, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm9, %xmm4 mulps %xmm12, %xmm4 movss 0x60(%rdx,%rdi,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm14, %xmm5 mulps %xmm13, %xmm5 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm10, %xmm0 mulps %xmm11, %xmm0 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm9, %xmm2 mulps %xmm12, %xmm2 movss 0x70(%rdx,%rdi,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] subps %xmm14, %xmm7 mulps %xmm13, %xmm7 movaps %xmm3, %xmm6 pminsd %xmm0, %xmm6 movaps %xmm4, %xmm8 pminsd %xmm2, %xmm8 pmaxsd %xmm6, %xmm8 movaps %xmm5, %xmm6 pminsd %xmm7, %xmm6 pmaxsd %xmm8, %xmm6 pmaxsd %xmm3, %xmm0 pmaxsd %xmm4, %xmm2 pminsd %xmm0, %xmm2 pmaxsd %xmm5, %xmm7 movdqa %xmm6, %xmm0 pmaxsd 0xf0(%rsp), %xmm0 pminsd (%rsp), %xmm7 pminsd %xmm2, %xmm7 cmpleps %xmm7, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x1567b6 movaps %xmm15, %xmm2 blendvps %xmm0, %xmm6, %xmm2 movaps %xmm2, %xmm0 cmpltps %xmm1, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x156796 movq %rbp, %r9 movaps %xmm1, %xmm0 cmpq $0x8, %rbp movq %r8, %rbp jne 0x15679f movaps %xmm2, %xmm1 movq %r8, %rbp jmp 0x1567b6 movq %r8, %r9 movaps %xmm2, %xmm0 movaps %xmm1, %xmm2 incq %r10 movq %r9, (%r12) addq $0x8, %r12 movaps %xmm0, (%r13) addq $0x10, %r13 movaps %xmm2, %xmm1 cmpq $0x8, %r8 je 0x1567cd leaq 0x1(%rdi), %r8 cmpq $0x3, %rdi movq %r8, %rdi jb 0x15668c cmpq $0x8, %rbp setne %dl cmpq $0x2, %r10 setae %sil andb %dl, %sil cmpb $0x1, %sil je 0x1567f4 cmpq $0x8, %rbp jne 0x15666c jmp 0x156a37 movaps -0x20(%r13), %xmm0 movaps -0x10(%r13), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x156829 movaps %xmm2, -0x20(%r13) movaps %xmm0, -0x10(%r13) movdqu -0x10(%r12), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x10(%r12) cmpq $0x2, %r10 je 0x1567e5 movaps -0x30(%r13), %xmm0 movaps -0x10(%r13), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x156865 movaps %xmm2, -0x30(%r13) movaps %xmm0, -0x10(%r13) movq -0x18(%r12), %rsi movq -0x8(%r12), %rdx movq %rdx, -0x18(%r12) movq %rsi, -0x8(%r12) movaps -0x30(%r13), %xmm0 movaps -0x20(%r13), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x1567e5 movaps %xmm2, -0x30(%r13) movaps %xmm0, -0x20(%r13) movdqu -0x18(%r12), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x18(%r12) jmp 0x1567e5 cmpq $-0x8, %rbp je 0x156a39 movaps (%rsp), %xmm0 cmpnleps %xmm1, %xmm0 movaps %xmm0, 0x30(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x156a37 movl %ebp, %eax andl $0xf, %eax addq $-0x8, %rax movq %rax, 0x28(%rsp) je 0x156a20 andq $-0x10, %rbp xorl %r14d, %r14d movq %r11, 0x20(%rsp) movaps %xmm10, 0xe0(%rsp) movaps %xmm11, 0xd0(%rsp) movaps %xmm12, 0xc0(%rsp) movaps %xmm13, 0xb0(%rsp) movaps %xmm9, 0xa0(%rsp) movaps %xmm14, 0x90(%rsp) movq (%rcx), %rax movl (%rbp,%r14,8), %edi movq 0x1e8(%rax), %rax movq (%rax,%rdi,8), %rax movd 0x34(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] pand 0x90(%r11), %xmm0 pcmpeqd 0x1d950c7(%rip), %xmm0 # 0x1eeba10 pandn 0x30(%rsp), %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x156a12 movl 0x4(%rbp,%r14,8), %edx movaps %xmm0, 0x100(%rsp) leaq 0x100(%rsp), %rsi movq %rsi, 0x48(%rsp) movq 0x18(%rax), %rsi movq %rsi, 0x50(%rsp) movq 0x8(%rcx), %rsi movq %rsi, 0x60(%rsp) movq %r11, 0x68(%rsp) movl $0x4, 0x70(%rsp) movl %edi, 0x74(%rsp) movl %edx, 0x58(%rsp) movq %rax, 0x78(%rsp) andq $0x0, 0x80(%rsp) movq %rcx, %rbx movq 0x10(%rcx), %rcx movq %rcx, 0x88(%rsp) movq 0x18(%rcx), %rcx testq %rcx, %rcx jne 0x1569c5 movq 0x60(%rax), %rcx leaq 0x48(%rsp), %rdi callq *%rcx movq %rbx, %rcx movq 0x20(%rsp), %r11 movaps 0xe0(%rsp), %xmm10 movaps 0xd0(%rsp), %xmm11 movaps 0xc0(%rsp), %xmm12 movaps 0xb0(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm9 movaps 0x90(%rsp), %xmm14 movaps 0x1d94fde(%rip), %xmm15 # 0x1eeb9f0 incq %r14 cmpq %r14, 0x28(%rsp) jne 0x15691b movaps 0x30(%rsp), %xmm0 movaps (%rsp), %xmm1 blendvps %xmm0, 0x80(%r11), %xmm1 movaps %xmm1, (%rsp) xorl %eax, %eax testb %al, %al je 0x15663b addq $0x17b8, %rsp # imm = 0x17B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r11, %rdx jmp 0x1abc76 nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::ObjectIntersectorK<4, false>>, false>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
movq (%rsi), %rax movq 0x70(%rax), %rax cmpq $0x8, %rax je 0x156fa0 cmpq $0x0, 0x8(%rcx) je 0x156a83 movq 0x10(%rcx), %r8 testb $0x1, 0x2(%r8) jne 0x1ac6cc pcmpeqd %xmm9, %xmm9 movdqa (%rdi), %xmm0 pcmpeqd %xmm9, %xmm0 movaps 0x80(%rdx), %xmm2 xorps %xmm11, %xmm11 movaps %xmm2, %xmm10 cmpnltps %xmm11, %xmm10 andps %xmm0, %xmm10 movmskps %xmm10, %esi testl %esi, %esi je 0x156fa0 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x17d8, %rsp # imm = 0x17D8 movaps (%rdx), %xmm12 movaps 0x40(%rdx), %xmm6 movaps 0x1d95beb(%rip), %xmm1 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm1, %xmm0 movaps 0x1d9b25e(%rip), %xmm7 # 0x1ef1d40 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm6 movaps 0x30(%rdx), %xmm8 movaps 0x60(%rdx), %xmm4 movaps %xmm4, %xmm0 andps %xmm1, %xmm0 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm4 movaps 0x50(%rdx), %xmm5 rcpps %xmm6, %xmm3 maxps %xmm11, %xmm8 movaps 0x1d94eda(%rip), %xmm13 # 0x1eeb9f0 movaps %xmm13, %xmm14 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm8, %xmm14 mulps %xmm3, %xmm6 movaps 0x1d95ee1(%rip), %xmm15 # 0x1eeca10 movaps %xmm15, %xmm8 andps %xmm5, %xmm1 cmpltps %xmm7, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm5 subps %xmm6, %xmm8 maxps %xmm11, %xmm2 movaps 0x1d94eaf(%rip), %xmm1 # 0x1eeba00 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm2, %xmm1 movaps %xmm1, (%rsp) rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps %xmm15, %xmm2 subps %xmm4, %xmm2 rcpps %xmm5, %xmm1 mulps %xmm1, %xmm5 subps %xmm5, %xmm15 movaps 0x10(%rdx), %xmm4 movaps %xmm4, 0x100(%rsp) mulps %xmm1, %xmm15 addps %xmm1, %xmm15 movaps 0x20(%rdx), %xmm1 movaps %xmm1, 0xf0(%rsp) mulps %xmm3, %xmm8 mulps %xmm0, %xmm2 addps %xmm3, %xmm8 movaps %xmm10, 0x80(%rsp) movaps %xmm10, %xmm1 movaps %xmm8, %xmm10 xorps %xmm9, %xmm1 movaps %xmm1, 0x10(%rsp) addps %xmm0, %xmm2 movaps %xmm2, 0x110(%rsp) leaq 0x140(%rsp), %r12 movq $-0x8, -0x10(%r12) leaq 0x8e0(%rsp), %r13 movaps %xmm13, -0x20(%r13) movq %rax, -0x8(%r12) movaps %xmm14, -0x10(%r13) leaq 0x1ff938c(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0xd0(%rsp) pushq $0x8 popq %r14 pushq $0x1 popq %rbx addq $-0x10, %r13 movq -0x8(%r12), %rbp addq $-0x8, %r12 movb $0x1, %r10b cmpq $-0x8, %rbp je 0x156d8f movaps (%r13), %xmm1 movaps %xmm1, %xmm0 cmpltps (%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x156d8c testb $0x8, %bpl jne 0x156d9d movq %rbp, %rax movq %rbp, %r9 andq $-0x10, %r9 xorl %r8d, %r8d movq %r14, %rbp movaps %xmm13, %xmm1 movq (%r9,%r8,8), %rsi cmpq $0x8, %rsi je 0x156d6b movss 0x20(%rax,%r8,4), %xmm3 movss 0x30(%rax,%r8,4), %xmm0 movss 0x40(%rax,%r8,4), %xmm4 movss 0x50(%rax,%r8,4), %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm12, %xmm3 mulps %xmm10, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps 0x100(%rsp), %xmm7 subps %xmm7, %xmm4 mulps %xmm15, %xmm4 movss 0x60(%rax,%r8,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps 0xf0(%rsp), %xmm8 subps %xmm8, %xmm5 movaps 0x110(%rsp), %xmm6 mulps %xmm6, %xmm5 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm12, %xmm0 mulps %xmm10, %xmm0 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm7, %xmm2 mulps %xmm15, %xmm2 movss 0x70(%rax,%r8,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] subps %xmm8, %xmm7 mulps %xmm6, %xmm7 movaps %xmm3, %xmm6 pminsd %xmm0, %xmm6 movaps %xmm4, %xmm8 pminsd %xmm2, %xmm8 pmaxsd %xmm6, %xmm8 movaps %xmm5, %xmm6 pminsd %xmm7, %xmm6 pmaxsd %xmm8, %xmm6 pmaxsd %xmm3, %xmm0 pmaxsd %xmm4, %xmm2 pminsd %xmm0, %xmm2 pmaxsd %xmm5, %xmm7 movdqa %xmm6, %xmm0 pmaxsd %xmm14, %xmm0 pminsd (%rsp), %xmm7 pminsd %xmm2, %xmm7 cmpleps %xmm7, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x156d6b movaps %xmm13, %xmm2 blendvps %xmm0, %xmm6, %xmm2 cmpq $0x8, %rbp je 0x156d65 movq %rbp, (%r12) addq $0x8, %r12 movaps %xmm1, (%r13) addq $0x10, %r13 movaps %xmm2, %xmm1 movq %rsi, %rbp cmpq $0x8, %rsi je 0x156d82 leaq 0x1(%r8), %rsi cmpq $0x3, %r8 movq %rsi, %r8 jb 0x156c56 cmpq $0x8, %rbp jne 0x156c38 xorl %r10d, %r10d testb %r10b, %r10b je 0x156c06 jmp 0x156f6b cmpq $-0x8, %rbp je 0x156d8f movaps (%rsp), %xmm0 cmpnleps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x156d8c movl %ebp, %eax andl $0xf, %eax movdqa 0x10(%rsp), %xmm1 movdqa %xmm1, %xmm0 addq $-0x8, %rax movq %rax, 0x30(%rsp) je 0x156f3d andq $-0x10, %rbp movdqa %xmm1, %xmm2 pxor %xmm9, %xmm2 movq %rdx, 0x28(%rsp) movaps %xmm12, 0xc0(%rsp) movaps %xmm14, 0xb0(%rsp) movaps %xmm15, 0xa0(%rsp) movaps %xmm10, 0x90(%rsp) movq (%rcx), %rax movl -0x8(%rbp,%rbx,8), %r8d movq 0x1e8(%rax), %rax movq (%rax,%r8,8), %rax movd 0x34(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm1 # xmm1 = xmm0[0,0,0,0] pand 0x90(%rdx), %xmm1 pcmpeqd %xmm11, %xmm1 pandn %xmm2, %xmm1 movmskps %xmm1, %esi movaps 0xd0(%rsp), %xmm0 testl %esi, %esi je 0x156f11 movdqa %xmm2, 0xe0(%rsp) movl -0x4(%rbp,%rbx,8), %edi movaps %xmm1, 0x120(%rsp) leaq 0x120(%rsp), %rsi movq %rsi, 0x38(%rsp) movq 0x18(%rax), %rsi movq %rsi, 0x40(%rsp) movq 0x8(%rcx), %rsi movq %rsi, 0x50(%rsp) movq %rdx, 0x58(%rsp) movl $0x4, 0x60(%rsp) movl %r8d, 0x64(%rsp) movl %edi, 0x48(%rsp) movq %rax, 0x68(%rsp) andq $0x0, 0x70(%rsp) movq %rcx, %r15 movq 0x10(%rcx), %rcx movq %rcx, 0x78(%rsp) movq 0x18(%rcx), %rcx testq %rcx, %rcx jne 0x156eb5 movq 0x68(%rax), %rcx leaq 0x38(%rsp), %rdi callq *%rcx movq 0x28(%rsp), %rdx movaps 0x80(%rdx), %xmm0 xorps %xmm11, %xmm11 cmpltps %xmm11, %xmm0 movq %r15, %rcx pcmpeqd %xmm9, %xmm9 movaps 0xc0(%rsp), %xmm12 movaps 0x1d94b06(%rip), %xmm13 # 0x1eeb9f0 movaps 0xb0(%rsp), %xmm14 movaps 0xa0(%rsp), %xmm15 movaps 0x90(%rsp), %xmm10 movb $0x1, %r10b movdqa 0xe0(%rsp), %xmm2 andnps %xmm2, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x156f30 leaq 0x1(%rbx), %rax movaps %xmm0, %xmm2 cmpq 0x30(%rsp), %rbx movq %rax, %rbx jb 0x156e06 xorps %xmm9, %xmm0 movdqa 0x10(%rsp), %xmm1 pushq $0x1 popq %rbx por %xmm0, %xmm1 movmskps %xmm1, %eax cmpl $0xf, %eax movaps %xmm1, 0x10(%rsp) je 0x156d8f movaps %xmm1, %xmm0 movaps (%rsp), %xmm1 blendvps %xmm0, 0x1d94a9e(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, (%rsp) jmp 0x156d8c movaps 0x80(%rsp), %xmm0 andps 0x10(%rsp), %xmm0 movaps 0x80(%rdx), %xmm1 blendvps %xmm0, 0x1d94a78(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rdx) addq $0x17d8, %rsp # imm = 0x17D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::ObjectIntersectorK<4, true>>, false>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
movq (%rsi), %rax cmpq $0x8, 0x70(%rax) je 0x157651 movdqa (%rdi), %xmm1 pcmpeqd %xmm4, %xmm4 movdqa %xmm1, %xmm3 pcmpeqd %xmm4, %xmm3 movmskps %xmm3, %esi testl %esi, %esi je 0x157651 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x17b8, %rsp # imm = 0x17B8 movq %rdx, %r14 movaps 0x40(%rdx), %xmm7 movaps 0x1d956d6(%rip), %xmm2 # 0x1eec6c0 movaps %xmm7, %xmm0 andps %xmm2, %xmm0 movaps 0x1d9ad49(%rip), %xmm5 # 0x1ef1d40 cmpltps %xmm5, %xmm0 movaps %xmm7, %xmm6 blendvps %xmm0, %xmm5, %xmm6 movaps 0x50(%rdx), %xmm8 movaps %xmm8, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm8 movaps 0x60(%rdx), %xmm9 andps %xmm9, %xmm2 cmpltps %xmm5, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm9 rcpps %xmm6, %xmm11 mulps %xmm11, %xmm6 movaps 0x1d959d2(%rip), %xmm0 # 0x1eeca10 movaps %xmm0, %xmm2 subps %xmm6, %xmm2 rcpps %xmm8, %xmm12 mulps %xmm12, %xmm8 movaps %xmm0, %xmm6 subps %xmm8, %xmm6 rcpps %xmm9, %xmm13 mulps %xmm13, %xmm9 subps %xmm9, %xmm0 movaps 0x80(%rdx), %xmm5 xorps %xmm8, %xmm8 maxps %xmm8, %xmm5 cmpltps %xmm8, %xmm7 andps 0x1d95aa6(%rip), %xmm7 # 0x1eecb20 movaps 0x50(%rdx), %xmm9 cmpltps %xmm8, %xmm9 andps 0x1dc8e74(%rip), %xmm9 # 0x1f1ff00 orps %xmm7, %xmm9 movaps 0x60(%rdx), %xmm7 cmpltps %xmm8, %xmm7 movaps (%rdx), %xmm14 pxor %xmm4, %xmm3 movaps 0x10(%rdx), %xmm15 andps 0x1d9ad73(%rip), %xmm7 # 0x1ef1e20 por %xmm7, %xmm3 movaps 0x20(%rdx), %xmm4 movaps %xmm4, 0xf0(%rsp) por %xmm9, %xmm3 movaps 0x30(%rdx), %xmm4 mulps %xmm11, %xmm2 mulps %xmm12, %xmm6 mulps %xmm13, %xmm0 movdqa %xmm3, 0x10(%rsp) bsfq %rsi, %rdx movd 0x10(%rsp,%rdx,4), %xmm7 pshufd $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] pcmpeqd %xmm3, %xmm7 movmskps %xmm7, %edx notq %rdx andq %rdx, %rsi jne 0x1570d8 pcmpeqd %xmm3, %xmm3 pcmpeqd %xmm3, %xmm1 addps %xmm2, %xmm11 addps %xmm6, %xmm12 addps %xmm0, %xmm13 xorps %xmm0, %xmm0 maxps %xmm0, %xmm4 movaps 0x1d948d9(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm2, %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm3 movaps 0x1d948d6(%rip), %xmm4 # 0x1eeba00 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm4, (%rsp) leaq 0x120(%rsp), %r12 leaq 0x8c0(%rsp), %r13 por 0x10(%rsp), %xmm1 movdqa %xmm1, 0x10(%rsp) movq $-0x8, -0x10(%r12) movaps %xmm2, -0x20(%r13) movq 0x70(%rax), %rax movq %rax, -0x8(%r12) movaps %xmm3, 0xe0(%rsp) movaps %xmm3, -0x10(%r13) pushq $0x8 popq %r15 addq $-0x10, %r13 movq -0x8(%r12), %rbp addq $-0x8, %r12 movb $0x1, %al cmpq $-0x8, %rbp je 0x157638 movaps (%r13), %xmm1 movaps %xmm1, %xmm0 cmpltps (%rsp), %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x157636 movaps %xmm1, %xmm2 testb $0x8, %bpl jne 0x1574c5 movq %rbp, %rdx andq $-0x10, %rdx andl $0x7, %ebp movl %ebp, %esi xorl %edi, %edi xorl %r10d, %r10d movq %r15, %rbp movaps 0x1d94820(%rip), %xmm1 # 0x1eeb9f0 movq (%rdx,%rdi,8), %r8 cmpq $0x8, %r8 je 0x1573a9 movss 0x80(%rdx,%rdi,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x20(%rdx,%rdi,4), %xmm4 movss 0x30(%rdx,%rdi,4), %xmm8 movss 0x40(%rdx,%rdi,4), %xmm5 movss 0x50(%rdx,%rdi,4), %xmm7 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps 0x70(%r14), %xmm0 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movss 0xa0(%rdx,%rdi,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm0, %xmm4 addps %xmm5, %xmm4 movss 0xc0(%rdx,%rdi,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x60(%rdx,%rdi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm0, %xmm5 addps %xmm6, %xmm5 movss 0x90(%rdx,%rdi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm0, %xmm6 addps %xmm8, %xmm6 movss 0xb0(%rdx,%rdi,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movss 0xd0(%rdx,%rdi,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x70(%rdx,%rdi,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm0, %xmm7 addps %xmm9, %xmm7 subps %xmm14, %xmm3 mulps %xmm11, %xmm3 subps %xmm15, %xmm4 mulps %xmm12, %xmm4 movaps 0xf0(%rsp), %xmm9 subps %xmm9, %xmm5 mulps %xmm13, %xmm5 subps %xmm14, %xmm6 mulps %xmm11, %xmm6 subps %xmm15, %xmm8 mulps %xmm12, %xmm8 subps %xmm9, %xmm7 mulps %xmm13, %xmm7 movaps %xmm3, %xmm9 pminsd %xmm6, %xmm9 movaps %xmm4, %xmm10 pminsd %xmm8, %xmm10 pmaxsd %xmm9, %xmm10 movaps %xmm5, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm10, %xmm9 pmaxsd %xmm3, %xmm6 pmaxsd %xmm4, %xmm8 pminsd %xmm6, %xmm8 pmaxsd %xmm5, %xmm7 pminsd (%rsp), %xmm7 pminsd %xmm8, %xmm7 movdqa %xmm9, %xmm3 pmaxsd 0xe0(%rsp), %xmm3 cmpleps %xmm7, %xmm3 cmpl $0x6, %esi je 0x1573c2 movaps (%rsp), %xmm0 cmpnleps %xmm2, %xmm0 andps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x1573a9 movaps 0x1d94694(%rip), %xmm3 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm3 movaps %xmm3, %xmm0 cmpltps %xmm1, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x157389 movq %rbp, %r9 movaps %xmm1, %xmm0 cmpq $0x8, %rbp movq %r8, %rbp jne 0x157392 movaps %xmm3, %xmm1 movq %r8, %rbp jmp 0x1573a9 movq %r8, %r9 movaps %xmm3, %xmm0 movaps %xmm1, %xmm3 incq %r10 movq %r9, (%r12) addq $0x8, %r12 movaps %xmm0, (%r13) addq $0x10, %r13 movaps %xmm3, %xmm1 cmpq $0x8, %r8 je 0x1573ef leaq 0x1(%rdi), %r8 cmpq $0x3, %rdi movq %r8, %rdi jb 0x1571d0 jmp 0x1573ef movss 0xe0(%rdx,%rdi,4), %xmm4 movss 0xf0(%rdx,%rdi,4), %xmm5 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpleps %xmm0, %xmm4 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] cmpltps %xmm5, %xmm0 andps %xmm4, %xmm0 andps %xmm0, %xmm3 jmp 0x15733c cmpq $0x8, %rbp setne %dl cmpq $0x2, %r10 setae %sil andb %dl, %sil cmpb $0x1, %sil je 0x157416 cmpq $0x8, %rbp jne 0x1571a8 jmp 0x157636 movaps -0x20(%r13), %xmm0 movaps -0x10(%r13), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x15744b movaps %xmm2, -0x20(%r13) movaps %xmm0, -0x10(%r13) movdqu -0x10(%r12), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x10(%r12) cmpq $0x2, %r10 je 0x157407 movaps -0x30(%r13), %xmm0 movaps -0x10(%r13), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x157487 movaps %xmm2, -0x30(%r13) movaps %xmm0, -0x10(%r13) movq -0x18(%r12), %rsi movq -0x8(%r12), %rdx movq %rdx, -0x18(%r12) movq %rsi, -0x8(%r12) movaps -0x30(%r13), %xmm0 movaps -0x20(%r13), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x157407 movaps %xmm2, -0x30(%r13) movaps %xmm0, -0x20(%r13) movdqu -0x18(%r12), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x18(%r12) jmp 0x157407 cmpq $-0x8, %rbp je 0x157638 movaps (%rsp), %xmm0 cmpnleps %xmm2, %xmm0 movaps %xmm0, 0x30(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x157636 movl %ebp, %eax andl $0xf, %eax addq $-0x8, %rax movq %rax, 0x28(%rsp) je 0x15761f andq $-0x10, %rbp xorl %ebx, %ebx movq %rcx, 0x20(%rsp) movaps %xmm11, 0xd0(%rsp) movaps %xmm12, 0xc0(%rsp) movaps %xmm13, 0xb0(%rsp) movaps %xmm14, 0xa0(%rsp) movaps %xmm15, 0x90(%rsp) movq (%rcx), %rax movl (%rbp,%rbx,8), %edi movq 0x1e8(%rax), %rax movq (%rax,%rdi,8), %rax movd 0x34(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] pand 0x90(%r14), %xmm0 pcmpeqd 0x1d944b0(%rip), %xmm0 # 0x1eeba10 pandn 0x30(%rsp), %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x157611 movl 0x4(%rbp,%rbx,8), %edx movaps %xmm0, 0x100(%rsp) leaq 0x100(%rsp), %rsi movq %rsi, 0x48(%rsp) movq 0x18(%rax), %rsi movq %rsi, 0x50(%rsp) movq 0x8(%rcx), %rsi movq %rsi, 0x60(%rsp) movq %r14, 0x68(%rsp) movl $0x4, 0x70(%rsp) movl %edi, 0x74(%rsp) movl %edx, 0x58(%rsp) movq %rax, 0x78(%rsp) andq $0x0, 0x80(%rsp) movq 0x10(%rcx), %rcx movq %rcx, 0x88(%rsp) movq 0x18(%rcx), %rcx testq %rcx, %rcx jne 0x1575d8 movq 0x60(%rax), %rcx leaq 0x48(%rsp), %rdi callq *%rcx movq 0x20(%rsp), %rcx movaps 0xd0(%rsp), %xmm11 movaps 0xc0(%rsp), %xmm12 movaps 0xb0(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm14 movaps 0x90(%rsp), %xmm15 incq %rbx cmpq %rbx, 0x28(%rsp) jne 0x157533 movaps 0x30(%rsp), %xmm0 movaps (%rsp), %xmm1 blendvps %xmm0, 0x80(%r14), %xmm1 movaps %xmm1, (%rsp) xorl %eax, %eax testb %al, %al je 0x157177 addq $0x17b8, %rsp # imm = 0x17B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::InstanceIntersectorK<4>>, false>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1788, %rsp # imm = 0x1788 movq (%rsi), %rax movq 0x70(%rax), %rax cmpq $0x8, %rax je 0x158626 movq %rcx, %r14 movq %rdx, %rcx cmpq $0x0, 0x8(%r14) je 0x1581d3 movq 0x10(%r14), %rdx testb $0x1, 0x2(%rdx) jne 0x158638 pcmpeqd %xmm1, %xmm1 movdqa (%rdi), %xmm0 pcmpeqd %xmm1, %xmm0 movaps 0x80(%rcx), %xmm2 xorps %xmm3, %xmm3 movaps %xmm2, %xmm10 cmpnltps %xmm3, %xmm10 andps %xmm0, %xmm10 movmskps %xmm10, %edx testl %edx, %edx je 0x158626 movaps 0x40(%rcx), %xmm6 movaps 0x1d944b3(%rip), %xmm1 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm1, %xmm0 movaps 0x1d99b26(%rip), %xmm7 # 0x1ef1d40 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm6 movaps 0x30(%rcx), %xmm8 movaps 0x60(%rcx), %xmm4 movaps %xmm4, %xmm0 andps %xmm1, %xmm0 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm4 movaps 0x50(%rcx), %xmm5 maxps %xmm3, %xmm8 pcmpeqd %xmm9, %xmm9 movaps 0x1d937a0(%rip), %xmm11 # 0x1eeb9f0 movaps %xmm11, %xmm12 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm8, %xmm12 rcpps %xmm6, %xmm8 mulps %xmm8, %xmm6 movaps 0x1d947a2(%rip), %xmm13 # 0x1eeca10 andps %xmm5, %xmm1 cmpltps %xmm7, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm5 movaps %xmm13, %xmm14 subps %xmm6, %xmm14 maxps %xmm3, %xmm2 movaps 0x1d93770(%rip), %xmm15 # 0x1eeba00 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm2, %xmm15 rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps %xmm13, %xmm2 subps %xmm4, %xmm2 rcpps %xmm5, %xmm1 mulps %xmm1, %xmm5 subps %xmm5, %xmm13 movaps (%rcx), %xmm3 movaps %xmm3, 0xb0(%rsp) mulps %xmm1, %xmm13 addps %xmm1, %xmm13 movaps 0x10(%rcx), %xmm1 movaps %xmm1, 0xa0(%rsp) mulps %xmm8, %xmm14 addps %xmm8, %xmm14 movdqa 0x20(%rcx), %xmm1 movdqa %xmm1, 0x90(%rsp) mulps %xmm0, %xmm2 addps %xmm0, %xmm2 movaps %xmm2, 0xc0(%rsp) movaps %xmm10, %xmm0 xorps %xmm9, %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0xf0(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0x890(%rsp), %r12 movaps %xmm11, -0x20(%r12) movq %rax, -0x8(%r15) movaps %xmm12, -0x10(%r12) pushq $0x8 popq %r13 addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 movb $0x1, %r10b cmpq $-0x8, %rbp je 0x1584b6 movaps (%r12), %xmm1 movaps %xmm1, %xmm0 cmpltps %xmm15, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1584b3 testb $0x8, %bpl jne 0x1584c4 movq %rbp, %rax movq %rbp, %r9 andq $-0x10, %r9 xorl %edx, %edx movq %r13, %rbp movaps %xmm11, %xmm1 movq (%r9,%rdx,8), %rsi cmpq $0x8, %rsi je 0x158492 movss 0x20(%rax,%rdx,4), %xmm3 movss 0x30(%rax,%rdx,4), %xmm0 movss 0x40(%rax,%rdx,4), %xmm4 movss 0x50(%rax,%rdx,4), %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0xb0(%rsp), %xmm7 subps %xmm7, %xmm3 mulps %xmm14, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps 0xa0(%rsp), %xmm8 subps %xmm8, %xmm4 mulps %xmm13, %xmm4 movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps 0x90(%rsp), %xmm9 subps %xmm9, %xmm5 movaps 0xc0(%rsp), %xmm6 mulps %xmm6, %xmm5 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm7, %xmm0 mulps %xmm14, %xmm0 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm8, %xmm2 mulps %xmm13, %xmm2 movss 0x70(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] subps %xmm9, %xmm7 mulps %xmm6, %xmm7 movaps %xmm3, %xmm6 pminsd %xmm0, %xmm6 movaps %xmm4, %xmm8 pminsd %xmm2, %xmm8 pmaxsd %xmm6, %xmm8 movaps %xmm5, %xmm6 pminsd %xmm7, %xmm6 pmaxsd %xmm8, %xmm6 pmaxsd %xmm3, %xmm0 pmaxsd %xmm4, %xmm2 pminsd %xmm0, %xmm2 pmaxsd %xmm5, %xmm7 movdqa %xmm6, %xmm0 pmaxsd %xmm12, %xmm0 pminsd %xmm15, %xmm7 pminsd %xmm2, %xmm7 cmpleps %xmm7, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x158492 movaps %xmm11, %xmm2 blendvps %xmm0, %xmm6, %xmm2 cmpq $0x8, %rbp je 0x15848c movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm1, (%r12) addq $0x10, %r12 movaps %xmm2, %xmm1 movq %rsi, %rbp cmpq $0x8, %rsi je 0x1584a9 leaq 0x1(%rdx), %rsi cmpq $0x3, %rdx movq %rsi, %rdx jb 0x15837b cmpq $0x8, %rbp jne 0x15835e xorl %r10d, %r10d testb %r10b, %r10b je 0x15832d jmp 0x158605 cmpq $-0x8, %rbp je 0x1584b6 movaps %xmm15, %xmm0 cmpnleps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1584b3 movaps %xmm15, 0x40(%rsp) movaps %xmm14, 0x50(%rsp) movaps %xmm13, 0x60(%rsp) movaps %xmm12, 0x70(%rsp) movaps %xmm10, 0x80(%rsp) movl %ebp, %eax andl $0xf, %eax movaps 0x10(%rsp), %xmm0 xorps 0x1d93915(%rip), %xmm0 # 0x1eebe20 movaps %xmm0, 0x20(%rsp) addq $-0x8, %rax movq %rax, 0x38(%rsp) je 0x158574 andq $-0x10, %rbp pushq $0x1 popq %rbx movq %rcx, 0x30(%rsp) leaq 0xd0(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0xf(%rsp), %rdx movq %r14, %r8 movq %rbp, %r9 callq 0x1c2356 movq 0x30(%rsp), %rcx movaps 0xd0(%rsp), %xmm0 andnps 0x20(%rsp), %xmm0 movaps %xmm0, 0x20(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x158574 addq $0x10, %rbp leaq 0x1(%rbx), %rax cmpq 0x38(%rsp), %rbx movq %rax, %rbx jb 0x158527 movdqa 0x20(%rsp), %xmm2 pcmpeqd %xmm1, %xmm1 pxor %xmm1, %xmm2 movdqa 0x10(%rsp), %xmm0 por %xmm2, %xmm0 movmskps %xmm0, %eax cmpl $0xf, %eax movaps %xmm0, 0x10(%rsp) je 0x1585d4 movaps 0x40(%rsp), %xmm15 blendvps %xmm0, 0x1d93457(%rip), %xmm15 # 0x1eeba00 xorl %r10d, %r10d movaps 0x80(%rsp), %xmm10 movaps 0x1d93433(%rip), %xmm11 # 0x1eeb9f0 movaps 0x70(%rsp), %xmm12 movaps 0x60(%rsp), %xmm13 movaps 0x50(%rsp), %xmm14 jmp 0x1584b6 movaps 0x80(%rsp), %xmm10 movaps 0x1d9340b(%rip), %xmm11 # 0x1eeb9f0 movaps 0x70(%rsp), %xmm12 movaps 0x60(%rsp), %xmm13 movaps 0x50(%rsp), %xmm14 movaps 0x40(%rsp), %xmm15 movb $0x1, %r10b jmp 0x1584b6 andps 0x10(%rsp), %xmm10 movaps 0x80(%rcx), %xmm1 movaps %xmm10, %xmm0 blendvps %xmm0, 0x1d933e1(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rcx) addq $0x1788, %rsp # imm = 0x1788 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rcx, %rdx movq %r14, %rcx addq $0x1788, %rsp # imm = 0x1788 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1adaac
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::InstanceArrayIntersectorK<4>>, false>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
movq (%rsi), %rax cmpq $0x8, 0x70(%rax) je 0x1596d6 movq %rdx, %r11 cmpq $0x0, 0x8(%rcx) je 0x1591bc movq 0x10(%rcx), %rdx testb $0x1, 0x2(%rdx) jne 0x1596d7 movdqa (%rdi), %xmm1 pcmpeqd %xmm4, %xmm4 movdqa %xmm1, %xmm3 pcmpeqd %xmm4, %xmm3 movmskps %xmm3, %esi testl %esi, %esi je 0x1596d6 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1768, %rsp # imm = 0x1768 movaps (%r11), %xmm10 movaps 0x40(%r11), %xmm6 movaps 0x1d934c8(%rip), %xmm2 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm2, %xmm0 movaps 0x1d98b3b(%rip), %xmm5 # 0x1ef1d40 cmpltps %xmm5, %xmm0 movaps %xmm6, %xmm7 blendvps %xmm0, %xmm5, %xmm7 movaps 0x50(%r11), %xmm8 movaps %xmm8, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm8 movaps 0x60(%r11), %xmm9 andps %xmm9, %xmm2 cmpltps %xmm5, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm9 rcpps %xmm7, %xmm11 mulps %xmm11, %xmm7 movaps 0x1d937c4(%rip), %xmm0 # 0x1eeca10 movaps %xmm0, %xmm2 subps %xmm7, %xmm2 rcpps %xmm8, %xmm12 mulps %xmm12, %xmm8 movaps %xmm0, %xmm5 subps %xmm8, %xmm5 rcpps %xmm9, %xmm13 mulps %xmm13, %xmm9 subps %xmm9, %xmm0 xorps %xmm7, %xmm7 cmpltps %xmm7, %xmm6 andps 0x1d938a5(%rip), %xmm6 # 0x1eecb20 movaps 0x50(%r11), %xmm8 cmpltps %xmm7, %xmm8 andps 0x1dc6c73(%rip), %xmm8 # 0x1f1ff00 orps %xmm6, %xmm8 movaps 0x60(%r11), %xmm6 cmpltps %xmm7, %xmm6 movaps 0x10(%r11), %xmm9 pxor %xmm4, %xmm3 movaps 0x20(%r11), %xmm14 andps 0x1d98b71(%rip), %xmm6 # 0x1ef1e20 por %xmm6, %xmm3 movaps 0x30(%r11), %xmm4 mulps %xmm11, %xmm2 mulps %xmm12, %xmm5 mulps %xmm13, %xmm0 por %xmm8, %xmm3 movaps 0x80(%r11), %xmm6 movdqa %xmm3, 0x30(%rsp) bsfq %rsi, %rdx movd 0x30(%rsp,%rdx,4), %xmm7 pshufd $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] pcmpeqd %xmm3, %xmm7 movmskps %xmm7, %edx notq %rdx andq %rdx, %rsi jne 0x1592d7 pcmpeqd %xmm3, %xmm3 pcmpeqd %xmm3, %xmm1 addps %xmm2, %xmm11 addps %xmm5, %xmm12 addps %xmm0, %xmm13 xorps %xmm0, %xmm0 maxps %xmm0, %xmm4 maxps %xmm0, %xmm6 movaps 0x1d926d6(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm15, %xmm2 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm2 movaps 0x1d926d2(%rip), %xmm3 # 0x1eeba00 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, 0x10(%rsp) leaq 0xd0(%rsp), %rbp leaq 0x870(%rsp), %r15 por 0x30(%rsp), %xmm1 movdqa %xmm1, 0x30(%rsp) movq $-0x8, -0x10(%rbp) movaps %xmm15, -0x20(%r15) movq 0x70(%rax), %rax movq %rax, -0x8(%rbp) movaps %xmm2, 0xb0(%rsp) movaps %xmm2, -0x10(%r15) pushq $0x8 popq %r12 leaq 0x20(%rsp), %rdi leaq 0xf(%rsp), %rsi addq $-0x10, %r15 movq -0x8(%rbp), %r13 addq $-0x8, %rbp movb $0x1, %al cmpq $-0x8, %r13 je 0x1596bd movaps (%r15), %xmm1 movaps %xmm1, %xmm0 cmpltps 0x10(%rsp), %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x1596bb testb $0x8, %r13b jne 0x1595df movq %r13, %rdx movq %r13, %r14 andq $-0x10, %r14 xorl %ebx, %ebx xorl %r10d, %r10d movq %r12, %r13 movaps %xmm15, %xmm1 movq (%r14,%rbx,8), %r8 cmpq $0x8, %r8 je 0x1594fe movss 0x20(%rdx,%rbx,4), %xmm3 movss 0x30(%rdx,%rbx,4), %xmm0 movss 0x40(%rdx,%rbx,4), %xmm4 movss 0x50(%rdx,%rbx,4), %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm10, %xmm3 mulps %xmm11, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm9, %xmm4 mulps %xmm12, %xmm4 movss 0x60(%rdx,%rbx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm14, %xmm5 mulps %xmm13, %xmm5 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm10, %xmm0 mulps %xmm11, %xmm0 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm9, %xmm2 mulps %xmm12, %xmm2 movss 0x70(%rdx,%rbx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] subps %xmm14, %xmm7 mulps %xmm13, %xmm7 movaps %xmm3, %xmm6 pminsd %xmm0, %xmm6 movaps %xmm4, %xmm8 pminsd %xmm2, %xmm8 pmaxsd %xmm6, %xmm8 movaps %xmm5, %xmm6 pminsd %xmm7, %xmm6 pmaxsd %xmm8, %xmm6 pmaxsd %xmm3, %xmm0 pmaxsd %xmm4, %xmm2 pminsd %xmm0, %xmm2 pmaxsd %xmm5, %xmm7 movdqa %xmm6, %xmm0 pmaxsd 0xb0(%rsp), %xmm0 pminsd 0x10(%rsp), %xmm7 pminsd %xmm2, %xmm7 cmpleps %xmm7, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x1594fe movaps %xmm15, %xmm2 blendvps %xmm0, %xmm6, %xmm2 movaps %xmm2, %xmm0 cmpltps %xmm1, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x1594df movq %r13, %r9 movaps %xmm1, %xmm0 cmpq $0x8, %r13 movq %r8, %r13 jne 0x1594e8 movaps %xmm2, %xmm1 movq %r8, %r13 jmp 0x1594fe movq %r8, %r9 movaps %xmm2, %xmm0 movaps %xmm1, %xmm2 incq %r10 movq %r9, (%rbp) addq $0x8, %rbp movaps %xmm0, (%r15) addq $0x10, %r15 movaps %xmm2, %xmm1 cmpq $0x8, %r8 je 0x159515 leaq 0x1(%rbx), %r8 cmpq $0x3, %rbx movq %r8, %rbx jb 0x1593d4 cmpq $0x8, %r13 setne %dl cmpq $0x2, %r10 setae %r8b andb %dl, %r8b cmpb $0x1, %r8b je 0x15953c cmpq $0x8, %r13 jne 0x1593b4 jmp 0x1596bb movaps -0x20(%r15), %xmm0 movaps -0x10(%r15), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x15956d movaps %xmm2, -0x20(%r15) movaps %xmm0, -0x10(%r15) movdqu -0x10(%rbp), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x10(%rbp) cmpq $0x2, %r10 je 0x15952d movaps -0x30(%r15), %xmm0 movaps -0x10(%r15), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x1595a5 movaps %xmm2, -0x30(%r15) movaps %xmm0, -0x10(%r15) movq -0x18(%rbp), %r8 movq -0x8(%rbp), %rdx movq %rdx, -0x18(%rbp) movq %r8, -0x8(%rbp) movaps -0x30(%r15), %xmm0 movaps -0x20(%r15), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x15952d movaps %xmm2, -0x30(%r15) movaps %xmm0, -0x20(%r15) movdqu -0x18(%rbp), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x18(%rbp) jmp 0x15952d cmpq $-0x8, %r13 je 0x1596bd movaps 0x10(%rsp), %xmm0 cmpnleps %xmm1, %xmm0 movaps %xmm0, 0x20(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x1596bb movaps %xmm14, 0x50(%rsp) movaps %xmm9, 0x60(%rsp) movaps %xmm13, 0x70(%rsp) movaps %xmm12, 0x80(%rsp) movaps %xmm11, 0x90(%rsp) movaps %xmm10, 0xa0(%rsp) movl %r13d, %ebx andl $0xf, %ebx addq $-0x8, %rbx je 0x15966d andq $-0x10, %r13 movq %rcx, 0x48(%rsp) movq %r11, %rdx movq %r13, %r8 movq %r11, %r14 callq 0x1c7b96 movq %r14, %r11 leaq 0xf(%rsp), %rsi leaq 0x20(%rsp), %rdi movq 0x48(%rsp), %rcx addq $0x8, %r13 decq %rbx jne 0x159644 movaps 0x20(%rsp), %xmm0 movaps 0x10(%rsp), %xmm1 blendvps %xmm0, 0x80(%r11), %xmm1 movaps %xmm1, 0x10(%rsp) movaps 0xa0(%rsp), %xmm10 movaps 0x90(%rsp), %xmm11 movaps 0x80(%rsp), %xmm12 movaps 0x70(%rsp), %xmm13 movaps 0x60(%rsp), %xmm9 movaps 0x50(%rsp), %xmm14 movaps 0x1d92335(%rip), %xmm15 # 0x1eeb9f0 xorl %eax, %eax testb %al, %al je 0x159384 addq $0x1768, %rsp # imm = 0x1768 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r11, %rdx jmp 0x1ae3e0 nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::InstanceArrayIntersectorK<4>>, false>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1788, %rsp # imm = 0x1788 movq (%rsi), %rax movq 0x70(%rax), %rax cmpq $0x8, %rax je 0x159b70 movq %rcx, %r14 movq %rdx, %rcx cmpq $0x0, 0x8(%r14) je 0x15971d movq 0x10(%r14), %rdx testb $0x1, 0x2(%rdx) jne 0x159b82 pcmpeqd %xmm1, %xmm1 movdqa (%rdi), %xmm0 pcmpeqd %xmm1, %xmm0 movaps 0x80(%rcx), %xmm2 xorps %xmm3, %xmm3 movaps %xmm2, %xmm10 cmpnltps %xmm3, %xmm10 andps %xmm0, %xmm10 movmskps %xmm10, %edx testl %edx, %edx je 0x159b70 movaps 0x40(%rcx), %xmm6 movaps 0x1d92f69(%rip), %xmm1 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm1, %xmm0 movaps 0x1d985dc(%rip), %xmm7 # 0x1ef1d40 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm6 movaps 0x30(%rcx), %xmm8 movaps 0x60(%rcx), %xmm4 movaps %xmm4, %xmm0 andps %xmm1, %xmm0 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm4 movaps 0x50(%rcx), %xmm5 maxps %xmm3, %xmm8 pcmpeqd %xmm9, %xmm9 movaps 0x1d92256(%rip), %xmm11 # 0x1eeb9f0 movaps %xmm11, %xmm12 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm8, %xmm12 rcpps %xmm6, %xmm8 mulps %xmm8, %xmm6 movaps 0x1d93258(%rip), %xmm13 # 0x1eeca10 andps %xmm5, %xmm1 cmpltps %xmm7, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm5 movaps %xmm13, %xmm14 subps %xmm6, %xmm14 maxps %xmm3, %xmm2 movaps 0x1d92226(%rip), %xmm15 # 0x1eeba00 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm2, %xmm15 rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps %xmm13, %xmm2 subps %xmm4, %xmm2 rcpps %xmm5, %xmm1 mulps %xmm1, %xmm5 subps %xmm5, %xmm13 movaps (%rcx), %xmm3 movaps %xmm3, 0xb0(%rsp) mulps %xmm1, %xmm13 addps %xmm1, %xmm13 movaps 0x10(%rcx), %xmm1 movaps %xmm1, 0xa0(%rsp) mulps %xmm8, %xmm14 addps %xmm8, %xmm14 movdqa 0x20(%rcx), %xmm1 movdqa %xmm1, 0x90(%rsp) mulps %xmm0, %xmm2 addps %xmm0, %xmm2 movaps %xmm2, 0xc0(%rsp) movaps %xmm10, %xmm0 xorps %xmm9, %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0xf0(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0x890(%rsp), %r12 movaps %xmm11, -0x20(%r12) movq %rax, -0x8(%r15) movaps %xmm12, -0x10(%r12) pushq $0x8 popq %r13 addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 movb $0x1, %r10b cmpq $-0x8, %rbp je 0x159a00 movaps (%r12), %xmm1 movaps %xmm1, %xmm0 cmpltps %xmm15, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1599fd testb $0x8, %bpl jne 0x159a0e movq %rbp, %rax movq %rbp, %r9 andq $-0x10, %r9 xorl %edx, %edx movq %r13, %rbp movaps %xmm11, %xmm1 movq (%r9,%rdx,8), %rsi cmpq $0x8, %rsi je 0x1599dc movss 0x20(%rax,%rdx,4), %xmm3 movss 0x30(%rax,%rdx,4), %xmm0 movss 0x40(%rax,%rdx,4), %xmm4 movss 0x50(%rax,%rdx,4), %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0xb0(%rsp), %xmm7 subps %xmm7, %xmm3 mulps %xmm14, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps 0xa0(%rsp), %xmm8 subps %xmm8, %xmm4 mulps %xmm13, %xmm4 movss 0x60(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps 0x90(%rsp), %xmm9 subps %xmm9, %xmm5 movaps 0xc0(%rsp), %xmm6 mulps %xmm6, %xmm5 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm7, %xmm0 mulps %xmm14, %xmm0 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm8, %xmm2 mulps %xmm13, %xmm2 movss 0x70(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] subps %xmm9, %xmm7 mulps %xmm6, %xmm7 movaps %xmm3, %xmm6 pminsd %xmm0, %xmm6 movaps %xmm4, %xmm8 pminsd %xmm2, %xmm8 pmaxsd %xmm6, %xmm8 movaps %xmm5, %xmm6 pminsd %xmm7, %xmm6 pmaxsd %xmm8, %xmm6 pmaxsd %xmm3, %xmm0 pmaxsd %xmm4, %xmm2 pminsd %xmm0, %xmm2 pmaxsd %xmm5, %xmm7 movdqa %xmm6, %xmm0 pmaxsd %xmm12, %xmm0 pminsd %xmm15, %xmm7 pminsd %xmm2, %xmm7 cmpleps %xmm7, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x1599dc movaps %xmm11, %xmm2 blendvps %xmm0, %xmm6, %xmm2 cmpq $0x8, %rbp je 0x1599d6 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm1, (%r12) addq $0x10, %r12 movaps %xmm2, %xmm1 movq %rsi, %rbp cmpq $0x8, %rsi je 0x1599f3 leaq 0x1(%rdx), %rsi cmpq $0x3, %rdx movq %rsi, %rdx jb 0x1598c5 cmpq $0x8, %rbp jne 0x1598a8 xorl %r10d, %r10d testb %r10b, %r10b je 0x159877 jmp 0x159b4f cmpq $-0x8, %rbp je 0x159a00 movaps %xmm15, %xmm0 cmpnleps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1599fd movaps %xmm15, 0x40(%rsp) movaps %xmm14, 0x50(%rsp) movaps %xmm13, 0x60(%rsp) movaps %xmm12, 0x70(%rsp) movaps %xmm10, 0x80(%rsp) movl %ebp, %eax andl $0xf, %eax movaps 0x10(%rsp), %xmm0 xorps 0x1d923cb(%rip), %xmm0 # 0x1eebe20 movaps %xmm0, 0x20(%rsp) addq $-0x8, %rax movq %rax, 0x38(%rsp) je 0x159abe andq $-0x10, %rbp pushq $0x1 popq %rbx movq %rcx, 0x30(%rsp) leaq 0xd0(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0xf(%rsp), %rdx movq %r14, %r8 movq %rbp, %r9 callq 0x1c8504 movq 0x30(%rsp), %rcx movaps 0xd0(%rsp), %xmm0 andnps 0x20(%rsp), %xmm0 movaps %xmm0, 0x20(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x159abe addq $0x8, %rbp leaq 0x1(%rbx), %rax cmpq 0x38(%rsp), %rbx movq %rax, %rbx jb 0x159a71 movdqa 0x20(%rsp), %xmm2 pcmpeqd %xmm1, %xmm1 pxor %xmm1, %xmm2 movdqa 0x10(%rsp), %xmm0 por %xmm2, %xmm0 movmskps %xmm0, %eax cmpl $0xf, %eax movaps %xmm0, 0x10(%rsp) je 0x159b1e movaps 0x40(%rsp), %xmm15 blendvps %xmm0, 0x1d91f0d(%rip), %xmm15 # 0x1eeba00 xorl %r10d, %r10d movaps 0x80(%rsp), %xmm10 movaps 0x1d91ee9(%rip), %xmm11 # 0x1eeb9f0 movaps 0x70(%rsp), %xmm12 movaps 0x60(%rsp), %xmm13 movaps 0x50(%rsp), %xmm14 jmp 0x159a00 movaps 0x80(%rsp), %xmm10 movaps 0x1d91ec1(%rip), %xmm11 # 0x1eeb9f0 movaps 0x70(%rsp), %xmm12 movaps 0x60(%rsp), %xmm13 movaps 0x50(%rsp), %xmm14 movaps 0x40(%rsp), %xmm15 movb $0x1, %r10b jmp 0x159a00 andps 0x10(%rsp), %xmm10 movaps 0x80(%rcx), %xmm1 movaps %xmm10, %xmm0 blendvps %xmm0, 0x1d91e97(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rcx) addq $0x1788, %rsp # imm = 0x1788 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rcx, %rdx movq %r14, %rcx addq $0x1788, %rsp # imm = 0x1788 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1aedd6
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::InstanceArrayIntersectorKMB<4>>, false>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
movq (%rsi), %rax cmpq $0x8, 0x70(%rax) je 0x15a1aa movdqa (%rdi), %xmm1 pcmpeqd %xmm4, %xmm4 movdqa %xmm1, %xmm3 pcmpeqd %xmm4, %xmm3 movmskps %xmm3, %esi testl %esi, %esi je 0x15a1aa pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1768, %rsp # imm = 0x1768 movq %rdx, %r14 movaps (%rdx), %xmm11 movaps 0x40(%rdx), %xmm6 movaps 0x1d92ad6(%rip), %xmm2 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm2, %xmm0 movaps 0x1d98149(%rip), %xmm5 # 0x1ef1d40 cmpltps %xmm5, %xmm0 movaps %xmm6, %xmm7 blendvps %xmm0, %xmm5, %xmm7 movaps 0x50(%rdx), %xmm8 movaps %xmm8, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm8 movaps 0x60(%rdx), %xmm9 andps %xmm9, %xmm2 cmpltps %xmm5, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm9 rcpps %xmm7, %xmm12 mulps %xmm12, %xmm7 movaps 0x1d92dd2(%rip), %xmm0 # 0x1eeca10 movaps %xmm0, %xmm2 subps %xmm7, %xmm2 rcpps %xmm8, %xmm13 mulps %xmm13, %xmm8 movaps %xmm0, %xmm5 subps %xmm8, %xmm5 rcpps %xmm9, %xmm14 mulps %xmm14, %xmm9 subps %xmm9, %xmm0 xorps %xmm7, %xmm7 cmpltps %xmm7, %xmm6 andps 0x1d92eb3(%rip), %xmm6 # 0x1eecb20 movaps 0x50(%rdx), %xmm8 cmpltps %xmm7, %xmm8 andps 0x1dc6281(%rip), %xmm8 # 0x1f1ff00 orps %xmm6, %xmm8 movaps 0x60(%rdx), %xmm6 cmpltps %xmm7, %xmm6 movaps 0x10(%rdx), %xmm15 pxor %xmm4, %xmm3 movaps 0x20(%rdx), %xmm4 movaps %xmm4, 0xb0(%rsp) andps 0x1d98179(%rip), %xmm6 # 0x1ef1e20 por %xmm6, %xmm3 movaps 0x30(%rdx), %xmm4 mulps %xmm12, %xmm2 mulps %xmm13, %xmm5 mulps %xmm14, %xmm0 por %xmm8, %xmm3 movaps 0x80(%rdx), %xmm6 movdqa %xmm3, 0x30(%rsp) bsfq %rsi, %rdx movd 0x30(%rsp,%rdx,4), %xmm7 pshufd $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] pcmpeqd %xmm3, %xmm7 movmskps %xmm7, %edx notq %rdx andq %rdx, %rsi jne 0x159ccd pcmpeqd %xmm3, %xmm3 pcmpeqd %xmm3, %xmm1 addps %xmm2, %xmm12 addps %xmm5, %xmm13 addps %xmm0, %xmm14 xorps %xmm0, %xmm0 maxps %xmm0, %xmm4 maxps %xmm0, %xmm6 movaps 0x1d91ce1(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm2, %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm3 movaps 0x1d91cde(%rip), %xmm4 # 0x1eeba00 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm4, 0x10(%rsp) leaq 0xd0(%rsp), %rbp leaq 0x870(%rsp), %r15 por 0x30(%rsp), %xmm1 movdqa %xmm1, 0x30(%rsp) movq $-0x8, -0x10(%rbp) movaps %xmm2, -0x20(%r15) movq 0x70(%rax), %rax movq %rax, -0x8(%rbp) movaps %xmm3, 0xa0(%rsp) movaps %xmm3, -0x10(%r15) pushq $0x8 popq %r12 leaq 0x20(%rsp), %rdi leaq 0xf(%rsp), %rbx addq $-0x10, %r15 movq -0x8(%rbp), %r13 addq $-0x8, %rbp movb $0x1, %al cmpq $-0x8, %r13 je 0x15a191 movaps (%r15), %xmm1 movaps %xmm1, %xmm0 cmpltps 0x10(%rsp), %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x15a18f movaps %xmm1, %xmm2 testb $0x8, %r13b jne 0x15a0c8 movq %r13, %rdx andq $-0x10, %rdx andl $0x7, %r13d movl %r13d, %esi xorl %r11d, %r11d xorl %r10d, %r10d movq %r12, %r13 movaps 0x1d91c1d(%rip), %xmm1 # 0x1eeb9f0 movq (%rdx,%r11,8), %r8 cmpq $0x8, %r8 je 0x159fb6 movss 0x80(%rdx,%r11,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x20(%rdx,%r11,4), %xmm4 movss 0x30(%rdx,%r11,4), %xmm8 movss 0x40(%rdx,%r11,4), %xmm5 movss 0x50(%rdx,%r11,4), %xmm7 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps 0x70(%r14), %xmm0 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movss 0xa0(%rdx,%r11,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm0, %xmm4 addps %xmm5, %xmm4 movss 0xc0(%rdx,%r11,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x60(%rdx,%r11,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm0, %xmm5 addps %xmm6, %xmm5 movss 0x90(%rdx,%r11,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm0, %xmm6 addps %xmm8, %xmm6 movss 0xb0(%rdx,%r11,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movss 0xd0(%rdx,%r11,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x70(%rdx,%r11,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm0, %xmm7 addps %xmm9, %xmm7 subps %xmm11, %xmm3 mulps %xmm12, %xmm3 subps %xmm15, %xmm4 mulps %xmm13, %xmm4 movaps 0xb0(%rsp), %xmm9 subps %xmm9, %xmm5 mulps %xmm14, %xmm5 subps %xmm11, %xmm6 mulps %xmm12, %xmm6 subps %xmm15, %xmm8 mulps %xmm13, %xmm8 subps %xmm9, %xmm7 mulps %xmm14, %xmm7 movaps %xmm3, %xmm9 pminsd %xmm6, %xmm9 movaps %xmm4, %xmm10 pminsd %xmm8, %xmm10 pmaxsd %xmm9, %xmm10 movaps %xmm5, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm10, %xmm9 pmaxsd %xmm3, %xmm6 pmaxsd %xmm4, %xmm8 pminsd %xmm6, %xmm8 pmaxsd %xmm5, %xmm7 pminsd 0x10(%rsp), %xmm7 pminsd %xmm8, %xmm7 movdqa %xmm9, %xmm3 pmaxsd 0xa0(%rsp), %xmm3 cmpleps %xmm7, %xmm3 cmpl $0x6, %esi je 0x159fcf movaps 0x10(%rsp), %xmm0 cmpnleps %xmm2, %xmm0 andps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x159fb6 movaps 0x1d91a86(%rip), %xmm3 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm3 movaps %xmm3, %xmm0 cmpltps %xmm1, %xmm0 movmskps %xmm0, %r9d testl %r9d, %r9d je 0x159f97 movq %r13, %r9 movaps %xmm1, %xmm0 cmpq $0x8, %r13 movq %r8, %r13 jne 0x159fa0 movaps %xmm3, %xmm1 movq %r8, %r13 jmp 0x159fb6 movq %r8, %r9 movaps %xmm3, %xmm0 movaps %xmm1, %xmm3 incq %r10 movq %r9, (%rbp) addq $0x8, %rbp movaps %xmm0, (%r15) addq $0x10, %r15 movaps %xmm3, %xmm1 cmpq $0x8, %r8 je 0x159ffe leaq 0x1(%r11), %r8 cmpq $0x3, %r11 movq %r8, %r11 jb 0x159dd3 jmp 0x159ffe movss 0xe0(%rdx,%r11,4), %xmm4 movss 0xf0(%rdx,%r11,4), %xmm5 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpleps %xmm0, %xmm4 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] cmpltps %xmm5, %xmm0 andps %xmm4, %xmm0 andps %xmm0, %xmm3 jmp 0x159f49 cmpq $0x8, %r13 setne %dl cmpq $0x2, %r10 setae %sil andb %dl, %sil cmpb $0x1, %sil je 0x15a025 cmpq $0x8, %r13 jne 0x159da8 jmp 0x15a18f movaps -0x20(%r15), %xmm0 movaps -0x10(%r15), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x15a056 movaps %xmm2, -0x20(%r15) movaps %xmm0, -0x10(%r15) movdqu -0x10(%rbp), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x10(%rbp) cmpq $0x2, %r10 je 0x15a016 movaps -0x30(%r15), %xmm0 movaps -0x10(%r15), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x15a08e movaps %xmm2, -0x30(%r15) movaps %xmm0, -0x10(%r15) movq -0x18(%rbp), %rsi movq -0x8(%rbp), %rdx movq %rdx, -0x18(%rbp) movq %rsi, -0x8(%rbp) movaps -0x30(%r15), %xmm0 movaps -0x20(%r15), %xmm2 movaps %xmm0, %xmm3 cmpltps %xmm2, %xmm3 movmskps %xmm3, %edx testl %edx, %edx je 0x15a016 movaps %xmm2, -0x30(%r15) movaps %xmm0, -0x20(%r15) movdqu -0x18(%rbp), %xmm0 pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1] movdqu %xmm0, -0x18(%rbp) jmp 0x15a016 cmpq $-0x8, %r13 je 0x15a191 movaps 0x10(%rsp), %xmm0 cmpnleps %xmm2, %xmm0 movaps %xmm0, 0x20(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x15a18f movaps %xmm15, 0x50(%rsp) movaps %xmm14, 0x60(%rsp) movaps %xmm13, 0x70(%rsp) movaps %xmm12, 0x80(%rsp) movaps %xmm11, 0x90(%rsp) movq %rbx, %rax movl %r13d, %ebx andl $0xf, %ebx addq $-0x8, %rbx je 0x15a14f andq $-0x10, %r13 movq %rcx, 0x48(%rsp) leaq 0xf(%rsp), %rsi movq %r14, %rdx movq %r13, %r8 callq 0x1c8eb4 leaq 0xf(%rsp), %rax leaq 0x20(%rsp), %rdi movq 0x48(%rsp), %rcx addq $0x8, %r13 decq %rbx jne 0x15a127 movaps 0x20(%rsp), %xmm0 movaps 0x10(%rsp), %xmm1 blendvps %xmm0, 0x80(%r14), %xmm1 movaps %xmm1, 0x10(%rsp) movaps 0x90(%rsp), %xmm11 movaps 0x80(%rsp), %xmm12 movaps 0x70(%rsp), %xmm13 movaps 0x60(%rsp), %xmm14 movaps 0x50(%rsp), %xmm15 movq %rax, %rbx xorl %eax, %eax testb %al, %al je 0x159d78 addq $0x1768, %rsp # imm = 0x1768 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::InstanceArrayIntersectorKMB<4>>, false>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1788, %rsp # imm = 0x1788 movq %rcx, 0x38(%rsp) movq (%rsi), %rax movq 0x70(%rax), %rax cmpq $0x8, %rax je 0x15a6ce movq %rdx, %rbx pcmpeqd %xmm1, %xmm1 movdqa (%rdi), %xmm0 pcmpeqd %xmm1, %xmm0 movaps 0x80(%rdx), %xmm2 xorps %xmm3, %xmm3 movaps %xmm2, %xmm10 cmpnltps %xmm3, %xmm10 andps %xmm0, %xmm10 movmskps %xmm10, %ecx testl %ecx, %ecx je 0x15a6ce pcmpeqd %xmm9, %xmm9 movaps 0x40(%rbx), %xmm6 movaps 0x1d924ab(%rip), %xmm1 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm1, %xmm0 movaps 0x1d97b1e(%rip), %xmm7 # 0x1ef1d40 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm6 movaps 0x30(%rbx), %xmm8 movaps 0x60(%rbx), %xmm4 movaps %xmm4, %xmm0 andps %xmm1, %xmm0 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm7, %xmm4 movaps 0x50(%rbx), %xmm5 maxps %xmm3, %xmm8 movaps 0x1d9179d(%rip), %xmm11 # 0x1eeb9f0 movaps %xmm11, %xmm12 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm8, %xmm12 rcpps %xmm6, %xmm8 mulps %xmm8, %xmm6 movaps 0x1d9279f(%rip), %xmm15 # 0x1eeca10 andps %xmm5, %xmm1 cmpltps %xmm7, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm5 movaps %xmm15, %xmm7 subps %xmm6, %xmm7 maxps %xmm3, %xmm2 movaps 0x1d9176f(%rip), %xmm6 # 0x1eeba00 movaps %xmm10, %xmm0 blendvps %xmm0, %xmm2, %xmm6 rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps %xmm15, %xmm2 subps %xmm4, %xmm2 rcpps %xmm5, %xmm1 mulps %xmm1, %xmm5 subps %xmm5, %xmm15 movaps (%rbx), %xmm3 movaps %xmm3, 0x90(%rsp) mulps %xmm1, %xmm15 addps %xmm1, %xmm15 movaps 0x10(%rbx), %xmm1 movaps %xmm1, 0x80(%rsp) mulps %xmm8, %xmm7 addps %xmm8, %xmm7 movaps %xmm7, 0xb0(%rsp) movaps 0x20(%rbx), %xmm1 movaps %xmm1, 0x70(%rsp) mulps %xmm0, %xmm2 addps %xmm0, %xmm2 movaps %xmm2, 0xa0(%rsp) movaps %xmm10, 0x60(%rsp) xorps %xmm9, %xmm10 movaps %xmm10, 0x10(%rsp) leaq 0xf0(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0x890(%rsp), %r12 movaps %xmm11, -0x20(%r12) movq %rax, -0x8(%r15) movaps %xmm12, 0xc0(%rsp) movaps %xmm12, -0x10(%r12) pushq $0x8 popq %r13 addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 movb $0x1, %r8b cmpq $-0x8, %rbp je 0x15a5b3 movaps (%r12), %xmm1 movaps %xmm1, %xmm0 cmpltps %xmm6, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15a5b0 testb $0x8, %bpl jne 0x15a5c1 movq %rbp, %rax andq $-0x10, %rax andl $0x7, %ebp movl %ebp, %ecx xorl %edx, %edx movq %r13, %rbp movaps 0x1d91662(%rip), %xmm2 # 0x1eeb9f0 movq (%rax,%rdx,8), %rsi cmpq $0x8, %rsi je 0x15a55d movss 0x80(%rax,%rdx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x20(%rax,%rdx,4), %xmm4 movss 0x30(%rax,%rdx,4), %xmm8 movss 0x40(%rax,%rdx,4), %xmm5 movss 0x50(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps 0x70(%rbx), %xmm0 mulps %xmm0, %xmm3 addps %xmm4, %xmm3 movss 0xa0(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm0, %xmm4 addps %xmm5, %xmm4 movss 0xc0(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm6, %xmm11 movss 0x60(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm0, %xmm5 addps %xmm6, %xmm5 movss 0x90(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm0, %xmm6 addps %xmm8, %xmm6 movss 0xb0(%rax,%rdx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movss 0xd0(%rax,%rdx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x70(%rax,%rdx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm0, %xmm7 addps %xmm9, %xmm7 movaps 0x90(%rsp), %xmm12 subps %xmm12, %xmm3 movaps 0xb0(%rsp), %xmm9 mulps %xmm9, %xmm3 movaps 0x80(%rsp), %xmm14 subps %xmm14, %xmm4 mulps %xmm15, %xmm4 movaps 0x70(%rsp), %xmm13 subps %xmm13, %xmm5 movaps 0xa0(%rsp), %xmm10 mulps %xmm10, %xmm5 subps %xmm12, %xmm6 mulps %xmm9, %xmm6 subps %xmm14, %xmm8 mulps %xmm15, %xmm8 subps %xmm13, %xmm7 mulps %xmm10, %xmm7 movaps %xmm3, %xmm9 pminsd %xmm6, %xmm9 movaps %xmm4, %xmm10 pminsd %xmm8, %xmm10 pmaxsd %xmm9, %xmm10 movaps %xmm5, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm10, %xmm9 pmaxsd %xmm3, %xmm6 pmaxsd %xmm4, %xmm8 pminsd %xmm6, %xmm8 movaps %xmm11, %xmm6 pmaxsd %xmm5, %xmm7 pminsd %xmm11, %xmm7 pminsd %xmm8, %xmm7 movdqa %xmm9, %xmm3 pmaxsd 0xc0(%rsp), %xmm3 cmpleps %xmm7, %xmm3 cmpl $0x6, %ecx je 0x15a576 movaps %xmm6, %xmm0 cmpnleps %xmm1, %xmm0 andps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x15a55d movaps 0x1d914b5(%rip), %xmm3 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm3 cmpq $0x8, %rbp je 0x15a557 movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm2, (%r12) addq $0x10, %r12 movaps %xmm3, %xmm2 movq %rsi, %rbp cmpq $0x8, %rsi je 0x15a5a3 leaq 0x1(%rdx), %rsi cmpq $0x3, %rdx movq %rsi, %rdx jb 0x15a38e jmp 0x15a5a3 movss 0xe0(%rax,%rdx,4), %xmm4 movss 0xf0(%rax,%rdx,4), %xmm5 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpleps %xmm0, %xmm4 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] cmpltps %xmm5, %xmm0 andps %xmm4, %xmm0 andps %xmm0, %xmm3 jmp 0x15a51e movaps %xmm2, %xmm1 cmpq $0x8, %rbp jne 0x15a36c xorl %r8d, %r8d testb %r8b, %r8b je 0x15a33c jmp 0x15a6ad cmpq $-0x8, %rbp je 0x15a5b3 movaps %xmm6, %xmm0 cmpnleps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15a5b0 movaps %xmm6, 0x40(%rsp) movaps %xmm15, 0x50(%rsp) movl %ebp, %eax andl $0xf, %eax movaps 0x10(%rsp), %xmm0 xorps 0x1d9182f(%rip), %xmm0 # 0x1eebe20 movaps %xmm0, 0x20(%rsp) addq $-0x8, %rax movq %rax, 0x30(%rsp) je 0x15a656 andq $-0x10, %rbp pushq $0x1 popq %r14 leaq 0xd0(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0xf(%rsp), %rdx movq %rbx, %rcx movq 0x38(%rsp), %r8 movq %rbp, %r9 callq 0x1cc2f4 movaps 0xd0(%rsp), %xmm0 andnps 0x20(%rsp), %xmm0 movaps %xmm0, 0x20(%rsp) movmskps %xmm0, %eax testl %eax, %eax je 0x15a656 addq $0x8, %rbp leaq 0x1(%r14), %rax cmpq 0x30(%rsp), %r14 movq %rax, %r14 jb 0x15a609 movdqa 0x20(%rsp), %xmm0 pcmpeqd %xmm1, %xmm1 pxor %xmm1, %xmm0 movdqa 0x10(%rsp), %xmm1 por %xmm0, %xmm1 movmskps %xmm1, %eax cmpl $0xf, %eax movaps %xmm1, 0x10(%rsp) je 0x15a69a movaps %xmm1, %xmm0 movaps 0x40(%rsp), %xmm6 blendvps %xmm0, 0x1d91374(%rip), %xmm6 # 0x1eeba00 xorl %r8d, %r8d movaps 0x50(%rsp), %xmm15 jmp 0x15a5b3 movaps 0x50(%rsp), %xmm15 movaps 0x40(%rsp), %xmm6 movb $0x1, %r8b jmp 0x15a5b3 movaps 0x60(%rsp), %xmm0 andps 0x10(%rsp), %xmm0 movaps 0x80(%rbx), %xmm1 blendvps %xmm0, 0x1d91339(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%rbx) addq $0x1788, %rsp # imm = 0x1788 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::SubGridIntersectorKMoeller<4, 4, true>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq (%rsi), %rbp cmpq $0x8, 0x70(%rbp) je 0x15a8a8 movq %rcx, %r13 movq %rdx, %r14 movq %rsi, %r12 cmpq $0x0, 0x8(%rcx) je 0x15a71d movq 0x10(%r13), %rax testb $0x1, 0x2(%rax) jne 0x15a8ba pcmpeqd %xmm1, %xmm1 pcmpeqd (%rdi), %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15a8a8 movaps (%r14), %xmm0 leaq 0x10(%rsp), %rcx movaps %xmm0, (%rcx) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rcx) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rcx) movaps 0x40(%r14), %xmm6 movaps %xmm6, 0x30(%rcx) movaps 0x50(%r14), %xmm4 movaps %xmm4, 0x40(%rcx) movaps 0x60(%r14), %xmm3 movaps 0x1d91f54(%rip), %xmm2 # 0x1eec6c0 movaps %xmm6, %xmm0 andps %xmm2, %xmm0 movaps 0x1d975c7(%rip), %xmm5 # 0x1ef1d40 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm6 movaps %xmm3, 0x50(%rcx) movaps %xmm4, %xmm0 andps %xmm2, %xmm0 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm5, %xmm4 andps %xmm3, %xmm2 cmpltps %xmm5, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm3 movzbl %al, %ebx rcpps %xmm6, %xmm0 mulps %xmm0, %xmm6 movaps 0x1d9225c(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm5 subps %xmm6, %xmm5 mulps %xmm0, %xmm5 addps %xmm0, %xmm5 rcpps %xmm4, %xmm6 mulps %xmm6, %xmm4 movaps %xmm2, %xmm0 subps %xmm4, %xmm0 mulps %xmm6, %xmm0 addps %xmm6, %xmm0 rcpps %xmm3, %xmm4 mulps %xmm4, %xmm3 subps %xmm3, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 movaps %xmm5, 0x60(%rcx) movaps %xmm0, 0x70(%rcx) movaps %xmm2, 0x80(%rcx) xorps %xmm3, %xmm3 cmpltps %xmm3, %xmm5 andps 0x1dc56c2(%rip), %xmm5 # 0x1f1fec0 cmpnltps %xmm3, %xmm0 movaps 0x1dc56c7(%rip), %xmm4 # 0x1f1fed0 blendvps %xmm0, 0x1da29fe(%rip), %xmm4 # 0x1efd210 movaps %xmm5, 0x90(%rcx) movaps %xmm4, 0xa0(%rcx) cmpnltps %xmm3, %xmm2 movaps 0x1dc56c5(%rip), %xmm4 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dc56a9(%rip), %xmm4 # 0x1f1fee0 movaps %xmm4, 0xb0(%rcx) movaps 0x30(%r14), %xmm2 movaps 0x80(%r14), %xmm4 maxps %xmm3, %xmm2 movaps 0x1d9119b(%rip), %xmm5 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm5 maxps %xmm3, %xmm4 movaps %xmm5, 0xc0(%rcx) movaps 0x1d91192(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, 0xd0(%rcx) bsfq %rbx, %rcx leaq -0x1(%rbx), %r15 movq 0x70(%rbp), %rdx movq %r12, %rdi movq %rbp, %rsi leaq 0xf(%rsp), %r8 movq %r14, %r9 pushq %r13 leaq 0x18(%rsp), %rax pushq %rax callq 0x1b1776 popq %rax popq %rcx andq %r15, %rbx jne 0x15a87a addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1af70a nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::SubGridIntersectorKMoeller<4, 4, true>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b98, %rsp # imm = 0x1B98 movq (%rsi), %rax movq %rax, 0x178(%rsp) cmpq $0x8, 0x70(%rax) je 0x15c2ce movq %rcx, %r10 movq %rdx, %r9 movq 0x8(%rcx), %rax testq %rax, %rax je 0x15a91e movq 0x10(%r10), %rcx testb $0x1, 0x2(%rcx) jne 0x15c2e0 pcmpeqd %xmm2, %xmm2 movdqa (%rdi), %xmm0 pcmpeqd %xmm2, %xmm0 movaps 0x80(%r9), %xmm3 xorps %xmm4, %xmm4 movaps %xmm3, %xmm9 cmpnltps %xmm4, %xmm9 andps %xmm0, %xmm9 movmskps %xmm9, %ecx testl %ecx, %ecx je 0x15c2ce movaps (%r9), %xmm0 movaps %xmm0, 0x200(%rsp) movaps 0x10(%r9), %xmm0 movaps %xmm0, 0x210(%rsp) movaps 0x20(%r9), %xmm0 movaps %xmm0, 0x220(%rsp) movaps 0x40(%r9), %xmm7 movaps %xmm7, 0x230(%rsp) movaps 0x50(%r9), %xmm1 movaps %xmm1, 0x240(%rsp) movaps 0x60(%r9), %xmm5 movaps %xmm5, 0x250(%rsp) movaps 0x1d91d1d(%rip), %xmm8 # 0x1eec6c0 movaps %xmm7, %xmm0 andps %xmm8, %xmm0 movaps 0x1d9738f(%rip), %xmm6 # 0x1ef1d40 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm7 movaps %xmm1, %xmm0 andps %xmm8, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm1 movaps %xmm5, %xmm0 andps %xmm8, %xmm0 cmpltps %xmm6, %xmm0 blendvps %xmm0, %xmm6, %xmm5 rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1d92028(%rip), %xmm8 # 0x1eeca10 movaps %xmm8, %xmm6 subps %xmm7, %xmm6 mulps %xmm0, %xmm6 addps %xmm0, %xmm6 rcpps %xmm1, %xmm7 mulps %xmm7, %xmm1 movaps %xmm8, %xmm0 subps %xmm1, %xmm0 mulps %xmm7, %xmm0 addps %xmm7, %xmm0 rcpps %xmm5, %xmm7 mulps %xmm7, %xmm5 movaps %xmm8, %xmm1 subps %xmm5, %xmm1 mulps %xmm7, %xmm1 addps %xmm7, %xmm1 movaps %xmm6, 0x260(%rsp) movaps %xmm0, 0x270(%rsp) cmpltps %xmm4, %xmm6 andps 0x1dc548a(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm4, %xmm0 movaps 0x1dc548f(%rip), %xmm5 # 0x1f1fed0 blendvps %xmm0, 0x1da27c6(%rip), %xmm5 # 0x1efd210 movaps %xmm1, 0x280(%rsp) movaps %xmm6, 0x290(%rsp) cmpnltps %xmm4, %xmm1 movaps 0x1dc548b(%rip), %xmm6 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dc546f(%rip), %xmm6 # 0x1f1fee0 movaps %xmm5, 0x2a0(%rsp) movaps %xmm6, 0x2b0(%rsp) movaps 0x30(%r9), %xmm5 maxps %xmm4, %xmm5 maxps %xmm4, %xmm3 movaps %xmm9, %xmm0 movaps 0x1d90f58(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm15, %xmm1 blendvps %xmm0, %xmm5, %xmm1 movaps %xmm1, 0x2c0(%rsp) movaps 0x1d90f50(%rip), %xmm4 # 0x1eeba00 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, 0x2d0(%rsp) movaps %xmm9, 0x370(%rsp) pxor %xmm9, %xmm2 movdqa %xmm2, 0x130(%rsp) testq %rax, %rax movq %rsi, 0x1d0(%rsp) je 0x15aaf5 movq 0x10(%r10), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %r13d, %r13d cmpb $0x1, %al adcq $0x2, %r13 jmp 0x15aaf9 pushq $0x3 popq %r13 leaq 0x500(%rsp), %r15 movq $-0x8, -0x10(%r15) leaq 0xca0(%rsp), %r12 movaps %xmm15, -0x20(%r12) movq 0x178(%rsp), %rax movq 0x70(%rax), %rax movq %rax, -0x8(%r15) movaps %xmm1, -0x10(%r12) leaq 0x1ff544c(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0xd0(%rsp) pushq $0x8 popq %r8 movq %r9, 0x18(%rsp) movq %r10, 0x10(%rsp) addq $-0x10, %r12 movq -0x8(%r15), %rbp addq $-0x8, %r15 cmpq $-0x8, %rbp je 0x15c1e9 movaps (%r12), %xmm11 movaps %xmm11, %xmm0 cmpltps 0x2d0(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15c1fa movzbl %al, %r14d popcntl %r14d, %ebx xorl %eax, %eax cmpq %r13, %rbx jbe 0x15c1fe cmpq %r13, %rbx jbe 0x15c1ec testb $0x8, %bpl jne 0x15ad43 movq %rbp, %rax movq %rbp, %rcx andq $-0x10, %rcx xorl %edx, %edx movq %r8, %rbp movaps %xmm15, %xmm11 movq (%rcx,%rdx,8), %rsi cmpq $0x8, %rsi je 0x15ace5 movss 0x20(%rax,%rdx,4), %xmm2 movss 0x30(%rax,%rdx,4), %xmm1 movss 0x40(%rax,%rdx,4), %xmm3 movss 0x50(%rax,%rdx,4), %xmm0 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps 0x200(%rsp), %xmm6 movaps 0x210(%rsp), %xmm7 movaps 0x220(%rsp), %xmm5 movaps 0x260(%rsp), %xmm8 subps %xmm6, %xmm2 mulps %xmm8, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] subps %xmm7, %xmm3 movaps 0x270(%rsp), %xmm9 mulps %xmm9, %xmm3 movss 0x60(%rax,%rdx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm5, %xmm4 movaps 0x280(%rsp), %xmm10 mulps %xmm10, %xmm4 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] subps %xmm6, %xmm1 mulps %xmm8, %xmm1 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm7, %xmm0 mulps %xmm9, %xmm0 movss 0x70(%rax,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm5, %xmm6 mulps %xmm10, %xmm6 movaps %xmm2, %xmm5 pminsd %xmm1, %xmm5 movaps %xmm3, %xmm7 pminsd %xmm0, %xmm7 pmaxsd %xmm5, %xmm7 movaps %xmm4, %xmm5 pminsd %xmm6, %xmm5 pmaxsd %xmm7, %xmm5 pmaxsd %xmm2, %xmm1 pmaxsd %xmm3, %xmm0 pminsd %xmm1, %xmm0 pmaxsd %xmm4, %xmm6 pminsd %xmm0, %xmm6 movdqa 0x2c0(%rsp), %xmm0 pminsd 0x2d0(%rsp), %xmm6 pmaxsd %xmm5, %xmm0 cmpleps %xmm6, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x15ace5 movaps %xmm15, %xmm1 blendvps %xmm0, %xmm5, %xmm1 cmpq $0x8, %rbp je 0x15acde movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm11, (%r12) addq $0x10, %r12 movaps %xmm1, %xmm11 movq %rsi, %rbp cmpq $0x8, %rsi je 0x15acfc leaq 0x1(%rdx), %rsi cmpq $0x3, %rdx movq %rsi, %rdx jb 0x15abba xorl %eax, %eax cmpq $0x8, %rbp je 0x15ad3c movaps 0x2d0(%rsp), %xmm0 cmpnleps %xmm11, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %edx movb $0x1, %cl cmpq %rdx, %r13 jae 0x15ad2c testb %cl, %cl jne 0x15ab9d jmp 0x15c1ec movq %rbp, (%r15) addq $0x8, %r15 movaps %xmm11, (%r12) addq $0x10, %r12 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x15ad1f cmpq $-0x8, %rbp je 0x15c1e9 movaps 0x2d0(%rsp), %xmm0 cmpnleps %xmm11, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15c1fa movl %ebp, %eax andl $0xf, %eax movaps 0x130(%rsp), %xmm0 addq $-0x8, %rax movq %rax, 0x1d8(%rsp) je 0x15c1b4 andq $-0x10, %rbp xorps 0x1d91091(%rip), %xmm0 # 0x1eebe20 movaps %xmm0, 0x180(%rsp) xorl %eax, %eax movq %r13, 0x1e8(%rsp) movq %rax, 0x1e0(%rsp) imulq $0x58, %rax, %rdx movq 0x20(%rbp,%rdx), %xmm0 movq 0x24(%rbp,%rdx), %xmm1 pminub %xmm0, %xmm1 pcmpeqb %xmm0, %xmm1 pcmpeqd %xmm2, %xmm2 pxor %xmm2, %xmm1 pmovzxbd %xmm1, %xmm0 # xmm0 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero pxor %xmm2, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15c18c addq %rbp, %rdx movzbl %al, %esi movq %rdx, 0x1f0(%rsp) bsfq %rsi, %rax movq 0x20(%rdx), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 movss 0x38(%rdx), %xmm1 movss 0x44(%rdx), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0x3f0(%rsp) movq 0x24(%rdx), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0x2e0(%rsp) movq 0x28(%rdx), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 movss 0x3c(%rdx), %xmm1 movss 0x48(%rdx), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0x140(%rsp) movq 0x2c(%rdx), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0xe0(%rsp) movq 0x30(%rdx), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 movss 0x40(%rdx), %xmm1 movss 0x4c(%rdx), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0x1c0(%rsp) movq 0x34(%rdx), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0x1b0(%rsp) movss 0x3f0(%rsp,%rax,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x200(%rsp), %xmm6 movaps 0x210(%rsp), %xmm5 movaps 0x220(%rsp), %xmm3 movaps 0x260(%rsp), %xmm7 subps %xmm6, %xmm0 mulps %xmm7, %xmm0 movss 0x140(%rsp,%rax,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] subps %xmm5, %xmm1 movaps 0x270(%rsp), %xmm8 mulps %xmm8, %xmm1 movss 0x1c0(%rsp,%rax,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm3, %xmm2 movaps 0x280(%rsp), %xmm9 mulps %xmm9, %xmm2 movss 0x2e0(%rsp,%rax,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm6, %xmm4 mulps %xmm7, %xmm4 movss 0xe0(%rsp,%rax,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm5, %xmm6 mulps %xmm8, %xmm6 movss 0x1b0(%rsp,%rax,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm3, %xmm5 mulps %xmm9, %xmm5 movaps %xmm0, %xmm3 pminsd %xmm4, %xmm3 movaps %xmm1, %xmm7 pminsd %xmm6, %xmm7 pmaxsd %xmm3, %xmm7 movaps %xmm2, %xmm3 pminsd %xmm5, %xmm3 pmaxsd %xmm7, %xmm3 pmaxsd %xmm0, %xmm4 pmaxsd %xmm1, %xmm6 pminsd %xmm4, %xmm6 pmaxsd %xmm2, %xmm5 pminsd %xmm6, %xmm5 pmaxsd 0x2c0(%rsp), %xmm3 pminsd 0x2d0(%rsp), %xmm5 cmpleps %xmm5, %xmm3 movaps 0x180(%rsp), %xmm6 andps %xmm6, %xmm3 movmskps %xmm3, %ecx testl %ecx, %ecx je 0x15c171 movq %rsi, 0x1f8(%rsp) movzwl (%rdx,%rax,8), %r8d movzwl 0x2(%rdx,%rax,8), %esi movl 0x50(%rdx), %ecx movq %rcx, 0x20(%rsp) movl 0x4(%rdx,%rax,8), %r13d movq %r13, 0x60(%rsp) movq (%r10), %rdx movq 0x1e8(%rdx), %rdx movq (%rdx,%rcx,8), %r9 movq 0x58(%r9), %r11 movq %r11, 0x118(%rsp) movq 0x90(%r9), %rdx imulq 0x68(%r9), %r13 movl %r8d, %eax movl $0x7fff, %edi # imm = 0x7FFF andl %edi, %eax movl (%r11,%r13), %r10d addl %eax, %r10d movl %esi, %ecx andl %edi, %ecx movl 0x4(%r11,%r13), %edi movl %edi, %r14d imull %ecx, %r14d addl %r10d, %r14d leaq 0x1(%r14), %r10 movq 0xa0(%r9), %r9 movq %r9, %r11 imulq %r14, %r11 movups (%rdx,%r11), %xmm2 imulq %r9, %r10 movups (%rdx,%r10), %xmm0 leaq (%r14,%rdi), %r11 leaq (%r14,%rdi), %r10 incq %r10 movq %r11, %rbx imulq %r9, %rbx movups (%rdx,%rbx), %xmm3 movq %r10, %rbx imulq %r9, %rbx movups (%rdx,%rbx), %xmm1 xorl %ebx, %ebx testw %r8w, %r8w setns %bl leaq (%r14,%rbx), %r8 incq %r8 imulq %r9, %r8 movups (%rdx,%r8), %xmm5 addq %r10, %rbx movq %rbx, %r8 imulq %r9, %r8 movups (%rdx,%r8), %xmm4 movl %eax, %r8d testw %si, %si movl $0x0, %esi cmovsq %rsi, %rdi movq 0x118(%rsp), %rsi addq %rdi, %r11 imulq %r9, %r11 movaps %xmm6, %xmm10 movups (%rdx,%r11), %xmm6 movl %ecx, %r11d addq %rdi, %r10 imulq %r9, %r10 movups (%rdx,%r10), %xmm7 movq 0x10(%rsp), %r10 addq %rbx, %rdi imulq %r9, %rdi movq 0x18(%rsp), %r9 movups (%rdx,%rdi), %xmm8 movq %r13, %rdi movd 0x60(%rsp), %xmm9 movaps %xmm2, 0x3f0(%rsp) movaps %xmm0, 0x400(%rsp) movaps %xmm1, 0x410(%rsp) movaps %xmm3, 0x420(%rsp) movaps %xmm0, 0x430(%rsp) movaps %xmm5, 0x440(%rsp) movaps %xmm4, 0x450(%rsp) movaps %xmm1, 0x460(%rsp) movaps %xmm3, 0x470(%rsp) movaps %xmm1, 0x480(%rsp) movaps %xmm7, 0x490(%rsp) movaps %xmm6, 0x4a0(%rsp) movaps %xmm1, 0x4b0(%rsp) movaps %xmm4, 0x4c0(%rsp) movaps %xmm8, 0x4d0(%rsp) movaps %xmm7, 0x4e0(%rsp) movd 0x20(%rsp), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3a0(%rsp) pshufd $0x0, %xmm9, %xmm0 # xmm0 = xmm9[0,0,0,0] movdqa %xmm0, 0x390(%rsp) leaq 0x420(%rsp), %r13 xorl %r14d, %r14d movaps %xmm10, %xmm1 movaps %xmm1, 0x20(%rsp) movaps -0x30(%r13), %xmm8 movaps -0x20(%r13), %xmm4 movaps (%r13), %xmm6 movaps %xmm8, %xmm14 movaps %xmm8, %xmm2 shufps $0x55, %xmm8, %xmm2 # xmm2 = xmm2[1,1],xmm8[1,1] movaps %xmm8, %xmm3 shufps $0xaa, %xmm8, %xmm3 # xmm3 = xmm3[2,2],xmm8[2,2] movaps %xmm4, %xmm0 shufps $0x55, %xmm4, %xmm0 # xmm0 = xmm0[1,1],xmm4[1,1] movaps %xmm4, %xmm1 shufps $0xaa, %xmm4, %xmm1 # xmm1 = xmm1[2,2],xmm4[2,2] movaps %xmm6, %xmm5 shufps $0x55, %xmm6, %xmm5 # xmm5 = xmm5[1,1],xmm6[1,1] movaps %xmm6, %xmm7 shufps $0xaa, %xmm6, %xmm7 # xmm7 = xmm7[2,2],xmm6[2,2] movaps %xmm2, %xmm15 movaps %xmm0, 0x3e0(%rsp) subps %xmm0, %xmm15 movaps %xmm3, %xmm9 movaps %xmm1, 0x3d0(%rsp) subps %xmm1, %xmm9 movaps %xmm5, 0x3c0(%rsp) movaps %xmm5, %xmm1 subps %xmm2, %xmm1 movaps %xmm7, 0x3b0(%rsp) subps %xmm3, %xmm7 movaps %xmm15, %xmm0 mulps %xmm7, %xmm0 movaps %xmm9, %xmm5 mulps %xmm1, %xmm5 subps %xmm0, %xmm5 movaps %xmm6, 0x1a0(%rsp) subss %xmm8, %xmm6 movaps %xmm4, 0x120(%rsp) subss %xmm4, %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm9, 0x190(%rsp) movaps %xmm9, %xmm0 mulps %xmm6, %xmm0 movaps %xmm8, %xmm4 mulps %xmm7, %xmm4 subps %xmm0, %xmm4 movaps %xmm8, 0x60(%rsp) movaps %xmm8, %xmm0 mulps %xmm1, %xmm0 movaps %xmm15, 0x100(%rsp) mulps %xmm6, %xmm15 subps %xmm0, %xmm15 movaps 0x3a0(%rsp), %xmm0 movaps %xmm0, 0x1c0(%rsp) movaps 0x390(%rsp), %xmm0 movaps %xmm0, 0x1b0(%rsp) subps 0x10(%r9), %xmm2 subps 0x20(%r9), %xmm3 movaps 0x50(%r9), %xmm11 movaps %xmm3, %xmm0 mulps %xmm11, %xmm0 movaps 0x60(%r9), %xmm12 movaps %xmm2, %xmm8 mulps %xmm12, %xmm8 subps %xmm0, %xmm8 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps (%r9), %xmm14 movaps %xmm14, %xmm10 mulps %xmm12, %xmm10 movaps 0x40(%r9), %xmm0 movaps %xmm3, %xmm9 mulps %xmm0, %xmm9 subps %xmm10, %xmm9 movaps %xmm2, %xmm13 mulps %xmm0, %xmm13 movaps %xmm14, 0x380(%rsp) mulps %xmm11, %xmm14 subps %xmm13, %xmm14 movaps %xmm5, %xmm13 mulps %xmm15, %xmm12 mulps %xmm4, %xmm11 addps %xmm12, %xmm11 mulps %xmm5, %xmm0 addps %xmm11, %xmm0 xorps %xmm5, %xmm5 mulps %xmm14, %xmm7 mulps %xmm9, %xmm1 addps %xmm7, %xmm1 mulps %xmm8, %xmm6 addps %xmm1, %xmm6 movaps %xmm0, %xmm11 andps 0x1d9136e(%rip), %xmm11 # 0x1eec6d0 xorps %xmm11, %xmm6 movaps %xmm6, %xmm1 cmpnltps %xmm5, %xmm1 andps 0x20(%rsp), %xmm1 movmskps %xmm1, %eax movaps -0x10(%r13), %xmm12 testl %eax, %eax jne 0x15bd30 movaps 0xd0(%rsp), %xmm0 movaps 0x50(%rsp), %xmm10 movaps 0x70(%rsp), %xmm8 movaps 0x30(%rsp), %xmm11 movaps 0xb0(%rsp), %xmm13 movaps 0x90(%rsp), %xmm9 movaps 0x80(%rsp), %xmm6 movaps 0xc0(%rsp), %xmm7 movaps 0x120(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm12, %xmm14 movaps %xmm12, %xmm15 shufps $0x0, %xmm12, %xmm15 # xmm15 = xmm15[0,0],xmm12[0,0] movaps %xmm12, %xmm1 shufps $0x55, %xmm12, %xmm1 # xmm1 = xmm1[1,1],xmm12[1,1] movaps %xmm1, 0x30(%rsp) shufps $0xaa, %xmm12, %xmm14 # xmm14 = xmm14[2,2],xmm12[2,2] movaps 0x1a0(%rsp), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movmskps %xmm0, %eax testl %eax, %eax movaps %xmm9, 0x90(%rsp) movaps %xmm6, 0xc0(%rsp) movaps %xmm7, 0xf0(%rsp) movaps %xmm11, 0xb0(%rsp) movaps %xmm13, 0x100(%rsp) je 0x15b545 movl %r14d, %ecx andl $0x1, %ecx addl %r8d, %ecx movl %r14d, %eax shrl %eax movzwl 0x8(%rsi,%rdi), %edx decl %edx cvtsi2ss %edx, %xmm1 addl %r11d, %eax movaps %xmm1, %xmm2 rcpss %xmm1, %xmm2 mulss %xmm2, %xmm1 movss 0x1d95b9b(%rip), %xmm4 # 0x1ef0ff8 movaps %xmm4, %xmm3 subss %xmm1, %xmm3 mulss %xmm2, %xmm3 movzwl 0xa(%rsi,%rdi), %edx decl %edx cvtsi2ss %edx, %xmm1 movaps %xmm1, %xmm2 rcpss %xmm1, %xmm2 mulss %xmm2, %xmm1 subss %xmm1, %xmm4 cvtsi2ss %ecx, %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm13, %xmm1 addps %xmm10, %xmm1 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm1, %xmm3 blendvps %xmm0, %xmm3, %xmm10 mulss %xmm2, %xmm4 cvtsi2ss %eax, %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm13, %xmm1 addps %xmm8, %xmm1 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm1, %xmm4 blendvps %xmm0, %xmm4, %xmm8 movq (%r10), %rcx movl 0x1c0(%rsp,%r14,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %rbx movd 0x34(%rbx), %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pand 0x90(%r9), %xmm1 pcmpeqd 0x1d9051f(%rip), %xmm1 # 0x1eeba10 pandn %xmm0, %xmm1 movmskps %xmm1, %ecx testl %ecx, %ecx movaps %xmm8, 0x60(%rsp) movaps %xmm10, 0x80(%rsp) je 0x15b554 movl 0x1b0(%rsp,%r14,4), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x15b847 cmpq $0x0, 0x48(%rbx) jne 0x15b847 movaps 0x30(%rsp), %xmm8 movdqa 0x20(%rsp), %xmm3 pandn %xmm3, %xmm1 movdqa %xmm1, 0x20(%rsp) jmp 0x15b55a movaps %xmm10, 0x80(%rsp) movaps %xmm8, 0x60(%rsp) movaps 0x30(%rsp), %xmm8 movaps %xmm15, %xmm3 subps %xmm12, %xmm3 movaps %xmm8, %xmm4 subps 0x3c0(%rsp), %xmm4 movaps %xmm14, %xmm2 subps 0x3b0(%rsp), %xmm2 subps %xmm15, %xmm5 movaps 0x3e0(%rsp), %xmm9 subps %xmm8, %xmm9 movaps 0x3d0(%rsp), %xmm10 subps %xmm14, %xmm10 movaps %xmm10, %xmm0 mulps %xmm4, %xmm0 movaps %xmm9, %xmm11 mulps %xmm2, %xmm11 subps %xmm0, %xmm11 movaps %xmm5, %xmm0 mulps %xmm2, %xmm0 movaps %xmm10, %xmm1 mulps %xmm3, %xmm1 subps %xmm0, %xmm1 movaps %xmm9, %xmm0 movaps %xmm3, 0x70(%rsp) mulps %xmm3, %xmm0 movaps %xmm5, %xmm12 movaps %xmm4, 0x120(%rsp) mulps %xmm4, %xmm12 subps (%r9), %xmm15 subps 0x10(%r9), %xmm8 subps %xmm0, %xmm12 subps 0x20(%r9), %xmm14 movaps 0x40(%r9), %xmm0 movaps 0x50(%r9), %xmm6 movaps 0x60(%r9), %xmm7 movaps %xmm14, %xmm4 mulps %xmm6, %xmm4 movaps %xmm8, %xmm3 mulps %xmm7, %xmm3 subps %xmm4, %xmm3 movaps %xmm15, %xmm13 movaps %xmm5, %xmm15 movaps %xmm13, %xmm5 mulps %xmm7, %xmm5 movaps %xmm14, %xmm4 mulps %xmm0, %xmm4 subps %xmm5, %xmm4 movaps %xmm8, 0x30(%rsp) mulps %xmm0, %xmm8 movaps %xmm13, %xmm5 mulps %xmm6, %xmm5 subps %xmm8, %xmm5 mulps %xmm12, %xmm7 mulps %xmm1, %xmm6 addps %xmm7, %xmm6 mulps %xmm11, %xmm0 addps %xmm6, %xmm0 mulps %xmm5, %xmm10 mulps %xmm4, %xmm9 addps %xmm10, %xmm9 movaps %xmm0, %xmm7 andps 0x1d91072(%rip), %xmm7 # 0x1eec6d0 mulps %xmm3, %xmm15 addps %xmm9, %xmm15 xorps %xmm7, %xmm15 movaps %xmm15, %xmm6 cmpnltps 0x1d9039a(%rip), %xmm6 # 0x1eeba10 andps 0x20(%rsp), %xmm6 movmskps %xmm6, %eax testl %eax, %eax jne 0x15bdc5 movaps 0xd0(%rsp), %xmm0 movaps 0x80(%rsp), %xmm7 movaps 0x60(%rsp), %xmm6 movaps 0xb0(%rsp), %xmm1 movaps 0x100(%rsp), %xmm12 movaps 0x90(%rsp), %xmm8 movaps 0xc0(%rsp), %xmm9 movaps 0xf0(%rsp), %xmm10 movaps 0x1d90321(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm1, 0x30(%rsp) movmskps %xmm0, %eax testl %eax, %eax movaps %xmm8, 0x90(%rsp) movaps %xmm9, 0x80(%rsp) movaps %xmm10, 0xc0(%rsp) movaps %xmm12, 0xb0(%rsp) je 0x15b812 movaps %xmm12, %xmm2 subps %xmm7, %xmm2 movaps %xmm12, %xmm1 subps %xmm6, %xmm1 movl %r14d, %ecx andl $0x1, %ecx addl %r8d, %ecx movl %r14d, %eax shrl %eax addl %r11d, %eax movzwl 0x8(%rsi,%rdi), %edx decl %edx cvtsi2ss %edx, %xmm3 movaps %xmm3, %xmm4 rcpss %xmm3, %xmm4 mulss %xmm4, %xmm3 movss 0x1d958b8(%rip), %xmm7 # 0x1ef0ff8 movaps %xmm7, %xmm5 movzwl 0xa(%rsi,%rdi), %edx decl %edx cvtsi2ss %edx, %xmm6 subss %xmm3, %xmm5 mulss %xmm4, %xmm5 movaps %xmm6, %xmm4 rcpss %xmm6, %xmm4 mulss %xmm4, %xmm6 movaps %xmm7, %xmm3 subss %xmm6, %xmm3 mulss %xmm4, %xmm3 cvtsi2ss %ecx, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm12, %xmm4 addps %xmm2, %xmm4 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm4, %xmm5 movaps %xmm2, %xmm7 blendvps %xmm0, %xmm5, %xmm7 cvtsi2ss %eax, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm12, %xmm2 addps %xmm1, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm2, %xmm3 movaps %xmm1, %xmm6 blendvps %xmm0, %xmm3, %xmm6 movq (%r10), %rcx movl 0x1c0(%rsp,%r14,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %rbx movd 0x34(%rbx), %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pand 0x90(%r9), %xmm1 pcmpeqd 0x1d90237(%rip), %xmm1 # 0x1eeba10 pandn %xmm0, %xmm1 movmskps %xmm1, %ecx testl %ecx, %ecx je 0x15b812 movl 0x1b0(%rsp,%r14,4), %ecx movq 0x10(%r10), %rdx cmpq $0x0, 0x10(%rdx) jne 0x15badd cmpq $0x0, 0x48(%rbx) jne 0x15badd movdqa 0x20(%rsp), %xmm3 pandn %xmm3, %xmm1 jmp 0x15b818 movdqa 0x20(%rsp), %xmm1 movaps %xmm7, 0x50(%rsp) movaps %xmm6, 0x70(%rsp) movmskps %xmm1, %eax testl %eax, %eax je 0x15c140 leaq 0x1(%r14), %rax addq $0x40, %r13 cmpq $0x3, %r14 movq %rax, %r14 jb 0x15b1bd jmp 0x15c140 movaps %xmm5, 0x120(%rsp) rcpps %xmm13, %xmm0 movaps %xmm13, %xmm3 mulps %xmm0, %xmm3 movaps 0x1d911af(%rip), %xmm2 # 0x1eeca10 subps %xmm3, %xmm2 mulps %xmm0, %xmm2 addps %xmm0, %xmm2 movaps %xmm10, %xmm0 mulps %xmm2, %xmm0 movaps %xmm8, %xmm3 mulps %xmm2, %xmm3 movq 0x8(%r10), %rdx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd %ecx, %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm9, 0x2e0(%rsp) movaps %xmm6, 0x2f0(%rsp) movaps %xmm7, 0x300(%rsp) movaps %xmm0, 0x310(%rsp) movaps %xmm3, 0x320(%rsp) movdqa %xmm5, 0x330(%rsp) movdqa %xmm4, 0x340(%rsp) mulps %xmm11, %xmm2 leaq 0x350(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x350(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x360(%rsp) movaps 0x80(%r9), %xmm4 movaps %xmm4, %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x80(%r9) movaps %xmm1, 0xe0(%rsp) leaq 0xe0(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x18(%rbx), %rax movq %rax, 0x148(%rsp) movq 0x8(%r10), %rax movq %rax, 0x150(%rsp) movq %r9, 0x158(%rsp) leaq 0x2e0(%rsp), %rax movq %rax, 0x160(%rsp) movl $0x4, 0x168(%rsp) movq 0x48(%rbx), %rax testq %rax, %rax movdqa 0x20(%rsp), %xmm3 movq %rdi, 0xa8(%rsp) movl %r8d, 0xc(%rsp) movl %r11d, 0x8(%rsp) movaps %xmm14, 0x50(%rsp) movaps %xmm12, 0x1a0(%rsp) movaps %xmm15, 0x190(%rsp) movaps %xmm4, 0x70(%rsp) je 0x15ba05 leaq 0x140(%rsp), %rdi callq *%rax movaps 0x70(%rsp), %xmm4 movaps 0x190(%rsp), %xmm15 movaps 0x1a0(%rsp), %xmm12 movaps 0x50(%rsp), %xmm14 movdqa 0x20(%rsp), %xmm3 movl 0x8(%rsp), %r11d movl 0xc(%rsp), %r8d movq 0xa8(%rsp), %rdi movq 0x118(%rsp), %rsi movq 0x10(%rsp), %r10 movq 0x18(%rsp), %r9 movdqa 0xe0(%rsp), %xmm2 ptest %xmm2, %xmm2 movaps 0x120(%rsp), %xmm5 je 0x15be57 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax movaps 0x30(%rsp), %xmm8 je 0x15ba9c testb $0x2, (%rcx) jne 0x15ba3f testb $0x40, 0x3e(%rbx) je 0x15ba9c leaq 0x140(%rsp), %rdi movq %rsi, %rbx callq *%rax movaps 0x70(%rsp), %xmm4 movaps 0x30(%rsp), %xmm8 movaps 0x190(%rsp), %xmm15 movaps 0x1a0(%rsp), %xmm12 movaps 0x50(%rsp), %xmm14 movaps 0x120(%rsp), %xmm5 movdqa 0x20(%rsp), %xmm3 movl 0x8(%rsp), %r11d movl 0xc(%rsp), %r8d movq 0xa8(%rsp), %rdi movq %rbx, %rsi movq 0x10(%rsp), %r10 movq 0x18(%rsp), %r9 movdqa 0xe0(%rsp), %xmm0 pcmpeqd 0x1d8ff63(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d90367(%rip), %xmm2 # 0x1eebe20 movq 0x158(%rsp), %rax movaps 0x1d8ff38(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x15be6d rcpps %xmm12, %xmm0 movaps %xmm12, %xmm3 mulps %xmm0, %xmm3 movaps 0x1d90f21(%rip), %xmm2 # 0x1eeca10 subps %xmm3, %xmm2 mulps %xmm0, %xmm2 addps %xmm0, %xmm2 movaps %xmm7, %xmm0 mulps %xmm2, %xmm0 movaps %xmm6, %xmm3 mulps %xmm2, %xmm3 movq 0x8(%r10), %rdx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd %ecx, %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm8, 0x2e0(%rsp) movaps %xmm9, 0x2f0(%rsp) movaps %xmm10, 0x300(%rsp) movaps %xmm0, 0x310(%rsp) movaps %xmm3, 0x320(%rsp) movdqa %xmm5, 0x330(%rsp) movdqa %xmm4, 0x340(%rsp) mulps 0x30(%rsp), %xmm2 leaq 0x350(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x350(%rsp) movd 0x4(%rdx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x360(%rsp) movaps 0x80(%r9), %xmm4 movaps %xmm4, %xmm3 movdqa %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm3 movaps %xmm3, 0x80(%r9) movaps %xmm1, 0xe0(%rsp) leaq 0xe0(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x18(%rbx), %rax movq %rax, 0x148(%rsp) movq 0x8(%r10), %rax movq %rax, 0x150(%rsp) movq %r9, 0x158(%rsp) leaq 0x2e0(%rsp), %rax movq %rax, 0x160(%rsp) movl $0x4, 0x168(%rsp) movq 0x48(%rbx), %rax testq %rax, %rax movaps %xmm6, 0x70(%rsp) movaps %xmm7, 0x50(%rsp) movq %rdi, 0xa8(%rsp) movl %r8d, 0xc(%rsp) movl %r11d, 0x8(%rsp) movaps %xmm4, 0x60(%rsp) je 0x15bc74 leaq 0x140(%rsp), %rdi callq *%rax movaps 0x60(%rsp), %xmm4 movl 0x8(%rsp), %r11d movl 0xc(%rsp), %r8d movq 0xa8(%rsp), %rdi movq 0x118(%rsp), %rsi movaps 0x50(%rsp), %xmm7 movaps 0x70(%rsp), %xmm6 movaps 0x1d8fd86(%rip), %xmm15 # 0x1eeb9f0 movq 0x10(%rsp), %r10 movq 0x18(%rsp), %r9 movdqa 0xe0(%rsp), %xmm2 ptest %xmm2, %xmm2 movdqa 0x20(%rsp), %xmm3 je 0x15be96 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x15bcef testb $0x2, (%rcx) jne 0x15bca6 testb $0x40, 0x3e(%rbx) je 0x15bcef leaq 0x140(%rsp), %rdi movq %rsi, %rbx callq *%rax movaps 0x60(%rsp), %xmm4 movdqa 0x20(%rsp), %xmm3 movl 0x8(%rsp), %r11d movl 0xc(%rsp), %r8d movq 0xa8(%rsp), %rdi movq %rbx, %rsi movaps 0x50(%rsp), %xmm7 movaps 0x70(%rsp), %xmm6 movaps 0x1d8fd0b(%rip), %xmm15 # 0x1eeb9f0 movq 0x10(%rsp), %r10 movq 0x18(%rsp), %r9 movdqa 0xe0(%rsp), %xmm0 pcmpeqd 0x1d8fd10(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm2 pxor 0x1d90114(%rip), %xmm2 # 0x1eebe20 movq 0x158(%rsp), %rax movaps 0x1d8fce5(%rip), %xmm1 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm1 movaps %xmm1, 0x80(%rax) jmp 0x15bea6 movaps %xmm15, 0xf0(%rsp) movaps 0x190(%rsp), %xmm7 mulps %xmm14, %xmm7 movaps 0x100(%rsp), %xmm5 mulps %xmm9, %xmm5 addps %xmm7, %xmm5 movaps 0x60(%rsp), %xmm14 mulps %xmm8, %xmm14 addps %xmm5, %xmm14 xorps %xmm11, %xmm14 movaps %xmm14, %xmm5 cmpnltps 0x1d8fc9e(%rip), %xmm5 # 0x1eeba10 andps %xmm1, %xmm5 movmskps %xmm5, %eax testl %eax, %eax movaps 0xc0(%rsp), %xmm7 movaps 0x70(%rsp), %xmm8 movaps 0xb0(%rsp), %xmm9 jne 0x15becf movaps 0xd0(%rsp), %xmm0 movaps 0x50(%rsp), %xmm10 movaps 0x30(%rsp), %xmm11 movaps %xmm9, %xmm13 movaps 0x90(%rsp), %xmm9 movaps 0x80(%rsp), %xmm6 jmp 0x15b3be movaps 0x30(%rsp), %xmm9 movaps %xmm15, 0x50(%rsp) mulps %xmm5, %xmm2 movaps 0x120(%rsp), %xmm5 mulps %xmm4, %xmm5 addps %xmm2, %xmm5 movaps 0x70(%rsp), %xmm4 mulps %xmm3, %xmm4 addps %xmm5, %xmm4 xorps %xmm7, %xmm4 movaps %xmm4, %xmm2 cmpnltps 0x1d8fc15(%rip), %xmm2 # 0x1eeba10 andps %xmm6, %xmm2 movmskps %xmm2, %eax testl %eax, %eax movaps 0x60(%rsp), %xmm6 movaps 0x1d8fbe0(%rip), %xmm15 # 0x1eeb9f0 jne 0x15bf2c movaps 0xd0(%rsp), %xmm0 movaps 0x80(%rsp), %xmm7 movaps 0xb0(%rsp), %xmm1 movaps 0x100(%rsp), %xmm12 movaps 0x90(%rsp), %xmm8 movaps 0xc0(%rsp), %xmm9 movaps 0xf0(%rsp), %xmm10 jmp 0x15b6cf pcmpeqd 0x1d8fbb1(%rip), %xmm2 # 0x1eeba10 pxor 0x1d8ffb9(%rip), %xmm2 # 0x1eebe20 movaps 0x30(%rsp), %xmm8 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%r9), %xmm4 movaps %xmm4, 0x80(%r9) jmp 0x15b539 pcmpeqd 0x1d8fb72(%rip), %xmm2 # 0x1eeba10 pxor 0x1d8ff7a(%rip), %xmm2 # 0x1eebe20 pslld $0x1f, %xmm2 movdqa %xmm2, %xmm1 psrad $0x1f, %xmm1 movdqa %xmm2, %xmm0 blendvps %xmm0, 0x80(%r9), %xmm4 movaps %xmm4, 0x80(%r9) jmp 0x15b80c movaps %xmm0, %xmm15 andps 0x1d907e5(%rip), %xmm15 # 0x1eec6c0 movaps %xmm15, %xmm10 subps %xmm6, %xmm10 cmpnltps %xmm14, %xmm10 andps %xmm5, %xmm10 movmskps %xmm10, %eax testl %eax, %eax movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm1 jne 0x15c011 movaps 0xd0(%rsp), %xmm0 movaps 0x50(%rsp), %xmm10 movaps 0x30(%rsp), %xmm11 movaps %xmm9, %xmm13 movaps %xmm5, %xmm9 movaps %xmm1, %xmm6 jmp 0x15b3be movaps %xmm13, %xmm10 movaps %xmm7, %xmm3 movaps %xmm0, %xmm7 andps 0x1d90783(%rip), %xmm7 # 0x1eec6c0 movaps %xmm7, %xmm13 subps 0x50(%rsp), %xmm13 cmpnltps %xmm4, %xmm13 andps %xmm2, %xmm13 movmskps %xmm13, %eax testl %eax, %eax je 0x15be16 movaps %xmm4, 0x70(%rsp) movaps %xmm12, %xmm6 mulps %xmm12, %xmm14 mulps %xmm1, %xmm9 addps %xmm14, %xmm9 mulps %xmm11, %xmm10 addps %xmm9, %xmm10 movaps %xmm3, %xmm2 xorps %xmm10, %xmm2 movaps 0x30(%r9), %xmm3 mulps %xmm7, %xmm3 cmpltps %xmm2, %xmm3 movaps 0x80(%r9), %xmm4 movaps %xmm7, %xmm12 mulps %xmm7, %xmm4 movaps %xmm2, %xmm7 cmpleps %xmm4, %xmm2 andps %xmm3, %xmm2 andps %xmm13, %xmm2 movmskps %xmm2, %eax testl %eax, %eax je 0x15c0a5 movaps %xmm1, %xmm5 movaps %xmm11, %xmm8 xorps %xmm1, %xmm1 cmpneqps %xmm1, %xmm0 andps %xmm2, %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r10 movaps 0x1d8fa14(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm5, %xmm9 movaps %xmm6, %xmm10 movaps 0x70(%rsp), %xmm6 movaps %xmm7, %xmm1 movaps 0x50(%rsp), %xmm7 jne 0x15b6cf movaps 0xd0(%rsp), %xmm0 movaps 0x80(%rsp), %xmm7 movaps 0x60(%rsp), %xmm6 jmp 0x15be26 mulps 0xf0(%rsp), %xmm3 mulps %xmm4, %xmm2 addps %xmm3, %xmm2 movaps 0x380(%rsp), %xmm1 mulps %xmm13, %xmm1 addps %xmm2, %xmm1 xorps %xmm1, %xmm11 movaps 0x30(%r9), %xmm2 mulps %xmm15, %xmm2 cmpltps %xmm11, %xmm2 movaps 0x80(%r9), %xmm3 mulps %xmm15, %xmm3 movaps %xmm11, %xmm1 cmpleps %xmm3, %xmm1 andps %xmm2, %xmm1 andps %xmm10, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15c0f5 movaps %xmm13, %xmm9 movaps %xmm15, %xmm13 xorps %xmm2, %xmm2 cmpneqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r10 movaps %xmm14, %xmm8 movaps %xmm6, %xmm10 movaps %xmm4, %xmm6 movaps 0xf0(%rsp), %xmm7 jne 0x15b3be jmp 0x15b382 movaps 0xd0(%rsp), %xmm0 movaps 0x80(%rsp), %xmm7 movaps 0x60(%rsp), %xmm6 movaps 0xb0(%rsp), %xmm1 movaps 0x100(%rsp), %xmm12 movaps 0x90(%rsp), %xmm8 movaps 0xc0(%rsp), %xmm9 movaps 0xf0(%rsp), %xmm10 movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r10 jmp 0x15b6c7 movaps 0xd0(%rsp), %xmm0 movaps 0x50(%rsp), %xmm10 movaps 0x70(%rsp), %xmm8 movaps 0x30(%rsp), %xmm11 movaps 0xb0(%rsp), %xmm13 movaps 0x90(%rsp), %xmm9 movaps 0x80(%rsp), %xmm6 movaps 0xc0(%rsp), %xmm7 movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r10 jmp 0x15b3be movaps 0x180(%rsp), %xmm6 andps %xmm1, %xmm6 movmskps %xmm6, %eax testl %eax, %eax sete %al movq 0x1e8(%rsp), %r13 pushq $0x8 popq %r8 movq 0x1f0(%rsp), %rdx movq 0x1f8(%rsp), %rsi jmp 0x15c173 xorl %eax, %eax movaps %xmm6, 0x180(%rsp) testb %al, %al jne 0x15c18c leaq -0x1(%rsi), %rax andq %rax, %rsi jne 0x15adf0 movq 0x1e0(%rsp), %rax incq %rax cmpq 0x1d8(%rsp), %rax jne 0x15ada1 movaps 0x180(%rsp), %xmm0 xorps 0x1d8fc6c(%rip), %xmm0 # 0x1eebe20 orps 0x130(%rsp), %xmm0 movaps %xmm0, 0x130(%rsp) movmskps %xmm0, %eax cmpl $0xf, %eax je 0x15c1e9 movaps 0x2d0(%rsp), %xmm1 blendvps %xmm0, 0x1d8f823(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x2d0(%rsp) xorl %eax, %eax jmp 0x15c1ec pushq $0x3 popq %rax cmpl $0x3, %eax jne 0x15ab4d jmp 0x15c2a5 pushq $0x2 jmp 0x15c1eb movaps %xmm11, 0x60(%rsp) bsfq %r14, %rcx movq 0x1d0(%rsp), %rdi movq 0x178(%rsp), %rsi movq %rbp, %rdx movq %rcx, 0x20(%rsp) leaq 0x4f(%rsp), %r8 pushq %r10 leaq 0x208(%rsp), %rax pushq %rax callq 0x1b4f14 popq %rcx popq %rdx testb %al, %al je 0x15c248 movq 0x20(%rsp), %rax orl $-0x1, 0x130(%rsp,%rax,4) leaq -0x1(%r14), %rax andq %rax, %r14 movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r10 jne 0x15c204 movaps 0x130(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d8f77c(%rip), %xmm15 # 0x1eeb9f0 pushq $0x8 popq %r8 movaps 0x60(%rsp), %xmm11 je 0x15ab94 movaps 0x2d0(%rsp), %xmm1 blendvps %xmm0, 0x1d8f76b(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x2d0(%rsp) pushq $0x2 popq %rax jmp 0x15ab94 movaps 0x370(%rsp), %xmm0 andps 0x130(%rsp), %xmm0 movaps 0x80(%r9), %xmm1 blendvps %xmm0, 0x1d8f73a(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%r9) addq $0x1b98, %rsp # imm = 0x1B98 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r9, %rdx movq %r10, %rcx addq $0x1b98, %rsp # imm = 0x1B98 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1b3136
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::SubGridMBIntersectorKPluecker<4, 4, true>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x15c492 pcmpeqd %xmm1, %xmm1 pcmpeqd (%rdi), %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15c492 movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movzbl %al, %ebp movaps (%rdx), %xmm0 leaq 0x10(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%rdx), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%rdx), %xmm0 movaps %xmm0, 0x20(%rax) movaps 0x40(%rdx), %xmm0 movaps %xmm0, 0x30(%rax) movaps 0x50(%rdx), %xmm4 movaps %xmm4, 0x40(%rax) movaps 0x60(%rdx), %xmm7 movaps %xmm7, 0x50(%rax) movaps 0x1d9034c(%rip), %xmm5 # 0x1eec6c0 movaps 0x1d90695(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm6 divps %xmm0, %xmm6 andps %xmm5, %xmm0 movaps 0x1d959b4(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps %xmm2, %xmm3 divps %xmm4, %xmm3 andps %xmm5, %xmm4 cmpltps %xmm8, %xmm4 andps %xmm7, %xmm5 cmpltps %xmm8, %xmm5 movaps 0x1dc0581(%rip), %xmm8 # 0x1f1c930 blendvps %xmm0, %xmm8, %xmm6 divps %xmm7, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm8, %xmm3 movaps %xmm5, %xmm0 blendvps %xmm0, %xmm8, %xmm2 movaps %xmm6, 0x60(%rax) movaps %xmm3, 0x70(%rax) movaps %xmm2, 0x80(%rax) xorps %xmm4, %xmm4 cmpltps %xmm4, %xmm6 andps 0x1dc3ad9(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm4, %xmm3 movaps 0x1dc3ade(%rip), %xmm5 # 0x1f1fed0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1da0e12(%rip), %xmm5 # 0x1efd210 movaps %xmm6, 0x90(%rax) movaps %xmm5, 0xa0(%rax) cmpnltps %xmm4, %xmm2 movaps 0x1dc3ad9(%rip), %xmm3 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dc3abd(%rip), %xmm3 # 0x1f1fee0 movaps %xmm3, 0xb0(%rax) movaps 0x30(%rdx), %xmm2 movaps 0x80(%rdx), %xmm3 maxps %xmm4, %xmm2 movaps 0x1d8f5b1(%rip), %xmm5 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm5 maxps %xmm4, %xmm3 movaps %xmm5, 0xc0(%rax) movaps 0x1d8f5a8(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r13 movq 0x70(%rbx), %rdx movq %r12, %rdi movq %rbx, %rsi leaq 0xf(%rsp), %r8 movq %r14, %r9 pushq %r15 leaq 0x18(%rsp), %rax pushq %rax callq 0x1b63c4 popq %rax popq %rcx andq %r13, %rbp jne 0x15c464 addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::SubGridMBIntersectorKPluecker<4, 4, true>, true>::occluded(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayK<K>& __restrict__ ray, RayQueryContext* context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { occludedCoherent(valid_i, This, ray, context); return; } #endif /* filter out already occluded and invalid rays */ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f); #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ const size_t valid_bits = movemask(valid); if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); vbool<K> terminated = !valid; const vfloat<K> inf = vfloat<K>(pos_inf); /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); if (occluded1(This, bvh, cur, i, pre, ray, tray, context)) set(terminated, i); } if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push 'cur' node onto stack and continue with hit child */ if (likely(cur != BVH::emptyNode)) { *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } } if (unlikely(cur == BVH::emptyNode)) goto pop; #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*) cur.leaf(items); size_t lazy_node = 0; terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node); if (all(terminated)) break; tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c38, %rsp # imm = 0x1C38 movq %rsi, 0x258(%rsp) movq (%rsi), %rax movq %rax, 0xf0(%rsp) cmpq $0x8, 0x70(%rax) je 0x15e4dc movq %rdx, %r15 pcmpeqd %xmm5, %xmm5 movdqa (%rdi), %xmm0 pcmpeqd %xmm5, %xmm0 movaps 0x80(%rdx), %xmm6 xorps %xmm7, %xmm7 movaps %xmm6, %xmm12 cmpnltps %xmm7, %xmm12 andps %xmm0, %xmm12 movmskps %xmm12, %eax testl %eax, %eax je 0x15e4dc movq %rcx, %r12 movaps (%r15), %xmm0 movaps %xmm0, 0x3a0(%rsp) movaps 0x10(%r15), %xmm0 movaps %xmm0, 0x3b0(%rsp) movaps 0x20(%r15), %xmm0 movaps %xmm0, 0x3c0(%rsp) movaps 0x40(%r15), %xmm0 movaps %xmm0, 0x3d0(%rsp) movaps 0x50(%r15), %xmm4 movaps %xmm4, 0x3e0(%rsp) movaps 0x60(%r15), %xmm2 movaps %xmm2, 0x3f0(%rsp) movaps 0x1d90163(%rip), %xmm10 # 0x1eec6c0 movaps 0x1d904ac(%rip), %xmm1 # 0x1eeca10 movaps %xmm1, %xmm8 divps %xmm0, %xmm8 andps %xmm10, %xmm0 movaps 0x1d957c8(%rip), %xmm11 # 0x1ef1d40 cmpltps %xmm11, %xmm0 movaps %xmm1, %xmm3 divps %xmm4, %xmm3 andps %xmm10, %xmm4 cmpltps %xmm11, %xmm4 divps %xmm2, %xmm1 movaps 0x1dc0399(%rip), %xmm9 # 0x1f1c930 blendvps %xmm0, %xmm9, %xmm8 andps %xmm10, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm9, %xmm3 cmpltps %xmm11, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm9, %xmm1 movaps %xmm8, 0x400(%rsp) movaps %xmm3, 0x410(%rsp) movaps %xmm1, 0x420(%rsp) cmpltps %xmm7, %xmm8 andps 0x1dc38e2(%rip), %xmm8 # 0x1f1fec0 cmpnltps %xmm7, %xmm3 movaps 0x1dc38e7(%rip), %xmm2 # 0x1f1fed0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1da0c1b(%rip), %xmm2 # 0x1efd210 movaps %xmm8, 0x430(%rsp) movaps %xmm2, 0x440(%rsp) cmpnltps %xmm7, %xmm1 movaps 0x1dc38df(%rip), %xmm2 # 0x1f1fef0 movaps %xmm1, %xmm0 blendvps %xmm0, 0x1dc38c3(%rip), %xmm2 # 0x1f1fee0 movaps %xmm2, 0x450(%rsp) movaps 0x30(%r15), %xmm2 maxps %xmm7, %xmm2 movaps 0x1d8f3bb(%rip), %xmm15 # 0x1eeb9f0 movaps %xmm15, %xmm1 movaps %xmm12, %xmm0 blendvps %xmm0, %xmm2, %xmm1 maxps %xmm7, %xmm6 movaps %xmm1, 0x460(%rsp) movaps 0x1d8f3ac(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm6, %xmm2 movaps %xmm2, 0x470(%rsp) pxor %xmm12, %xmm5 movdqa %xmm5, 0xe0(%rsp) cmpq $0x0, 0x8(%rcx) je 0x15c68a movq 0x10(%r12), %rax movb 0x2(%rax), %al andb $0x1, %al xorl %ebp, %ebp cmpb $0x1, %al adcq $0x2, %rbp jmp 0x15c68d pushq $0x3 popq %rbp leaq 0x5a0(%rsp), %r8 movq $-0x8, -0x10(%r8) leaq 0xd40(%rsp), %r9 movaps %xmm15, -0x20(%r9) movq 0xf0(%rsp), %rax movq 0x70(%rax), %rax movq %rax, -0x8(%r8) movaps %xmm1, -0x10(%r9) pushq $0x8 popq %r10 movaps %xmm12, 0x480(%rsp) addq $-0x10, %r9 movq -0x8(%r8), %rdx addq $-0x8, %r8 cmpq $-0x8, %rdx je 0x15e3d7 movaps (%r9), %xmm14 movaps %xmm14, %xmm0 cmpltps 0x470(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15e3e8 movzbl %al, %r14d popcntl %r14d, %ebx xorl %eax, %eax cmpq %rbp, %rbx jbe 0x15e3ec cmpq %rbp, %rbx jbe 0x15e3da testb $0x8, %dl jne 0x15c9b0 movaps 0x470(%rsp), %xmm1 movq %rdx, %rax andq $-0x10, %rax andl $0x7, %edx movl %edx, %ecx cmpnleps %xmm14, %xmm1 xorl %r11d, %r11d movq %r10, %rdx movaps %xmm15, %xmm14 movq (%rax,%r11,8), %rsi cmpq $0x8, %rsi je 0x15c925 movss 0x80(%rax,%r11,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x20(%rax,%r11,4), %xmm3 movss 0x30(%rax,%r11,4), %xmm7 movss 0x40(%rax,%r11,4), %xmm4 movss 0x50(%rax,%r11,4), %xmm5 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps 0x70(%r15), %xmm2 mulps %xmm2, %xmm0 addps %xmm3, %xmm0 movss 0xa0(%rax,%r11,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm3 addps %xmm4, %xmm3 movss 0xc0(%rax,%r11,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x60(%rax,%r11,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm6, %xmm4 movss 0x90(%rax,%r11,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm2, %xmm6 addps %xmm7, %xmm6 movss 0xb0(%rax,%r11,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm7 addps %xmm5, %xmm7 movss 0xd0(%rax,%r11,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x70(%rax,%r11,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm8, %xmm5 movaps 0x3a0(%rsp), %xmm8 movaps 0x3b0(%rsp), %xmm9 movaps 0x3c0(%rsp), %xmm10 movaps 0x400(%rsp), %xmm11 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 subps %xmm9, %xmm3 movaps 0x410(%rsp), %xmm12 mulps %xmm12, %xmm3 subps %xmm10, %xmm4 movaps 0x420(%rsp), %xmm13 mulps %xmm13, %xmm4 subps %xmm8, %xmm6 mulps %xmm11, %xmm6 subps %xmm9, %xmm7 mulps %xmm12, %xmm7 subps %xmm10, %xmm5 mulps %xmm13, %xmm5 movaps %xmm0, %xmm8 pminsd %xmm6, %xmm8 movaps %xmm3, %xmm9 pminsd %xmm7, %xmm9 pmaxsd %xmm8, %xmm9 movaps %xmm4, %xmm8 pminsd %xmm5, %xmm8 pmaxsd %xmm9, %xmm8 mulps 0x1d954d2(%rip), %xmm8 # 0x1ef1d80 pmaxsd %xmm0, %xmm6 pmaxsd %xmm3, %xmm7 pminsd %xmm6, %xmm7 pmaxsd %xmm4, %xmm5 pminsd %xmm7, %xmm5 mulps 0x1d954c2(%rip), %xmm5 # 0x1ef1d90 movdqa 0x460(%rsp), %xmm0 pmaxsd %xmm8, %xmm0 pminsd 0x470(%rsp), %xmm5 cmpleps %xmm5, %xmm0 cmpl $0x6, %ecx je 0x15c93e andps %xmm1, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edi testl %edi, %edi je 0x15c925 movaps %xmm15, %xmm2 blendvps %xmm0, %xmm8, %xmm2 cmpq $0x8, %rdx je 0x15c91e movq %rdx, (%r8) addq $0x8, %r8 movaps %xmm14, (%r9) addq $0x10, %r9 movaps %xmm2, %xmm14 movq %rsi, %rdx cmpq $0x8, %rsi je 0x15c96a leaq 0x1(%r11), %rsi cmpq $0x3, %r11 movq %rsi, %r11 jb 0x15c747 jmp 0x15c96a movss 0xe0(%rax,%r11,4), %xmm3 movss 0xf0(%rax,%r11,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] cmpleps %xmm2, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] cmpltps %xmm4, %xmm2 andps %xmm3, %xmm2 andps %xmm2, %xmm0 jmp 0x15c8f0 xorl %eax, %eax cmpq $0x8, %rdx je 0x15c9a9 movaps 0x470(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %ecx popcntl %ecx, %esi movb $0x1, %cl cmpq %rsi, %rbp jae 0x15c99a testb %cl, %cl jne 0x15c71b jmp 0x15e3da movq %rdx, (%r8) addq $0x8, %r8 movaps %xmm14, (%r9) addq $0x10, %r9 xorl %ecx, %ecx pushq $0x4 popq %rax jmp 0x15c98d cmpq $-0x8, %rdx je 0x15e3d7 movaps 0x470(%rsp), %xmm0 cmpnleps %xmm14, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x15e3e8 movl %edx, %eax andl $0xf, %eax movaps 0xe0(%rsp), %xmm12 addq $-0x8, %rax movq %rax, 0x260(%rsp) je 0x15e39b andq $-0x10, %rdx xorps 0x1d8f422(%rip), %xmm12 # 0x1eebe20 xorl %eax, %eax movq %r15, 0x290(%rsp) movq %r12, 0x288(%rsp) movq %rbp, 0x270(%rsp) movq %r8, 0xa8(%rsp) movq %r9, 0xa0(%rsp) movq %rdx, 0xb0(%rsp) movq %rax, 0x268(%rsp) imulq $0x90, %rax, %rax movq 0x20(%rdx,%rax), %xmm0 movq 0x24(%rdx,%rax), %xmm1 pminub %xmm0, %xmm1 pcmpeqb %xmm0, %xmm1 pcmpeqd %xmm2, %xmm2 pxor %xmm2, %xmm1 pmovzxbd %xmm1, %xmm0 # xmm0 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero pxor %xmm2, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %ecx testl %ecx, %ecx je 0x15e37a leaq (%rdx,%rax), %rsi movss 0x80(%rdx,%rax), %xmm0 movss 0x84(%rdx,%rax), %xmm2 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x70(%r15), %xmm1 subps %xmm0, %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm1, %xmm2 movaps %xmm2, 0x490(%rsp) movzbl %cl, %edi movq %rsi, 0x278(%rsp) bsfq %rdi, %rax movq 0x20(%rsi), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 movss 0x38(%rsi), %xmm1 movss 0x44(%rsi), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, 0x130(%rsp) movss 0x130(%rsp,%rax,4), %xmm5 movq 0x50(%rsi), %xmm0 pmovzxbd %xmm0, %xmm0 # xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero cvtdq2ps %xmm0, %xmm0 movss 0x68(%rsi), %xmm3 movss 0x74(%rsi), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm4, %xmm0 addps %xmm3, %xmm0 movaps %xmm0, 0x2c0(%rsp) movss 0x2c0(%rsp,%rax,4), %xmm0 subss %xmm5, %xmm0 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x490(%rsp), %xmm10 mulps %xmm10, %xmm0 addps %xmm5, %xmm0 movq 0x24(%rsi), %xmm5 pmovzxbd %xmm5, %xmm5 # xmm5 = xmm5[0],zero,zero,zero,xmm5[1],zero,zero,zero,xmm5[2],zero,zero,zero,xmm5[3],zero,zero,zero cvtdq2ps %xmm5, %xmm5 mulps %xmm2, %xmm5 addps %xmm1, %xmm5 movaps %xmm5, 0x130(%rsp) movss 0x130(%rsp,%rax,4), %xmm2 movq 0x54(%rsi), %xmm1 pmovzxbd %xmm1, %xmm1 # xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero cvtdq2ps %xmm1, %xmm1 mulps %xmm4, %xmm1 addps %xmm3, %xmm1 movaps %xmm1, 0x2c0(%rsp) movss 0x2c0(%rsp,%rax,4), %xmm1 subss %xmm2, %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm10, %xmm1 addps %xmm2, %xmm1 movq 0x28(%rsi), %xmm2 pmovzxbd %xmm2, %xmm2 # xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero cvtdq2ps %xmm2, %xmm2 movss 0x3c(%rsi), %xmm3 movss 0x48(%rsi), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm4, %xmm2 addps %xmm3, %xmm2 movaps %xmm2, 0x130(%rsp) movss 0x130(%rsp,%rax,4), %xmm7 movq 0x58(%rsi), %xmm2 pmovzxbd %xmm2, %xmm2 # xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero cvtdq2ps %xmm2, %xmm2 movss 0x6c(%rsi), %xmm5 movss 0x78(%rsi), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm6, %xmm2 addps %xmm5, %xmm2 movaps %xmm2, 0x2c0(%rsp) movss 0x2c0(%rsp,%rax,4), %xmm2 subss %xmm7, %xmm2 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm10, %xmm2 addps %xmm7, %xmm2 movq 0x2c(%rsi), %xmm7 pmovzxbd %xmm7, %xmm7 # xmm7 = xmm7[0],zero,zero,zero,xmm7[1],zero,zero,zero,xmm7[2],zero,zero,zero,xmm7[3],zero,zero,zero cvtdq2ps %xmm7, %xmm7 mulps %xmm4, %xmm7 addps %xmm3, %xmm7 movaps %xmm7, 0x130(%rsp) movss 0x130(%rsp,%rax,4), %xmm4 movq 0x5c(%rsi), %xmm3 pmovzxbd %xmm3, %xmm3 # xmm3 = xmm3[0],zero,zero,zero,xmm3[1],zero,zero,zero,xmm3[2],zero,zero,zero,xmm3[3],zero,zero,zero cvtdq2ps %xmm3, %xmm3 mulps %xmm6, %xmm3 addps %xmm5, %xmm3 movaps %xmm3, 0x2c0(%rsp) movss 0x2c0(%rsp,%rax,4), %xmm3 subss %xmm4, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm10, %xmm3 addps %xmm4, %xmm3 movq 0x30(%rsi), %xmm4 pmovzxbd %xmm4, %xmm4 # xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero cvtdq2ps %xmm4, %xmm4 movss 0x40(%rsi), %xmm5 movss 0x4c(%rsi), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm6, %xmm4 addps %xmm5, %xmm4 movaps %xmm4, 0x130(%rsp) movss 0x130(%rsp,%rax,4), %xmm9 movq 0x60(%rsi), %xmm4 pmovzxbd %xmm4, %xmm4 # xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero cvtdq2ps %xmm4, %xmm4 movss 0x70(%rsi), %xmm7 movss 0x7c(%rsi), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm8, %xmm4 addps %xmm7, %xmm4 movaps %xmm4, 0x2c0(%rsp) movss 0x2c0(%rsp,%rax,4), %xmm4 subss %xmm9, %xmm4 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm10, %xmm4 addps %xmm9, %xmm4 movq 0x34(%rsi), %xmm9 pmovzxbd %xmm9, %xmm9 # xmm9 = xmm9[0],zero,zero,zero,xmm9[1],zero,zero,zero,xmm9[2],zero,zero,zero,xmm9[3],zero,zero,zero cvtdq2ps %xmm9, %xmm9 mulps %xmm6, %xmm9 addps %xmm5, %xmm9 movaps %xmm9, 0x130(%rsp) movss 0x130(%rsp,%rax,4), %xmm6 movq 0x64(%rsi), %xmm5 pmovzxbd %xmm5, %xmm5 # xmm5 = xmm5[0],zero,zero,zero,xmm5[1],zero,zero,zero,xmm5[2],zero,zero,zero,xmm5[3],zero,zero,zero cvtdq2ps %xmm5, %xmm5 mulps %xmm8, %xmm5 addps %xmm7, %xmm5 movaps %xmm5, 0x2c0(%rsp) movss 0x2c0(%rsp,%rax,4), %xmm5 subss %xmm6, %xmm5 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm10, %xmm5 addps %xmm6, %xmm5 movaps 0x3a0(%rsp), %xmm6 movaps 0x3b0(%rsp), %xmm7 movaps 0x3c0(%rsp), %xmm8 movaps 0x400(%rsp), %xmm9 subps %xmm6, %xmm0 mulps %xmm9, %xmm0 subps %xmm7, %xmm2 movaps 0x410(%rsp), %xmm10 mulps %xmm10, %xmm2 subps %xmm8, %xmm4 movaps 0x420(%rsp), %xmm11 mulps %xmm11, %xmm4 subps %xmm6, %xmm1 mulps %xmm9, %xmm1 subps %xmm7, %xmm3 mulps %xmm10, %xmm3 subps %xmm8, %xmm5 mulps %xmm11, %xmm5 movaps %xmm0, %xmm6 minps %xmm1, %xmm6 movaps %xmm2, %xmm7 minps %xmm3, %xmm7 maxps %xmm7, %xmm6 movaps %xmm4, %xmm7 minps %xmm5, %xmm7 maxps %xmm7, %xmm6 mulps 0x1d94fa8(%rip), %xmm6 # 0x1ef1d80 maxps %xmm1, %xmm0 maxps %xmm3, %xmm2 minps %xmm2, %xmm0 maxps %xmm5, %xmm4 minps %xmm4, %xmm0 mulps 0x1d94fa2(%rip), %xmm0 # 0x1ef1d90 maxps 0x460(%rsp), %xmm6 minps 0x470(%rsp), %xmm0 cmpleps %xmm0, %xmm6 andps %xmm12, %xmm6 movmskps %xmm6, %ecx testl %ecx, %ecx je 0x15e367 movq %rdi, 0x280(%rsp) movzwl (%rsi,%rax,8), %ecx movzwl 0x2(%rsi,%rax,8), %edx movl %edx, 0x2c(%rsp) movl 0x88(%rsi), %ebx movl 0x4(%rsi,%rax,8), %eax movq %rax, 0xf8(%rsp) movaps %xmm12, 0x390(%rsp) movaps %xmm12, 0x4a0(%rsp) movmskps %xmm12, %eax testl %eax, %eax je 0x15e30e movl %ecx, %edx movzbl %al, %esi movl $0x7fff, %eax # imm = 0x7FFF andl %eax, %edx movl 0x2c(%rsp), %edi andl %eax, %edi xorl %eax, %eax testw %cx, %cx setns %al movq %rax, 0x298(%rsp) movl %edx, 0xcc(%rsp) movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] paddd 0x1dbfb00(%rip), %xmm0 # 0x1f1c990 movl %edi, 0xc8(%rsp) movd %edi, %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] paddd 0x1dbfaf8(%rip), %xmm1 # 0x1f1c9a0 cvtdq2ps %xmm0, %xmm0 movaps %xmm0, 0x380(%rsp) cvtdq2ps %xmm1, %xmm0 movaps %xmm0, 0x370(%rsp) movd %ebx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x360(%rsp) movd 0xf8(%rsp), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x350(%rsp) movq %rbx, 0x2a0(%rsp) movq %rsi, 0x2b8(%rsp) bsfq %rsi, %rdx movq %rdx, 0x2b0(%rsp) movq (%r12), %rax movq %rax, 0x2a8(%rsp) movq 0x1e8(%rax), %rax movq (%rax,%rbx,8), %rcx movq 0x58(%rcx), %rdi movq 0x68(%rcx), %rax imulq 0xf8(%rsp), %rax movss 0x28(%rcx), %xmm0 movss 0x2c(%rcx), %xmm1 movss 0x30(%rcx), %xmm2 subss %xmm1, %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm0, %xmm3 shufps $0x0, %xmm0, %xmm3 # xmm3 = xmm3[0,0],xmm0[0,0] movaps 0x70(%r15), %xmm4 subps %xmm1, %xmm4 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] divps %xmm2, %xmm4 mulps %xmm3, %xmm4 roundps $0x1, %xmm4, %xmm1 addss 0x1d93a63(%rip), %xmm0 # 0x1ef09cc shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] minps %xmm0, %xmm1 maxps 0x1d8ea99(%rip), %xmm1 # 0x1eeba10 subps %xmm1, %xmm4 movaps %xmm4, 0x580(%rsp) cvtps2dq %xmm1, %xmm0 movapd %xmm0, 0x570(%rsp) movslq 0x570(%rsp,%rdx,4), %rsi movq %rax, 0xb8(%rsp) movq %rdi, 0xc0(%rsp) movl (%rdi,%rax), %edx addl 0xcc(%rsp), %edx movl 0x4(%rdi,%rax), %r10d movl %r10d, %eax imull 0xc8(%rsp), %eax addl %edx, %eax leaq 0x1(%rax), %rdx movq 0xe0(%rcx), %r9 imulq $0x38, %rsi, %rsi movq (%r9,%rsi), %rdi movq 0x10(%r9,%rsi), %r8 movq %r8, %rbx imulq %rax, %rbx movq 0x48(%r9,%rsi), %rcx movq %rcx, %r11 imulq %rdx, %r11 movq %r11, 0x10(%rsp) imulq %r8, %rdx leaq (%rax,%r10), %r11 movups (%rdi,%rbx), %xmm0 leaq (%rax,%r10), %r14 incq %r14 movups (%rdi,%rdx), %xmm15 movq %r11, %rdx imulq %r8, %rdx movups (%rdi,%rdx), %xmm1 movq %r14, %rdx imulq %r8, %rdx movups (%rdi,%rdx), %xmm2 movq %rcx, %rbx imulq %rax, %rbx movq 0x298(%rsp), %r15 addq %r15, %rax incq %rax movq %rcx, %rdx imulq %rax, %rdx imulq %r8, %rax movups (%rdi,%rax), %xmm5 leaq (%r14,%r15), %r13 movq %r13, %rax imulq %r8, %rax movups (%rdi,%rax), %xmm6 movq %rcx, %r15 imulq %r11, %r15 movq %rcx, %rbp imulq %r14, %rbp movq %rcx, %rax imulq %r13, %rax cmpw $0x0, 0x2c(%rsp) movl $0x0, %r12d cmovnsq %r10, %r12 addq %r12, %r11 movq %rcx, %r10 imulq %r11, %r10 imulq %r8, %r11 movups (%rdi,%r11), %xmm7 addq %r12, %r14 movq %rcx, %r11 imulq %r14, %r11 imulq %r8, %r14 movups (%rdi,%r14), %xmm9 addq %r13, %r12 leaq 0xf(%rsp), %r13 imulq %r12, %r8 movups (%rdi,%r8), %xmm3 movaps %xmm3, 0x4f0(%rsp) movq 0x38(%r9,%rsi), %rsi movups (%rsi,%rbx), %xmm4 movq 0x2a0(%rsp), %rbx movq 0x10(%rsp), %rdi movups (%rsi,%rdi), %xmm14 movups (%rsi,%r15), %xmm12 movq 0x290(%rsp), %r15 movups (%rsi,%rbp), %xmm10 movq 0x2b0(%rsp), %rbp movups (%rsi,%rdx), %xmm8 movq 0xc0(%rsp), %rdx movups (%rsi,%rax), %xmm13 movss 0x580(%rsp,%rbp,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] subps %xmm0, %xmm4 mulps %xmm11, %xmm4 addps %xmm0, %xmm4 movups (%rsi,%r10), %xmm0 subps %xmm15, %xmm14 mulps %xmm11, %xmm14 addps %xmm15, %xmm14 movups (%rsi,%r11), %xmm15 imulq %rcx, %r12 subps %xmm1, %xmm12 mulps %xmm11, %xmm12 addps %xmm1, %xmm12 movups (%rsi,%r12), %xmm1 movaps %xmm1, 0x4c0(%rsp) movq 0xb8(%rsp), %rsi movq 0x288(%rsp), %r12 subps %xmm2, %xmm10 mulps %xmm11, %xmm10 addps %xmm2, %xmm10 subps %xmm5, %xmm8 mulps %xmm11, %xmm8 addps %xmm5, %xmm8 subps %xmm6, %xmm13 mulps %xmm11, %xmm13 addps %xmm6, %xmm13 subps %xmm7, %xmm0 mulps %xmm11, %xmm0 addps %xmm7, %xmm0 subps %xmm9, %xmm15 movaps %xmm11, 0x4e0(%rsp) mulps %xmm11, %xmm15 addps %xmm9, %xmm15 movaps %xmm4, %xmm3 unpcklps %xmm10, %xmm3 # xmm3 = xmm3[0],xmm10[0],xmm3[1],xmm10[1] unpckhps %xmm10, %xmm4 # xmm4 = xmm4[2],xmm10[2],xmm4[3],xmm10[3] movaps %xmm14, %xmm1 unpcklps %xmm12, %xmm1 # xmm1 = xmm1[0],xmm12[0],xmm1[1],xmm12[1] movaps %xmm14, %xmm2 unpckhps %xmm12, %xmm2 # xmm2 = xmm2[2],xmm12[2],xmm2[3],xmm12[3] unpcklps %xmm2, %xmm4 # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1] movaps %xmm3, %xmm2 unpcklps %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1] movaps %xmm2, %xmm6 unpckhps %xmm1, %xmm3 # xmm3 = xmm3[2],xmm1[2],xmm3[3],xmm1[3] movaps %xmm3, %xmm9 movaps %xmm14, %xmm11 unpcklps %xmm13, %xmm11 # xmm11 = xmm11[0],xmm13[0],xmm11[1],xmm13[1] movaps %xmm13, 0x500(%rsp) unpckhps %xmm13, %xmm14 # xmm14 = xmm14[2],xmm13[2],xmm14[3],xmm13[3] movaps %xmm8, %xmm1 unpcklps %xmm10, %xmm1 # xmm1 = xmm1[0],xmm10[0],xmm1[1],xmm10[1] unpckhps %xmm10, %xmm8 # xmm8 = xmm8[2],xmm10[2],xmm8[3],xmm10[3] unpcklps %xmm8, %xmm14 # xmm14 = xmm14[0],xmm8[0],xmm14[1],xmm8[1] movaps %xmm11, %xmm3 unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1] unpckhps %xmm1, %xmm11 # xmm11 = xmm11[2],xmm1[2],xmm11[3],xmm1[3] movaps %xmm10, %xmm1 unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] movaps %xmm10, 0x240(%rsp) movaps %xmm10, %xmm2 unpckhps %xmm0, %xmm2 # xmm2 = xmm2[2],xmm0[2],xmm2[3],xmm0[3] movaps %xmm12, %xmm5 unpcklps %xmm15, %xmm5 # xmm5 = xmm5[0],xmm15[0],xmm5[1],xmm15[1] movaps %xmm15, 0x4d0(%rsp) unpckhps %xmm15, %xmm12 # xmm12 = xmm12[2],xmm15[2],xmm12[3],xmm15[3] unpcklps %xmm2, %xmm12 # xmm12 = xmm12[0],xmm2[0],xmm12[1],xmm2[1] movaps %xmm5, %xmm0 unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] unpckhps %xmm1, %xmm5 # xmm5 = xmm5[2],xmm1[2],xmm5[3],xmm1[3] movq %r13, 0x160(%rsp) movss (%r15,%rbp,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm6, %xmm7 subps %xmm1, %xmm7 movaps %xmm3, 0x520(%rsp) subps %xmm1, %xmm3 movaps %xmm3, 0x50(%rsp) movaps %xmm0, 0x80(%rsp) subps %xmm1, %xmm0 movss 0x10(%r15,%rbp,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] subps %xmm2, %xmm9 movaps %xmm11, 0x510(%rsp) movaps %xmm11, %xmm15 subps %xmm2, %xmm15 movaps %xmm5, 0x60(%rsp) movaps %xmm5, %xmm1 subps %xmm2, %xmm1 movss 0x20(%r15,%rbp,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm6, %xmm4 movaps %xmm14, 0x530(%rsp) subps %xmm6, %xmm14 movaps %xmm12, 0x30(%rsp) movaps %xmm12, %xmm2 subps %xmm6, %xmm2 movaps %xmm0, %xmm5 movaps %xmm0, 0x40(%rsp) subps %xmm7, %xmm5 movaps %xmm7, %xmm11 movaps %xmm1, %xmm13 subps %xmm9, %xmm13 movaps %xmm9, %xmm3 movaps %xmm2, %xmm10 subps %xmm4, %xmm10 movaps %xmm1, %xmm6 addps %xmm9, %xmm6 movaps %xmm2, %xmm7 addps %xmm4, %xmm7 movaps %xmm5, %xmm8 mulps %xmm6, %xmm8 mulps %xmm10, %xmm6 movaps %xmm13, %xmm12 mulps %xmm7, %xmm12 subps %xmm6, %xmm12 movaps %xmm0, %xmm6 addps %xmm11, %xmm6 movaps %xmm11, 0x10(%rsp) movaps %xmm5, 0x210(%rsp) mulps %xmm5, %xmm7 movaps %xmm6, %xmm9 movaps %xmm10, 0x200(%rsp) mulps %xmm10, %xmm9 subps %xmm7, %xmm9 movaps %xmm13, 0x1f0(%rsp) mulps %xmm13, %xmm6 subps %xmm6, %xmm8 movss 0x50(%r15,%rbp,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0xd0(%rsp) movss 0x60(%r15,%rbp,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm8 mulps %xmm0, %xmm9 addps %xmm8, %xmm9 movss 0x40(%r15,%rbp,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm0, %xmm12 addps %xmm9, %xmm12 movaps %xmm11, %xmm5 movaps 0x50(%rsp), %xmm6 subps %xmm6, %xmm5 movaps %xmm3, %xmm7 movaps %xmm3, %xmm11 movaps %xmm15, 0x70(%rsp) subps %xmm15, %xmm11 movaps %xmm4, %xmm3 subps %xmm14, %xmm3 movaps %xmm7, 0x220(%rsp) movaps %xmm7, %xmm13 addps %xmm15, %xmm13 movaps %xmm4, 0x230(%rsp) movaps %xmm4, %xmm15 addps %xmm14, %xmm15 movaps %xmm5, %xmm8 mulps %xmm13, %xmm8 mulps %xmm3, %xmm13 movaps %xmm11, %xmm9 mulps %xmm15, %xmm9 subps %xmm13, %xmm9 movaps 0x10(%rsp), %xmm7 movaps %xmm6, %xmm4 addps %xmm6, %xmm7 mulps %xmm5, %xmm15 movaps %xmm7, %xmm13 movaps %xmm3, 0x1e0(%rsp) mulps %xmm3, %xmm13 subps %xmm15, %xmm13 mulps %xmm11, %xmm7 subps %xmm7, %xmm8 mulps %xmm10, %xmm8 movaps 0xd0(%rsp), %xmm6 mulps %xmm6, %xmm13 addps %xmm8, %xmm13 movaps %xmm9, %xmm3 movaps %xmm0, %xmm9 mulps %xmm0, %xmm3 addps %xmm13, %xmm3 movaps %xmm4, %xmm13 movaps 0x40(%rsp), %xmm0 subps %xmm0, %xmm13 addps %xmm4, %xmm0 movaps 0x70(%rsp), %xmm4 movaps %xmm4, %xmm15 subps %xmm1, %xmm15 addps %xmm4, %xmm1 movaps %xmm14, %xmm8 subps %xmm2, %xmm8 addps %xmm14, %xmm2 movaps %xmm13, %xmm7 mulps %xmm1, %xmm7 mulps %xmm8, %xmm1 movaps %xmm15, %xmm14 mulps %xmm2, %xmm14 subps %xmm1, %xmm14 mulps %xmm13, %xmm2 movaps %xmm0, %xmm1 mulps %xmm8, %xmm1 subps %xmm2, %xmm1 mulps %xmm15, %xmm0 subps %xmm0, %xmm7 movaps %xmm10, 0x50(%rsp) mulps %xmm10, %xmm7 mulps %xmm6, %xmm1 movaps %xmm11, %xmm10 addps %xmm7, %xmm1 mulps %xmm9, %xmm14 addps %xmm1, %xmm14 movaps %xmm12, %xmm7 addps %xmm3, %xmm7 addps %xmm14, %xmm7 movaps %xmm12, %xmm0 minps %xmm3, %xmm0 minps %xmm14, %xmm0 movaps %xmm12, 0x550(%rsp) movaps %xmm12, %xmm11 movaps %xmm3, 0x540(%rsp) maxps %xmm3, %xmm11 maxps %xmm14, %xmm11 movaps %xmm7, %xmm1 andps 0x1d8f1e6(%rip), %xmm1 # 0x1eec6c0 movaps %xmm1, 0x4b0(%rsp) mulps 0x1d94887(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm11 xorps 0x1d8f1db(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm11 movmskps %xmm11, %eax testl %eax, %eax je 0x15daa2 movaps %xmm10, %xmm0 movaps 0x200(%rsp), %xmm12 mulps %xmm12, %xmm0 movaps %xmm5, %xmm1 movaps %xmm6, %xmm4 movaps 0x1f0(%rsp), %xmm6 mulps %xmm6, %xmm1 movaps %xmm15, 0x560(%rsp) movaps %xmm9, 0x40(%rsp) movaps 0x1e0(%rsp), %xmm9 mulps %xmm9, %xmm15 movaps %xmm13, %xmm14 mulps %xmm10, %xmm14 mulps %xmm9, %xmm6 subps %xmm0, %xmm6 movaps 0x210(%rsp), %xmm3 movaps %xmm3, %xmm2 mulps %xmm10, %xmm3 mulps %xmm8, %xmm10 subps %xmm15, %xmm10 movaps %xmm7, 0x70(%rsp) movaps 0x1d8f147(%rip), %xmm7 # 0x1eec6c0 andps %xmm7, %xmm0 andps %xmm7, %xmm15 cmpltps %xmm15, %xmm0 blendvps %xmm0, %xmm6, %xmm10 movaps %xmm5, %xmm0 mulps %xmm8, %xmm0 mulps %xmm9, %xmm2 mulps %xmm9, %xmm13 movaps 0x40(%rsp), %xmm9 mulps %xmm5, %xmm12 subps %xmm2, %xmm12 subps %xmm0, %xmm13 andps %xmm7, %xmm2 andps %xmm7, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm12, %xmm13 mulps 0x560(%rsp), %xmm5 subps %xmm1, %xmm3 subps %xmm14, %xmm5 andps %xmm7, %xmm1 andps %xmm7, %xmm14 movaps 0x70(%rsp), %xmm6 cmpltps %xmm14, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm3, %xmm5 movaps 0x50(%rsp), %xmm0 mulps %xmm5, %xmm0 mulps %xmm13, %xmm4 addps %xmm0, %xmm4 mulps %xmm10, %xmm9 addps %xmm4, %xmm9 addps %xmm9, %xmm9 movaps 0x230(%rsp), %xmm0 mulps %xmm5, %xmm0 movaps 0x220(%rsp), %xmm1 mulps %xmm13, %xmm1 addps %xmm0, %xmm1 movaps 0x10(%rsp), %xmm3 mulps %xmm10, %xmm3 addps %xmm1, %xmm3 rcpps %xmm9, %xmm1 movaps %xmm9, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d8f3d6(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm3, %xmm3 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm3, %xmm0 movss 0x80(%r15,%rbp,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r15,%rbp,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm11, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15daa2 cmpneqps 0x1d8e388(%rip), %xmm9 # 0x1eeba10 andps %xmm9, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15daa2 movaps 0x550(%rsp), %xmm7 movaps %xmm7, 0x130(%rsp) movaps 0x540(%rsp), %xmm8 movaps %xmm8, 0x140(%rsp) movaps %xmm6, 0x150(%rsp) movq %r13, 0x160(%rsp) movaps %xmm1, 0x170(%rsp) movaps %xmm0, 0x1a0(%rsp) movaps %xmm10, 0x1b0(%rsp) movaps %xmm13, 0x1c0(%rsp) movaps %xmm5, 0x1d0(%rsp) movzwl 0x8(%rdx,%rsi), %eax decl %eax cvtsi2ss %eax, %xmm1 movaps %xmm1, %xmm2 rcpss %xmm1, %xmm2 mulss %xmm2, %xmm1 movss 0x1d938e7(%rip), %xmm4 # 0x1ef0ff8 movaps %xmm4, %xmm0 subss %xmm1, %xmm0 movzwl 0xa(%rdx,%rsi), %eax decl %eax cvtsi2ss %eax, %xmm3 mulss %xmm2, %xmm0 movaps %xmm3, %xmm2 rcpss %xmm3, %xmm2 mulss %xmm2, %xmm3 movaps %xmm4, %xmm1 subss %xmm3, %xmm1 mulss %xmm2, %xmm1 movaps %xmm6, %xmm2 mulps 0x380(%rsp), %xmm2 addps %xmm7, %xmm2 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm2, %xmm0 movaps %xmm0, 0x130(%rsp) movaps %xmm6, %xmm2 mulps 0x370(%rsp), %xmm2 addps %xmm8, %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm2, %xmm1 movaps %xmm1, 0x140(%rsp) movq 0x2a8(%rsp), %rax movq 0x1e8(%rax), %rax movq (%rax,%rbx,8), %r14 movl 0x90(%r15,%rbp,4), %eax testl %eax, 0x34(%r14) je 0x15daa2 movq 0x10(%r12), %rax cmpq $0x0, 0x10(%rax) jne 0x15d7b4 cmpq $0x0, 0x48(%r14) je 0x15e034 rcpps %xmm6, %xmm2 mulps %xmm2, %xmm6 movaps 0x1d8f24f(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm3 subps %xmm6, %xmm3 mulps %xmm2, %xmm3 addps %xmm2, %xmm3 movaps 0x4b0(%rsp), %xmm2 cmpnltps 0x1d94563(%rip), %xmm2 # 0x1ef1d40 andps %xmm3, %xmm2 mulps %xmm2, %xmm0 minps %xmm4, %xmm0 movaps %xmm0, 0x180(%rsp) mulps %xmm2, %xmm1 minps %xmm4, %xmm1 movaps %xmm1, 0x190(%rsp) movaps 0x170(%rsp), %xmm0 movmskps %xmm0, %edi bsfq %rdi, %r8 testl %edi, %edi sete 0xd0(%rsp) je 0x15daa2 pushq $0x1 popq %rax movl %ebp, %ecx shll %cl, %eax cltq shlq $0x4, %rax leaq 0x1ff2751(%rip), %rcx # 0x214ff80 movaps (%rcx,%rax), %xmm0 movaps %xmm0, 0x70(%rsp) movss 0x80(%r15,%rbp,4), %xmm5 movss 0x1a0(%rsp,%r8,4), %xmm0 movss 0x180(%rsp,%r8,4), %xmm1 movss 0x190(%rsp,%r8,4), %xmm2 movss %xmm0, 0x80(%r15,%rbp,4) movq 0x8(%r12), %rax shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x1b0(%rsp,%r8,4), %xmm0 movss 0x1c0(%rsp,%r8,4), %xmm3 movss 0x1d0(%rsp,%r8,4), %xmm4 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm0, 0x2c0(%rsp) movaps %xmm3, 0x2d0(%rsp) movaps %xmm4, 0x2e0(%rsp) movaps %xmm1, 0x2f0(%rsp) movaps %xmm2, 0x300(%rsp) movaps 0x350(%rsp), %xmm0 movaps %xmm0, 0x310(%rsp) movdqa 0x360(%rsp), %xmm0 movdqa %xmm0, 0x320(%rsp) leaq 0x330(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x330(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x340(%rsp) movdqa 0x70(%rsp), %xmm0 movdqa %xmm0, 0x90(%rsp) leaq 0x90(%rsp), %rcx movq %rcx, 0x100(%rsp) movq 0x18(%r14), %rcx movq %rcx, 0x108(%rsp) movq %rax, 0x110(%rsp) movq %r15, 0x118(%rsp) leaq 0x2c0(%rsp), %rax movq %rax, 0x120(%rsp) movl $0x4, 0x128(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %rdi, 0x10(%rsp) movq %r8, 0x50(%rsp) movss %xmm5, 0x40(%rsp) je 0x15d9be leaq 0x100(%rsp), %rdi callq *%rax movss 0x40(%rsp), %xmm5 movq 0x50(%rsp), %r8 movq 0x10(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx movdqa 0x90(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x15da54 movq 0x10(%r12), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x15da16 testb $0x2, (%rcx) jne 0x15d9ec testb $0x40, 0x3e(%r14) je 0x15da16 leaq 0x100(%rsp), %rdi callq *%rax movss 0x40(%rsp), %xmm5 movq 0x50(%rsp), %r8 movq 0x10(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx movdqa 0x90(%rsp), %xmm0 pcmpeqd 0x1d8dfe9(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d8e3ed(%rip), %xmm1 # 0x1eebe20 movq 0x118(%rsp), %rax movaps 0x1d8dfbe(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x15da64 pcmpeqd 0x1d8dfb4(%rip), %xmm1 # 0x1eeba10 pxor 0x1d8e3bc(%rip), %xmm1 # 0x1eebe20 ptest 0x1d8f0b3(%rip), %xmm1 # 0x1eecb20 jne 0x15da94 movss %xmm5, 0x80(%r15,%rbp,4) btcq %r8, %rdi bsfq %rdi, %r8 testq %rdi, %rdi sete 0xd0(%rsp) jne 0x15d838 jmp 0x15daa2 testb $0x1, 0xd0(%rsp) je 0x15e034 movaps 0x4f0(%rsp), %xmm0 movaps 0x4c0(%rsp), %xmm2 subps %xmm0, %xmm2 movaps 0x4e0(%rsp), %xmm1 mulps %xmm2, %xmm1 addps %xmm0, %xmm1 movaps 0x240(%rsp), %xmm3 movaps %xmm3, %xmm7 unpcklps %xmm1, %xmm7 # xmm7 = xmm7[0],xmm1[0],xmm7[1],xmm1[1] unpckhps %xmm1, %xmm3 # xmm3 = xmm3[2],xmm1[2],xmm3[3],xmm1[3] movaps 0x500(%rsp), %xmm1 movaps %xmm1, %xmm0 movaps 0x4d0(%rsp), %xmm2 unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] unpckhps %xmm2, %xmm1 # xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3] unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1] movaps %xmm7, %xmm11 unpcklps %xmm0, %xmm11 # xmm11 = xmm11[0],xmm0[0],xmm11[1],xmm0[1] unpckhps %xmm0, %xmm7 # xmm7 = xmm7[2],xmm0[2],xmm7[3],xmm0[3] movss (%r15,%rbp,4), %xmm1 movss 0x10(%r15,%rbp,4), %xmm2 movss 0x20(%r15,%rbp,4), %xmm0 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] subps %xmm1, %xmm11 subps %xmm2, %xmm7 subps %xmm0, %xmm3 movaps 0x80(%rsp), %xmm4 subps %xmm1, %xmm4 movaps %xmm4, 0x80(%rsp) movaps 0x60(%rsp), %xmm9 subps %xmm2, %xmm9 movaps 0x30(%rsp), %xmm4 subps %xmm0, %xmm4 movaps %xmm4, 0x30(%rsp) movaps 0x520(%rsp), %xmm15 subps %xmm1, %xmm15 movaps 0x510(%rsp), %xmm4 subps %xmm2, %xmm4 movaps 0x530(%rsp), %xmm12 subps %xmm0, %xmm12 movaps %xmm15, %xmm6 subps %xmm11, %xmm6 movaps %xmm4, %xmm13 subps %xmm7, %xmm13 movaps %xmm12, %xmm8 subps %xmm3, %xmm8 movaps %xmm15, %xmm0 addps %xmm11, %xmm0 movaps %xmm4, %xmm1 addps %xmm7, %xmm1 movaps %xmm12, %xmm2 addps %xmm3, %xmm2 movaps %xmm6, %xmm5 mulps %xmm1, %xmm5 mulps %xmm8, %xmm1 movaps %xmm13, %xmm10 mulps %xmm2, %xmm10 subps %xmm1, %xmm10 movaps %xmm6, 0xd0(%rsp) mulps %xmm6, %xmm2 movaps %xmm0, %xmm1 movaps %xmm8, 0x70(%rsp) mulps %xmm8, %xmm1 subps %xmm2, %xmm1 movss 0x50(%r15,%rbp,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movaps %xmm13, 0x230(%rsp) mulps %xmm13, %xmm0 subps %xmm0, %xmm5 movss 0x60(%r15,%rbp,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm6, %xmm5 mulps %xmm14, %xmm1 addps %xmm5, %xmm1 movss 0x40(%r15,%rbp,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x10(%rsp) mulps %xmm0, %xmm10 addps %xmm1, %xmm10 movaps %xmm11, %xmm13 movaps 0x80(%rsp), %xmm5 subps %xmm5, %xmm13 movaps %xmm7, %xmm8 movaps %xmm9, %xmm1 movaps %xmm9, 0x60(%rsp) subps %xmm9, %xmm8 movaps %xmm3, %xmm9 movaps 0x30(%rsp), %xmm2 subps %xmm2, %xmm9 movaps %xmm7, 0x40(%rsp) movaps %xmm7, %xmm0 addps %xmm1, %xmm0 movaps %xmm3, 0x240(%rsp) addps %xmm2, %xmm3 movaps %xmm13, %xmm2 mulps %xmm0, %xmm2 mulps %xmm9, %xmm0 movaps %xmm8, %xmm7 mulps %xmm3, %xmm7 subps %xmm0, %xmm7 movaps %xmm11, 0x50(%rsp) movaps %xmm11, %xmm0 addps %xmm5, %xmm0 movaps %xmm5, %xmm11 mulps %xmm13, %xmm3 movaps %xmm0, %xmm5 movaps %xmm9, 0x220(%rsp) mulps %xmm9, %xmm5 subps %xmm3, %xmm5 mulps %xmm8, %xmm0 subps %xmm0, %xmm2 mulps %xmm6, %xmm2 mulps %xmm14, %xmm5 addps %xmm2, %xmm5 movaps 0x10(%rsp), %xmm3 mulps %xmm3, %xmm7 addps %xmm5, %xmm7 movaps %xmm11, %xmm0 subps %xmm15, %xmm11 addps %xmm0, %xmm15 movaps %xmm10, %xmm5 movaps 0x60(%rsp), %xmm0 movaps %xmm0, %xmm10 subps %xmm4, %xmm10 addps %xmm0, %xmm4 movaps 0x30(%rsp), %xmm0 movaps %xmm0, %xmm9 subps %xmm12, %xmm9 addps %xmm0, %xmm12 movaps %xmm11, %xmm1 mulps %xmm4, %xmm1 mulps %xmm9, %xmm4 movaps %xmm10, %xmm0 mulps %xmm12, %xmm0 subps %xmm4, %xmm0 mulps %xmm11, %xmm12 movaps %xmm15, %xmm2 mulps %xmm9, %xmm2 subps %xmm12, %xmm2 mulps %xmm10, %xmm15 subps %xmm15, %xmm1 movaps %xmm6, 0x60(%rsp) mulps %xmm6, %xmm1 movaps %xmm14, 0x30(%rsp) mulps %xmm14, %xmm2 addps %xmm1, %xmm2 mulps %xmm3, %xmm0 addps %xmm2, %xmm0 movaps %xmm5, %xmm2 addps %xmm7, %xmm2 addps %xmm0, %xmm2 movaps %xmm5, %xmm1 minps %xmm7, %xmm1 minps %xmm0, %xmm1 movaps %xmm5, 0x200(%rsp) movaps %xmm7, 0x1f0(%rsp) maxps %xmm7, %xmm5 maxps %xmm0, %xmm5 movaps %xmm2, %xmm0 andps 0x1d8e95b(%rip), %xmm0 # 0x1eec6c0 movaps %xmm0, 0x1e0(%rsp) mulps 0x1d93ffc(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm5 xorps 0x1d8e951(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm5 movmskps %xmm5, %eax testl %eax, %eax je 0x15e03c movaps %xmm8, %xmm6 movaps %xmm8, %xmm0 movaps %xmm10, %xmm14 movaps %xmm10, 0x210(%rsp) movaps 0x70(%rsp), %xmm10 mulps %xmm10, %xmm0 movaps %xmm13, %xmm1 movaps %xmm2, 0x80(%rsp) movaps 0x230(%rsp), %xmm7 mulps %xmm7, %xmm1 movaps %xmm3, %xmm4 movaps 0x220(%rsp), %xmm8 mulps %xmm8, %xmm14 movaps %xmm11, %xmm15 mulps %xmm6, %xmm15 mulps %xmm8, %xmm7 subps %xmm0, %xmm7 movaps 0xd0(%rsp), %xmm3 movaps %xmm3, %xmm2 mulps %xmm6, %xmm3 mulps %xmm9, %xmm6 subps %xmm14, %xmm6 movaps 0x1d8e8bc(%rip), %xmm12 # 0x1eec6c0 andps %xmm12, %xmm0 andps %xmm12, %xmm14 cmpltps %xmm14, %xmm0 blendvps %xmm0, %xmm7, %xmm6 movaps 0x80(%rsp), %xmm7 movaps %xmm13, %xmm0 mulps %xmm9, %xmm0 mulps %xmm8, %xmm2 mulps %xmm8, %xmm11 mulps %xmm13, %xmm10 subps %xmm2, %xmm10 subps %xmm0, %xmm11 andps %xmm12, %xmm2 andps %xmm12, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm10, %xmm11 mulps 0x210(%rsp), %xmm13 subps %xmm1, %xmm3 subps %xmm15, %xmm13 andps %xmm12, %xmm1 andps %xmm12, %xmm15 cmpltps %xmm15, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm3, %xmm13 movaps 0x60(%rsp), %xmm1 mulps %xmm13, %xmm1 movaps 0x30(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 mulps %xmm6, %xmm4 addps %xmm0, %xmm4 addps %xmm4, %xmm4 movaps 0x240(%rsp), %xmm0 mulps %xmm13, %xmm0 movaps 0x40(%rsp), %xmm1 mulps %xmm11, %xmm1 addps %xmm0, %xmm1 movaps 0x50(%rsp), %xmm3 mulps %xmm6, %xmm3 addps %xmm1, %xmm3 rcpps %xmm4, %xmm1 movaps %xmm4, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d8eb4a(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm3, %xmm3 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm3, %xmm0 movss 0x80(%r15,%rbp,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r15,%rbp,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm5, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15e03c cmpneqps 0x1d8dafe(%rip), %xmm4 # 0x1eeba10 andps %xmm4, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15e03c movaps %xmm7, 0x150(%rsp) movq %r13, 0x160(%rsp) movaps %xmm1, 0x170(%rsp) movaps %xmm0, 0x1a0(%rsp) movaps %xmm6, 0x1b0(%rsp) movaps %xmm11, 0x1c0(%rsp) movaps %xmm13, 0x1d0(%rsp) movaps %xmm7, %xmm3 subps 0x200(%rsp), %xmm3 movaps %xmm3, 0x130(%rsp) movaps %xmm7, %xmm2 subps 0x1f0(%rsp), %xmm2 movaps %xmm2, 0x140(%rsp) movzwl 0x8(%rdx,%rsi), %eax decl %eax cvtsi2ss %eax, %xmm1 movaps %xmm1, %xmm4 rcpss %xmm1, %xmm4 mulss %xmm4, %xmm1 movss 0x1d9305a(%rip), %xmm6 # 0x1ef0ff8 movaps %xmm6, %xmm0 subss %xmm1, %xmm0 mulss %xmm4, %xmm0 movzwl 0xa(%rdx,%rsi), %eax decl %eax cvtsi2ss %eax, %xmm4 movaps %xmm4, %xmm5 rcpss %xmm4, %xmm5 mulss %xmm5, %xmm4 movaps %xmm6, %xmm1 subss %xmm4, %xmm1 mulss %xmm5, %xmm1 movaps %xmm7, %xmm4 mulps 0x380(%rsp), %xmm4 addps %xmm3, %xmm4 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm4, %xmm0 movaps %xmm0, 0x130(%rsp) movaps %xmm7, %xmm3 mulps 0x370(%rsp), %xmm3 addps %xmm2, %xmm3 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm3, %xmm1 movaps %xmm1, 0x140(%rsp) movq (%r12), %rax movq 0x1e8(%rax), %rax movq (%rax,%rbx,8), %r14 movl 0x90(%r15,%rbp,4), %eax testl %eax, 0x34(%r14) je 0x15e03c movq 0x10(%r12), %rax cmpq $0x0, 0x10(%rax) jne 0x15e056 cmpq $0x0, 0x48(%r14) jne 0x15e056 andl $0x0, 0x390(%rsp,%rbp,4) movq 0x2b8(%rsp), %rsi leaq -0x1(%rsi), %rax andq %rax, %rsi jne 0x15ceef jmp 0x15e30e rcpps %xmm7, %xmm2 mulps %xmm2, %xmm7 movaps 0x1d8e9ad(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm3 subps %xmm7, %xmm3 mulps %xmm2, %xmm3 addps %xmm2, %xmm3 movaps 0x1e0(%rsp), %xmm2 cmpnltps 0x1d93cc1(%rip), %xmm2 # 0x1ef1d40 andps %xmm3, %xmm2 mulps %xmm2, %xmm0 minps %xmm4, %xmm0 movaps %xmm0, 0x180(%rsp) mulps %xmm2, %xmm1 minps %xmm4, %xmm1 movaps %xmm1, 0x190(%rsp) movaps 0x170(%rsp), %xmm0 movmskps %xmm0, %r13d bsfq %r13, %rdx testl %r13d, %r13d sete 0x60(%rsp) je 0x15e03c pushq $0x1 popq %rax movl %ebp, %ecx shll %cl, %eax cltq shlq $0x4, %rax leaq 0x1ff1eb4(%rip), %rcx # 0x214ff80 movaps (%rcx,%rax), %xmm0 movaps %xmm0, 0x80(%rsp) movss 0x80(%r15,%rbp,4), %xmm5 movss 0x1a0(%rsp,%rdx,4), %xmm0 movss 0x180(%rsp,%rdx,4), %xmm1 movss 0x190(%rsp,%rdx,4), %xmm2 movss %xmm0, 0x80(%r15,%rbp,4) movq 0x8(%r12), %rax shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x1b0(%rsp,%rdx,4), %xmm0 movss 0x1c0(%rsp,%rdx,4), %xmm3 movss 0x1d0(%rsp,%rdx,4), %xmm4 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm0, 0x2c0(%rsp) movaps %xmm3, 0x2d0(%rsp) movaps %xmm4, 0x2e0(%rsp) movaps %xmm1, 0x2f0(%rsp) movaps %xmm2, 0x300(%rsp) movaps 0x350(%rsp), %xmm0 movaps %xmm0, 0x310(%rsp) movdqa 0x360(%rsp), %xmm0 movdqa %xmm0, 0x320(%rsp) leaq 0x330(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x330(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x340(%rsp) movdqa 0x80(%rsp), %xmm0 movdqa %xmm0, 0x90(%rsp) leaq 0x90(%rsp), %rcx movq %rcx, 0x100(%rsp) movq 0x18(%r14), %rcx movq %rcx, 0x108(%rsp) movq %rax, 0x110(%rsp) movq %r15, 0x118(%rsp) leaq 0x2c0(%rsp), %rax movq %rax, 0x120(%rsp) movl $0x4, 0x128(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %rdx, 0x10(%rsp) movss %xmm5, 0x30(%rsp) je 0x15e241 leaq 0x100(%rsp), %rdi callq *%rax movss 0x30(%rsp), %xmm5 movq 0x10(%rsp), %rdx movdqa 0x90(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x15e2be movq 0x10(%r12), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x15e280 testb $0x2, (%rcx) jne 0x15e26b testb $0x40, 0x3e(%r14) je 0x15e280 leaq 0x100(%rsp), %rdi callq *%rax movss 0x30(%rsp), %xmm5 movq 0x10(%rsp), %rdx movdqa 0x90(%rsp), %xmm0 pcmpeqd 0x1d8d77f(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d8db83(%rip), %xmm1 # 0x1eebe20 movq 0x118(%rsp), %rax movaps 0x1d8d754(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x15e2ce pcmpeqd 0x1d8d74a(%rip), %xmm1 # 0x1eeba10 pxor 0x1d8db52(%rip), %xmm1 # 0x1eebe20 ptest 0x1d8e849(%rip), %xmm1 # 0x1eecb20 jne 0x15e2fe movss %xmm5, 0x80(%r15,%rbp,4) btcq %rdx, %r13 bsfq %r13, %rdx testq %r13, %r13 sete 0x60(%rsp) jne 0x15e0d8 jmp 0x15e03c testb $0x1, 0x60(%rsp) je 0x15e034 jmp 0x15e03c movaps 0x4a0(%rsp), %xmm12 andps 0x390(%rsp), %xmm12 movmskps %xmm12, %eax testl %eax, %eax sete %al movaps 0x1d8d6bf(%rip), %xmm15 # 0x1eeb9f0 movq 0x270(%rsp), %rbp movq 0xa8(%rsp), %r8 movq 0xa0(%rsp), %r9 pushq $0x8 popq %r10 movq 0xb0(%rsp), %rdx movq 0x278(%rsp), %rsi movq 0x280(%rsp), %rdi jmp 0x15e369 xorl %eax, %eax testb %al, %al jne 0x15e37a leaq -0x1(%rdi), %rax andq %rax, %rdi jne 0x15cab0 movq 0x268(%rsp), %rax incq %rax cmpq 0x260(%rsp), %rax jne 0x15ca30 xorps 0x1d8da85(%rip), %xmm12 # 0x1eebe20 orps 0xe0(%rsp), %xmm12 movaps %xmm12, 0xe0(%rsp) movmskps %xmm12, %eax cmpl $0xf, %eax je 0x15e3d7 movaps 0x470(%rsp), %xmm1 movaps %xmm12, %xmm0 blendvps %xmm0, 0x1d8d635(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x470(%rsp) xorl %eax, %eax jmp 0x15e3da pushq $0x3 popq %rax cmpl $0x3, %eax jne 0x15c6cc jmp 0x15e4b3 pushq $0x2 jmp 0x15e3d9 movaps %xmm14, 0x10(%rsp) movq %r9, 0xa0(%rsp) movq %r8, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) bsfq %r14, %r13 movq 0x258(%rsp), %rdi movq 0xf0(%rsp), %rsi movq %r13, %rcx leaq 0xe(%rsp), %r8 movq %r15, %r9 pushq %r12 leaq 0x3a8(%rsp), %rax pushq %rax callq 0x1b85d4 popq %rcx popq %rdx testb %al, %al je 0x15e448 orl $-0x1, 0xe0(%rsp,%r13,4) leaq -0x1(%r14), %rax andq %rax, %r14 movq 0xb0(%rsp), %rdx jne 0x15e40a movaps 0xe0(%rsp), %xmm0 movmskps %xmm0, %ecx pushq $0x3 popq %rax cmpl $0xf, %ecx movaps 0x1d8d57e(%rip), %xmm15 # 0x1eeb9f0 movq 0xa8(%rsp), %r8 movq 0xa0(%rsp), %r9 pushq $0x8 popq %r10 movaps 0x10(%rsp), %xmm14 je 0x15c712 movaps 0x470(%rsp), %xmm1 blendvps %xmm0, 0x1d8d55d(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x470(%rsp) pushq $0x2 popq %rax jmp 0x15c712 movaps 0x480(%rsp), %xmm0 andps 0xe0(%rsp), %xmm0 movaps 0x80(%r15), %xmm1 blendvps %xmm0, 0x1d8d52c(%rip), %xmm1 # 0x1eeba00 movaps %xmm1, 0x80(%r15) addq $0x1c38, %rsp # imm = 0x1C38 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::SubGridIntersectorKPluecker<4, 4, true>, true>::intersect(embree::vint_impl<4>*, embree::Accel::Intersectors*, embree::RayHitK<4>&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i, Accel::Intersectors* __restrict__ This, RayHitK<K>& __restrict__ ray, RayQueryContext* __restrict__ context) { BVH* __restrict__ bvh = (BVH*)This->ptr; /* we may traverse an empty BVH in case all geometry was invalid */ if (bvh->root == BVH::emptyNode) return; #if ENABLE_FAST_COHERENT_CODEPATHS == 1 assert(context); if (unlikely(types == BVH_AN1 && context->user && context->isCoherent())) { intersectCoherent(valid_i, This, ray, context); return; } #endif /* filter out invalid rays */ vbool<K> valid = *valid_i == -1; #if defined(EMBREE_IGNORE_INVALID_RAYS) valid &= ray.valid(); #endif /* return if there are no valid rays */ size_t valid_bits = movemask(valid); #if defined(__AVX__) STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1); #endif if (unlikely(valid_bits == 0)) return; /* verify correct input */ assert(all(valid, ray.valid())); assert(all(valid, ray.tnear() >= 0.0f)); assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f))); Precalculations pre(valid, ray); /* load ray */ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0); const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f); const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f); if (single) { tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf)); for (; valid_bits!=0; ) { const size_t i = bscf(valid_bits); intersect1(This, bvh, bvh->root, i, pre, ray, tray, context); } return; } /* determine switch threshold based on flags */ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent; vint<K> octant = ray.octant(); octant = select(valid, octant, vint<K>(0xffffffff)); /* test whether we have ray with opposing direction signs in the packet */ bool split = false; { size_t bits = valid_bits; vbool<K> vsplit( false ); do { const size_t valid_index = bsf(bits); vbool<K> octant_valid = octant[valid_index] == octant; bits &= ~(size_t)movemask(octant_valid); vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7)); } while (bits); if (any(vsplit)) split = true; } do { const size_t valid_index = bsf(valid_bits); const vint<K> diff_octant = vint<K>(octant[valid_index])^octant; const vint<K> count_diff_octant = \ ((diff_octant >> 2) & 1) + ((diff_octant >> 1) & 1) + ((diff_octant >> 0) & 1); vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff)); if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down octant = select(octant_valid,vint<K>(0xffffffff),octant); valid_bits &= ~(size_t)movemask(octant_valid); tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf)); tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf)); /* allocate stack and push root node */ vfloat<K> stack_near[stackSizeChunk]; NodeRef stack_node[stackSizeChunk]; stack_node[0] = BVH::invalidNode; stack_near[0] = inf; stack_node[1] = bvh->root; stack_near[1] = tray.tnear; NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk; NodeRef* __restrict__ sptr_node = stack_node + 2; vfloat<K>* __restrict__ sptr_near = stack_near + 2; while (1) pop: { /* pop next node from stack */ assert(sptr_node > stack_node); sptr_node--; sptr_near--; NodeRef cur = *sptr_node; if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* cull node if behind closest hit point */ vfloat<K> curDist = *sptr_near; const vbool<K> active = curDist < tray.tfar; if (unlikely(none(active))) continue; /* switch to single ray traversal */ #if (!defined(__WIN32__) || defined(__X86_64__)) && ((defined(__aarch64__)) || defined(__SSE4_2__)) #if FORCE_SINGLE_MODE == 0 if (single) #endif { size_t bits = movemask(active); #if FORCE_SINGLE_MODE == 0 if (unlikely(popcnt(bits) <= switchThreshold)) #endif { for (; bits!=0; ) { const size_t i = bscf(bits); intersect1(This, bvh, cur, i, pre, ray, tray, context); } tray.tfar = min(tray.tfar, ray.tfar); continue; } } #endif while (likely(!cur.isLeaf())) { /* process nodes */ const vbool<K> valid_node = tray.tfar > curDist; STAT3(normal.trav_nodes, 1, popcnt(valid_node), K); const NodeRef nodeRef = cur; const BaseNode* __restrict__ const node = nodeRef.baseNode(); /* set cur to invalid */ cur = BVH::emptyNode; curDist = pos_inf; size_t num_child_hits = 0; for (unsigned i = 0; i < N; i++) { const NodeRef child = node->children[i]; if (unlikely(child == BVH::emptyNode)) break; vfloat<K> lnearP; vbool<K> lhit = valid_node; BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit); /* if we hit the child we choose to continue with that child if it is closer than the current next child, or we push it onto the stack */ if (likely(any(lhit))) { assert(sptr_node < stackEnd); assert(child != BVH::emptyNode); const vfloat<K> childDist = select(lhit, lnearP, inf); /* push cur node onto stack and continue with hit child */ if (any(childDist < curDist)) { if (likely(cur != BVH::emptyNode)) { num_child_hits++; *sptr_node = cur; sptr_node++; *sptr_near = curDist; sptr_near++; } curDist = childDist; cur = child; } /* push hit child onto stack */ else { num_child_hits++; *sptr_node = child; sptr_node++; *sptr_near = childDist; sptr_near++; } } } #if defined(__AVX__) //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1); #endif if (unlikely(cur == BVH::emptyNode)) goto pop; /* improved distance sorting for 3 or more hits */ if (unlikely(num_child_hits >= 2)) { if (any(sptr_near[-2] < sptr_near[-1])) { std::swap(sptr_near[-2],sptr_near[-1]); std::swap(sptr_node[-2],sptr_node[-1]); } if (unlikely(num_child_hits >= 3)) { if (any(sptr_near[-3] < sptr_near[-1])) { std::swap(sptr_near[-3],sptr_near[-1]); std::swap(sptr_node[-3],sptr_node[-1]); } if (any(sptr_near[-3] < sptr_near[-2])) { std::swap(sptr_near[-3],sptr_near[-2]); std::swap(sptr_node[-3],sptr_node[-2]); } } } #if SWITCH_DURING_DOWN_TRAVERSAL == 1 if (single) { // seems to be the best place for testing utilization if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold)) { *sptr_node++ = cur; *sptr_near++ = curDist; goto pop; } } #endif } /* return if stack is empty */ if (unlikely(cur == BVH::invalidNode)) { assert(sptr_node == stack_node); break; } /* intersect leaf */ assert(cur != BVH::emptyNode); const vbool<K> valid_leaf = tray.tfar > curDist; STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K); if (unlikely(none(valid_leaf))) continue; size_t items; const Primitive* prim = (Primitive*)cur.leaf(items); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node); tray.tfar = select(valid_leaf, ray.tfar, tray.tfar); if (unlikely(lazy_node)) { *sptr_node = lazy_node; sptr_node++; *sptr_near = neg_inf; sptr_near++; } } } while(valid_bits); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq (%rsi), %rbx cmpq $0x8, 0x70(%rbx) je 0x15e6a1 movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 cmpq $0x0, 0x8(%rcx) je 0x15e52b movq 0x10(%r15), %rax testb $0x1, 0x2(%rax) jne 0x15e6b3 pcmpeqd %xmm1, %xmm1 pcmpeqd (%rdi), %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x15e6a1 movzbl %al, %ebp movaps (%r14), %xmm0 leaq 0x10(%rsp), %rax movaps %xmm0, (%rax) movaps 0x10(%r14), %xmm0 movaps %xmm0, 0x10(%rax) movaps 0x20(%r14), %xmm0 movaps %xmm0, 0x20(%rax) movaps 0x40(%r14), %xmm0 movaps %xmm0, 0x30(%rax) movaps 0x50(%r14), %xmm4 movaps %xmm4, 0x40(%rax) movaps 0x60(%r14), %xmm7 movaps %xmm7, 0x50(%rax) movaps 0x1d8e13f(%rip), %xmm5 # 0x1eec6c0 movaps 0x1d8e488(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm6 divps %xmm0, %xmm6 andps %xmm5, %xmm0 movaps 0x1d937a7(%rip), %xmm8 # 0x1ef1d40 cmpltps %xmm8, %xmm0 movaps %xmm2, %xmm3 divps %xmm4, %xmm3 andps %xmm5, %xmm4 cmpltps %xmm8, %xmm4 andps %xmm7, %xmm5 cmpltps %xmm8, %xmm5 movaps 0x1dbe374(%rip), %xmm8 # 0x1f1c930 blendvps %xmm0, %xmm8, %xmm6 divps %xmm7, %xmm2 movaps %xmm4, %xmm0 blendvps %xmm0, %xmm8, %xmm3 movaps %xmm5, %xmm0 blendvps %xmm0, %xmm8, %xmm2 movaps %xmm6, 0x60(%rax) movaps %xmm3, 0x70(%rax) movaps %xmm2, 0x80(%rax) xorps %xmm4, %xmm4 cmpltps %xmm4, %xmm6 andps 0x1dc18cc(%rip), %xmm6 # 0x1f1fec0 cmpnltps %xmm4, %xmm3 movaps 0x1dc18d1(%rip), %xmm5 # 0x1f1fed0 movaps %xmm3, %xmm0 blendvps %xmm0, 0x1d9ec05(%rip), %xmm5 # 0x1efd210 movaps %xmm6, 0x90(%rax) movaps %xmm5, 0xa0(%rax) cmpnltps %xmm4, %xmm2 movaps 0x1dc18cc(%rip), %xmm3 # 0x1f1fef0 movaps %xmm2, %xmm0 blendvps %xmm0, 0x1dc18b0(%rip), %xmm3 # 0x1f1fee0 movaps %xmm3, 0xb0(%rax) movaps 0x30(%r14), %xmm2 movaps 0x80(%r14), %xmm3 maxps %xmm4, %xmm2 movaps 0x1d8d3a2(%rip), %xmm5 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm2, %xmm5 maxps %xmm4, %xmm3 movaps %xmm5, 0xc0(%rax) movaps 0x1d8d399(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm2, 0xd0(%rax) bsfq %rbp, %rcx leaq -0x1(%rbp), %r13 movq 0x70(%rbx), %rdx movq %r12, %rdi movq %rbx, %rsi leaq 0xf(%rsp), %r8 movq %r14, %r9 pushq %r15 leaq 0x18(%rsp), %rax pushq %rax callq 0x1bc7e0 popq %rax popq %rcx andq %r13, %rbp jne 0x15e673 addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, %rsi movq %r14, %rdx movq %r15, %rcx addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1ba458
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMIntersectorKMoeller<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x11f8, %rsp # imm = 0x11F8 movq %r9, %rbx movq %rcx, %r14 movq 0x1230(%rsp), %rax leaq 0x2c0(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rsi movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rsi, %r10 xorq $0x10, %r10 movq %rdi, %r15 xorq $0x10, %r15 movq %r8, %r12 xorq $0x10, %r12 movss 0xc0(%rax,%rcx,4), %xmm14 movss 0xd0(%rax,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fc2e83(%rip), %rax # 0x2124730 movq %rax, 0xa8(%rsp) movq %r15, 0x18(%rsp) movq %r12, 0x10(%rsp) movaps %xmm8, 0x210(%rsp) movaps %xmm9, 0x200(%rsp) movaps %xmm10, 0x1f0(%rsp) movaps %xmm11, 0x1e0(%rsp) movaps %xmm12, 0x1d0(%rsp) movaps %xmm13, 0x1c0(%rsp) movq %r10, 0x8(%rsp) movaps %xmm14, 0x1b0(%rsp) leaq 0x2b0(%rsp), %rax cmpq %rax, %r11 je 0x16242d movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x161903 movq (%r11), %rbp testb $0x8, %bpl jne 0x1619bd movaps 0x20(%rbp,%rsi), %xmm0 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 movaps 0x20(%rbp,%rdi), %xmm2 subps %xmm9, %xmm2 mulps %xmm12, %xmm2 pmaxsd %xmm0, %xmm2 movaps 0x20(%rbp,%r8), %xmm0 subps %xmm10, %xmm0 mulps %xmm13, %xmm0 pmaxsd %xmm14, %xmm0 pmaxsd %xmm2, %xmm0 movaps 0x20(%rbp,%r10), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movaps 0x20(%rbp,%r15), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 pminsd %xmm2, %xmm3 movaps 0x20(%rbp,%r12), %xmm2 subps %xmm10, %xmm2 mulps %xmm13, %xmm2 pminsd %xmm1, %xmm2 pminsd %xmm3, %xmm2 movdqa %xmm0, 0xe0(%rsp) pcmpgtd %xmm2, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %r13d testb $0x8, %bpl jne 0x1619f7 testq %r13, %r13 je 0x1619fb andq $-0x10, %rbp bsfq %r13, %rcx leaq -0x1(%r13), %r9 xorl %eax, %eax movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %r13, %r9 jne 0x161a00 movq %rdx, %rbp testl %eax, %eax je 0x16192c jmp 0x161bd4 pushq $0x6 jmp 0x1619fd pushq $0x4 popq %rax jmp 0x1619ea movq %r8, %r10 movq %rdi, %r12 movq %rsi, %r15 movl 0xe0(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%rbp,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0xe0(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x161a73 leaq 0x10(%r11), %rcx cmpl %r8d, %edi jae 0x161a49 movq %rsi, (%r11) movl %r8d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %rbp jmp 0x161a56 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %rbp movq %r15, %rsi movq %r12, %rdi movq %r10, %r8 movq 0x8(%rsp), %r10 movq 0x18(%rsp), %r15 movq 0x10(%rsp), %r12 jmp 0x1619ea movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%rbp,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0xe0(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x161b1d pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm5, %rbp addq $0x20, %r11 jmp 0x161a56 bsfq %rdx, %rcx movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0xe0(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm2, (%r11) movaps %xmm4, 0x10(%r11) movaps %xmm5, 0x20(%r11) movq %xmm3, %rbp addq $0x30, %r11 jmp 0x161a56 cmpl $0x6, %eax jne 0x161903 movl %ebp, %edx andl $0xf, %edx addq $-0x8, %rdx je 0x1623d1 andq $-0x10, %rbp xorl %r15d, %r15d imulq $0xb0, %r15, %r12 movaps 0x80(%rbp,%r12), %xmm6 movaps 0x40(%rbp,%r12), %xmm10 movaps %xmm6, %xmm0 mulps %xmm10, %xmm0 movaps 0x70(%rbp,%r12), %xmm8 movaps 0x50(%rbp,%r12), %xmm11 movaps %xmm11, 0x40(%rsp) movaps %xmm8, %xmm3 mulps %xmm11, %xmm3 subps %xmm0, %xmm3 movaps 0x60(%rbp,%r12), %xmm2 mulps %xmm2, %xmm11 movaps (%rbp,%r12), %xmm4 movaps 0x10(%rbp,%r12), %xmm5 movaps 0x20(%rbp,%r12), %xmm9 movaps 0x30(%rbp,%r12), %xmm7 movaps %xmm6, %xmm1 mulps %xmm7, %xmm1 subps %xmm11, %xmm1 movaps %xmm8, %xmm12 mulps %xmm7, %xmm12 movss (%rbx,%r14,4), %xmm11 movss 0x20(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm13 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] subps %xmm11, %xmm4 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm14, %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movaps %xmm4, %xmm15 mulps %xmm11, %xmm15 movaps %xmm13, %xmm14 mulps %xmm9, %xmm14 subps %xmm15, %xmm14 mulps %xmm14, %xmm8 mulps %xmm10, %xmm14 mulps %xmm2, %xmm10 subps %xmm12, %xmm10 movss 0x10(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm12, %xmm5 movss 0x50(%rbx,%r14,4), %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm15, %xmm0 mulps %xmm9, %xmm0 movaps %xmm11, %xmm12 mulps %xmm5, %xmm12 subps %xmm0, %xmm12 movaps %xmm3, 0x20(%rsp) movaps %xmm3, %xmm0 mulps %xmm13, %xmm0 movaps %xmm5, 0x60(%rsp) mulps %xmm5, %xmm13 movaps %xmm1, %xmm3 mulps %xmm15, %xmm3 movaps %xmm4, 0x30(%rsp) mulps %xmm4, %xmm15 subps %xmm13, %xmm15 mulps %xmm10, %xmm11 addps %xmm3, %xmm11 addps %xmm0, %xmm11 mulps %xmm15, %xmm6 addps %xmm6, %xmm8 mulps %xmm12, %xmm2 addps %xmm8, %xmm2 mulps 0x40(%rsp), %xmm15 addps %xmm15, %xmm14 movaps %xmm11, %xmm6 andps 0x1d8a98a(%rip), %xmm6 # 0x1eec6d0 xorps %xmm6, %xmm2 mulps %xmm7, %xmm12 addps %xmm14, %xmm12 xorps %xmm6, %xmm12 movaps %xmm2, %xmm0 xorps %xmm8, %xmm8 cmpnltps %xmm8, %xmm0 movaps %xmm12, %xmm3 cmpnltps %xmm8, %xmm3 andps %xmm0, %xmm3 movaps %xmm11, %xmm7 andps 0x1d8a948(%rip), %xmm7 # 0x1eec6c0 cmpneqps %xmm8, %xmm11 andps %xmm11, %xmm3 movaps %xmm2, %xmm8 addps %xmm12, %xmm8 cmpleps %xmm7, %xmm8 andps %xmm3, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x161dab incq %r15 cmpq %rdx, %r15 jne 0x161bf3 jmp 0x1623d1 mulps %xmm10, %xmm9 movaps 0x60(%rsp), %xmm3 mulps %xmm1, %xmm3 addps %xmm9, %xmm3 movaps 0x30(%rsp), %xmm0 mulps 0x20(%rsp), %xmm0 addps %xmm3, %xmm0 xorps %xmm0, %xmm6 movss 0x30(%rbx,%r14,4), %xmm3 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm7, %xmm3 cmpltps %xmm6, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm7, %xmm4 movaps %xmm6, %xmm0 cmpleps %xmm4, %xmm0 andps %xmm3, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x161d9a movaps %xmm2, 0xe0(%rsp) movaps %xmm12, 0xf0(%rsp) movaps %xmm6, 0x100(%rsp) movaps %xmm7, 0x110(%rsp) movaps %xmm0, 0x130(%rsp) movaps 0x20(%rsp), %xmm2 movaps %xmm2, 0x170(%rsp) movaps %xmm1, 0x180(%rsp) movaps %xmm10, 0x190(%rsp) movq 0x1238(%rsp), %rax movq (%rax), %rcx movaps %xmm0, 0x50(%rsp) rcpps %xmm7, %xmm1 mulps %xmm1, %xmm7 movaps 0x1d8aba9(%rip), %xmm2 # 0x1eeca10 subps %xmm7, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 movaps 0x100(%rsp), %xmm4 mulps %xmm2, %xmm4 movaps %xmm4, 0x160(%rsp) movaps 0xe0(%rsp), %xmm1 mulps %xmm2, %xmm1 movaps %xmm1, 0x140(%rsp) mulps 0xf0(%rsp), %xmm2 movaps %xmm2, 0x150(%rsp) movaps 0x1d89b43(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 movaps %xmm1, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %eax pcmpeqd %xmm2, %xmm2 testl %eax, %eax je 0x161ede movaps %xmm1, %xmm2 addq %rbp, %r12 andps %xmm2, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r9 movq %rcx, 0x60(%rsp) movl 0x90(%r12,%r9,4), %eax movq 0x1e8(%rcx), %rcx movq %rax, 0x20(%rsp) movq (%rcx,%rax,8), %rax movl 0x90(%rbx,%r14,4), %ecx movq %rax, 0x40(%rsp) testl %ecx, 0x34(%rax) je 0x16222d movq %r9, 0x30(%rsp) movq 0x1238(%rsp), %rcx movq 0x10(%rcx), %rcx cmpq $0x0, 0x10(%rcx) jne 0x161f46 movq 0x40(%rsp), %rcx cmpq $0x0, 0x40(%rcx) je 0x162313 movaps %xmm4, 0x1a0(%rsp) movq %rdx, 0x80(%rsp) movq %r8, 0x88(%rsp) movq %rdi, 0x90(%rsp) movq %rsi, 0x98(%rsp) movq %r11, 0xa0(%rsp) movq 0x30(%rsp), %rsi movss 0x140(%rsp,%rsi,4), %xmm0 movss 0x150(%rsp,%rsi,4), %xmm1 movss 0x170(%rsp,%rsi,4), %xmm2 movss 0x180(%rsp,%rsi,4), %xmm3 movq 0x1238(%rsp), %rdx movq 0x8(%rdx), %rcx movd 0x20(%rsp), %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xa0(%r12,%rsi,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x190(%rsp,%rsi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x220(%rsp) movaps %xmm3, 0x230(%rsp) movaps %xmm6, 0x240(%rsp) movaps %xmm0, 0x250(%rsp) movaps %xmm1, 0x260(%rsp) movdqa %xmm5, 0x270(%rsp) movdqa %xmm4, 0x280(%rsp) leaq 0x290(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x290(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2a0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x20(%rsp) movss 0x160(%rsp,%rsi,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xa8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x70(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x40(%rsp), %rcx movq 0x18(%rcx), %rax movq %rax, 0xb8(%rsp) movq 0x8(%rdx), %rax movq %rax, 0xc0(%rsp) movq %rbx, 0xc8(%rsp) leaq 0x220(%rsp), %rax movq %rax, 0xd0(%rsp) movl $0x4, 0xd8(%rsp) movq 0x40(%rcx), %rax testq %rax, %rax je 0x1620eb leaq 0xb0(%rsp), %rdi callq *%rax movdqa 0x70(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x162285 movq 0x1238(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x16212b testb $0x2, (%rcx) jne 0x162121 movq 0x40(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x16212b leaq 0xb0(%rsp), %rdi callq *%rax movdqa 0x70(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d898d2(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d89cd6(%rip), %xmm1 # 0x1eebe20 je 0x162295 movq 0xc8(%rsp), %rax movq 0xd0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x162295 andl $0x0, 0x50(%rsp,%r9,4) movaps 0x50(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x60(%rsp), %rcx je 0x161d9a movaps 0x1d897a1(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x162279 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r9 jmp 0x161ef0 pcmpeqd 0x1d89783(%rip), %xmm1 # 0x1eeba10 pxor 0x1d89b8b(%rip), %xmm1 # 0x1eebe20 ptest 0x1d8a882(%rip), %xmm1 # 0x1eecb20 jne 0x1622b0 movd 0x20(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x30(%rsp), %rax andl $0x0, 0x50(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x1a0(%rsp), %xmm4 movaps %xmm4, %xmm1 cmpleps %xmm0, %xmm1 andps 0x50(%rsp), %xmm1 movaps %xmm1, 0x50(%rsp) movq 0xa0(%rsp), %r11 movq 0x98(%rsp), %rsi movq 0x90(%rsp), %rdi movq 0x88(%rsp), %r8 movq 0x8(%rsp), %r10 movq 0x80(%rsp), %rdx jmp 0x162233 movq 0x30(%rsp), %rcx movss 0x140(%rsp,%rcx,4), %xmm0 movss 0x150(%rsp,%rcx,4), %xmm1 movss 0x160(%rsp,%rcx,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x170(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x180(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x190(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xa0(%r12,%rcx,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movq 0x20(%rsp), %rax movl %eax, 0x120(%rbx,%r14,4) movq 0x1238(%rsp), %rcx movq 0x8(%rcx), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%rcx), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) jmp 0x161d9a movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x210(%rsp), %xmm8 movaps 0x200(%rsp), %xmm9 movaps 0x1f0(%rsp), %xmm10 movaps 0x1e0(%rsp), %xmm11 movaps 0x1d0(%rsp), %xmm12 movaps 0x1c0(%rsp), %xmm13 movq 0x18(%rsp), %r15 movq 0x10(%rsp), %r12 movaps 0x1b0(%rsp), %xmm14 jmp 0x161903 addq $0x11f8, %rsp # imm = 0x11F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMIntersectorKMoeller<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa78, %rsp # imm = 0xA78 movq %r9, %rbx movq %rcx, %r14 movq 0xab0(%rsp), %rax leaq 0x2d8(%rsp), %rdi movq %rdx, -0x8(%rdi) movss (%rax,%rcx,4), %xmm3 movss 0x10(%rax,%rcx,4), %xmm4 movss 0x20(%rax,%rcx,4), %xmm5 movss 0x60(%rax,%rcx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r9 movslq 0xb0(%rax,%rcx,4), %r10 movq %r8, %r11 xorq $0x10, %r11 movq %r9, %rdx xorq $0x10, %rdx movq %r10, %r12 xorq $0x10, %r12 movss 0xc0(%rax,%rcx,4), %xmm9 movss 0xd0(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] pushq $0x1 popq %rax shll %cl, %eax movq %rdx, %rcx cltq shlq $0x4, %rax addq 0x1fc0ee3(%rip), %rax # 0x2124730 movq %rax, 0x138(%rsp) leaq 0x2d0(%rsp), %r15 pushq $0x6 popq %rsi movaps %xmm3, 0xd0(%rsp) movaps %xmm4, 0xc0(%rsp) movaps %xmm5, 0xb0(%rsp) movaps %xmm6, 0xa0(%rsp) movaps %xmm7, 0x90(%rsp) movaps %xmm8, 0x80(%rsp) movq %r12, 0x58(%rsp) movaps %xmm9, 0x70(%rsp) movaps %xmm10, 0x60(%rsp) movq %rdi, %rax cmpq %r15, %rdi je 0x164137 leaq -0x8(%rax), %rdi movq %rax, 0x140(%rsp) movq -0x8(%rax), %r13 testb $0x8, %r13b jne 0x16393a movaps 0x20(%r13,%r8), %xmm0 subps %xmm3, %xmm0 mulps %xmm6, %xmm0 movaps 0x20(%r13,%r9), %xmm1 subps %xmm4, %xmm1 mulps %xmm7, %xmm1 pmaxsd %xmm0, %xmm1 movaps 0x20(%r13,%r10), %xmm0 subps %xmm5, %xmm0 mulps %xmm8, %xmm0 pmaxsd %xmm9, %xmm0 pmaxsd %xmm1, %xmm0 movaps 0x20(%r13,%r11), %xmm1 subps %xmm3, %xmm1 mulps %xmm6, %xmm1 movaps 0x20(%r13,%rcx), %xmm2 subps %xmm4, %xmm2 mulps %xmm7, %xmm2 pminsd %xmm1, %xmm2 movaps 0x20(%r13,%r12), %xmm1 subps %xmm5, %xmm1 mulps %xmm8, %xmm1 pminsd %xmm10, %xmm1 pminsd %xmm2, %xmm1 pcmpgtd %xmm1, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %ebp testb $0x8, %r13b jne 0x163971 testq %rbp, %rbp je 0x163975 andq $-0x10, %r13 bsfq %rbp, %rax leaq -0x1(%rbp), %rdx movq (%r13,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %rbp, %rdx jne 0x16397a movq %rax, %r13 xorl %edx, %edx testl %edx, %edx je 0x1638be jmp 0x1639bf movl %esi, %edx jmp 0x163967 pushq $0x4 popq %rdx jmp 0x163967 movq %r15, %rsi movq %rcx, %r15 movq %rax, (%rdi) addq $0x8, %rdi bsfq %rdx, %rcx leaq -0x1(%rdx), %rax movq (%r13,%rcx,8), %rcx prefetcht0 (%rcx) prefetcht0 0x40(%rcx) andq %rdx, %rax je 0x1639b1 movq %rcx, (%rdi) addq $0x8, %rdi bsfq %rax, %rcx leaq -0x1(%rax), %rdx jmp 0x16398f movq %rcx, %r13 movq %r15, %rcx movq %rsi, %r15 pushq $0x6 popq %rsi jmp 0x163965 cmpl $0x6, %edx jne 0x1640ff movl %r13d, %eax andl $0xf, %eax xorl %edx, %edx addq $-0x8, %rax movq %rax, 0x148(%rsp) setne %al je 0x1640ff andq $-0x10, %r13 xorl %r12d, %r12d movb %al, 0xf(%rsp) imulq $0xb0, %r12, %r15 movaps 0x80(%r13,%r15), %xmm6 movaps 0x40(%r13,%r15), %xmm10 movaps %xmm6, %xmm1 mulps %xmm10, %xmm1 movaps 0x70(%r13,%r15), %xmm8 movaps 0x50(%r13,%r15), %xmm11 movaps %xmm11, 0x10(%rsp) movaps %xmm8, %xmm2 mulps %xmm11, %xmm2 subps %xmm1, %xmm2 movaps 0x60(%r13,%r15), %xmm1 mulps %xmm1, %xmm11 movaps (%r13,%r15), %xmm4 movaps 0x10(%r13,%r15), %xmm5 movaps 0x20(%r13,%r15), %xmm9 movaps 0x30(%r13,%r15), %xmm7 movaps %xmm6, %xmm3 mulps %xmm7, %xmm3 subps %xmm11, %xmm3 movaps %xmm8, %xmm12 mulps %xmm7, %xmm12 movss (%rbx,%r14,4), %xmm11 movss 0x20(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm13 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] subps %xmm11, %xmm4 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm14, %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movaps %xmm4, %xmm15 mulps %xmm11, %xmm15 movaps %xmm13, %xmm14 mulps %xmm9, %xmm14 subps %xmm15, %xmm14 mulps %xmm14, %xmm8 mulps %xmm10, %xmm14 mulps %xmm1, %xmm10 subps %xmm12, %xmm10 movss 0x10(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm12, %xmm5 movss 0x50(%rbx,%r14,4), %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm15, %xmm0 mulps %xmm9, %xmm0 movaps %xmm11, %xmm12 mulps %xmm5, %xmm12 subps %xmm0, %xmm12 movaps %xmm2, 0x30(%rsp) movaps %xmm2, %xmm0 mulps %xmm13, %xmm0 movaps %xmm5, 0xe0(%rsp) mulps %xmm5, %xmm13 movaps %xmm3, %xmm2 mulps %xmm15, %xmm2 movaps %xmm4, 0x40(%rsp) mulps %xmm4, %xmm15 subps %xmm13, %xmm15 mulps %xmm10, %xmm11 addps %xmm2, %xmm11 addps %xmm0, %xmm11 mulps %xmm15, %xmm6 addps %xmm6, %xmm8 mulps %xmm12, %xmm1 addps %xmm8, %xmm1 mulps 0x10(%rsp), %xmm15 addps %xmm15, %xmm14 movaps %xmm11, %xmm6 andps 0x1d88b8a(%rip), %xmm6 # 0x1eec6d0 xorps %xmm6, %xmm1 mulps %xmm7, %xmm12 addps %xmm14, %xmm12 xorps %xmm6, %xmm12 movaps %xmm1, %xmm0 xorps %xmm8, %xmm8 cmpnltps %xmm8, %xmm0 movaps %xmm12, %xmm2 cmpnltps %xmm8, %xmm2 andps %xmm0, %xmm2 movaps %xmm11, %xmm7 andps 0x1d88b48(%rip), %xmm7 # 0x1eec6c0 cmpneqps %xmm8, %xmm11 andps %xmm11, %xmm2 movaps %xmm1, %xmm8 addps %xmm12, %xmm8 cmpleps %xmm7, %xmm8 andps %xmm2, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x163bb3 incq %r12 cmpq 0x148(%rsp), %r12 setb %al jne 0x1639ec jmp 0x1640b5 mulps %xmm10, %xmm9 movaps 0xe0(%rsp), %xmm2 mulps %xmm3, %xmm2 addps %xmm9, %xmm2 movaps 0x40(%rsp), %xmm0 mulps 0x30(%rsp), %xmm0 addps %xmm2, %xmm0 xorps %xmm0, %xmm6 movss 0x30(%rbx,%r14,4), %xmm2 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm7, %xmm2 cmpltps %xmm6, %xmm2 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm7, %xmm4 movaps %xmm6, %xmm0 cmpleps %xmm4, %xmm0 andps %xmm2, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x163b9a addq %r13, %r15 movaps %xmm1, 0x180(%rsp) movaps %xmm12, 0x190(%rsp) movaps %xmm6, 0x1a0(%rsp) movaps %xmm7, 0x1b0(%rsp) movaps %xmm0, 0x1d0(%rsp) movaps 0x30(%rsp), %xmm0 movaps %xmm0, 0x210(%rsp) movaps %xmm3, 0x220(%rsp) movaps %xmm10, 0x230(%rsp) movq %rax, 0x10(%rsp) movq 0xab8(%rsp), %rax movq (%rax), %rax movq %rax, 0xe0(%rsp) movq 0x10(%rsp), %rax rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1d88d8e(%rip), %xmm1 # 0x1eeca10 subps %xmm7, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps 0x1a0(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x200(%rsp) movaps 0x180(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x1e0(%rsp) mulps 0x190(%rsp), %xmm1 movaps %xmm1, 0x1f0(%rsp) movq %rcx, 0x130(%rsp) movq %rax, 0x10(%rsp) bsfq %rax, %rcx movq %rcx, 0x40(%rsp) movl 0x90(%r15,%rcx,4), %ecx movq 0xe0(%rsp), %rax movq 0x1e8(%rax), %rax movq %rcx, 0x128(%rsp) movq (%rax,%rcx,8), %rcx movl 0x90(%rbx,%r14,4), %eax movq %rcx, 0x30(%rsp) testl %eax, 0x34(%rcx) je 0x163d70 movq 0xab8(%rsp), %rax movq 0x10(%rax), %rax cmpq $0x0, 0x10(%rax) movaps 0xd0(%rsp), %xmm3 movaps 0xc0(%rsp), %xmm4 movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 jne 0x163de5 movq 0x30(%rsp), %rax cmpq $0x0, 0x48(%rax) jne 0x163de5 xorl %eax, %eax jmp 0x163dc2 movq 0x40(%rsp), %rax movq 0x10(%rsp), %rcx btcq %rax, %rcx movq %rcx, 0x10(%rsp) movb $0x1, %al movaps 0xd0(%rsp), %xmm3 movaps 0xc0(%rsp), %xmm4 movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 testb %al, %al movq 0x130(%rsp), %rcx je 0x164112 movq 0x10(%rsp), %rax testq %rax, %rax jne 0x163cc9 jmp 0x163b9a movq %r11, 0x100(%rsp) movq %r10, 0x108(%rsp) movq %r9, 0x110(%rsp) movq %r8, 0x118(%rsp) movq %rdi, 0x120(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x2c(%rsp) movq 0x40(%rsp), %rcx movss 0x200(%rsp,%rcx,4), %xmm0 movss 0x1e0(%rsp,%rcx,4), %xmm1 movss 0x1f0(%rsp,%rcx,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xab8(%rsp), %rax movq 0x8(%rax), %rax movd 0x128(%rsp), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0xa0(%r15,%rcx,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x210(%rsp,%rcx,4), %xmm4 movss 0x220(%rsp,%rcx,4), %xmm5 movss 0x230(%rsp,%rcx,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x240(%rsp) movaps %xmm5, 0x250(%rsp) movaps %xmm6, 0x260(%rsp) movaps %xmm1, 0x270(%rsp) movaps %xmm2, 0x280(%rsp) movdqa %xmm3, 0x290(%rsp) movdqa %xmm0, 0x2a0(%rsp) leaq 0x2b0(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2b0(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2c0(%rsp) movq 0x138(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0xf0(%rsp) leaq 0xf0(%rsp), %rcx movq %rcx, 0x150(%rsp) movq 0x30(%rsp), %rdx movq 0x18(%rdx), %rcx movq %rcx, 0x158(%rsp) movq %rax, 0x160(%rsp) movq %rbx, 0x168(%rsp) leaq 0x240(%rsp), %rax movq %rax, 0x170(%rsp) movl $0x4, 0x178(%rsp) movq 0x48(%rdx), %rax testq %rax, %rax je 0x163f87 leaq 0x150(%rsp), %rdi callq *%rax movdqa 0xf0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x164004 movq 0xab8(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x163fc6 testb $0x2, (%rcx) jne 0x163fbc movq 0x30(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x163fc6 leaq 0x150(%rsp), %rdi callq *%rax movdqa 0xf0(%rsp), %xmm0 pcmpeqd 0x1d87a39(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d87e3d(%rip), %xmm1 # 0x1eebe20 movq 0x168(%rsp), %rax movaps 0x1d87a0e(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x164014 pcmpeqd 0x1d87a04(%rip), %xmm1 # 0x1eeba10 pxor 0x1d87e0c(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x164046 movd 0x2c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x10(%rsp), %rcx movq 0x40(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x10(%rsp) movaps 0xd0(%rsp), %xmm3 movaps 0xc0(%rsp), %xmm4 movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movq 0x120(%rsp), %rdi movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movq 0x118(%rsp), %r8 movq 0x110(%rsp), %r9 movq 0x108(%rsp), %r10 movq 0x100(%rsp), %r11 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 pushq $0x6 popq %rsi xorl %edx, %edx jmp 0x163dc2 movaps 0xd0(%rsp), %xmm3 movaps 0xc0(%rsp), %xmm4 movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movq 0x58(%rsp), %r12 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 leaq 0x2d0(%rsp), %r15 testb $0x3, %dl movq 0x140(%rsp), %rax je 0x1638a2 jmp 0x164137 testb $0x1, 0xf(%rsp) movq 0x58(%rsp), %r12 leaq 0x2d0(%rsp), %r15 je 0x1640ff movl $0xff800000, 0x80(%rbx,%r14,4) # imm = 0xFF800000 pushq $0x1 popq %rdx jmp 0x1640ff cmpq %r15, %rax setne %al addq $0xa78, %rsp # imm = 0xA78 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMIntersectorKMoeller<4, 4, false>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10a8, %rsp # imm = 0x10A8 movq 0x10e0(%rsp), %rax leaq 0x170(%rsp), %rsi movq %rdx, -0x10(%rsi) andl $0x0, -0x8(%rsi) movss (%rax,%rcx,4), %xmm6 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rdx movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rdx, %r10 xorq $0x10, %r10 movq %rdi, %r11 xorq $0x10, %r11 movq %r8, %rbx xorq $0x10, %rbx movss 0xc0(%rax,%rcx,4), %xmm14 movss 0xd0(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movaps %xmm6, 0x130(%rsp) movaps %xmm9, 0x120(%rsp) movaps %xmm10, 0x110(%rsp) movaps %xmm11, 0x100(%rsp) movaps %xmm12, 0xf0(%rsp) movaps %xmm13, 0xe0(%rsp) movaps %xmm14, 0xd0(%rsp) leaq 0x160(%rsp), %rax cmpq %rax, %rsi je 0x165a8e movss -0x8(%rsi), %xmm0 addq $-0x10, %rsi ucomiss 0x80(%r9,%rcx,4), %xmm0 ja 0x165288 movq (%rsi), %r13 testb $0x8, %r13b jne 0x16533f movaps 0x20(%r13,%rdx), %xmm0 subps %xmm6, %xmm0 mulps %xmm11, %xmm0 movaps 0x20(%r13,%rdi), %xmm1 subps %xmm9, %xmm1 mulps %xmm12, %xmm1 pmaxsd %xmm0, %xmm1 movaps 0x20(%r13,%r8), %xmm0 subps %xmm10, %xmm0 mulps %xmm13, %xmm0 pmaxsd %xmm14, %xmm0 pmaxsd %xmm1, %xmm0 movaps 0x20(%r13,%r10), %xmm1 subps %xmm6, %xmm1 mulps %xmm11, %xmm1 movaps 0x20(%r13,%r11), %xmm2 subps %xmm9, %xmm2 mulps %xmm12, %xmm2 pminsd %xmm1, %xmm2 movaps 0x20(%r13,%rbx), %xmm1 subps %xmm10, %xmm1 mulps %xmm13, %xmm1 pminsd %xmm8, %xmm1 pminsd %xmm2, %xmm1 movdqa %xmm0, 0x10(%rsp) pcmpgtd %xmm1, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %r12d testb $0x8, %r13b jne 0x16537b testq %r12, %r12 je 0x165382 andq $-0x10, %r13 bsfq %r12, %r14 leaq -0x1(%r12), %r15 xorl %eax, %eax movq (%r13,%r14,8), %rbp prefetcht0 (%rbp) prefetcht0 0x40(%rbp) andq %r12, %r15 jne 0x165389 movq %rbp, %r13 testl %eax, %eax je 0x1652b0 jmp 0x165581 movl $0x6, %eax jmp 0x16536e movl $0x4, %eax jmp 0x16536e movl 0x10(%rsp,%r14,4), %r14d movq %r14, -0x30(%rsp) bsfq %r15, %r14 movq %r14, -0x80(%rsp) leaq -0x1(%r15), %r14 movq %r14, -0x20(%rsp) movq -0x80(%rsp), %r14 movq (%r13,%r14,8), %r14 prefetcht0 (%r14) movq %r14, -0x50(%rsp) prefetcht0 0x40(%r14) movq -0x80(%rsp), %r14 movl 0x10(%rsp,%r14,4), %r14d movq %r14, -0x80(%rsp) movq -0x20(%rsp), %r14 andq %r15, %r14 jne 0x165411 leaq 0x10(%rsi), %r14 movq -0x30(%rsp), %r15 movq -0x80(%rsp), %r13 cmpl %r13d, %r15d jae 0x1653fd movq -0x50(%rsp), %r15 movq %r15, (%rsi) movl %r13d, 0x8(%rsi) movq %r14, %rsi jmp 0x16536b movq %rbp, (%rsi) movl %r15d, 0x8(%rsi) movq %r14, %rsi movq -0x50(%rsp), %r13 jmp 0x16536e movq %rbp, %xmm7 movd -0x30(%rsp), %xmm0 punpcklqdq %xmm0, %xmm7 # xmm7 = xmm7[0],xmm0[0] movq -0x50(%rsp), %xmm3 movd -0x80(%rsp), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movq %r14, %r15 bsfq %r14, %r14 movq %r14, -0x80(%rsp) leaq -0x1(%r15), %r14 movq -0x80(%rsp), %rbp movq (%r13,%rbp,8), %rbp prefetcht0 (%rbp) prefetcht0 0x40(%rbp) movq %rbp, %xmm1 movq -0x80(%rsp), %rbp movd 0x10(%rsp,%rbp,4), %xmm0 punpcklqdq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] movdqa %xmm3, %xmm0 pcmpgtd %xmm7, %xmm0 andq %r15, %r14 jne 0x1654cd pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm2 blendvps %xmm0, %xmm7, %xmm2 blendvps %xmm0, %xmm3, %xmm7 movdqa %xmm1, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm1, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm1, %xmm2 movaps %xmm2, %xmm0 pcmpgtd %xmm7, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm2, %xmm1 blendvps %xmm0, %xmm7, %xmm1 blendvps %xmm0, %xmm2, %xmm7 movaps %xmm7, (%rsi) movaps %xmm1, 0x10(%rsi) movq %xmm3, %r13 addq $0x20, %rsi jmp 0x16536e bsfq %r14, %r14 movq (%r13,%r14,8), %r15 prefetcht0 (%r15) prefetcht0 0x40(%r15) movq %r15, %xmm4 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm3, %xmm2 blendvps %xmm0, %xmm7, %xmm2 movd 0x10(%rsp,%r14,4), %xmm5 blendvps %xmm0, %xmm3, %xmm7 punpcklqdq %xmm5, %xmm4 # xmm4 = xmm4[0],xmm5[0] movdqa %xmm4, %xmm0 pcmpgtd %xmm1, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm4, %xmm3 blendvps %xmm0, %xmm1, %xmm3 blendvps %xmm0, %xmm4, %xmm1 movaps %xmm1, %xmm0 pcmpgtd %xmm7, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm1, %xmm4 blendvps %xmm0, %xmm7, %xmm4 blendvps %xmm0, %xmm1, %xmm7 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm1 blendvps %xmm0, %xmm2, %xmm1 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm7, (%rsi) movaps %xmm2, 0x10(%rsi) movaps %xmm3, 0x20(%rsi) movq %xmm1, %r13 addq $0x30, %rsi jmp 0x16536e cmpl $0x6, %eax jne 0x165288 movl %r13d, %eax andl $0xf, %eax addq $-0x8, %rax je 0x165a3c andq $-0x10, %r13 movss (%r9,%rcx,4), %xmm0 movss 0x10(%r9,%rcx,4), %xmm1 movss 0x20(%r9,%rcx,4), %xmm2 movss 0x40(%r9,%rcx,4), %xmm3 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, -0x80(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, -0x50(%rsp) shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm2, -0x20(%rsp) shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, -0x30(%rsp) movss 0x50(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x150(%rsp) movss 0x60(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x140(%rsp) xorl %ebp, %ebp imulq $0xb0, %rbp, %r15 movaps 0x80(%r13,%r15), %xmm7 movaps 0x40(%r13,%r15), %xmm1 movaps %xmm7, %xmm0 mulps %xmm1, %xmm0 movaps 0x70(%r13,%r15), %xmm9 movaps 0x50(%r13,%r15), %xmm8 movaps %xmm9, %xmm6 mulps %xmm8, %xmm6 subps %xmm0, %xmm6 movaps 0x60(%r13,%r15), %xmm10 movaps (%r13,%r15), %xmm0 subps -0x80(%rsp), %xmm0 movaps 0x10(%r13,%r15), %xmm13 subps -0x50(%rsp), %xmm13 movaps %xmm7, %xmm4 movaps -0x30(%rsp), %xmm2 movaps %xmm2, %xmm3 mulps %xmm13, %xmm3 movaps 0x150(%rsp), %xmm15 movaps %xmm15, %xmm12 mulps %xmm0, %xmm12 subps %xmm3, %xmm12 mulps %xmm12, %xmm7 mulps %xmm8, %xmm12 mulps %xmm10, %xmm8 movaps 0x20(%r13,%r15), %xmm3 subps -0x20(%rsp), %xmm3 movaps 0x30(%r13,%r15), %xmm5 mulps %xmm5, %xmm4 subps %xmm8, %xmm4 movaps %xmm9, %xmm8 mulps %xmm5, %xmm8 movaps %xmm0, -0x60(%rsp) movaps 0x140(%rsp), %xmm14 mulps %xmm14, %xmm0 movaps %xmm2, %xmm11 mulps %xmm3, %xmm11 subps %xmm0, %xmm11 mulps %xmm11, %xmm9 mulps %xmm1, %xmm11 mulps %xmm10, %xmm1 subps %xmm8, %xmm1 movaps %xmm15, %xmm0 mulps %xmm3, %xmm0 movaps %xmm14, %xmm8 mulps %xmm13, %xmm8 subps %xmm0, %xmm8 movaps %xmm1, %xmm0 mulps %xmm14, %xmm0 movaps %xmm4, %xmm14 mulps %xmm15, %xmm14 addps %xmm0, %xmm14 movaps %xmm6, %xmm0 mulps %xmm2, %xmm0 addps %xmm14, %xmm0 addps %xmm7, %xmm9 mulps %xmm8, %xmm10 addps %xmm9, %xmm10 addps %xmm12, %xmm11 movaps %xmm0, %xmm7 andps 0x1d86fb3(%rip), %xmm7 # 0x1eec6d0 xorps %xmm7, %xmm10 mulps %xmm5, %xmm8 addps %xmm11, %xmm8 xorps %xmm7, %xmm8 movaps %xmm10, %xmm5 xorps %xmm12, %xmm12 cmpnltps %xmm12, %xmm5 movaps %xmm8, %xmm11 cmpnltps %xmm12, %xmm11 andps %xmm5, %xmm11 movaps %xmm0, %xmm9 andps 0x1d86f6d(%rip), %xmm9 # 0x1eec6c0 cmpneqps %xmm12, %xmm0 andps %xmm0, %xmm11 movaps %xmm10, %xmm12 addps %xmm8, %xmm12 cmpleps %xmm9, %xmm12 andps %xmm11, %xmm12 movmskps %xmm12, %r14d testl %r14d, %r14d jne 0x165787 incq %rbp cmpq %rax, %rbp jne 0x165605 jmp 0x165a3c mulps %xmm1, %xmm3 mulps %xmm4, %xmm13 addps %xmm3, %xmm13 movaps -0x60(%rsp), %xmm0 mulps %xmm6, %xmm0 addps %xmm13, %xmm0 xorps %xmm0, %xmm7 movss 0x30(%r9,%rcx,4), %xmm3 movss 0x80(%r9,%rcx,4), %xmm5 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm9, %xmm3 cmpltps %xmm7, %xmm3 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm9, %xmm5 movaps %xmm7, %xmm0 cmpleps %xmm5, %xmm0 andps %xmm3, %xmm0 andps %xmm12, %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d je 0x165776 movq %rsi, -0x40(%rsp) movaps %xmm10, 0x10(%rsp) movaps %xmm8, 0x20(%rsp) movaps %xmm7, 0x30(%rsp) movaps %xmm9, 0x40(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm6, 0xa0(%rsp) movaps %xmm4, 0xb0(%rsp) movaps %xmm1, 0xc0(%rsp) movq 0x10e8(%rsp), %r14 movq (%r14), %r14 movq %r14, -0x60(%rsp) movaps %xmm0, (%rsp) rcpps %xmm9, %xmm1 mulps %xmm1, %xmm9 movaps 0x1d871d7(%rip), %xmm3 # 0x1eeca10 subps %xmm9, %xmm3 mulps %xmm1, %xmm3 addps %xmm1, %xmm3 movaps 0x30(%rsp), %xmm7 mulps %xmm3, %xmm7 movaps %xmm7, 0x90(%rsp) movaps 0x10(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps %xmm1, 0x70(%rsp) mulps 0x20(%rsp), %xmm3 movaps %xmm3, 0x80(%rsp) movaps 0x1d8617c(%rip), %xmm5 # 0x1eeb9f0 movaps %xmm5, %xmm3 blendvps %xmm0, %xmm7, %xmm3 movaps %xmm3, %xmm4 shufps $0xb1, %xmm3, %xmm4 # xmm4 = xmm4[1,0],xmm3[3,2] minps %xmm3, %xmm4 movaps %xmm4, %xmm1 shufps $0x4e, %xmm4, %xmm1 # xmm1 = xmm1[2,3],xmm4[0,1] minps %xmm4, %xmm1 cmpeqps %xmm3, %xmm1 movaps %xmm1, %xmm3 andps %xmm0, %xmm3 movmskps %xmm3, %r14d pcmpeqd %xmm3, %xmm3 testl %r14d, %r14d je 0x1658aa movaps %xmm1, %xmm3 addq %r13, %r15 andps %xmm3, %xmm0 movmskps %xmm0, %r14d bsfq %r14, %rsi movq %rsi, -0x8(%rsp) movq -0x60(%rsp), %r14 movq 0x1e8(%r14), %r14 movq %r9, -0x60(%rsp) movq %rcx, -0x38(%rsp) movl 0x90(%r9,%rcx,4), %esi movq -0x8(%rsp), %rcx movl 0x90(%r15,%rcx,4), %r9d movq %r14, -0x70(%rsp) movq (%r14,%r9,8), %r14 movl %esi, -0x64(%rsp) testl %esi, 0x34(%r14) jne 0x16596d andl $0x0, (%rsp,%rcx,4) movaps (%rsp), %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d movq -0x60(%rsp), %r9 movq -0x38(%rsp), %rcx movq -0x40(%rsp), %rsi je 0x165776 movaps %xmm5, %xmm3 blendvps %xmm0, %xmm7, %xmm3 movaps %xmm3, %xmm4 shufps $0xb1, %xmm3, %xmm4 # xmm4 = xmm4[1,0],xmm3[3,2] minps %xmm3, %xmm4 movaps %xmm4, %xmm1 shufps $0x4e, %xmm4, %xmm1 # xmm1 = xmm1[2,3],xmm4[0,1] minps %xmm4, %xmm1 cmpeqps %xmm3, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %r14d testl %r14d, %r14d je 0x16594e movaps %xmm1, %xmm0 movmskps %xmm0, %r14d bsfq %r14, %rcx movl 0x90(%r15,%rcx,4), %r9d movq -0x70(%rsp), %r14 movq (%r14,%r9,8), %r14 movl -0x64(%rsp), %esi jmp 0x1658f5 movq %r9, -0x70(%rsp) movss 0x70(%rsp,%rcx,4), %xmm0 movss 0x80(%rsp,%rcx,4), %xmm1 movss 0x90(%rsp,%rcx,4), %xmm3 movq -0x60(%rsp), %r9 movq %rcx, %rsi movq -0x38(%rsp), %rcx movss %xmm3, 0x80(%r9,%rcx,4) movss 0xa0(%rsp,%rsi,4), %xmm3 movss %xmm3, 0xc0(%r9,%rcx,4) movss 0xb0(%rsp,%rsi,4), %xmm3 movss %xmm3, 0xd0(%r9,%rcx,4) movss 0xc0(%rsp,%rsi,4), %xmm3 movss %xmm3, 0xe0(%r9,%rcx,4) movss %xmm0, 0xf0(%r9,%rcx,4) movss %xmm1, 0x100(%r9,%rcx,4) movl 0xa0(%r15,%rsi,4), %r14d movl %r14d, 0x110(%r9,%rcx,4) movq -0x70(%rsp), %rsi movl %esi, 0x120(%r9,%rcx,4) movq 0x10e8(%rsp), %r15 movq 0x8(%r15), %r14 movl (%r14), %r14d movl %r14d, 0x130(%r9,%rcx,4) movq 0x8(%r15), %r14 movl 0x4(%r14), %r14d movl %r14d, 0x140(%r9,%rcx,4) movq -0x40(%rsp), %rsi jmp 0x165776 movss 0x80(%r9,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movaps 0x130(%rsp), %xmm6 movaps 0x120(%rsp), %xmm9 movaps 0x110(%rsp), %xmm10 movaps 0x100(%rsp), %xmm11 movaps 0xf0(%rsp), %xmm12 movaps 0xe0(%rsp), %xmm13 movaps 0xd0(%rsp), %xmm14 jmp 0x165288 addq $0x10a8, %rsp # imm = 0x10A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMIntersectorKMoeller<4, 4, false>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x868, %rsp # imm = 0x868 movq %r9, -0x78(%rsp) movq 0x8a0(%rsp), %rax leaq 0xc8(%rsp), %r14 movq %rdx, -0x8(%r14) movss (%rax,%rcx,4), %xmm0 movss 0x10(%rax,%rcx,4), %xmm1 movss 0x20(%rax,%rcx,4), %xmm2 movss 0x60(%rax,%rcx,4), %xmm3 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r9 movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %r9, %r10 xorq $0x10, %r10 movq %rdi, %r11 xorq $0x10, %r11 movq %r8, %rbx xorq $0x10, %rbx movss 0xc0(%rax,%rcx,4), %xmm6 movss 0xd0(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movaps %xmm6, -0x50(%rsp) movq %r14, %rdx leaq 0xc0(%rsp), %rax cmpq %rax, %r14 je 0x166ccf leaq -0x8(%rdx), %r14 movq %rdx, -0x70(%rsp) movq -0x8(%rdx), %r15 testb $0x8, %r15b jne 0x16687d movaps 0x20(%r15,%r9), %xmm8 subps %xmm0, %xmm8 mulps %xmm3, %xmm8 movaps 0x20(%r15,%rdi), %xmm9 subps %xmm1, %xmm9 mulps %xmm4, %xmm9 pmaxsd %xmm8, %xmm9 movaps 0x20(%r15,%r8), %xmm8 subps %xmm2, %xmm8 mulps %xmm5, %xmm8 pmaxsd %xmm6, %xmm8 pmaxsd %xmm9, %xmm8 movaps 0x20(%r15,%r10), %xmm9 subps %xmm0, %xmm9 mulps %xmm3, %xmm9 movaps 0x20(%r15,%r11), %xmm10 subps %xmm1, %xmm10 mulps %xmm4, %xmm10 pminsd %xmm9, %xmm10 movaps 0x20(%r15,%rbx), %xmm9 subps %xmm2, %xmm9 mulps %xmm5, %xmm9 pminsd %xmm7, %xmm9 pminsd %xmm10, %xmm9 pcmpgtd %xmm9, %xmm8 movmskps %xmm8, %eax xorb $0xf, %al movzbl %al, %ebp testb $0x8, %r15b jne 0x1668b3 testq %rbp, %rbp je 0x1668ba andq $-0x10, %r15 bsfq %rbp, %rsi leaq -0x1(%rbp), %r12 xorl %eax, %eax movq (%r15,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) andq %rbp, %r12 jne 0x1668c1 movq %rsi, %r15 testl %eax, %eax je 0x1667ed jmp 0x1668ff movl $0x6, %eax jmp 0x1668a9 movl $0x4, %eax jmp 0x1668a9 movq %rsi, (%r14) addq $0x8, %r14 movq %r14, %rdx bsfq %r12, %r14 leaq -0x1(%r12), %rsi movq (%r15,%r14,8), %r14 prefetcht0 (%r14) prefetcht0 0x40(%r14) andq %r12, %rsi je 0x1668f7 movq %r14, (%rdx) addq $0x8, %rdx bsfq %rsi, %r14 leaq -0x1(%rsi), %r12 jmp 0x1668d4 movq %r14, %r15 movq %rdx, %r14 jmp 0x1668a9 cmpl $0x6, %eax jne 0x166cc2 movl %r15d, %esi andl $0xf, %esi addq $-0x8, %rsi setne %dl je 0x166ca6 andq $-0x10, %r15 movq -0x78(%rsp), %rax movss (%rax,%rcx,4), %xmm10 movss 0x10(%rax,%rcx,4), %xmm12 movss 0x20(%rax,%rcx,4), %xmm9 movss 0x40(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movss 0x50(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] xorl %r12d, %r12d movq %r14, -0x68(%rsp) movq %rsi, 0x10(%rsp) movaps %xmm10, -0x30(%rsp) movaps %xmm12, -0x40(%rsp) movaps %xmm9, 0x80(%rsp) movaps %xmm13, (%rsp) movaps %xmm11, -0x10(%rsp) movaps %xmm8, 0x70(%rsp) imulq $0xb0, %r12, %r14 movaps %xmm12, %xmm13 movaps 0x80(%r15,%r14), %xmm12 movaps 0x40(%r15,%r14), %xmm9 movaps %xmm9, -0x20(%rsp) movaps %xmm12, %xmm8 mulps %xmm9, %xmm8 movaps 0x70(%r15,%r14), %xmm9 movaps %xmm9, 0xb0(%rsp) movaps 0x50(%r15,%r14), %xmm14 movaps %xmm14, -0x60(%rsp) mulps %xmm14, %xmm9 subps %xmm8, %xmm9 movaps %xmm9, 0x30(%rsp) movaps 0x60(%r15,%r14), %xmm15 movaps %xmm15, 0x40(%rsp) movaps (%r15,%r14), %xmm14 subps %xmm10, %xmm14 movaps 0x10(%r15,%r14), %xmm8 subps %xmm13, %xmm8 movaps %xmm8, %xmm6 movaps %xmm8, 0x20(%rsp) movaps %xmm12, %xmm10 movaps (%rsp), %xmm8 mulps %xmm6, %xmm8 movaps %xmm11, %xmm13 mulps %xmm14, %xmm13 subps %xmm8, %xmm13 mulps %xmm13, %xmm12 movaps %xmm12, 0xa0(%rsp) movaps -0x60(%rsp), %xmm12 mulps %xmm12, %xmm13 mulps %xmm15, %xmm12 movaps 0x20(%r15,%r14), %xmm15 subps 0x80(%rsp), %xmm15 movaps 0x30(%r15,%r14), %xmm6 movaps %xmm6, 0x90(%rsp) mulps %xmm6, %xmm10 subps %xmm12, %xmm10 movaps %xmm10, -0x60(%rsp) movaps 0xb0(%rsp), %xmm9 movaps %xmm9, %xmm8 mulps %xmm6, %xmm8 movaps %xmm14, 0x60(%rsp) movaps 0x70(%rsp), %xmm10 mulps %xmm10, %xmm14 movaps (%rsp), %xmm12 mulps %xmm15, %xmm12 subps %xmm14, %xmm12 mulps %xmm12, %xmm9 movaps -0x20(%rsp), %xmm14 mulps %xmm14, %xmm12 mulps 0x40(%rsp), %xmm14 subps %xmm8, %xmm14 movaps -0x10(%rsp), %xmm6 movaps %xmm15, -0x20(%rsp) mulps %xmm15, %xmm6 movaps %xmm14, %xmm15 movaps %xmm10, %xmm8 mulps 0x20(%rsp), %xmm8 subps %xmm6, %xmm8 mulps %xmm10, %xmm14 movaps -0x60(%rsp), %xmm11 mulps -0x10(%rsp), %xmm11 movaps 0x40(%rsp), %xmm10 addps %xmm14, %xmm11 movaps 0x30(%rsp), %xmm14 mulps (%rsp), %xmm14 addps %xmm11, %xmm14 addps 0xa0(%rsp), %xmm9 mulps %xmm8, %xmm10 addps %xmm9, %xmm10 addps %xmm13, %xmm12 mulps 0x90(%rsp), %xmm8 movaps %xmm14, %xmm11 andps 0x1d85b9f(%rip), %xmm11 # 0x1eec6d0 xorps %xmm11, %xmm10 addps %xmm12, %xmm8 xorps %xmm11, %xmm8 movaps %xmm10, %xmm12 xorps %xmm9, %xmm9 cmpnltps %xmm9, %xmm12 addps %xmm8, %xmm10 cmpnltps %xmm9, %xmm8 andps %xmm12, %xmm8 movaps %xmm14, %xmm13 cmpneqps %xmm9, %xmm14 andps %xmm14, %xmm8 andps 0x1d85b54(%rip), %xmm13 # 0x1eec6c0 cmpleps %xmm13, %xmm10 andps %xmm8, %xmm10 movmskps %xmm10, %eax testl %eax, %eax movb %dl, -0x79(%rsp) movq %r12, 0x18(%rsp) jne 0x166c1e xorl %esi, %esi movdqa -0x30(%rsp), %xmm10 movaps -0x40(%rsp), %xmm12 movaps -0x50(%rsp), %xmm6 testb %sil, %sil je 0x166bf5 addq %r15, %r14 movq 0x8a8(%rsp), %rax movq (%rax), %r12 movaps 0x50(%rsp), %xmm8 movmskps %xmm8, %esi bsfq %rsi, %r13 movl 0x90(%r14,%r13,4), %eax movq 0x1e8(%r12), %rdx movq (%rdx,%rax,8), %rdx movq -0x78(%rsp), %rax movl 0x90(%rax,%rcx,4), %eax andl 0x34(%rdx), %eax jne 0x166be8 btcq %r13, %rsi testl %eax, %eax jne 0x166c9d testq %rsi, %rsi jne 0x166bbb movq 0x18(%rsp), %r12 incq %r12 movq 0x10(%rsp), %rsi cmpq %rsi, %r12 setb %dl movq -0x68(%rsp), %r14 movaps -0x10(%rsp), %xmm11 jne 0x16699e jmp 0x166ca6 mulps -0x20(%rsp), %xmm15 movaps -0x60(%rsp), %xmm12 mulps 0x20(%rsp), %xmm12 addps %xmm15, %xmm12 movaps 0x30(%rsp), %xmm8 mulps 0x60(%rsp), %xmm8 addps %xmm12, %xmm8 xorps %xmm8, %xmm11 movq -0x78(%rsp), %rax movss 0x30(%rax,%rcx,4), %xmm8 movss 0x80(%rax,%rcx,4), %xmm9 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm13, %xmm8 cmpltps %xmm11, %xmm8 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm13, %xmm9 cmpleps %xmm9, %xmm11 andps %xmm8, %xmm11 andps %xmm10, %xmm11 movmskps %xmm11, %eax testl %eax, %eax setne %sil je 0x166b8c movaps %xmm11, 0x50(%rsp) jmp 0x166b8c movq -0x68(%rsp), %r14 movb -0x79(%rsp), %dl xorl %eax, %eax testb $0x1, %dl je 0x166cc2 movq -0x78(%rsp), %rax movl $0xff800000, 0x80(%rax,%rcx,4) # imm = 0xFF800000 movl $0x1, %eax movq -0x70(%rsp), %rdx testb $0x3, %al je 0x1667cc leaq 0xc0(%rsp), %rax cmpq %rax, %rdx setne %al addq $0x868, %rsp # imm = 0x868 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiIntersectorKMoeller<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x11f8, %rsp # imm = 0x11F8 movq %r9, %rbx movq %rcx, %r14 movq 0x1238(%rsp), %r10 movq 0x1230(%rsp), %rax leaq 0x2c0(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r12 movslq 0xb0(%rax,%rcx,4), %rsi movq %r8, %rdi xorq $0x10, %rdi movq %r12, %r15 xorq $0x10, %r15 movq %rsi, %rcx xorq $0x10, %rcx movq %rcx, 0x88(%rsp) movss 0xc0(%rax,%r14,4), %xmm14 movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] pushq $0x1 popq %rax movl %r14d, %ecx shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fbc499(%rip), %rax # 0x2124730 movq %rax, 0x78(%rsp) movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) movq %r15, (%rsp) movaps %xmm8, 0x200(%rsp) movaps %xmm9, 0x1f0(%rsp) movaps %xmm10, 0x1e0(%rsp) movaps %xmm11, 0x1d0(%rsp) movaps %xmm12, 0x1c0(%rsp) movaps %xmm13, 0x1b0(%rsp) movq %r12, 0x80(%rsp) movaps %xmm14, 0x1a0(%rsp) leaq 0x2b0(%rsp), %rax cmpq %rax, %r11 je 0x168e78 movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x1682f1 movq (%r11), %rbp testb $0x8, %bpl jne 0x1683b2 movaps 0x20(%rbp,%r8), %xmm0 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 movaps 0x20(%rbp,%r12), %xmm2 subps %xmm9, %xmm2 mulps %xmm12, %xmm2 pmaxsd %xmm0, %xmm2 movaps 0x20(%rbp,%rsi), %xmm0 subps %xmm10, %xmm0 mulps %xmm13, %xmm0 pmaxsd %xmm14, %xmm0 pmaxsd %xmm2, %xmm0 movaps 0x20(%rbp,%rdi), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movaps 0x20(%rbp,%r15), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 pminsd %xmm2, %xmm3 movq 0x88(%rsp), %rax movaps 0x20(%rbp,%rax), %xmm2 subps %xmm10, %xmm2 mulps %xmm13, %xmm2 pminsd %xmm1, %xmm2 pminsd %xmm3, %xmm2 movdqa %xmm0, 0xd0(%rsp) pcmpgtd %xmm2, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %r13d testb $0x8, %bpl jne 0x1683ec testq %r13, %r13 je 0x1683f0 andq $-0x10, %rbp bsfq %r13, %rcx leaq -0x1(%r13), %r9 xorl %eax, %eax movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %r13, %r9 jne 0x1683f5 movq %rdx, %rbp testl %eax, %eax je 0x16831a jmp 0x1685b9 pushq $0x6 jmp 0x1683f2 pushq $0x4 popq %rax jmp 0x1683df movq %r8, %r15 movl 0xd0(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%rbp,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0xd0(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x168458 leaq 0x10(%r11), %rcx cmpl %r8d, %edi jae 0x168438 movq %rsi, (%r11) movl %r8d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %rbp jmp 0x168445 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %rbp movq %r15, %r8 movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdi movq (%rsp), %r15 jmp 0x1683df movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%rbp,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0xd0(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x168502 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm5, %rbp addq $0x20, %r11 jmp 0x168445 bsfq %rdx, %rcx movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0xd0(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm2, (%r11) movaps %xmm4, 0x10(%r11) movaps %xmm5, 0x20(%r11) movq %xmm3, %rbp addq $0x30, %r11 jmp 0x168445 cmpl $0x6, %eax jne 0x1682f1 movl %ebp, %r9d andl $0xf, %r9d addq $-0x8, %r9 je 0x168e10 andq $-0x10, %rbp xorl %r12d, %r12d imulq $0x50, %r12, %rax movq (%r10), %r15 movl 0x30(%rbp,%rax), %edx movq 0x228(%r15), %rcx movq (%rcx,%rdx,8), %rdx movl (%rbp,%rax), %esi movl 0x4(%rbp,%rax), %edi movups (%rdx,%rsi,4), %xmm0 movl 0x10(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm5 movl 0x20(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm3 movl 0x34(%rbp,%rax), %edx movq (%rcx,%rdx,8), %rdx movups (%rdx,%rdi,4), %xmm2 movl 0x14(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm6 movl 0x24(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm4 movl 0x38(%rbp,%rax), %edx movq (%rcx,%rdx,8), %rdx movl 0x8(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm10 movl 0x18(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm7 movl 0x28(%rbp,%rax), %esi movups (%rdx,%rsi,4), %xmm8 movl 0x3c(%rbp,%rax), %edx movq (%rcx,%rdx,8), %rcx movl 0xc(%rbp,%rax), %edx movups (%rcx,%rdx,4), %xmm11 movl 0x1c(%rbp,%rax), %edx movups (%rcx,%rdx,4), %xmm12 movl 0x2c(%rbp,%rax), %edx movups (%rcx,%rdx,4), %xmm9 movaps %xmm0, %xmm1 unpcklps %xmm10, %xmm1 # xmm1 = xmm1[0],xmm10[0],xmm1[1],xmm10[1] unpckhps %xmm10, %xmm0 # xmm0 = xmm0[2],xmm10[2],xmm0[3],xmm10[3] movaps %xmm2, %xmm10 unpcklps %xmm11, %xmm10 # xmm10 = xmm10[0],xmm11[0],xmm10[1],xmm11[1] unpckhps %xmm11, %xmm2 # xmm2 = xmm2[2],xmm11[2],xmm2[3],xmm11[3] unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] movaps %xmm1, %xmm2 unpcklps %xmm10, %xmm2 # xmm2 = xmm2[0],xmm10[0],xmm2[1],xmm10[1] unpckhps %xmm10, %xmm1 # xmm1 = xmm1[2],xmm10[2],xmm1[3],xmm10[3] movaps %xmm5, %xmm11 unpcklps %xmm7, %xmm11 # xmm11 = xmm11[0],xmm7[0],xmm11[1],xmm7[1] unpckhps %xmm7, %xmm5 # xmm5 = xmm5[2],xmm7[2],xmm5[3],xmm7[3] movaps %xmm6, %xmm7 unpcklps %xmm12, %xmm7 # xmm7 = xmm7[0],xmm12[0],xmm7[1],xmm12[1] unpckhps %xmm12, %xmm6 # xmm6 = xmm6[2],xmm12[2],xmm6[3],xmm12[3] unpcklps %xmm6, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1] movaps %xmm11, %xmm6 unpcklps %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1] unpckhps %xmm7, %xmm11 # xmm11 = xmm11[2],xmm7[2],xmm11[3],xmm7[3] movaps %xmm3, %xmm7 unpcklps %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1] unpckhps %xmm8, %xmm3 # xmm3 = xmm3[2],xmm8[2],xmm3[3],xmm8[3] movaps %xmm4, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm4 # xmm4 = xmm4[2],xmm9[2],xmm4[3],xmm9[3] unpcklps %xmm4, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1] movaps %xmm7, %xmm4 unpcklps %xmm8, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1] unpckhps %xmm8, %xmm7 # xmm7 = xmm7[2],xmm8[2],xmm7[3],xmm8[3] movaps 0x30(%rbp,%rax), %xmm8 movaps %xmm8, 0x210(%rsp) movaps 0x40(%rbp,%rax), %xmm8 movaps %xmm8, 0xc0(%rsp) movaps %xmm2, %xmm8 subps %xmm6, %xmm8 movaps %xmm1, %xmm10 subps %xmm11, %xmm10 movaps %xmm0, %xmm11 subps %xmm5, %xmm11 subps %xmm2, %xmm4 subps %xmm1, %xmm7 subps %xmm0, %xmm3 movaps %xmm10, %xmm6 mulps %xmm3, %xmm6 movaps %xmm11, %xmm5 mulps %xmm7, %xmm5 subps %xmm6, %xmm5 movaps %xmm8, %xmm6 mulps %xmm3, %xmm6 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm2 subps %xmm14, %xmm1 movaps %xmm1, %xmm14 mulps %xmm9, %xmm14 movaps %xmm2, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm3 mulps %xmm11, %xmm13 mulps %xmm4, %xmm11 subps %xmm11, %xmm6 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm0 movaps %xmm2, %xmm11 mulps %xmm14, %xmm11 movaps %xmm0, %xmm15 mulps %xmm9, %xmm15 subps %xmm11, %xmm15 movaps %xmm8, %xmm11 mulps %xmm7, %xmm11 mulps %xmm15, %xmm7 mulps %xmm10, %xmm15 mulps %xmm4, %xmm10 subps %xmm11, %xmm10 movaps %xmm0, 0x30(%rsp) mulps %xmm12, %xmm0 movaps %xmm1, %xmm11 mulps %xmm14, %xmm11 subps %xmm0, %xmm11 mulps %xmm10, %xmm14 mulps %xmm6, %xmm12 addps %xmm14, %xmm12 mulps %xmm5, %xmm9 addps %xmm12, %xmm9 addps %xmm3, %xmm7 mulps %xmm11, %xmm4 addps %xmm7, %xmm4 addps %xmm13, %xmm15 movaps %xmm9, %xmm3 andps 0x1d83eb9(%rip), %xmm3 # 0x1eec6d0 xorps %xmm3, %xmm4 mulps %xmm8, %xmm11 addps %xmm15, %xmm11 xorps %xmm3, %xmm11 movaps %xmm4, %xmm0 xorps %xmm8, %xmm8 cmpnltps %xmm8, %xmm0 movaps %xmm11, %xmm12 cmpnltps %xmm8, %xmm12 andps %xmm0, %xmm12 movaps %xmm9, %xmm7 andps 0x1d83e76(%rip), %xmm7 # 0x1eec6c0 cmpneqps %xmm8, %xmm9 andps %xmm9, %xmm12 movaps %xmm4, %xmm8 addps %xmm11, %xmm8 cmpleps %xmm7, %xmm8 andps %xmm12, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x16887d incq %r12 cmpq %r9, %r12 jne 0x1685da jmp 0x168e10 movaps 0x30(%rsp), %xmm0 mulps %xmm10, %xmm0 mulps %xmm6, %xmm1 addps %xmm0, %xmm1 mulps %xmm5, %xmm2 addps %xmm1, %xmm2 xorps %xmm2, %xmm3 movss 0x30(%rbx,%r14,4), %xmm1 movss 0x80(%rbx,%r14,4), %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm7, %xmm1 cmpltps %xmm3, %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm7, %xmm2 movaps %xmm3, %xmm0 cmpleps %xmm2, %xmm0 andps %xmm1, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x16886c movaps %xmm4, 0xd0(%rsp) movaps %xmm11, 0xe0(%rsp) movaps %xmm3, 0xf0(%rsp) movaps %xmm7, 0x100(%rsp) movaps %xmm0, 0x120(%rsp) movaps %xmm5, 0x160(%rsp) movaps %xmm6, 0x170(%rsp) movaps %xmm10, 0x180(%rsp) movaps %xmm0, 0x20(%rsp) rcpps %xmm7, %xmm1 mulps %xmm1, %xmm7 movaps 0x1d840ef(%rip), %xmm2 # 0x1eeca10 subps %xmm7, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 movaps 0xf0(%rsp), %xmm4 mulps %xmm2, %xmm4 movaps %xmm4, 0x150(%rsp) movaps 0xd0(%rsp), %xmm1 mulps %xmm2, %xmm1 movaps %xmm1, 0x130(%rsp) mulps 0xe0(%rsp), %xmm2 movaps %xmm2, 0x140(%rsp) movaps 0x1d83089(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 movaps %xmm1, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %eax pcmpeqd %xmm2, %xmm2 testl %eax, %eax je 0x168998 movaps %xmm1, %xmm2 andps %xmm2, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rdx movl 0x210(%rsp,%rdx,4), %eax movq 0x1e8(%r15), %rcx movq (%rcx,%rax,8), %rsi movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%rsi) je 0x168c9b movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x1689db cmpq $0x0, 0x40(%rsi) je 0x168d65 movaps %xmm4, 0x190(%rsp) movq %r9, 0x68(%rsp) movq %r8, 0x70(%rsp) movq %r11, 0x30(%rsp) movss 0x130(%rsp,%rdx,4), %xmm0 movss 0x140(%rsp,%rdx,4), %xmm1 movss 0x160(%rsp,%rdx,4), %xmm2 movss 0x170(%rsp,%rdx,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xc0(%rsp,%rdx,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x180(%rsp,%rdx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x220(%rsp) movaps %xmm3, 0x230(%rsp) movaps %xmm6, 0x240(%rsp) movaps %xmm0, 0x250(%rsp) movaps %xmm1, 0x260(%rsp) movdqa %xmm5, 0x270(%rsp) movdqa %xmm4, 0x280(%rsp) leaq 0x290(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x290(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2a0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x1c(%rsp) movq %rdx, 0x60(%rsp) movss 0x150(%rsp,%rdx,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x78(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x40(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x18(%rsi), %rax movq %rax, 0x98(%rsp) movq 0x8(%r10), %rax movq %rax, 0xa0(%rsp) movq %rbx, 0xa8(%rsp) leaq 0x220(%rsp), %rax movq %rax, 0xb0(%rsp) movl $0x4, 0xb8(%rsp) movq %rsi, 0x58(%rsp) movq 0x40(%rsi), %rax testq %rax, %rax je 0x168b59 leaq 0x90(%rsp), %rdi callq *%rax movdqa 0x40(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x168ced movq 0x1238(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x168b99 testb $0x2, (%rcx) jne 0x168b8f movq 0x58(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x168b99 leaq 0x90(%rsp), %rdi callq *%rax movdqa 0x40(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d82e64(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d83268(%rip), %xmm1 # 0x1eebe20 je 0x168cfd movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x168cfd andl $0x0, 0x20(%rsp,%rdx,4) movaps 0x20(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x16886c movaps 0x1d82d39(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x168ce1 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rdx jmp 0x1689a2 pcmpeqd 0x1d82d1b(%rip), %xmm1 # 0x1eeba10 pxor 0x1d83123(%rip), %xmm1 # 0x1eebe20 ptest 0x1d83e1a(%rip), %xmm1 # 0x1eecb20 jne 0x168d18 movd 0x1c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x60(%rsp), %rax andl $0x0, 0x20(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x190(%rsp), %xmm4 movaps %xmm4, %xmm1 cmpleps %xmm0, %xmm1 andps 0x20(%rsp), %xmm1 movaps %xmm1, 0x20(%rsp) movq 0x1238(%rsp), %r10 movq 0x30(%rsp), %r11 movq 0x70(%rsp), %r8 movq 0x68(%rsp), %r9 jmp 0x168ca0 movss 0x130(%rsp,%rdx,4), %xmm0 movss 0x140(%rsp,%rdx,4), %xmm1 movss 0x150(%rsp,%rdx,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x160(%rsp,%rdx,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x170(%rsp,%rdx,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x180(%rsp,%rdx,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xc0(%rsp,%rdx,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) jmp 0x16886c movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x200(%rsp), %xmm8 movaps 0x1f0(%rsp), %xmm9 movaps 0x1e0(%rsp), %xmm10 movaps 0x1d0(%rsp), %xmm11 movaps 0x1c0(%rsp), %xmm12 movaps 0x1b0(%rsp), %xmm13 movq 0x80(%rsp), %r12 movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdi movq (%rsp), %r15 movaps 0x1a0(%rsp), %xmm14 jmp 0x1682f1 addq $0x11f8, %rsp # imm = 0x11F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiIntersectorKMoeller<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa58, %rsp # imm = 0xA58 movq %r9, %rbx movq %rcx, %r14 movq 0xa98(%rsp), %r8 movq 0xa90(%rsp), %rax leaq 0x2b8(%rsp), %r9 movq %rdx, -0x8(%r9) movss (%rax,%rcx,4), %xmm3 movss 0x10(%rax,%rcx,4), %xmm4 movss 0x20(%rax,%rcx,4), %xmm5 movss 0x60(%rax,%rcx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r10 movslq 0xa0(%rax,%rcx,4), %r11 movslq 0xb0(%rax,%rcx,4), %rsi movq %r10, %rdi xorq $0x10, %rdi movq %r11, %r15 xorq $0x10, %r15 movq %rsi, %rdx xorq $0x10, %rdx movss 0xc0(%rax,%rcx,4), %xmm9 movss 0xd0(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] pushq $0x1 popq %rax shll %cl, %eax movq %rdx, %rcx cltq shlq $0x4, %rax addq 0x1fba42d(%rip), %rax # 0x2124730 movq %rax, 0xf8(%rsp) leaq 0x2b0(%rsp), %r13 movq %rdx, (%rsp) movaps %xmm3, 0xb0(%rsp) movaps %xmm4, 0xa0(%rsp) movaps %xmm5, 0x90(%rsp) movaps %xmm6, 0x80(%rsp) movaps %xmm7, 0x70(%rsp) movaps %xmm8, 0x60(%rsp) movq %rsi, 0x30(%rsp) movq %rdi, 0x28(%rsp) movq %r15, 0x20(%rsp) movaps %xmm9, 0x50(%rsp) movaps %xmm10, 0x40(%rsp) movq %r9, %rax cmpq %r13, %r9 je 0x16ac62 leaq -0x8(%rax), %r9 movq %rax, 0x100(%rsp) movq -0x8(%rax), %r12 testb $0x8, %r12b jne 0x16a3f5 movaps 0x20(%r12,%r10), %xmm0 subps %xmm3, %xmm0 mulps %xmm6, %xmm0 movaps 0x20(%r12,%r11), %xmm1 subps %xmm4, %xmm1 mulps %xmm7, %xmm1 pmaxsd %xmm0, %xmm1 movaps 0x20(%r12,%rsi), %xmm0 subps %xmm5, %xmm0 mulps %xmm8, %xmm0 pmaxsd %xmm9, %xmm0 pmaxsd %xmm1, %xmm0 movaps 0x20(%r12,%rdi), %xmm1 subps %xmm3, %xmm1 mulps %xmm6, %xmm1 movaps 0x20(%r12,%r15), %xmm2 subps %xmm4, %xmm2 mulps %xmm7, %xmm2 pminsd %xmm1, %xmm2 movaps 0x20(%r12,%rcx), %xmm1 subps %xmm5, %xmm1 mulps %xmm8, %xmm1 pminsd %xmm10, %xmm1 pminsd %xmm2, %xmm1 pcmpgtd %xmm1, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %ebp testb $0x8, %r12b jne 0x16a42b testq %rbp, %rbp je 0x16a42f andq $-0x10, %r12 bsfq %rbp, %rax leaq -0x1(%rbp), %rdx movq (%r12,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %rbp, %rdx jne 0x16a434 movq %rax, %r12 xorl %eax, %eax testl %eax, %eax je 0x16a379 jmp 0x16a46d pushq $0x6 jmp 0x16a431 pushq $0x4 popq %rax jmp 0x16a421 movq %rax, (%r9) addq $0x8, %r9 bsfq %rdx, %rcx leaq -0x1(%rdx), %rax movq (%r12,%rcx,8), %rcx prefetcht0 (%rcx) prefetcht0 0x40(%rcx) andq %rdx, %rax je 0x16a464 movq %rcx, (%r9) addq $0x8, %r9 bsfq %rax, %rcx leaq -0x1(%rax), %rdx jmp 0x16a443 movq %rcx, %r12 movq (%rsp), %rcx jmp 0x16a41f cmpl $0x6, %eax jne 0x16ac14 movl %r12d, %edx andl $0xf, %edx xorl %eax, %eax addq $-0x8, %rdx movq %rdx, 0x108(%rsp) setne %r13b je 0x16ac0c movq %r9, 0x38(%rsp) andq $-0x10, %r12 xorl %r15d, %r15d imulq $0x50, %r15, %rax movq (%r8), %r9 movl 0x30(%r12,%rax), %edx movq 0x228(%r9), %rcx movq (%rcx,%rdx,8), %rdx movl (%r12,%rax), %esi movl 0x4(%r12,%rax), %edi movups (%rdx,%rsi,4), %xmm0 movl 0x10(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm5 movl 0x20(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm3 movl 0x34(%r12,%rax), %edx movq (%rcx,%rdx,8), %rdx movups (%rdx,%rdi,4), %xmm2 movl 0x14(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm6 movl 0x24(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm4 movl 0x38(%r12,%rax), %edx movq (%rcx,%rdx,8), %rdx movl 0x8(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm10 movl 0x18(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm7 movl 0x28(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm8 movl 0x3c(%r12,%rax), %edx movq (%rcx,%rdx,8), %rcx movl 0xc(%r12,%rax), %edx movups (%rcx,%rdx,4), %xmm11 movl 0x1c(%r12,%rax), %edx movups (%rcx,%rdx,4), %xmm12 movl 0x2c(%r12,%rax), %edx movups (%rcx,%rdx,4), %xmm9 movaps %xmm0, %xmm1 unpcklps %xmm10, %xmm1 # xmm1 = xmm1[0],xmm10[0],xmm1[1],xmm10[1] unpckhps %xmm10, %xmm0 # xmm0 = xmm0[2],xmm10[2],xmm0[3],xmm10[3] movaps %xmm2, %xmm10 unpcklps %xmm11, %xmm10 # xmm10 = xmm10[0],xmm11[0],xmm10[1],xmm11[1] unpckhps %xmm11, %xmm2 # xmm2 = xmm2[2],xmm11[2],xmm2[3],xmm11[3] unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] movaps %xmm1, %xmm2 unpcklps %xmm10, %xmm2 # xmm2 = xmm2[0],xmm10[0],xmm2[1],xmm10[1] unpckhps %xmm10, %xmm1 # xmm1 = xmm1[2],xmm10[2],xmm1[3],xmm10[3] movaps %xmm5, %xmm11 unpcklps %xmm7, %xmm11 # xmm11 = xmm11[0],xmm7[0],xmm11[1],xmm7[1] unpckhps %xmm7, %xmm5 # xmm5 = xmm5[2],xmm7[2],xmm5[3],xmm7[3] movaps %xmm6, %xmm7 unpcklps %xmm12, %xmm7 # xmm7 = xmm7[0],xmm12[0],xmm7[1],xmm12[1] unpckhps %xmm12, %xmm6 # xmm6 = xmm6[2],xmm12[2],xmm6[3],xmm12[3] unpcklps %xmm6, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1] movaps %xmm11, %xmm6 unpcklps %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1] unpckhps %xmm7, %xmm11 # xmm11 = xmm11[2],xmm7[2],xmm11[3],xmm7[3] movaps %xmm3, %xmm7 unpcklps %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1] unpckhps %xmm8, %xmm3 # xmm3 = xmm3[2],xmm8[2],xmm3[3],xmm8[3] movaps %xmm4, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm4 # xmm4 = xmm4[2],xmm9[2],xmm4[3],xmm9[3] unpcklps %xmm4, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1] movaps %xmm7, %xmm4 unpcklps %xmm8, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1] unpckhps %xmm8, %xmm7 # xmm7 = xmm7[2],xmm8[2],xmm7[3],xmm8[3] movaps 0x30(%r12,%rax), %xmm8 movaps %xmm8, 0x150(%rsp) movaps 0x40(%r12,%rax), %xmm8 movaps %xmm8, 0x140(%rsp) movaps %xmm2, %xmm8 subps %xmm6, %xmm8 movaps %xmm1, %xmm10 subps %xmm11, %xmm10 movaps %xmm0, %xmm11 subps %xmm5, %xmm11 subps %xmm2, %xmm4 subps %xmm1, %xmm7 subps %xmm0, %xmm3 movaps %xmm10, %xmm6 mulps %xmm3, %xmm6 movaps %xmm11, %xmm5 mulps %xmm7, %xmm5 subps %xmm6, %xmm5 movaps %xmm8, %xmm6 mulps %xmm3, %xmm6 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm2 subps %xmm14, %xmm1 movaps %xmm1, %xmm14 mulps %xmm9, %xmm14 movaps %xmm2, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm3 mulps %xmm11, %xmm13 mulps %xmm4, %xmm11 subps %xmm11, %xmm6 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm0 movaps %xmm2, %xmm11 mulps %xmm14, %xmm11 movaps %xmm0, %xmm15 mulps %xmm9, %xmm15 subps %xmm11, %xmm15 movaps %xmm8, %xmm11 mulps %xmm7, %xmm11 mulps %xmm15, %xmm7 mulps %xmm10, %xmm15 mulps %xmm4, %xmm10 subps %xmm11, %xmm10 movaps %xmm0, 0x10(%rsp) mulps %xmm12, %xmm0 movaps %xmm1, %xmm11 mulps %xmm14, %xmm11 subps %xmm0, %xmm11 mulps %xmm10, %xmm14 mulps %xmm6, %xmm12 addps %xmm14, %xmm12 mulps %xmm5, %xmm9 addps %xmm12, %xmm9 addps %xmm3, %xmm7 mulps %xmm11, %xmm4 addps %xmm7, %xmm4 addps %xmm13, %xmm15 movaps %xmm9, %xmm3 andps 0x1d81fe4(%rip), %xmm3 # 0x1eec6d0 xorps %xmm3, %xmm4 mulps %xmm8, %xmm11 addps %xmm15, %xmm11 xorps %xmm3, %xmm11 movaps %xmm4, %xmm0 xorps %xmm8, %xmm8 cmpnltps %xmm8, %xmm0 movaps %xmm11, %xmm12 cmpnltps %xmm8, %xmm12 andps %xmm0, %xmm12 movaps %xmm9, %xmm7 andps 0x1d81fa1(%rip), %xmm7 # 0x1eec6c0 cmpneqps %xmm8, %xmm9 andps %xmm9, %xmm12 movaps %xmm4, %xmm8 addps %xmm11, %xmm8 cmpleps %xmm7, %xmm8 andps %xmm12, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x16a75b incq %r15 cmpq 0x108(%rsp), %r15 setb %r13b jne 0x16a4a0 jmp 0x16abb1 movaps 0x10(%rsp), %xmm0 mulps %xmm10, %xmm0 mulps %xmm6, %xmm1 addps %xmm0, %xmm1 mulps %xmm5, %xmm2 addps %xmm1, %xmm2 xorps %xmm2, %xmm3 movss 0x30(%rbx,%r14,4), %xmm1 movss 0x80(%rbx,%r14,4), %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm7, %xmm1 cmpltps %xmm3, %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm7, %xmm2 movaps %xmm3, %xmm0 cmpleps %xmm2, %xmm0 andps %xmm1, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %edx testl %edx, %edx je 0x16a741 movaps %xmm4, 0x160(%rsp) movaps %xmm11, 0x170(%rsp) movaps %xmm3, 0x180(%rsp) movaps %xmm7, 0x190(%rsp) movaps %xmm0, 0x1b0(%rsp) movaps %xmm5, 0x1f0(%rsp) movaps %xmm6, 0x200(%rsp) movaps %xmm10, 0x210(%rsp) rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1d82216(%rip), %xmm1 # 0x1eeca10 subps %xmm7, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps 0x180(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x1e0(%rsp) movaps 0x160(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x1c0(%rsp) mulps 0x170(%rsp), %xmm1 movaps %xmm1, 0x1d0(%rsp) bsfq %rdx, %rsi movl 0x150(%rsp,%rsi,4), %ecx movq 0x1e8(%r9), %rax movq (%rax,%rcx,8), %rdi movl 0x90(%rbx,%r14,4), %eax testl %eax, 0x34(%rdi) je 0x16a8a9 movq 0x10(%r8), %rax cmpq $0x0, 0x10(%rax) movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 jne 0x16a8fc cmpq $0x0, 0x48(%rdi) jne 0x16a8fc xorl %eax, %eax jmp 0x16a8e6 btcq %rsi, %rdx movb $0x1, %al movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 testb %al, %al je 0x16ac26 testq %rdx, %rdx jne 0x16a839 jmp 0x16a741 movq %rdx, 0x10(%rsp) movq %r9, 0xe0(%rsp) movq %r11, 0xe8(%rsp) movq %r10, 0xf0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0xc(%rsp) movss 0x1e0(%rsp,%rsi,4), %xmm0 movss 0x1c0(%rsp,%rsi,4), %xmm1 movss 0x1d0(%rsp,%rsi,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x8(%r8), %rax movd %ecx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x140(%rsp,%rsi,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x1f0(%rsp,%rsi,4), %xmm4 movss 0x200(%rsp,%rsi,4), %xmm5 movq %rsi, 0xd8(%rsp) movss 0x210(%rsp,%rsi,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x220(%rsp) movaps %xmm5, 0x230(%rsp) movaps %xmm6, 0x240(%rsp) movaps %xmm1, 0x250(%rsp) movaps %xmm2, 0x260(%rsp) movdqa %xmm3, 0x270(%rsp) movdqa %xmm0, 0x280(%rsp) leaq 0x290(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x290(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2a0(%rsp) movq 0xf8(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0xc0(%rsp) leaq 0xc0(%rsp), %rcx movq %rcx, 0x110(%rsp) movq 0x18(%rdi), %rcx movq %rcx, 0x118(%rsp) movq %rax, 0x120(%rsp) movq %rbx, 0x128(%rsp) leaq 0x220(%rsp), %rax movq %rax, 0x130(%rsp) movl $0x4, 0x138(%rsp) movq %rdi, 0xd0(%rsp) movq 0x48(%rdi), %rax testq %rax, %rax je 0x16aa8b leaq 0x110(%rsp), %rdi callq *%rax movdqa 0xc0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x16ab0b movq 0xa98(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x16aacd testb $0x2, (%rcx) jne 0x16aac3 movq 0xd0(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x16aacd leaq 0x110(%rsp), %rdi callq *%rax movdqa 0xc0(%rsp), %xmm0 pcmpeqd 0x1d80f32(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d81336(%rip), %xmm1 # 0x1eebe20 movq 0x128(%rsp), %rax movaps 0x1d80f07(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x16ab1b pcmpeqd 0x1d80efd(%rip), %xmm1 # 0x1eeba10 pxor 0x1d81305(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x16ab50 movd 0xc(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x10(%rsp), %rcx movq 0xd8(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x10(%rsp) movq 0xa98(%rsp), %r8 movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movq 0xf0(%rsp), %r10 movq 0xe8(%rsp), %r11 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 movq 0xe0(%rsp), %r9 movq 0x10(%rsp), %rdx jmp 0x16a8e6 movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdi movq 0x20(%rsp), %r15 movq (%rsp), %rcx movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 leaq 0x2b0(%rsp), %r13 xorl %eax, %eax movq 0x38(%rsp), %r9 jmp 0x16ac14 leaq 0x2b0(%rsp), %r13 testb $0x3, %al movq 0x100(%rsp), %rax je 0x16a35d jmp 0x16ac62 testb $0x1, %r13b movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdi movq 0x20(%rsp), %r15 movq (%rsp), %rcx leaq 0x2b0(%rsp), %r13 movl $0x0, %eax movq 0x38(%rsp), %r9 je 0x16ac14 movl $0xff800000, 0x80(%rbx,%r14,4) # imm = 0xFF800000 pushq $0x1 popq %rax jmp 0x16ac14 cmpq %r13, %rax setne %al addq $0xa58, %rsp # imm = 0xA58 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMvIntersectorKPluecker<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x12a8, %rsp # imm = 0x12A8 movq %r9, %rbx movq %rcx, %r14 movq 0x12e8(%rsp), %r10 movq 0x12e0(%rsp), %rax leaq 0x370(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm11 movss 0x70(%rax,%rcx,4), %xmm12 movss 0x80(%rax,%rcx,4), %xmm13 movss 0x1db3e72(%rip), %xmm14 # 0x1f1ff10 movaps %xmm11, %xmm15 mulss %xmm14, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm12, %xmm6 mulss %xmm14, %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x1db3e49(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulss %xmm0, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rsi movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rsi, %r12 xorq $0x10, %r12 movq %rdi, %rcx xorq $0x10, %rcx movq %rcx, 0xd8(%rsp) movq %r8, %rcx xorq $0x10, %rcx movq %rcx, 0xd0(%rsp) movss 0xc0(%rax,%r14,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pushq $0x1 popq %rax movl %r14d, %ecx shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fb85d9(%rip), %rax # 0x2124730 movq %rax, 0xc0(%rsp) movq %rsi, 0x20(%rsp) movq %rdi, 0x18(%rsp) movq %r8, 0x10(%rsp) movaps %xmm8, 0x250(%rsp) movaps %xmm9, 0x240(%rsp) movaps %xmm10, 0x230(%rsp) movaps %xmm11, 0x220(%rsp) movaps %xmm12, 0x210(%rsp) movaps %xmm13, 0x200(%rsp) movaps %xmm14, 0x1f0(%rsp) movaps %xmm15, 0x1e0(%rsp) movaps %xmm6, 0x120(%rsp) movq %r12, 0xc8(%rsp) movaps %xmm7, 0x110(%rsp) leaq 0x360(%rsp), %rax cmpq %rax, %r11 je 0x16cf55 movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x16c1ce movq (%r11), %r15 testb $0x8, %r15b jne 0x16c286 movaps 0x20(%r15,%rsi), %xmm0 subps %xmm8, %xmm0 mulps %xmm15, %xmm0 movaps 0x20(%r15,%rdi), %xmm2 subps %xmm9, %xmm2 mulps %xmm6, %xmm2 maxps %xmm2, %xmm0 movaps 0x20(%r15,%r8), %xmm2 subps %xmm10, %xmm2 mulps %xmm14, %xmm2 maxps %xmm7, %xmm2 maxps %xmm2, %xmm0 movaps 0x20(%r15,%r12), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movq 0xd8(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 minps %xmm3, %xmm2 movq 0xd0(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm1, %xmm3 minps %xmm3, %xmm2 movaps %xmm0, 0x130(%rsp) cmpleps %xmm2, %xmm0 movmskps %xmm0, %r13d testb $0x8, %r15b jne 0x16c2bf testq %r13, %r13 je 0x16c2c3 andq $-0x10, %r15 bsfq %r13, %rcx leaq -0x1(%r13), %r9 xorl %eax, %eax movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %r13, %r9 jne 0x16c2c8 movq %rdx, %r15 testl %eax, %eax je 0x16c1f7 jmp 0x16c494 pushq $0x6 jmp 0x16c2c5 pushq $0x4 popq %rax jmp 0x16c2b2 movl 0x130(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%r15,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0x130(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x16c325 leaq 0x10(%r11), %rcx cmpl %r8d, %edi jae 0x16c307 movq %rsi, (%r11) movl %r8d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %r15 jmp 0x16c314 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %r15 movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdi movq 0x10(%rsp), %r8 jmp 0x16c2b2 movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%r15,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0x130(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x16c3ce pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm5, %r15 addq $0x20, %r11 jmp 0x16c314 bsfq %rdx, %rcx movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0x130(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps 0x110(%rsp), %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps 0x120(%rsp), %xmm6 movaps %xmm2, (%r11) movaps %xmm4, 0x10(%r11) movaps %xmm5, 0x20(%r11) movq %xmm3, %r15 addq $0x30, %r11 jmp 0x16c314 cmpl $0x6, %eax jne 0x16c1ce movl %r15d, %edx andl $0xf, %edx addq $-0x8, %rdx je 0x16cee2 andq $-0x10, %r15 xorl %r9d, %r9d movq %r13, 0x28(%rsp) imulq $0xb0, %r9, %r12 leaq 0xf(%rsp), %rax movq %rax, 0x160(%rsp) movss (%rbx,%r14,4), %xmm3 movss 0x10(%rbx,%r14,4), %xmm1 movss 0x20(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps (%r15,%r12), %xmm15 movaps 0x10(%r15,%r12), %xmm10 movaps 0x20(%r15,%r12), %xmm13 movaps 0x30(%r15,%r12), %xmm0 subps %xmm3, %xmm15 subps %xmm1, %xmm10 subps %xmm4, %xmm13 subps %xmm3, %xmm0 movaps %xmm0, 0x30(%rsp) movaps 0x40(%r15,%r12), %xmm2 subps %xmm1, %xmm2 movaps 0x50(%r15,%r12), %xmm5 subps %xmm4, %xmm5 movaps 0x60(%r15,%r12), %xmm0 subps %xmm3, %xmm0 movaps 0x70(%r15,%r12), %xmm3 subps %xmm1, %xmm3 movaps 0x80(%r15,%r12), %xmm7 subps %xmm4, %xmm7 movaps %xmm0, %xmm9 movaps %xmm0, 0x40(%rsp) subps %xmm15, %xmm9 movaps %xmm3, %xmm12 subps %xmm10, %xmm12 movaps %xmm7, %xmm11 subps %xmm13, %xmm11 movaps %xmm10, %xmm4 addps %xmm3, %xmm4 movaps %xmm13, %xmm6 addps %xmm7, %xmm6 movaps %xmm9, %xmm8 mulps %xmm4, %xmm8 mulps %xmm11, %xmm4 movaps %xmm12, %xmm14 mulps %xmm6, %xmm14 subps %xmm4, %xmm14 movaps %xmm15, %xmm4 addps %xmm0, %xmm4 movaps %xmm9, 0x80(%rsp) mulps %xmm9, %xmm6 movaps %xmm4, %xmm9 movaps %xmm11, 0x290(%rsp) mulps %xmm11, %xmm9 subps %xmm6, %xmm9 movaps %xmm12, 0x70(%rsp) mulps %xmm12, %xmm4 subps %xmm4, %xmm8 movss 0x50(%rbx,%r14,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm12, %xmm8 mulps %xmm6, %xmm9 addps %xmm8, %xmm9 movss 0x40(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x90(%rsp) mulps %xmm0, %xmm14 addps %xmm9, %xmm14 movaps %xmm15, %xmm1 movaps 0x30(%rsp), %xmm0 subps %xmm0, %xmm1 movaps %xmm10, %xmm8 subps %xmm2, %xmm8 movaps %xmm13, %xmm11 subps %xmm5, %xmm11 movaps %xmm10, 0x2b0(%rsp) movaps %xmm10, %xmm9 addps %xmm2, %xmm9 movaps %xmm13, 0x2a0(%rsp) movaps %xmm13, %xmm10 addps %xmm5, %xmm10 movaps %xmm1, %xmm13 movaps %xmm1, 0xa0(%rsp) mulps %xmm9, %xmm13 mulps %xmm11, %xmm9 movaps %xmm8, %xmm4 mulps %xmm10, %xmm4 subps %xmm9, %xmm4 movaps %xmm15, 0x2c0(%rsp) addps %xmm0, %xmm15 mulps %xmm1, %xmm10 movaps %xmm15, %xmm9 mulps %xmm11, %xmm9 subps %xmm10, %xmm9 mulps %xmm8, %xmm15 subps %xmm15, %xmm13 mulps %xmm12, %xmm13 mulps %xmm6, %xmm9 addps %xmm13, %xmm9 movaps 0x90(%rsp), %xmm0 mulps %xmm0, %xmm4 addps %xmm9, %xmm4 movaps 0x30(%rsp), %xmm10 movaps %xmm10, %xmm9 movaps 0x40(%rsp), %xmm1 subps %xmm1, %xmm9 addps %xmm10, %xmm1 movaps %xmm2, %xmm15 subps %xmm3, %xmm15 addps %xmm2, %xmm3 movaps %xmm5, %xmm10 subps %xmm7, %xmm10 addps %xmm5, %xmm7 movaps %xmm9, %xmm5 mulps %xmm3, %xmm5 mulps %xmm10, %xmm3 movaps %xmm15, %xmm2 mulps %xmm7, %xmm2 subps %xmm3, %xmm2 mulps %xmm9, %xmm7 movaps %xmm1, %xmm3 mulps %xmm10, %xmm3 subps %xmm7, %xmm3 mulps %xmm15, %xmm1 subps %xmm1, %xmm5 movaps %xmm12, 0x40(%rsp) mulps %xmm12, %xmm5 movaps %xmm0, %xmm12 movaps %xmm6, 0x30(%rsp) mulps %xmm6, %xmm3 movaps 0xa0(%rsp), %xmm6 addps %xmm5, %xmm3 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 movaps %xmm4, %xmm7 addps %xmm14, %xmm7 addps %xmm2, %xmm7 movaps %xmm14, %xmm0 minps %xmm4, %xmm0 minps %xmm2, %xmm0 movaps %xmm14, 0x260(%rsp) movaps %xmm14, %xmm3 movaps %xmm4, 0x280(%rsp) maxps %xmm4, %xmm3 maxps %xmm2, %xmm3 movaps %xmm7, 0x270(%rsp) andps 0x1d7ff66(%rip), %xmm7 # 0x1eec6c0 movaps %xmm7, %xmm1 mulps 0x1d8560c(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm3 xorps 0x1d7ff61(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm3 movmskps %xmm3, %eax testl %eax, %eax je 0x16ced6 movaps %xmm8, %xmm0 movaps 0x290(%rsp), %xmm13 mulps %xmm13, %xmm0 movaps %xmm11, %xmm2 movaps 0x80(%rsp), %xmm4 mulps %xmm4, %xmm2 movaps %xmm6, %xmm1 movaps 0x70(%rsp), %xmm5 mulps %xmm5, %xmm1 movaps %xmm10, %xmm14 movaps %xmm11, %xmm10 mulps %xmm15, %xmm10 mulps %xmm11, %xmm5 subps %xmm0, %xmm5 mulps %xmm8, %xmm4 movaps %xmm9, 0x70(%rsp) movaps %xmm8, %xmm9 mulps %xmm14, %xmm8 subps %xmm10, %xmm8 movaps %xmm15, 0x80(%rsp) movaps 0x1d7feda(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 andps %xmm15, %xmm10 cmpltps %xmm10, %xmm0 blendvps %xmm0, %xmm5, %xmm8 movaps %xmm6, %xmm0 mulps %xmm14, %xmm0 mulps %xmm6, %xmm13 subps %xmm2, %xmm13 movaps 0x70(%rsp), %xmm5 mulps %xmm5, %xmm11 subps %xmm0, %xmm11 andps %xmm15, %xmm2 andps %xmm15, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm13, %xmm11 mulps %xmm5, %xmm9 mulps 0x80(%rsp), %xmm6 subps %xmm1, %xmm4 subps %xmm9, %xmm6 andps %xmm15, %xmm1 andps %xmm15, %xmm9 cmpltps %xmm9, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm6 movaps 0x40(%rsp), %xmm1 mulps %xmm6, %xmm1 movaps 0x30(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 mulps %xmm8, %xmm12 addps %xmm0, %xmm12 addps %xmm12, %xmm12 movaps 0x2a0(%rsp), %xmm1 mulps %xmm6, %xmm1 movaps 0x2b0(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 movaps 0x2c0(%rsp), %xmm10 mulps %xmm8, %xmm10 addps %xmm0, %xmm10 rcpps %xmm12, %xmm0 movaps %xmm12, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d80160(%rip), %xmm9 # 0x1eeca10 subps %xmm1, %xmm9 addps %xmm10, %xmm10 mulps %xmm0, %xmm9 addps %xmm0, %xmm9 mulps %xmm10, %xmm9 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm9, %xmm0 cmpleps %xmm1, %xmm0 movss 0x30(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cmpleps %xmm9, %xmm1 andps %xmm1, %xmm0 andps %xmm3, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x16ced6 cmpneqps 0x1d7f10c(%rip), %xmm12 # 0x1eeba10 andps %xmm12, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x16ced6 movaps 0x260(%rsp), %xmm10 movaps %xmm10, 0x130(%rsp) movaps 0x280(%rsp), %xmm4 movaps %xmm4, 0x140(%rsp) movaps 0x270(%rsp), %xmm5 movaps %xmm5, 0x150(%rsp) leaq 0xf(%rsp), %rax movq %rax, 0x160(%rsp) movaps %xmm0, 0x170(%rsp) movaps %xmm9, 0x1a0(%rsp) movaps %xmm8, 0x1b0(%rsp) movaps %xmm11, 0x1c0(%rsp) movaps %xmm6, 0x1d0(%rsp) movq (%r10), %rcx movaps 0x170(%rsp), %xmm0 movaps %xmm0, 0x50(%rsp) rcpps %xmm5, %xmm1 mulps %xmm1, %xmm5 movaps 0x1d80076(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm2 subps %xmm5, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 cmpnltps 0x1d85392(%rip), %xmm7 # 0x1ef1d40 andps %xmm2, %xmm7 mulps %xmm7, %xmm10 minps %xmm3, %xmm10 movaps %xmm10, 0x180(%rsp) mulps %xmm4, %xmm7 minps %xmm3, %xmm7 movaps %xmm7, 0x190(%rsp) movaps 0x1d7f019(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x16ca02 movaps %xmm1, %xmm0 addq %r15, %r12 movmskps %xmm0, %eax bsfq %rax, %rbp movq %rcx, 0x30(%rsp) movl 0x90(%r12,%rbp,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %r13 movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%r13) je 0x16cd6b movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x16ca4c cmpq $0x0, 0x40(%r13) je 0x16ce2a movss 0x180(%rsp,%rbp,4), %xmm0 movss 0x190(%rsp,%rbp,4), %xmm1 movss 0x1b0(%rsp,%rbp,4), %xmm2 movss 0x1c0(%rsp,%rbp,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xa0(%r12,%rbp,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1d0(%rsp,%rbp,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x2d0(%rsp) movaps %xmm3, 0x2e0(%rsp) movaps %xmm6, 0x2f0(%rsp) movaps %xmm0, 0x300(%rsp) movaps %xmm1, 0x310(%rsp) movdqa %xmm5, 0x320(%rsp) movdqa %xmm4, 0x330(%rsp) leaq 0x340(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x340(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x350(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0xa0(%rsp) movss 0x1a0(%rsp,%rbp,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xc0(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0xb0(%rsp) leaq 0xb0(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0x18(%r13), %rax movq %rax, 0xe8(%rsp) movq 0x8(%r10), %rax movq %rax, 0xf0(%rsp) movq %rbx, 0xf8(%rsp) leaq 0x2d0(%rsp), %rax movq %rax, 0x100(%rsp) movl $0x4, 0x108(%rsp) movq 0x40(%r13), %rax testq %rax, %rax movq %rdx, 0x68(%rsp) movq %r9, 0x60(%rsp) movaps %xmm9, 0x40(%rsp) je 0x16cbfd leaq 0xe0(%rsp), %rdi movq %r11, 0x90(%rsp) callq *%rax movaps 0x40(%rsp), %xmm9 movq 0x60(%rsp), %r9 movq 0x68(%rsp), %rdx movq 0x10(%rsp), %r8 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x90(%rsp), %r11 movq 0x12e8(%rsp), %r10 movdqa 0xb0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x16cdc8 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x16cc61 testb $0x2, (%rcx) jne 0x16cc2a testb $0x40, 0x3e(%r13) je 0x16cc61 leaq 0xe0(%rsp), %rdi movq %r11, %r13 callq *%rax movaps 0x40(%rsp), %xmm9 movq 0x60(%rsp), %r9 movq 0x68(%rsp), %rdx movq 0x10(%rsp), %r8 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi movq %r13, %r11 movq 0x12e8(%rsp), %r10 movdqa 0xb0(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d7ed99(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d7f19d(%rip), %xmm1 # 0x1eebe20 movq 0x28(%rsp), %r13 je 0x16cddd movq 0xf8(%rsp), %rax movq 0x100(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x16cddd andl $0x0, 0x50(%rsp,%rbp,4) movq 0x28(%rsp), %r13 movq 0x30(%rsp), %rcx movaps 0x50(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x16ced6 movaps 0x1d7ec5f(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x16cdbc movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rbp jmp 0x16ca11 pcmpeqd 0x1d7ec40(%rip), %xmm1 # 0x1eeba10 pxor 0x1d7f048(%rip), %xmm1 # 0x1eebe20 movq 0x28(%rsp), %r13 ptest 0x1d7fd3a(%rip), %xmm1 # 0x1eecb20 movq 0x30(%rsp), %rcx jne 0x16ce00 movd 0xa0(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x50(%rsp,%rbp,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm9, %xmm1 cmpleps %xmm0, %xmm1 andps 0x50(%rsp), %xmm1 movaps %xmm1, 0x50(%rsp) jmp 0x16cd7a movss 0x180(%rsp,%rbp,4), %xmm0 movss 0x190(%rsp,%rbp,4), %xmm1 movss 0x1a0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x1b0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1c0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1d0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xa0(%r12,%rbp,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movq 0x28(%rsp), %r13 incq %r9 cmpq %rdx, %r9 jne 0x16c4b9 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x250(%rsp), %xmm8 movaps 0x240(%rsp), %xmm9 movaps 0x230(%rsp), %xmm10 movaps 0x220(%rsp), %xmm11 movaps 0x210(%rsp), %xmm12 movaps 0x200(%rsp), %xmm13 movaps 0x1f0(%rsp), %xmm14 movaps 0x1e0(%rsp), %xmm15 movaps 0x120(%rsp), %xmm6 movq 0xc8(%rsp), %r12 movaps 0x110(%rsp), %xmm7 jmp 0x16c1ce addq $0x12a8, %rsp # imm = 0x12A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMvIntersectorKPluecker<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb48, %rsp # imm = 0xB48 movq 0xb88(%rsp), %rdi movq 0xb80(%rsp), %rax leaq 0x3a8(%rsp), %r8 movq %rdx, -0x8(%r8) movss (%rax,%rcx,4), %xmm6 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm1 movss 0x70(%rax,%rcx,4), %xmm2 movss 0x80(%rax,%rcx,4), %xmm3 movss 0x1db1ded(%rip), %xmm0 # 0x1f1ff10 movaps %xmm1, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x210(%rsp) movaps %xmm2, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x200(%rsp) mulss %xmm3, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x220(%rsp) movss 0x1db1db3(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, 0x250(%rsp) mulss %xmm0, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm2, 0x240(%rsp) mulss %xmm0, %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, 0x230(%rsp) movslq 0x90(%rax,%rcx,4), %r10 movslq 0xa0(%rax,%rcx,4), %r11 movslq 0xb0(%rax,%rcx,4), %rsi movq %r10, %r15 xorq $0x10, %r15 movq %r11, %rdx xorq $0x10, %rdx movq %rdx, 0xd8(%rsp) movq %rsi, %rdx xorq $0x10, %rdx movq %rdx, 0xd0(%rsp) movss 0xc0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1f0(%rsp) movss 0xd0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1e0(%rsp) pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fb6526(%rip), %rax # 0x2124730 movq %rax, 0xb8(%rsp) movaps %xmm6, 0x90(%rsp) movaps %xmm9, 0x70(%rsp) movaps %xmm10, 0x60(%rsp) movq %r15, 0x58(%rsp) movq %r8, %rdx leaq 0x3a0(%rsp), %rax cmpq %rax, %r8 je 0x16ec57 leaq -0x8(%rdx), %r8 movq %rdx, 0xc8(%rsp) movq -0x8(%rdx), %r12 testb $0x8, %r12b jne 0x16e2f6 movaps 0x20(%r12,%r10), %xmm0 subps %xmm6, %xmm0 mulps 0x210(%rsp), %xmm0 movaps 0x20(%r12,%r11), %xmm1 subps %xmm9, %xmm1 mulps 0x200(%rsp), %xmm1 maxps %xmm1, %xmm0 movaps 0x20(%r12,%rsi), %xmm1 subps %xmm10, %xmm1 mulps 0x220(%rsp), %xmm1 maxps 0x1f0(%rsp), %xmm1 maxps %xmm1, %xmm0 movaps 0x20(%r12,%r15), %xmm1 subps %xmm6, %xmm1 mulps 0x250(%rsp), %xmm1 movq 0xd8(%rsp), %rax movaps 0x20(%r12,%rax), %xmm2 subps %xmm9, %xmm2 mulps 0x240(%rsp), %xmm2 minps %xmm2, %xmm1 movq 0xd0(%rsp), %rax movaps 0x20(%r12,%rax), %xmm2 subps %xmm10, %xmm2 mulps 0x230(%rsp), %xmm2 minps 0x1e0(%rsp), %xmm2 minps %xmm2, %xmm1 cmpleps %xmm1, %xmm0 movmskps %xmm0, %ebx testb $0x8, %r12b jne 0x16e32e testq %rbx, %rbx je 0x16e332 andq $-0x10, %r12 bsfq %rbx, %rax leaq -0x1(%rbx), %rdx xorl %r14d, %r14d movq (%r12,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %rbx, %rdx jne 0x16e338 movq %rax, %r12 testl %r14d, %r14d je 0x16e24f jmp 0x16e379 pushq $0x6 jmp 0x16e334 pushq $0x4 popq %r14 jmp 0x16e323 movq %r15, %r13 movq %rsi, %r15 movq %rax, (%r8) addq $0x8, %r8 bsfq %rdx, %rsi leaq -0x1(%rdx), %rax movq (%r12,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) andq %rdx, %rax je 0x16e36e movq %rsi, (%r8) addq $0x8, %r8 bsfq %rax, %rsi leaq -0x1(%rax), %rdx jmp 0x16e34d movq %rsi, %r12 movq %r15, %rsi movq %r13, %r15 jmp 0x16e323 cmpl $0x6, %r14d jne 0x16ec45 movl %r12d, %eax andl $0xf, %eax xorl %r14d, %r14d addq $-0x8, %rax setne 0x6(%rsp) je 0x16ec45 andq $-0x10, %r12 xorl %edx, %edx movq %rax, 0xc0(%rsp) imulq $0xb0, %rdx, %r15 leaq 0x7(%rsp), %rax movq %rax, 0x290(%rsp) movss (%r9,%rcx,4), %xmm3 movss 0x10(%r9,%rcx,4), %xmm1 movss 0x20(%r9,%rcx,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps (%r12,%r15), %xmm15 movaps 0x10(%r12,%r15), %xmm10 movaps 0x20(%r12,%r15), %xmm13 movaps 0x30(%r12,%r15), %xmm0 subps %xmm3, %xmm15 subps %xmm1, %xmm10 subps %xmm4, %xmm13 subps %xmm3, %xmm0 movaps %xmm0, 0x10(%rsp) movaps 0x40(%r12,%r15), %xmm2 subps %xmm1, %xmm2 movaps 0x50(%r12,%r15), %xmm5 subps %xmm4, %xmm5 movaps 0x60(%r12,%r15), %xmm7 subps %xmm3, %xmm7 movaps 0x70(%r12,%r15), %xmm3 subps %xmm1, %xmm3 movq %r15, 0x8(%rsp) movaps 0x80(%r12,%r15), %xmm1 subps %xmm4, %xmm1 movaps %xmm7, %xmm9 subps %xmm15, %xmm9 movaps %xmm3, %xmm12 subps %xmm10, %xmm12 movaps %xmm1, %xmm11 subps %xmm13, %xmm11 movaps %xmm10, %xmm4 addps %xmm3, %xmm4 movaps %xmm13, %xmm6 addps %xmm1, %xmm6 movaps %xmm9, %xmm8 mulps %xmm4, %xmm8 mulps %xmm11, %xmm4 movaps %xmm12, %xmm14 mulps %xmm6, %xmm14 subps %xmm4, %xmm14 movaps %xmm15, %xmm4 addps %xmm7, %xmm4 movaps %xmm9, 0x190(%rsp) mulps %xmm9, %xmm6 movaps %xmm4, %xmm9 movaps %xmm11, 0x180(%rsp) mulps %xmm11, %xmm9 subps %xmm6, %xmm9 movaps %xmm12, 0x170(%rsp) mulps %xmm12, %xmm4 subps %xmm4, %xmm8 movss 0x50(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x20(%rsp) movss 0x60(%r9,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm12, %xmm8 mulps %xmm0, %xmm9 addps %xmm8, %xmm9 movss 0x40(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x80(%rsp) mulps %xmm0, %xmm14 addps %xmm9, %xmm14 movaps %xmm15, %xmm4 movaps 0x10(%rsp), %xmm0 subps %xmm0, %xmm4 movaps %xmm4, %xmm6 movaps %xmm4, 0x1d0(%rsp) movaps %xmm10, %xmm8 subps %xmm2, %xmm8 movaps %xmm13, %xmm11 subps %xmm5, %xmm11 movaps %xmm10, 0x1b0(%rsp) movaps %xmm10, %xmm9 addps %xmm2, %xmm9 movaps %xmm13, 0x1a0(%rsp) movaps %xmm13, %xmm10 addps %xmm5, %xmm10 movaps %xmm4, %xmm13 mulps %xmm9, %xmm13 mulps %xmm11, %xmm9 movaps %xmm8, %xmm4 mulps %xmm10, %xmm4 subps %xmm9, %xmm4 movaps %xmm15, 0x1c0(%rsp) addps %xmm0, %xmm15 mulps %xmm6, %xmm10 movaps %xmm15, %xmm9 mulps %xmm11, %xmm9 subps %xmm10, %xmm9 movaps 0x60(%rsp), %xmm10 mulps %xmm8, %xmm15 subps %xmm15, %xmm13 movaps 0x90(%rsp), %xmm6 mulps %xmm12, %xmm13 mulps 0x20(%rsp), %xmm9 addps %xmm13, %xmm9 mulps 0x80(%rsp), %xmm4 addps %xmm9, %xmm4 movaps 0x70(%rsp), %xmm9 movaps %xmm0, %xmm13 subps %xmm7, %xmm0 addps %xmm13, %xmm7 movaps %xmm2, %xmm13 subps %xmm3, %xmm13 addps %xmm2, %xmm3 movaps %xmm5, %xmm15 subps %xmm1, %xmm15 addps %xmm5, %xmm1 movaps %xmm0, %xmm5 mulps %xmm3, %xmm5 mulps %xmm15, %xmm3 movaps %xmm13, %xmm2 mulps %xmm1, %xmm2 subps %xmm3, %xmm2 movaps %xmm0, 0x150(%rsp) mulps %xmm0, %xmm1 movaps %xmm7, %xmm3 movaps %xmm15, 0xe0(%rsp) mulps %xmm15, %xmm3 subps %xmm1, %xmm3 movaps %xmm13, 0x10(%rsp) mulps %xmm13, %xmm7 subps %xmm7, %xmm5 movaps %xmm12, 0x160(%rsp) mulps %xmm12, %xmm5 movaps 0x80(%rsp), %xmm12 movaps 0x20(%rsp), %xmm0 mulps %xmm0, %xmm3 movaps 0x1d0(%rsp), %xmm15 addps %xmm5, %xmm3 mulps %xmm12, %xmm2 addps %xmm3, %xmm2 movaps %xmm4, %xmm7 addps %xmm14, %xmm7 addps %xmm2, %xmm7 movaps %xmm14, %xmm0 minps %xmm4, %xmm0 minps %xmm2, %xmm0 movaps %xmm14, 0x130(%rsp) movaps %xmm14, %xmm3 movaps %xmm4, 0x140(%rsp) maxps %xmm4, %xmm3 maxps %xmm2, %xmm3 movaps %xmm7, 0x120(%rsp) andps 0x1d7e045(%rip), %xmm7 # 0x1eec6c0 movaps %xmm7, %xmm1 mulps 0x1d836eb(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm3 xorps 0x1d7e040(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm3 movmskps %xmm3, %eax testl %eax, %eax je 0x16ec09 movaps %xmm8, %xmm0 movaps 0x180(%rsp), %xmm5 mulps %xmm5, %xmm0 movaps %xmm11, %xmm2 movaps 0x190(%rsp), %xmm13 mulps %xmm13, %xmm2 movaps %xmm15, %xmm1 movaps 0x170(%rsp), %xmm14 mulps %xmm14, %xmm1 movaps %xmm11, %xmm10 mulps 0x10(%rsp), %xmm10 mulps %xmm11, %xmm14 subps %xmm0, %xmm14 mulps %xmm8, %xmm13 movaps %xmm8, %xmm9 mulps 0xe0(%rsp), %xmm8 subps %xmm10, %xmm8 movaps 0x1d7dfbf(%rip), %xmm4 # 0x1eec6c0 andps %xmm4, %xmm0 andps %xmm4, %xmm10 cmpltps %xmm10, %xmm0 movaps 0x60(%rsp), %xmm10 blendvps %xmm0, %xmm14, %xmm8 movaps %xmm15, %xmm0 mulps 0xe0(%rsp), %xmm0 mulps %xmm15, %xmm5 subps %xmm2, %xmm5 movaps 0x150(%rsp), %xmm14 mulps %xmm14, %xmm11 subps %xmm0, %xmm11 andps %xmm4, %xmm2 andps %xmm4, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm5, %xmm11 mulps %xmm14, %xmm9 mulps 0x10(%rsp), %xmm15 subps %xmm1, %xmm13 subps %xmm9, %xmm15 andps %xmm4, %xmm1 andps %xmm4, %xmm9 cmpltps %xmm9, %xmm1 movaps 0x70(%rsp), %xmm9 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm15 movaps 0x160(%rsp), %xmm1 mulps %xmm15, %xmm1 movaps 0x20(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 mulps %xmm8, %xmm12 addps %xmm0, %xmm12 addps %xmm12, %xmm12 movaps 0x1a0(%rsp), %xmm1 mulps %xmm15, %xmm1 movaps 0x1b0(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 movaps 0x1c0(%rsp), %xmm4 mulps %xmm8, %xmm4 addps %xmm0, %xmm4 rcpps %xmm12, %xmm1 movaps %xmm12, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d7e233(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm4, %xmm4 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm4, %xmm0 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm3, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x16ec09 cmpneqps 0x1d7d1e6(%rip), %xmm12 # 0x1eeba10 andps %xmm12, %xmm1 movmskps %xmm1, %r15d testl %r15d, %r15d je 0x16ec09 addq %r12, 0x8(%rsp) movaps 0x130(%rsp), %xmm4 movaps %xmm4, 0x260(%rsp) movaps 0x140(%rsp), %xmm3 movaps %xmm3, 0x270(%rsp) movaps 0x120(%rsp), %xmm5 movaps %xmm5, 0x280(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x290(%rsp) movaps %xmm1, 0x2a0(%rsp) movaps %xmm0, 0x2d0(%rsp) movaps %xmm8, 0x2e0(%rsp) movaps %xmm11, 0x2f0(%rsp) movaps %xmm15, 0x300(%rsp) movq (%rdi), %rax movq %rax, 0x20(%rsp) rcpps %xmm5, %xmm0 mulps %xmm0, %xmm5 movaps 0x1d7e153(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm1 subps %xmm5, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 cmpnltps 0x1d8346f(%rip), %xmm7 # 0x1ef1d40 andps %xmm1, %xmm7 mulps %xmm7, %xmm4 minps %xmm2, %xmm4 movaps %xmm4, 0x2b0(%rsp) mulps %xmm3, %xmm7 minps %xmm2, %xmm7 movaps %xmm7, 0x2c0(%rsp) movq %rdx, %r14 bsfq %r15, %rbp movq 0x8(%rsp), %rax movl 0x90(%rax,%rbp,4), %edx movq 0x20(%rsp), %rax movq 0x1e8(%rax), %rax movq (%rax,%rdx,8), %r13 movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%r13) je 0x16e937 movq 0x10(%rdi), %rax cmpq $0x0, 0x10(%rax) jne 0x16e955 cmpq $0x0, 0x48(%r13) jne 0x16e955 xorl %eax, %eax jmp 0x16e93d btcq %rbp, %r15 movb $0x1, %al movq %r14, %rdx xorl %r14d, %r14d testb %al, %al je 0x16ec29 testq %r15, %r15 jne 0x16e8f0 jmp 0x16ec09 movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x80(%rsp) movss 0x2d0(%rsp,%rbp,4), %xmm0 movss 0x2b0(%rsp,%rbp,4), %xmm1 movss 0x2c0(%rsp,%rbp,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0x8(%rdi), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movq 0x8(%rsp), %rdx movd 0xa0(%rdx,%rbp,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x2e0(%rsp,%rbp,4), %xmm4 movss 0x2f0(%rsp,%rbp,4), %xmm5 movss 0x300(%rsp,%rbp,4), %xmm7 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movaps %xmm4, 0x310(%rsp) movaps %xmm5, 0x320(%rsp) movaps %xmm7, 0x330(%rsp) movaps %xmm1, 0x340(%rsp) movaps %xmm2, 0x350(%rsp) movdqa %xmm3, 0x360(%rsp) movdqa %xmm0, 0x370(%rsp) leaq 0x380(%rsp), %rdx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rdx) movdqa %xmm0, (%rdx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x380(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x390(%rsp) movq 0xb8(%rsp), %rdx movdqa (%rdx), %xmm0 movdqa %xmm0, 0xa0(%rsp) leaq 0xa0(%rsp), %rdx movq %rdx, 0xf0(%rsp) movq 0x18(%r13), %rdx movq %rdx, 0xf8(%rsp) movq %rax, 0x100(%rsp) movq %r9, 0x108(%rsp) leaq 0x310(%rsp), %rax movq %rax, 0x110(%rsp) movl $0x4, 0x118(%rsp) movq 0x48(%r13), %rax testq %rax, %rax movq %r9, 0x50(%rsp) movq %r8, 0x48(%rsp) movq %r10, 0x40(%rsp) movq %r11, 0x38(%rsp) movq %rsi, 0x30(%rsp) je 0x16eb17 leaq 0xf0(%rsp), %rdi movq %rcx, 0x10(%rsp) callq *%rax movq 0x30(%rsp), %rsi movq 0x38(%rsp), %r11 movq 0x40(%rsp), %r10 movq 0x48(%rsp), %r8 movaps 0x60(%rsp), %xmm10 movaps 0x70(%rsp), %xmm9 movaps 0x90(%rsp), %xmm6 movq 0xb88(%rsp), %rdi movq 0x10(%rsp), %rcx movq 0x50(%rsp), %r9 movdqa 0xa0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x16ebc7 movq 0x10(%rdi), %rdx movq 0x10(%rdx), %rax testq %rax, %rax je 0x16eb89 testb $0x2, (%rdx) jne 0x16eb44 testb $0x40, 0x3e(%r13) je 0x16eb89 leaq 0xf0(%rsp), %rdi movq %rcx, %r13 callq *%rax movq 0x30(%rsp), %rsi movq 0x38(%rsp), %r11 movq 0x40(%rsp), %r10 movq 0x48(%rsp), %r8 movaps 0x60(%rsp), %xmm10 movaps 0x70(%rsp), %xmm9 movaps 0x90(%rsp), %xmm6 movq 0xb88(%rsp), %rdi movq %r13, %rcx movq 0x50(%rsp), %r9 movdqa 0xa0(%rsp), %xmm0 pcmpeqd 0x1d7ce76(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d7d27a(%rip), %xmm1 # 0x1eebe20 movq 0x108(%rsp), %rax movaps 0x1d7ce4b(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x16ebd7 pcmpeqd 0x1d7ce41(%rip), %xmm1 # 0x1eeba10 pxor 0x1d7d249(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al movq %r14, %rdx jne 0x16e940 movd 0x80(%rsp), %xmm0 movd %xmm0, 0x80(%r9,%rcx,4) btcq %rbp, %r15 jmp 0x16e940 incq %rdx movq 0xc0(%rsp), %rax cmpq %rax, %rdx setb 0x6(%rsp) movq 0x58(%rsp), %r15 jne 0x16e3a9 jmp 0x16ec45 testb $0x1, 0x6(%rsp) movq 0x58(%rsp), %r15 je 0x16ec45 movl $0xff800000, 0x80(%r9,%rcx,4) # imm = 0xFF800000 pushq $0x1 popq %r14 testb $0x3, %r14b movq 0xc8(%rsp), %rdx je 0x16e22b leaq 0x3a0(%rsp), %rax cmpq %rax, %rdx setne %al addq $0xb48, %rsp # imm = 0xB48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiIntersectorKPluecker<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x12e8, %rsp # imm = 0x12E8 movq %r9, %rbx movq %rcx, %r14 movq 0x1328(%rsp), %r10 movq 0x1320(%rsp), %rax leaq 0x3b0(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm11 movss 0x70(%rax,%rcx,4), %xmm12 movss 0x80(%rax,%rcx,4), %xmm13 movss 0x1dafdd8(%rip), %xmm14 # 0x1f1ff10 movaps %xmm11, %xmm15 mulss %xmm14, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm12, %xmm6 mulss %xmm14, %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x1dafdaf(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulss %xmm0, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r12 movslq 0xb0(%rax,%rcx,4), %r13 movq %r8, %rsi xorq $0x10, %rsi movq %r12, %rdi xorq $0x10, %rdi movq %r13, %rcx xorq $0x10, %rcx movq %rcx, 0xb8(%rsp) movss 0xc0(%rax,%r14,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pushq $0x1 popq %rax movl %r14d, %ecx shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fb4547(%rip), %rax # 0x2124730 movq %rax, 0xa0(%rsp) movq %r8, 0x10(%rsp) movq %rsi, 0x20(%rsp) movq %rdi, 0x18(%rsp) movaps %xmm8, 0x250(%rsp) movaps %xmm9, 0x240(%rsp) movaps %xmm10, 0x230(%rsp) movaps %xmm11, 0x220(%rsp) movaps %xmm12, 0x210(%rsp) movaps %xmm13, 0x200(%rsp) movaps %xmm14, 0x1f0(%rsp) movaps %xmm15, 0x1e0(%rsp) movaps %xmm6, 0x100(%rsp) movq %r12, 0xb0(%rsp) movq %r13, 0xa8(%rsp) movaps %xmm7, 0xf0(%rsp) leaq 0x3a0(%rsp), %rax cmpq %rax, %r11 je 0x1710cd movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x170268 movq (%r11), %r15 testb $0x8, %r15b jne 0x170313 movaps 0x20(%r15,%r8), %xmm0 subps %xmm8, %xmm0 mulps %xmm15, %xmm0 movaps 0x20(%r15,%r12), %xmm2 subps %xmm9, %xmm2 mulps %xmm6, %xmm2 maxps %xmm2, %xmm0 movaps 0x20(%r15,%r13), %xmm2 subps %xmm10, %xmm2 mulps %xmm14, %xmm2 maxps %xmm7, %xmm2 maxps %xmm2, %xmm0 movaps 0x20(%r15,%rsi), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movaps 0x20(%r15,%rdi), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 minps %xmm3, %xmm2 movq 0xb8(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm1, %xmm3 minps %xmm3, %xmm2 movaps %xmm0, 0x130(%rsp) cmpleps %xmm2, %xmm0 movmskps %xmm0, %ebp testb $0x8, %r15b jne 0x17034c testq %rbp, %rbp je 0x170350 andq $-0x10, %r15 bsfq %rbp, %rcx leaq -0x1(%rbp), %r9 xorl %eax, %eax movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %rbp, %r9 jne 0x170355 movq %rdx, %r15 testl %eax, %eax je 0x170291 jmp 0x170521 pushq $0x6 jmp 0x170352 pushq $0x4 popq %rax jmp 0x17033f movl 0x130(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%r15,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0x130(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x1703b2 leaq 0x10(%r11), %rcx cmpl %r8d, %edi jae 0x170394 movq %rsi, (%r11) movl %r8d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %r15 jmp 0x1703a1 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %r15 movq 0x10(%rsp), %r8 movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdi jmp 0x17033f movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%r15,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0x130(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x17045b pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm5, %r15 addq $0x20, %r11 jmp 0x1703a1 bsfq %rdx, %rcx movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0x130(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps 0xf0(%rsp), %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps 0x100(%rsp), %xmm6 movaps %xmm2, (%r11) movaps %xmm4, 0x10(%r11) movaps %xmm5, 0x20(%r11) movq %xmm3, %r15 addq $0x30, %r11 jmp 0x1703a1 cmpl $0x6, %eax jne 0x170268 movl %r15d, %r9d andl $0xf, %r9d addq $-0x8, %r9 je 0x171048 andq $-0x10, %r15 xorl %r13d, %r13d movq %rbp, 0x28(%rsp) imulq $0x50, %r13, %rax movq (%r10), %rcx movl 0x30(%r15,%rax), %edx movq %rcx, 0x48(%rsp) movq 0x228(%rcx), %rcx movq (%rcx,%rdx,8), %rdx movl (%r15,%rax), %esi movl 0x4(%r15,%rax), %edi movups (%rdx,%rsi,4), %xmm15 movl 0x10(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm11 movl 0x20(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm4 movl 0x34(%r15,%rax), %edx movq (%rcx,%rdx,8), %rdx movups (%rdx,%rdi,4), %xmm2 movl 0x14(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm3 movl 0x24(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm6 movl 0x38(%r15,%rax), %edx movq (%rcx,%rdx,8), %rdx movl 0x8(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm5 movl 0x18(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm0 movl 0x28(%r15,%rax), %esi movups (%rdx,%rsi,4), %xmm7 movl 0x3c(%r15,%rax), %edx movq (%rcx,%rdx,8), %rcx movl 0xc(%r15,%rax), %edx movups (%rcx,%rdx,4), %xmm9 movl 0x1c(%r15,%rax), %edx movups (%rcx,%rdx,4), %xmm10 movl 0x2c(%r15,%rax), %edx movups (%rcx,%rdx,4), %xmm8 movaps %xmm15, %xmm13 unpcklps %xmm5, %xmm13 # xmm13 = xmm13[0],xmm5[0],xmm13[1],xmm5[1] unpckhps %xmm5, %xmm15 # xmm15 = xmm15[2],xmm5[2],xmm15[3],xmm5[3] movaps %xmm2, %xmm5 unpcklps %xmm9, %xmm5 # xmm5 = xmm5[0],xmm9[0],xmm5[1],xmm9[1] unpckhps %xmm9, %xmm2 # xmm2 = xmm2[2],xmm9[2],xmm2[3],xmm9[3] unpcklps %xmm2, %xmm15 # xmm15 = xmm15[0],xmm2[0],xmm15[1],xmm2[1] movaps %xmm13, %xmm1 unpcklps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1] movaps %xmm1, %xmm12 unpckhps %xmm5, %xmm13 # xmm13 = xmm13[2],xmm5[2],xmm13[3],xmm5[3] movaps %xmm11, %xmm9 movaps %xmm11, %xmm2 unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1] unpckhps %xmm0, %xmm9 # xmm9 = xmm9[2],xmm0[2],xmm9[3],xmm0[3] movaps %xmm3, %xmm5 unpcklps %xmm10, %xmm5 # xmm5 = xmm5[0],xmm10[0],xmm5[1],xmm10[1] unpckhps %xmm10, %xmm3 # xmm3 = xmm3[2],xmm10[2],xmm3[3],xmm10[3] unpcklps %xmm3, %xmm9 # xmm9 = xmm9[0],xmm3[0],xmm9[1],xmm3[1] movaps %xmm2, %xmm1 unpcklps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1] unpckhps %xmm5, %xmm2 # xmm2 = xmm2[2],xmm5[2],xmm2[3],xmm5[3] movaps %xmm4, %xmm3 unpcklps %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[0],xmm3[1],xmm7[1] unpckhps %xmm7, %xmm4 # xmm4 = xmm4[2],xmm7[2],xmm4[3],xmm7[3] movaps %xmm6, %xmm5 unpcklps %xmm8, %xmm5 # xmm5 = xmm5[0],xmm8[0],xmm5[1],xmm8[1] unpckhps %xmm8, %xmm6 # xmm6 = xmm6[2],xmm8[2],xmm6[3],xmm8[3] unpcklps %xmm6, %xmm4 # xmm4 = xmm4[0],xmm6[0],xmm4[1],xmm6[1] movaps %xmm3, %xmm11 unpcklps %xmm5, %xmm11 # xmm11 = xmm11[0],xmm5[0],xmm11[1],xmm5[1] unpckhps %xmm5, %xmm3 # xmm3 = xmm3[2],xmm5[2],xmm3[3],xmm5[3] movaps 0x30(%r15,%rax), %xmm5 movaps %xmm5, 0x300(%rsp) movaps 0x40(%r15,%rax), %xmm5 movaps %xmm5, 0x120(%rsp) leaq 0xf(%rsp), %rax movq %rax, 0x160(%rsp) movss (%rbx,%r14,4), %xmm6 movss 0x10(%rbx,%r14,4), %xmm7 movss 0x20(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm6, %xmm12 subps %xmm7, %xmm13 subps %xmm5, %xmm15 subps %xmm6, %xmm1 movaps %xmm1, 0x50(%rsp) subps %xmm7, %xmm2 subps %xmm5, %xmm9 movaps %xmm9, 0x30(%rsp) subps %xmm6, %xmm11 subps %xmm7, %xmm3 subps %xmm5, %xmm4 movaps %xmm11, %xmm9 subps %xmm12, %xmm9 movaps %xmm12, %xmm1 movaps %xmm3, %xmm14 subps %xmm13, %xmm14 movaps %xmm4, %xmm10 subps %xmm15, %xmm10 movaps %xmm3, %xmm5 addps %xmm13, %xmm5 movaps %xmm4, %xmm7 addps %xmm15, %xmm7 movaps %xmm9, %xmm8 mulps %xmm5, %xmm8 mulps %xmm10, %xmm5 movaps %xmm14, %xmm6 mulps %xmm7, %xmm6 subps %xmm5, %xmm6 movaps %xmm11, %xmm5 addps %xmm12, %xmm5 movaps %xmm12, 0x80(%rsp) movaps %xmm9, 0x2e0(%rsp) mulps %xmm9, %xmm7 movaps %xmm5, %xmm9 movaps %xmm10, 0x2d0(%rsp) mulps %xmm10, %xmm9 subps %xmm7, %xmm9 movaps %xmm14, 0x2c0(%rsp) mulps %xmm14, %xmm5 subps %xmm5, %xmm8 movss 0x50(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x110(%rsp) movss 0x60(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm12, %xmm8 mulps %xmm0, %xmm9 addps %xmm8, %xmm9 movss 0x40(%rbx,%r14,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm8, %xmm6 addps %xmm9, %xmm6 movaps %xmm1, %xmm9 movaps 0x50(%rsp), %xmm0 subps %xmm0, %xmm9 movaps %xmm13, %xmm10 subps %xmm2, %xmm10 movaps %xmm15, %xmm1 movaps 0x30(%rsp), %xmm7 subps %xmm7, %xmm1 movaps %xmm13, 0x2f0(%rsp) movaps %xmm13, %xmm5 addps %xmm2, %xmm5 movaps %xmm15, 0x2b0(%rsp) movaps %xmm15, %xmm13 addps %xmm7, %xmm13 movaps %xmm9, %xmm14 mulps %xmm5, %xmm14 mulps %xmm1, %xmm5 movaps %xmm10, %xmm7 mulps %xmm13, %xmm7 subps %xmm5, %xmm7 movaps 0x80(%rsp), %xmm5 addps %xmm0, %xmm5 mulps %xmm9, %xmm13 movaps %xmm5, %xmm15 movaps %xmm1, 0x2a0(%rsp) mulps %xmm1, %xmm15 subps %xmm13, %xmm15 mulps %xmm10, %xmm5 subps %xmm5, %xmm14 mulps %xmm12, %xmm14 movaps 0x110(%rsp), %xmm0 mulps %xmm0, %xmm15 addps %xmm14, %xmm15 mulps %xmm8, %xmm7 addps %xmm15, %xmm7 movaps 0x50(%rsp), %xmm1 movaps %xmm1, %xmm15 subps %xmm11, %xmm15 addps %xmm1, %xmm11 movaps %xmm2, %xmm5 subps %xmm3, %xmm5 addps %xmm2, %xmm3 movaps 0x30(%rsp), %xmm1 movaps %xmm1, %xmm13 subps %xmm4, %xmm13 addps %xmm1, %xmm4 movaps %xmm15, %xmm2 mulps %xmm3, %xmm2 mulps %xmm13, %xmm3 movaps %xmm5, %xmm1 mulps %xmm4, %xmm1 subps %xmm3, %xmm1 mulps %xmm15, %xmm4 movaps %xmm11, %xmm3 mulps %xmm13, %xmm3 subps %xmm4, %xmm3 mulps %xmm5, %xmm11 subps %xmm11, %xmm2 movaps %xmm12, 0x30(%rsp) mulps %xmm12, %xmm2 mulps %xmm0, %xmm3 addps %xmm2, %xmm3 mulps %xmm8, %xmm1 addps %xmm3, %xmm1 movaps %xmm6, %xmm3 addps %xmm7, %xmm3 addps %xmm1, %xmm3 movaps %xmm6, %xmm0 minps %xmm7, %xmm0 minps %xmm1, %xmm0 movaps %xmm6, 0x260(%rsp) movaps %xmm6, %xmm4 movaps %xmm7, 0x280(%rsp) maxps %xmm7, %xmm4 maxps %xmm1, %xmm4 movaps %xmm3, 0x270(%rsp) andps 0x1d7bde3(%rip), %xmm3 # 0x1eec6c0 movaps %xmm3, %xmm1 mulps 0x1d81489(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm4 xorps 0x1d7bdde(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm4 movmskps %xmm4, %eax testl %eax, %eax je 0x17103c movaps %xmm10, %xmm0 movaps 0x2d0(%rsp), %xmm7 mulps %xmm7, %xmm0 movaps %xmm9, %xmm1 movaps 0x2c0(%rsp), %xmm11 mulps %xmm11, %xmm1 movaps %xmm5, 0x50(%rsp) movaps 0x2a0(%rsp), %xmm6 mulps %xmm6, %xmm5 movaps %xmm15, %xmm14 mulps %xmm10, %xmm14 mulps %xmm6, %xmm11 subps %xmm0, %xmm11 movaps %xmm13, %xmm12 movaps %xmm13, 0x290(%rsp) movaps 0x2e0(%rsp), %xmm13 movaps %xmm13, %xmm2 mulps %xmm10, %xmm13 mulps %xmm12, %xmm10 subps %xmm5, %xmm10 movaps 0x1d7bd4e(%rip), %xmm12 # 0x1eec6c0 andps %xmm12, %xmm0 andps %xmm12, %xmm5 cmpltps %xmm5, %xmm0 blendvps %xmm0, %xmm11, %xmm10 movaps %xmm9, %xmm0 mulps 0x290(%rsp), %xmm0 mulps %xmm6, %xmm2 mulps %xmm6, %xmm15 mulps %xmm9, %xmm7 subps %xmm2, %xmm7 subps %xmm0, %xmm15 andps %xmm12, %xmm2 andps %xmm12, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm7, %xmm15 mulps 0x50(%rsp), %xmm9 subps %xmm1, %xmm13 subps %xmm14, %xmm9 andps %xmm12, %xmm1 andps %xmm12, %xmm14 cmpltps %xmm14, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm9 movaps 0x30(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x110(%rsp), %xmm0 mulps %xmm15, %xmm0 addps %xmm1, %xmm0 mulps %xmm10, %xmm8 addps %xmm0, %xmm8 addps %xmm8, %xmm8 movaps 0x2b0(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x2f0(%rsp), %xmm0 mulps %xmm15, %xmm0 addps %xmm1, %xmm0 movaps 0x80(%rsp), %xmm5 mulps %xmm10, %xmm5 addps %xmm0, %xmm5 rcpps %xmm8, %xmm0 movaps %xmm8, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d7bfd4(%rip), %xmm12 # 0x1eeca10 subps %xmm1, %xmm12 addps %xmm5, %xmm5 mulps %xmm0, %xmm12 addps %xmm0, %xmm12 mulps %xmm5, %xmm12 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm12, %xmm0 cmpleps %xmm1, %xmm0 movss 0x30(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cmpleps %xmm12, %xmm1 andps %xmm1, %xmm0 andps %xmm4, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17103c cmpneqps 0x1d7af81(%rip), %xmm8 # 0x1eeba10 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17103c movaps 0x260(%rsp), %xmm6 movaps %xmm6, 0x130(%rsp) movaps 0x280(%rsp), %xmm5 movaps %xmm5, 0x140(%rsp) movaps 0x270(%rsp), %xmm7 movaps %xmm7, 0x150(%rsp) leaq 0xf(%rsp), %rax movq %rax, 0x160(%rsp) movaps %xmm0, 0x170(%rsp) movaps %xmm12, 0x1a0(%rsp) movaps %xmm10, 0x1b0(%rsp) movaps %xmm15, 0x1c0(%rsp) movaps %xmm9, 0x1d0(%rsp) movaps %xmm0, 0x60(%rsp) rcpps %xmm7, %xmm1 mulps %xmm1, %xmm7 movaps 0x1d7bef7(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm2 subps %xmm7, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 cmpnltps 0x1d81213(%rip), %xmm3 # 0x1ef1d40 andps %xmm2, %xmm3 mulps %xmm3, %xmm6 minps %xmm4, %xmm6 movaps %xmm6, 0x180(%rsp) mulps %xmm5, %xmm3 minps %xmm4, %xmm3 movaps %xmm3, 0x190(%rsp) movaps 0x1d7ae9d(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm12, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 movaps %xmm1, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %eax pcmpeqd %xmm2, %xmm2 testl %eax, %eax je 0x170b85 movaps %xmm1, %xmm2 andps %xmm2, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r12 movq 0x48(%rsp), %rdx movl 0x300(%rsp,%r12,4), %eax movq 0x1e8(%rdx), %rcx movq (%rcx,%rax,8), %rbp movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%rbp) je 0x170ed6 movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x170bce cmpq $0x0, 0x40(%rbp) je 0x170f8a movss 0x180(%rsp,%r12,4), %xmm0 movss 0x190(%rsp,%r12,4), %xmm1 movss 0x1b0(%rsp,%r12,4), %xmm2 movss 0x1c0(%rsp,%r12,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x120(%rsp,%r12,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1d0(%rsp,%r12,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x310(%rsp) movaps %xmm3, 0x320(%rsp) movaps %xmm6, 0x330(%rsp) movaps %xmm0, 0x340(%rsp) movaps %xmm1, 0x350(%rsp) movdqa %xmm5, 0x360(%rsp) movdqa %xmm4, 0x370(%rsp) leaq 0x380(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x380(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x390(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x50(%rsp) movss 0x1a0(%rsp,%r12,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xa0(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x90(%rsp) leaq 0x90(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x18(%rbp), %rax movq %rax, 0xc8(%rsp) movq 0x8(%r10), %rax movq %rax, 0xd0(%rsp) movq %rbx, 0xd8(%rsp) leaq 0x310(%rsp), %rax movq %rax, 0xe0(%rsp) movl $0x4, 0xe8(%rsp) movq 0x40(%rbp), %rax testq %rax, %rax movq %r9, 0x78(%rsp) movaps %xmm12, 0x30(%rsp) je 0x170d73 leaq 0xc0(%rsp), %rdi movq %r11, 0x80(%rsp) callq *%rax movaps 0x30(%rsp), %xmm12 movq 0x48(%rsp), %rdx movq 0x78(%rsp), %r9 movq 0x10(%rsp), %r8 movq 0x80(%rsp), %r11 movq 0x1328(%rsp), %r10 movdqa 0x90(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x170f2f movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x170dcc testb $0x2, (%rcx) jne 0x170d9f testb $0x40, 0x3e(%rbp) je 0x170dcc leaq 0xc0(%rsp), %rdi movq %r11, %rbp callq *%rax movaps 0x30(%rsp), %xmm12 movq 0x48(%rsp), %rdx movq 0x78(%rsp), %r9 movq 0x10(%rsp), %r8 movq %rbp, %r11 movq 0x1328(%rsp), %r10 movdqa 0x90(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d7ac2e(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d7b032(%rip), %xmm1 # 0x1eebe20 movq 0x28(%rsp), %rbp je 0x170f44 movq 0xd8(%rsp), %rax movq 0xe0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x170f44 andl $0x0, 0x60(%rsp,%r12,4) movq 0x28(%rsp), %rbp movaps 0x60(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17103c movaps 0x1d7aaf8(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm12, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x170f23 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r12 jmp 0x170b94 pcmpeqd 0x1d7aad9(%rip), %xmm1 # 0x1eeba10 pxor 0x1d7aee1(%rip), %xmm1 # 0x1eebe20 movq 0x28(%rsp), %rbp ptest 0x1d7bbd3(%rip), %xmm1 # 0x1eecb20 jne 0x170f5f movd 0x50(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x60(%rsp,%r12,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm12, %xmm1 cmpleps %xmm0, %xmm1 andps 0x60(%rsp), %xmm1 movaps %xmm1, 0x60(%rsp) jmp 0x170ee1 movss 0x180(%rsp,%r12,4), %xmm0 movss 0x190(%rsp,%r12,4), %xmm1 movss 0x1a0(%rsp,%r12,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x1b0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1c0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1d0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x120(%rsp,%r12,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movq 0x28(%rsp), %rbp incq %r13 cmpq %r9, %r13 jne 0x170547 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x250(%rsp), %xmm8 movaps 0x240(%rsp), %xmm9 movaps 0x230(%rsp), %xmm10 movaps 0x220(%rsp), %xmm11 movaps 0x210(%rsp), %xmm12 movaps 0x200(%rsp), %xmm13 movaps 0x1f0(%rsp), %xmm14 movaps 0x1e0(%rsp), %xmm15 movaps 0x100(%rsp), %xmm6 movq 0xb0(%rsp), %r12 movq 0xa8(%rsp), %r13 movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdi movaps 0xf0(%rsp), %xmm7 jmp 0x170268 addq $0x12e8, %rsp # imm = 0x12E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiIntersectorKPluecker<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb38, %rsp # imm = 0xB38 movq 0xb78(%rsp), %r10 movq 0xb70(%rsp), %rax leaq 0x398(%rsp), %r11 movq %rdx, -0x8(%r11) movss (%rax,%rcx,4), %xmm14 movss 0x10(%rax,%rcx,4), %xmm5 movss 0x20(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x220(%rsp) movss 0x60(%rax,%rcx,4), %xmm1 movss 0x70(%rax,%rcx,4), %xmm2 movss 0x80(%rax,%rcx,4), %xmm3 movss 0x1dadc15(%rip), %xmm0 # 0x1f1ff10 movaps %xmm1, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x1d0(%rsp) movaps %xmm2, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x1c0(%rsp) mulss %xmm3, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1e0(%rsp) movss 0x1dadbdb(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, 0x210(%rsp) mulss %xmm0, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm2, 0x200(%rsp) mulss %xmm0, %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, 0x1f0(%rsp) movslq 0x90(%rax,%rcx,4), %rdi movslq 0xa0(%rax,%rcx,4), %r8 movslq 0xb0(%rax,%rcx,4), %r15 movq %rdi, %r13 xorq $0x10, %r13 movq %r8, %rbp xorq $0x10, %rbp movq %r15, %rsi xorq $0x10, %rsi movss 0xc0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1b0(%rsp) movss 0xd0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1a0(%rsp) pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fb235e(%rip), %rax # 0x2124730 movq %rax, 0xc0(%rsp) movaps %xmm14, 0x70(%rsp) movaps %xmm5, 0x80(%rsp) movq %rdi, 0x68(%rsp) movq %r8, 0x60(%rsp) movq %r15, 0x58(%rsp) movq %r13, 0x50(%rsp) movq %rbp, 0x48(%rsp) movq %rsi, 0x8(%rsp) movq %r11, %rdx leaq 0x390(%rsp), %rax cmpq %rax, %r11 je 0x172efb leaq -0x8(%rdx), %r11 movq %rdx, 0xd8(%rsp) movq -0x8(%rdx), %r12 testb $0x8, %r12b jne 0x1724c7 movaps 0x20(%r12,%rdi), %xmm0 subps %xmm14, %xmm0 mulps 0x1d0(%rsp), %xmm0 movaps 0x20(%r12,%r8), %xmm1 subps %xmm5, %xmm1 mulps 0x1c0(%rsp), %xmm1 maxps %xmm1, %xmm0 movaps 0x20(%r12,%r15), %xmm1 movaps 0x220(%rsp), %xmm3 subps %xmm3, %xmm1 mulps 0x1e0(%rsp), %xmm1 maxps 0x1b0(%rsp), %xmm1 maxps %xmm1, %xmm0 movaps 0x20(%r12,%r13), %xmm1 subps %xmm14, %xmm1 mulps 0x210(%rsp), %xmm1 movaps 0x20(%r12,%rbp), %xmm2 subps %xmm5, %xmm2 mulps 0x200(%rsp), %xmm2 minps %xmm2, %xmm1 movaps 0x20(%r12,%rsi), %xmm2 subps %xmm3, %xmm2 mulps 0x1f0(%rsp), %xmm2 minps 0x1a0(%rsp), %xmm2 minps %xmm2, %xmm1 cmpleps %xmm1, %xmm0 movmskps %xmm0, %ebx testb $0x8, %r12b jne 0x1724ff testq %rbx, %rbx je 0x172503 andq $-0x10, %r12 bsfq %rbx, %rax leaq -0x1(%rbx), %rdx xorl %r14d, %r14d movq (%r12,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %rbx, %rdx jne 0x172509 movq %rax, %r12 testl %r14d, %r14d je 0x17242a jmp 0x172543 pushq $0x6 jmp 0x172505 pushq $0x4 popq %r14 jmp 0x1724f4 movq %rax, (%r11) addq $0x8, %r11 bsfq %rdx, %rsi leaq -0x1(%rdx), %rax movq (%r12,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) andq %rdx, %rax je 0x172539 movq %rsi, (%r11) addq $0x8, %r11 bsfq %rax, %rsi leaq -0x1(%rax), %rdx jmp 0x172518 movq %rsi, %r12 movq 0x8(%rsp), %rsi jmp 0x1724f4 cmpl $0x6, %r14d jne 0x172ee9 movl %r12d, %eax andl $0xf, %eax xorl %r14d, %r14d addq $-0x8, %rax setne 0x6(%rsp) je 0x172ee9 andq $-0x10, %r12 xorl %edx, %edx movq %rax, 0xc8(%rsp) movq %rdx, 0xd0(%rsp) imulq $0x50, %rdx, %rax movq (%r10), %r15 movl 0x30(%r12,%rax), %edx movq 0x228(%r15), %r8 movq (%r8,%rdx,8), %rdx movl (%r12,%rax), %esi movl 0x4(%r12,%rax), %edi movups (%rdx,%rsi,4), %xmm15 movl 0x10(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm11 movl 0x20(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm0 movl 0x34(%r12,%rax), %edx movq (%r8,%rdx,8), %rdx movups (%rdx,%rdi,4), %xmm2 movl 0x14(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm3 movl 0x24(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm6 movl 0x38(%r12,%rax), %edx movq (%r8,%rdx,8), %rdx movl 0x8(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm5 movl 0x18(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm4 movl 0x28(%r12,%rax), %esi movups (%rdx,%rsi,4), %xmm7 movl 0x3c(%r12,%rax), %edx movq (%r8,%rdx,8), %rsi movl 0xc(%r12,%rax), %edx movups (%rsi,%rdx,4), %xmm9 movl 0x1c(%r12,%rax), %edx movups (%rsi,%rdx,4), %xmm10 movl 0x2c(%r12,%rax), %edx movups (%rsi,%rdx,4), %xmm8 movq 0x8(%rsp), %rsi movaps %xmm15, %xmm13 unpcklps %xmm5, %xmm13 # xmm13 = xmm13[0],xmm5[0],xmm13[1],xmm5[1] unpckhps %xmm5, %xmm15 # xmm15 = xmm15[2],xmm5[2],xmm15[3],xmm5[3] movaps %xmm2, %xmm5 unpcklps %xmm9, %xmm5 # xmm5 = xmm5[0],xmm9[0],xmm5[1],xmm9[1] unpckhps %xmm9, %xmm2 # xmm2 = xmm2[2],xmm9[2],xmm2[3],xmm9[3] unpcklps %xmm2, %xmm15 # xmm15 = xmm15[0],xmm2[0],xmm15[1],xmm2[1] movaps %xmm13, %xmm1 unpcklps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1] movaps %xmm1, %xmm12 unpckhps %xmm5, %xmm13 # xmm13 = xmm13[2],xmm5[2],xmm13[3],xmm5[3] movaps %xmm11, %xmm9 movaps %xmm11, %xmm2 unpcklps %xmm4, %xmm2 # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1] unpckhps %xmm4, %xmm9 # xmm9 = xmm9[2],xmm4[2],xmm9[3],xmm4[3] movaps %xmm3, %xmm5 unpcklps %xmm10, %xmm5 # xmm5 = xmm5[0],xmm10[0],xmm5[1],xmm10[1] unpckhps %xmm10, %xmm3 # xmm3 = xmm3[2],xmm10[2],xmm3[3],xmm10[3] unpcklps %xmm3, %xmm9 # xmm9 = xmm9[0],xmm3[0],xmm9[1],xmm3[1] movaps %xmm2, %xmm1 unpcklps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1] unpckhps %xmm5, %xmm2 # xmm2 = xmm2[2],xmm5[2],xmm2[3],xmm5[3] movaps %xmm0, %xmm3 unpcklps %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[0],xmm3[1],xmm7[1] unpckhps %xmm7, %xmm0 # xmm0 = xmm0[2],xmm7[2],xmm0[3],xmm7[3] movaps %xmm6, %xmm5 unpcklps %xmm8, %xmm5 # xmm5 = xmm5[0],xmm8[0],xmm5[1],xmm8[1] unpckhps %xmm8, %xmm6 # xmm6 = xmm6[2],xmm8[2],xmm6[3],xmm8[3] unpcklps %xmm6, %xmm0 # xmm0 = xmm0[0],xmm6[0],xmm0[1],xmm6[1] movaps %xmm3, %xmm11 unpcklps %xmm5, %xmm11 # xmm11 = xmm11[0],xmm5[0],xmm11[1],xmm5[1] unpckhps %xmm5, %xmm3 # xmm3 = xmm3[2],xmm5[2],xmm3[3],xmm5[3] movaps 0x30(%r12,%rax), %xmm5 movaps %xmm5, 0x240(%rsp) movaps 0x40(%r12,%rax), %xmm5 movaps %xmm5, 0x230(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x280(%rsp) movss (%r9,%rcx,4), %xmm6 movss 0x10(%r9,%rcx,4), %xmm7 movss 0x20(%r9,%rcx,4), %xmm5 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm6, %xmm12 subps %xmm7, %xmm13 subps %xmm5, %xmm15 subps %xmm6, %xmm1 movaps %xmm1, 0xa0(%rsp) subps %xmm7, %xmm2 subps %xmm5, %xmm9 movaps %xmm9, 0x10(%rsp) subps %xmm6, %xmm11 subps %xmm7, %xmm3 subps %xmm5, %xmm0 movaps %xmm11, %xmm9 subps %xmm12, %xmm9 movaps %xmm12, %xmm1 movaps %xmm3, %xmm14 subps %xmm13, %xmm14 movaps %xmm0, %xmm10 subps %xmm15, %xmm10 movaps %xmm3, %xmm5 addps %xmm13, %xmm5 movaps %xmm0, %xmm7 addps %xmm15, %xmm7 movaps %xmm9, %xmm8 mulps %xmm5, %xmm8 mulps %xmm10, %xmm5 movaps %xmm14, %xmm6 mulps %xmm7, %xmm6 subps %xmm5, %xmm6 movaps %xmm11, %xmm5 addps %xmm12, %xmm5 movaps %xmm12, 0xe0(%rsp) movaps %xmm9, 0x180(%rsp) mulps %xmm9, %xmm7 movaps %xmm5, %xmm9 movaps %xmm10, 0x170(%rsp) mulps %xmm10, %xmm9 subps %xmm7, %xmm9 movaps %xmm14, 0x90(%rsp) mulps %xmm14, %xmm5 subps %xmm5, %xmm8 movss 0x50(%r9,%rcx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm5, 0x20(%rsp) movss 0x60(%r9,%rcx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm4, %xmm8 mulps %xmm5, %xmm9 addps %xmm8, %xmm9 movss 0x40(%r9,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm12, %xmm6 addps %xmm9, %xmm6 movaps %xmm1, %xmm9 movaps 0xa0(%rsp), %xmm8 subps %xmm8, %xmm9 movaps %xmm13, %xmm10 subps %xmm2, %xmm10 movaps %xmm15, %xmm1 movaps 0x10(%rsp), %xmm7 subps %xmm7, %xmm1 movaps %xmm13, 0x190(%rsp) movaps %xmm13, %xmm5 addps %xmm2, %xmm5 movaps %xmm15, 0x160(%rsp) movaps %xmm15, %xmm13 addps %xmm7, %xmm13 movaps %xmm9, %xmm14 mulps %xmm5, %xmm14 mulps %xmm1, %xmm5 movaps %xmm10, %xmm7 mulps %xmm13, %xmm7 subps %xmm5, %xmm7 movaps 0xe0(%rsp), %xmm5 addps %xmm8, %xmm5 mulps %xmm9, %xmm13 movaps %xmm5, %xmm15 movaps %xmm1, 0x150(%rsp) mulps %xmm1, %xmm15 subps %xmm13, %xmm15 mulps %xmm10, %xmm5 subps %xmm5, %xmm14 movaps 0x80(%rsp), %xmm5 mulps %xmm4, %xmm14 mulps 0x20(%rsp), %xmm15 addps %xmm14, %xmm15 movaps 0x70(%rsp), %xmm14 mulps %xmm12, %xmm7 addps %xmm15, %xmm7 movaps %xmm8, %xmm15 subps %xmm11, %xmm15 addps %xmm8, %xmm11 movaps %xmm2, %xmm13 subps %xmm3, %xmm13 addps %xmm2, %xmm3 movaps 0x10(%rsp), %xmm1 movaps %xmm1, %xmm8 subps %xmm0, %xmm8 addps %xmm1, %xmm0 movaps %xmm15, %xmm2 mulps %xmm3, %xmm2 mulps %xmm8, %xmm3 movaps %xmm13, %xmm1 mulps %xmm0, %xmm1 subps %xmm3, %xmm1 mulps %xmm15, %xmm0 movaps %xmm11, %xmm3 movaps %xmm8, 0x10(%rsp) mulps %xmm8, %xmm3 subps %xmm0, %xmm3 mulps %xmm13, %xmm11 subps %xmm11, %xmm2 movaps %xmm4, 0xa0(%rsp) mulps %xmm4, %xmm2 mulps 0x20(%rsp), %xmm3 addps %xmm2, %xmm3 mulps %xmm12, %xmm1 addps %xmm3, %xmm1 movaps %xmm6, %xmm3 addps %xmm7, %xmm3 addps %xmm1, %xmm3 movaps %xmm6, %xmm0 minps %xmm7, %xmm0 minps %xmm1, %xmm0 movaps %xmm6, 0x120(%rsp) movaps %xmm6, %xmm4 movaps %xmm7, 0x140(%rsp) maxps %xmm7, %xmm4 maxps %xmm1, %xmm4 movaps %xmm3, 0x130(%rsp) andps 0x1d79d9c(%rip), %xmm3 # 0x1eec6c0 movaps %xmm3, %xmm1 mulps 0x1d7f442(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm4 xorps 0x1d79d97(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm4 movmskps %xmm4, %eax testl %eax, %eax je 0x172e7d movaps %xmm12, %xmm8 movaps %xmm10, %xmm0 movaps 0x170(%rsp), %xmm7 mulps %xmm7, %xmm0 movaps %xmm9, %xmm1 movaps 0x90(%rsp), %xmm11 mulps %xmm11, %xmm1 movaps %xmm13, %xmm5 movaps 0x150(%rsp), %xmm6 mulps %xmm6, %xmm5 movaps %xmm15, %xmm14 mulps %xmm10, %xmm14 mulps %xmm6, %xmm11 subps %xmm0, %xmm11 movaps %xmm13, 0x90(%rsp) movaps 0x180(%rsp), %xmm13 movaps %xmm13, %xmm2 mulps %xmm10, %xmm13 mulps 0x10(%rsp), %xmm10 subps %xmm5, %xmm10 movaps 0x1d79d06(%rip), %xmm12 # 0x1eec6c0 andps %xmm12, %xmm0 andps %xmm12, %xmm5 cmpltps %xmm5, %xmm0 movaps 0x80(%rsp), %xmm5 blendvps %xmm0, %xmm11, %xmm10 movaps %xmm9, %xmm0 mulps 0x10(%rsp), %xmm0 mulps %xmm6, %xmm2 mulps %xmm6, %xmm15 mulps %xmm9, %xmm7 subps %xmm2, %xmm7 subps %xmm0, %xmm15 andps %xmm12, %xmm2 andps %xmm12, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm7, %xmm15 mulps 0x90(%rsp), %xmm9 subps %xmm1, %xmm13 subps %xmm14, %xmm9 andps %xmm12, %xmm1 andps %xmm12, %xmm14 movaps 0x1d79feb(%rip), %xmm12 # 0x1eeca10 cmpltps %xmm14, %xmm1 movaps 0x70(%rsp), %xmm14 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm9 movaps 0xa0(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x20(%rsp), %xmm0 mulps %xmm15, %xmm0 addps %xmm1, %xmm0 mulps %xmm10, %xmm8 addps %xmm0, %xmm8 addps %xmm8, %xmm8 movaps 0x160(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x190(%rsp), %xmm0 mulps %xmm15, %xmm0 addps %xmm1, %xmm0 movaps 0xe0(%rsp), %xmm13 mulps %xmm10, %xmm13 addps %xmm0, %xmm13 rcpps %xmm8, %xmm1 movaps %xmm8, %xmm2 mulps %xmm1, %xmm2 movaps %xmm12, %xmm0 subps %xmm2, %xmm0 addps %xmm13, %xmm13 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm13, %xmm0 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm4, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x172e7d cmpneqps 0x1d78f29(%rip), %xmm8 # 0x1eeba10 andps %xmm8, %xmm1 movmskps %xmm1, %ebp testl %ebp, %ebp je 0x172e7d movq %r15, %rdi movaps 0x120(%rsp), %xmm6 movaps %xmm6, 0x250(%rsp) movaps 0x140(%rsp), %xmm2 movaps %xmm2, 0x260(%rsp) movaps 0x130(%rsp), %xmm4 movaps %xmm4, 0x270(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x280(%rsp) movaps %xmm1, 0x290(%rsp) movaps %xmm0, 0x2c0(%rsp) movaps %xmm10, 0x2d0(%rsp) movaps %xmm15, 0x2e0(%rsp) movaps %xmm9, 0x2f0(%rsp) rcpps %xmm4, %xmm0 mulps %xmm0, %xmm4 movaps %xmm12, %xmm1 subps %xmm4, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 cmpnltps 0x1d7f1c4(%rip), %xmm3 # 0x1ef1d40 andps %xmm1, %xmm3 mulps %xmm3, %xmm6 minps %xmm12, %xmm6 movaps %xmm6, 0x2a0(%rsp) mulps %xmm2, %xmm3 minps %xmm12, %xmm3 movaps %xmm3, 0x2b0(%rsp) bsfq %rbp, %r15 movl 0x240(%rsp,%r15,4), %edx movq 0x1e8(%rdi), %rax movq (%rax,%rdx,8), %r13 movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%r13) je 0x172bd8 movq 0x10(%r10), %rax cmpq $0x0, 0x10(%rax) jne 0x172bf0 cmpq $0x0, 0x48(%r13) jne 0x172bf0 xorl %eax, %eax jmp 0x172bde btcq %r15, %rbp movb $0x1, %al testb %al, %al je 0x172eb9 testq %rbp, %rbp jne 0x172b9d jmp 0x172e7d movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x20(%rsp) movss 0x2c0(%rsp,%r15,4), %xmm0 movss 0x2a0(%rsp,%r15,4), %xmm1 movss 0x2b0(%rsp,%r15,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0x8(%r10), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x230(%rsp,%r15,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x2d0(%rsp,%r15,4), %xmm4 movss 0x2e0(%rsp,%r15,4), %xmm5 movss 0x2f0(%rsp,%r15,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x300(%rsp) movaps %xmm5, 0x310(%rsp) movaps %xmm6, 0x320(%rsp) movaps %xmm1, 0x330(%rsp) movaps %xmm2, 0x340(%rsp) movdqa %xmm3, 0x350(%rsp) movdqa %xmm0, 0x360(%rsp) leaq 0x370(%rsp), %rdx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rdx) movdqa %xmm0, (%rdx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x370(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x380(%rsp) movq 0xc0(%rsp), %rdx movdqa (%rdx), %xmm0 movdqa %xmm0, 0xb0(%rsp) leaq 0xb0(%rsp), %rdx movq %rdx, 0xf0(%rsp) movq 0x18(%r13), %rdx movq %rdx, 0xf8(%rsp) movq %rax, 0x100(%rsp) movq %r9, 0x108(%rsp) leaq 0x300(%rsp), %rax movq %rax, 0x110(%rsp) movl $0x4, 0x118(%rsp) movq 0x48(%r13), %rax testq %rax, %rax movq %r9, 0x40(%rsp) movq %r11, 0x38(%rsp) movq %rdi, 0x30(%rsp) je 0x172d94 leaq 0xf0(%rsp), %rdi movq %rcx, 0x10(%rsp) callq *%rax movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x38(%rsp), %r11 movaps 0x70(%rsp), %xmm14 movq 0xb78(%rsp), %r10 movq 0x10(%rsp), %rcx movq 0x40(%rsp), %r9 movdqa 0xb0(%rsp), %xmm1 ptest %xmm1, %xmm1 movaps 0x80(%rsp), %xmm5 je 0x172e41 movq 0x10(%r10), %rdx movq 0x10(%rdx), %rax testq %rax, %rax je 0x172e03 testb $0x2, (%rdx) jne 0x172dc9 testb $0x40, 0x3e(%r13) je 0x172e03 leaq 0xf0(%rsp), %rdi movq %rcx, %r13 callq *%rax movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x38(%rsp), %r11 movaps 0x80(%rsp), %xmm5 movaps 0x70(%rsp), %xmm14 movq 0xb78(%rsp), %r10 movq %r13, %rcx movq 0x40(%rsp), %r9 movdqa 0xb0(%rsp), %xmm0 pcmpeqd 0x1d78bfc(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d79000(%rip), %xmm1 # 0x1eebe20 movq 0x108(%rsp), %rax movaps 0x1d78bd1(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x172e51 pcmpeqd 0x1d78bc7(%rip), %xmm1 # 0x1eeba10 pxor 0x1d78fcf(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x172bde movss 0x20(%rsp), %xmm0 movss %xmm0, 0x80(%r9,%rcx,4) btcq %r15, %rbp jmp 0x172bde movq 0xd0(%rsp), %rdx incq %rdx movq 0xc8(%rsp), %rax cmpq %rax, %rdx setb 0x6(%rsp) jne 0x172573 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %r8 movq 0x58(%rsp), %r15 movq 0x50(%rsp), %r13 movq 0x48(%rsp), %rbp jmp 0x172ee9 testb $0x1, 0x6(%rsp) movq 0x68(%rsp), %rdi movq 0x60(%rsp), %r8 movq 0x58(%rsp), %r15 movq 0x50(%rsp), %r13 movq 0x48(%rsp), %rbp je 0x172ee9 movl $0xff800000, 0x80(%r9,%rcx,4) # imm = 0xFF800000 pushq $0x1 popq %r14 testb $0x3, %r14b movq 0xd8(%rsp), %rdx je 0x172406 leaq 0x390(%rsp), %rax cmpq %rax, %rdx setne %al addq $0xb38, %rsp # imm = 0xB38 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMvMBIntersectorKMoeller<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x11e8, %rsp # imm = 0x11E8 movq %r9, %rbx movq %rcx, %r14 movq 0x1220(%rsp), %rax leaq 0x2b0(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rsi movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r9 movq %rsi, %r10 xorq $0x10, %r10 movq %rdi, %r15 xorq $0x10, %r15 movq %r9, %r12 xorq $0x10, %r12 movss 0xc0(%rax,%rcx,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0xd0(%rax,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fb173f(%rip), %rax # 0x2124730 movq %rax, 0x98(%rsp) movq %r15, 0x18(%rsp) movq %r12, 0x10(%rsp) movaps %xmm8, 0x200(%rsp) movaps %xmm9, 0x1f0(%rsp) movaps %xmm10, 0x1e0(%rsp) movaps %xmm11, 0x1d0(%rsp) movaps %xmm12, 0x1c0(%rsp) movaps %xmm13, 0x1b0(%rsp) movq %r10, 0x8(%rsp) movaps %xmm14, 0x1a0(%rsp) leaq 0x2a0(%rsp), %rax cmpq %rax, %r11 je 0x173c94 movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x173047 movq (%r11), %rbp testb $0x8, %bpl jne 0x17315f movq %rbp, %rax andq $-0x10, %rax movss 0x70(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%rsi), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rsi), %xmm3 subps %xmm8, %xmm3 mulps %xmm11, %xmm3 movaps %xmm14, %xmm2 movaps 0x80(%rax,%rdi), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rdi), %xmm4 maxps %xmm3, %xmm2 subps %xmm9, %xmm4 mulps %xmm12, %xmm4 movaps 0x80(%rax,%r9), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r9), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 maxps %xmm3, %xmm4 maxps %xmm4, %xmm2 movaps 0x80(%rax,%r10), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%r10), %xmm4 subps %xmm8, %xmm4 movaps 0x80(%rax,%r15), %xmm5 mulps %xmm0, %xmm5 addps 0x20(%rax,%r15), %xmm5 mulps %xmm11, %xmm4 subps %xmm9, %xmm5 mulps %xmm12, %xmm5 movaps 0x80(%rax,%r12), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r12), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm3, %xmm5 movaps %xmm1, %xmm3 minps %xmm4, %xmm3 minps %xmm5, %xmm3 movl %ebp, %ecx andl $0x7, %ecx cmpl $0x6, %ecx je 0x1731ab movaps %xmm2, %xmm0 cmpleps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %r13d movaps %xmm2, 0xd0(%rsp) testb $0x8, %bpl jne 0x1731a7 testq %r13, %r13 je 0x1731cd andq $-0x10, %rbp bsfq %r13, %rcx leaq -0x1(%r13), %r8 xorl %eax, %eax movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) andq %r13, %r8 jne 0x1731d2 movq %rdx, %rbp testl %eax, %eax je 0x173070 jmp 0x1733d0 pushq $0x6 jmp 0x1731cf movaps %xmm2, %xmm4 cmpleps %xmm3, %xmm4 movaps 0xe0(%rax), %xmm3 cmpleps %xmm0, %xmm3 cmpltps 0xf0(%rax), %xmm0 andps %xmm3, %xmm0 andps %xmm4, %xmm0 jmp 0x17314e pushq $0x4 popq %rax jmp 0x17319a movq %r9, %r10 movq %rdi, %r12 movq %rsi, %r15 movl 0xd0(%rsp,%rcx,4), %edi bsfq %r8, %r9 leaq -0x1(%r8), %rcx movq (%rbp,%r9,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) prefetcht0 0x80(%rsi) prefetcht0 0xc0(%rsi) movl 0xd0(%rsp,%r9,4), %r9d andq %r8, %rcx jne 0x173253 leaq 0x10(%r11), %rcx cmpl %r9d, %edi jae 0x173229 movq %rsi, (%r11) movl %r9d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %rbp jmp 0x173236 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %rbp movq %r15, %rsi movq %r12, %rdi movq %r10, %r9 movq 0x8(%rsp), %r10 movq 0x18(%rsp), %r15 movq 0x10(%rsp), %r12 jmp 0x17319a movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm4 movd %r9d, %xmm0 punpcklqdq %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%rbp,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) prefetcht0 0x80(%rdi) prefetcht0 0xc0(%rdi) movq %rdi, %xmm3 movd 0xd0(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x17330b pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 blendvps %xmm0, %xmm4, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm3, %xmm5 movaps %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm4, %rbp addq $0x20, %r11 jmp 0x173236 bsfq %rdx, %rcx movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 movd 0xd0(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm4, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm4 blendvps %xmm0, %xmm3, %xmm4 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm4, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm5 movaps %xmm6, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm6, %xmm5 movaps %xmm2, (%r11) movaps %xmm5, 0x10(%r11) movaps %xmm4, 0x20(%r11) movq %xmm3, %rbp addq $0x30, %r11 jmp 0x173236 cmpl $0x6, %eax jne 0x173047 movl %ebp, %edx andl $0xf, %edx addq $-0x8, %rdx je 0x173c38 andq $-0x10, %rbp xorl %r12d, %r12d imulq $0x140, %r12, %r15 # imm = 0x140 movss 0x70(%rbx,%r14,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps 0x90(%rbp,%r15), %xmm3 mulps %xmm6, %xmm3 addps (%rbp,%r15), %xmm3 movaps 0xa0(%rbp,%r15), %xmm2 mulps %xmm6, %xmm2 addps 0x10(%rbp,%r15), %xmm2 movaps 0xb0(%rbp,%r15), %xmm0 mulps %xmm6, %xmm0 addps 0x20(%rbp,%r15), %xmm0 movaps 0xc0(%rbp,%r15), %xmm4 mulps %xmm6, %xmm4 addps 0x30(%rbp,%r15), %xmm4 movaps 0xd0(%rbp,%r15), %xmm5 mulps %xmm6, %xmm5 addps 0x40(%rbp,%r15), %xmm5 movaps 0xe0(%rbp,%r15), %xmm9 mulps %xmm6, %xmm9 addps 0x50(%rbp,%r15), %xmm9 movaps 0xf0(%rbp,%r15), %xmm1 mulps %xmm6, %xmm1 addps 0x60(%rbp,%r15), %xmm1 movaps 0x100(%rbp,%r15), %xmm7 mulps %xmm6, %xmm7 addps 0x70(%rbp,%r15), %xmm7 mulps 0x110(%rbp,%r15), %xmm6 addps 0x80(%rbp,%r15), %xmm6 movaps %xmm3, %xmm8 subps %xmm4, %xmm8 movaps %xmm2, %xmm10 subps %xmm5, %xmm10 movaps %xmm0, %xmm11 subps %xmm9, %xmm11 subps %xmm3, %xmm1 subps %xmm2, %xmm7 subps %xmm0, %xmm6 movaps %xmm10, %xmm5 mulps %xmm6, %xmm5 movaps %xmm11, %xmm4 mulps %xmm7, %xmm4 subps %xmm5, %xmm4 movaps %xmm8, %xmm5 mulps %xmm6, %xmm5 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm3 subps %xmm14, %xmm2 movaps %xmm2, %xmm14 mulps %xmm9, %xmm14 movaps %xmm3, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm6 mulps %xmm11, %xmm13 mulps %xmm1, %xmm11 subps %xmm11, %xmm5 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm0 movaps %xmm3, 0x30(%rsp) movaps %xmm3, %xmm11 mulps %xmm14, %xmm11 movaps %xmm0, %xmm15 mulps %xmm9, %xmm15 subps %xmm11, %xmm15 movaps %xmm8, %xmm11 mulps %xmm7, %xmm11 mulps %xmm15, %xmm7 mulps %xmm10, %xmm15 mulps %xmm1, %xmm10 subps %xmm11, %xmm10 movaps %xmm0, %xmm3 mulps %xmm12, %xmm3 movaps %xmm2, %xmm11 mulps %xmm14, %xmm11 subps %xmm3, %xmm11 mulps %xmm10, %xmm14 mulps %xmm5, %xmm12 addps %xmm14, %xmm12 mulps %xmm4, %xmm9 addps %xmm12, %xmm9 addps %xmm6, %xmm7 mulps %xmm11, %xmm1 addps %xmm7, %xmm1 addps %xmm13, %xmm15 movaps %xmm9, %xmm6 andps 0x1d7910b(%rip), %xmm6 # 0x1eec6d0 xorps %xmm6, %xmm1 mulps %xmm8, %xmm11 addps %xmm15, %xmm11 xorps %xmm6, %xmm11 movaps %xmm1, %xmm3 xorps %xmm8, %xmm8 cmpnltps %xmm8, %xmm3 movaps %xmm11, %xmm12 cmpnltps %xmm8, %xmm12 andps %xmm3, %xmm12 movaps %xmm9, %xmm7 andps 0x1d790c8(%rip), %xmm7 # 0x1eec6c0 cmpneqps %xmm8, %xmm9 andps %xmm9, %xmm12 movaps %xmm1, %xmm8 addps %xmm11, %xmm8 cmpleps %xmm7, %xmm8 andps %xmm12, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x17362b incq %r12 cmpq %rdx, %r12 jne 0x1733ef jmp 0x173c38 mulps %xmm10, %xmm0 mulps %xmm5, %xmm2 addps %xmm0, %xmm2 movaps 0x30(%rsp), %xmm0 mulps %xmm4, %xmm0 addps %xmm2, %xmm0 xorps %xmm0, %xmm6 movss 0x30(%rbx,%r14,4), %xmm2 movss 0x80(%rbx,%r14,4), %xmm3 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm7, %xmm2 cmpltps %xmm6, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm7, %xmm3 movaps %xmm6, %xmm0 cmpleps %xmm3, %xmm0 andps %xmm2, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17361a movaps %xmm1, 0xd0(%rsp) movaps %xmm11, 0xe0(%rsp) movaps %xmm6, 0xf0(%rsp) movaps %xmm7, 0x100(%rsp) movaps %xmm0, 0x120(%rsp) movaps %xmm4, 0x160(%rsp) movaps %xmm5, 0x170(%rsp) movaps %xmm10, 0x180(%rsp) movq 0x1228(%rsp), %rax movq (%rax), %rcx movaps %xmm0, 0x40(%rsp) rcpps %xmm7, %xmm1 mulps %xmm1, %xmm7 movaps 0x1d79336(%rip), %xmm2 # 0x1eeca10 subps %xmm7, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 movaps 0xf0(%rsp), %xmm4 mulps %xmm2, %xmm4 movaps %xmm4, 0x150(%rsp) movaps 0xd0(%rsp), %xmm1 mulps %xmm2, %xmm1 movaps %xmm1, 0x130(%rsp) mulps 0xe0(%rsp), %xmm2 movaps %xmm2, 0x140(%rsp) movaps 0x1d782d0(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 movaps %xmm1, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %eax pcmpeqd %xmm2, %xmm2 testl %eax, %eax je 0x173751 movaps %xmm1, %xmm2 addq %rbp, %r15 andps %xmm2, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r8 movq %rcx, 0x90(%rsp) movl 0x120(%r15,%r8,4), %eax movq 0x1e8(%rcx), %rcx movq %rax, 0x20(%rsp) movq (%rcx,%rax,8), %rax movl 0x90(%rbx,%r14,4), %ecx movq %rax, 0x30(%rsp) testl %ecx, 0x34(%rax) je 0x173a9a movq %r8, 0x28(%rsp) movq 0x1228(%rsp), %rcx movq 0x10(%rcx), %rcx cmpq $0x0, 0x10(%rcx) jne 0x1737bc movq 0x30(%rsp), %rcx cmpq $0x0, 0x40(%rcx) je 0x173b7a movaps %xmm4, 0x190(%rsp) movq %rdx, 0x68(%rsp) movq %r9, 0x70(%rsp) movq %rdi, 0x78(%rsp) movq %rsi, 0x80(%rsp) movq %r11, 0x88(%rsp) movq 0x28(%rsp), %rsi movss 0x130(%rsp,%rsi,4), %xmm0 movss 0x140(%rsp,%rsi,4), %xmm1 movss 0x160(%rsp,%rsi,4), %xmm2 movss 0x170(%rsp,%rsi,4), %xmm3 movq 0x1228(%rsp), %rdx movq 0x8(%rdx), %rcx movd 0x20(%rsp), %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x130(%r15,%rsi,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x180(%rsp,%rsi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x210(%rsp) movaps %xmm3, 0x220(%rsp) movaps %xmm6, 0x230(%rsp) movaps %xmm0, 0x240(%rsp) movaps %xmm1, 0x250(%rsp) movdqa %xmm5, 0x260(%rsp) movdqa %xmm4, 0x270(%rsp) leaq 0x280(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x280(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x290(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x20(%rsp) movss 0x150(%rsp,%rsi,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x98(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x50(%rsp) leaq 0x50(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x30(%rsp), %rcx movq 0x18(%rcx), %rax movq %rax, 0xa8(%rsp) movq 0x8(%rdx), %rax movq %rax, 0xb0(%rsp) movq %rbx, 0xb8(%rsp) leaq 0x210(%rsp), %rax movq %rax, 0xc0(%rsp) movl $0x4, 0xc8(%rsp) movq 0x40(%rcx), %rax testq %rax, %rax je 0x173958 leaq 0xa0(%rsp), %rdi callq *%rax movdqa 0x50(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x173af5 movq 0x1228(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x173998 testb $0x2, (%rcx) jne 0x17398e movq 0x30(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x173998 leaq 0xa0(%rsp), %rdi callq *%rax movdqa 0x50(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d78065(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d78469(%rip), %xmm1 # 0x1eebe20 je 0x173b05 movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x173b05 andl $0x0, 0x40(%rsp,%r8,4) movaps 0x40(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x90(%rsp), %rcx je 0x17361a movaps 0x1d77f31(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x173ae9 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r8 jmp 0x173766 pcmpeqd 0x1d77f13(%rip), %xmm1 # 0x1eeba10 pxor 0x1d7831b(%rip), %xmm1 # 0x1eebe20 ptest 0x1d79012(%rip), %xmm1 # 0x1eecb20 jne 0x173b20 movd 0x20(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x28(%rsp), %rax andl $0x0, 0x40(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x190(%rsp), %xmm4 movaps %xmm4, %xmm1 cmpleps %xmm0, %xmm1 andps 0x40(%rsp), %xmm1 movaps %xmm1, 0x40(%rsp) movq 0x88(%rsp), %r11 movq 0x80(%rsp), %rsi movq 0x78(%rsp), %rdi movq 0x70(%rsp), %r9 movq 0x8(%rsp), %r10 movq 0x68(%rsp), %rdx jmp 0x173aa0 movq 0x28(%rsp), %rcx movss 0x130(%rsp,%rcx,4), %xmm0 movss 0x140(%rsp,%rcx,4), %xmm1 movss 0x150(%rsp,%rcx,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x160(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x170(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x180(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x130(%r15,%rcx,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movq 0x20(%rsp), %rax movl %eax, 0x120(%rbx,%r14,4) movq 0x1228(%rsp), %rcx movq 0x8(%rcx), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%rcx), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) jmp 0x17361a movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x200(%rsp), %xmm8 movaps 0x1f0(%rsp), %xmm9 movaps 0x1e0(%rsp), %xmm10 movaps 0x1d0(%rsp), %xmm11 movaps 0x1c0(%rsp), %xmm12 movaps 0x1b0(%rsp), %xmm13 movq 0x18(%rsp), %r15 movq 0x10(%rsp), %r12 movaps 0x1a0(%rsp), %xmm14 jmp 0x173047 addq $0x11e8, %rsp # imm = 0x11E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMvMBIntersectorKMoeller<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa58, %rsp # imm = 0xA58 movq %r9, %rbx movq %rcx, %r14 movq 0xa98(%rsp), %rsi movq 0xa90(%rsp), %rax leaq 0x2b8(%rsp), %rdi movq %rdx, -0x8(%rdi) movss (%rax,%rcx,4), %xmm5 movss 0x10(%rax,%rcx,4), %xmm6 movss 0x20(%rax,%rcx,4), %xmm7 movss 0x60(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r9 movslq 0xb0(%rax,%rcx,4), %r10 movq %r8, %r11 xorq $0x10, %r11 movq %r9, %r15 xorq $0x10, %r15 movq %r10, %r12 xorq $0x10, %r12 movss 0xc0(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0xd0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x150(%rsp) pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fb09b0(%rip), %rax # 0x2124730 movq %rax, 0x110(%rsp) movaps %xmm5, 0xb0(%rsp) movaps %xmm6, 0xa0(%rsp) movaps %xmm7, 0x90(%rsp) movaps %xmm8, 0x80(%rsp) movaps %xmm9, 0x70(%rsp) movaps %xmm10, 0x60(%rsp) movq %r15, 0x48(%rsp) movq %r12, 0x40(%rsp) movaps %xmm11, 0x50(%rsp) movq %rdi, %rcx leaq 0x2b0(%rsp), %rax cmpq %rax, %rdi je 0x17470f leaq -0x8(%rcx), %rdi movq %rcx, 0x118(%rsp) movq -0x8(%rcx), %r13 testb $0x8, %r13b jne 0x173ed0 movq %r13, %rax andq $-0x10, %rax movss 0x70(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%r8), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r8), %xmm2 subps %xmm5, %xmm2 mulps %xmm8, %xmm2 movaps %xmm11, %xmm1 movaps 0x80(%rax,%r9), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r9), %xmm3 maxps %xmm2, %xmm1 subps %xmm6, %xmm3 mulps %xmm9, %xmm3 movaps 0x80(%rax,%r10), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r10), %xmm2 subps %xmm7, %xmm2 mulps %xmm10, %xmm2 maxps %xmm2, %xmm3 maxps %xmm3, %xmm1 movaps 0x80(%rax,%r11), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r11), %xmm3 subps %xmm5, %xmm3 mulps %xmm8, %xmm3 movaps 0x150(%rsp), %xmm2 minps %xmm3, %xmm2 movaps 0x80(%rax,%r15), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r15), %xmm3 subps %xmm6, %xmm3 movaps 0x80(%rax,%r12), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%r12), %xmm4 mulps %xmm9, %xmm3 subps %xmm7, %xmm4 mulps %xmm10, %xmm4 minps %xmm4, %xmm3 minps %xmm3, %xmm2 movl %r13d, %ecx andl $0x7, %ecx cmpleps %xmm2, %xmm1 cmpl $0x6, %ecx je 0x173f19 pslld $0x1f, %xmm1 movmskps %xmm1, %ebp testb $0x8, %r13b jne 0x173f15 testq %rbp, %rbp je 0x173f34 andq $-0x10, %r13 bsfq %rbp, %rax leaq -0x1(%rbp), %rdx xorl %ecx, %ecx movq (%r13,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) prefetcht0 0x80(%rax) prefetcht0 0xc0(%rax) andq %rbp, %rdx jne 0x173f39 movq %rax, %r13 testl %ecx, %ecx je 0x173de9 jmp 0x173f7f pushq $0x6 jmp 0x173f36 movaps 0xe0(%rax), %xmm2 cmpleps %xmm0, %xmm2 cmpltps 0xf0(%rax), %xmm0 andps %xmm2, %xmm0 andps %xmm0, %xmm1 jmp 0x173ec8 pushq $0x4 popq %rcx jmp 0x173f0b movq %rax, (%rdi) addq $0x8, %rdi bsfq %rdx, %rcx leaq -0x1(%rdx), %rax movq (%r13,%rcx,8), %rcx prefetcht0 (%rcx) prefetcht0 0x40(%rcx) prefetcht0 0x80(%rcx) prefetcht0 0xc0(%rcx) andq %rdx, %rax je 0x173f78 movq %rcx, (%rdi) addq $0x8, %rdi bsfq %rax, %rcx leaq -0x1(%rax), %rdx jmp 0x173f48 movq %rcx, %r13 xorl %ecx, %ecx jmp 0x173f0b cmpl $0x6, %ecx jne 0x1746da movl %r13d, %edx andl $0xf, %edx xorl %ecx, %ecx addq $-0x8, %rdx setne %al je 0x1746da andq $-0x10, %r13 xorl %r12d, %r12d movb %al, 0xf(%rsp) imulq $0x140, %r12, %r15 # imm = 0x140 movss 0x70(%rbx,%r14,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps 0x90(%r13,%r15), %xmm3 mulps %xmm6, %xmm3 addps (%r13,%r15), %xmm3 movaps 0xa0(%r13,%r15), %xmm2 mulps %xmm6, %xmm2 addps 0x10(%r13,%r15), %xmm2 movaps 0xb0(%r13,%r15), %xmm0 mulps %xmm6, %xmm0 addps 0x20(%r13,%r15), %xmm0 movaps 0xc0(%r13,%r15), %xmm4 mulps %xmm6, %xmm4 addps 0x30(%r13,%r15), %xmm4 movaps 0xd0(%r13,%r15), %xmm5 mulps %xmm6, %xmm5 addps 0x40(%r13,%r15), %xmm5 movaps 0xe0(%r13,%r15), %xmm9 mulps %xmm6, %xmm9 addps 0x50(%r13,%r15), %xmm9 movaps 0xf0(%r13,%r15), %xmm1 mulps %xmm6, %xmm1 addps 0x60(%r13,%r15), %xmm1 movaps 0x100(%r13,%r15), %xmm7 mulps %xmm6, %xmm7 addps 0x70(%r13,%r15), %xmm7 mulps 0x110(%r13,%r15), %xmm6 addps 0x80(%r13,%r15), %xmm6 movaps %xmm3, %xmm8 subps %xmm4, %xmm8 movaps %xmm2, %xmm10 subps %xmm5, %xmm10 movaps %xmm0, %xmm11 subps %xmm9, %xmm11 subps %xmm3, %xmm1 subps %xmm2, %xmm7 subps %xmm0, %xmm6 movaps %xmm10, %xmm5 mulps %xmm6, %xmm5 movaps %xmm11, %xmm4 mulps %xmm7, %xmm4 subps %xmm5, %xmm4 movaps %xmm8, %xmm5 mulps %xmm6, %xmm5 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm3 subps %xmm14, %xmm2 movaps %xmm2, %xmm14 mulps %xmm9, %xmm14 movaps %xmm3, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm6 mulps %xmm11, %xmm13 mulps %xmm1, %xmm11 subps %xmm11, %xmm5 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm0 movaps %xmm3, 0x10(%rsp) movaps %xmm3, %xmm11 mulps %xmm14, %xmm11 movaps %xmm0, %xmm15 mulps %xmm9, %xmm15 subps %xmm11, %xmm15 movaps %xmm8, %xmm11 mulps %xmm7, %xmm11 mulps %xmm15, %xmm7 mulps %xmm10, %xmm15 mulps %xmm1, %xmm10 subps %xmm11, %xmm10 movaps %xmm0, %xmm3 mulps %xmm12, %xmm3 movaps %xmm2, %xmm11 mulps %xmm14, %xmm11 subps %xmm3, %xmm11 mulps %xmm10, %xmm14 mulps %xmm5, %xmm12 addps %xmm14, %xmm12 mulps %xmm4, %xmm9 addps %xmm12, %xmm9 addps %xmm6, %xmm7 mulps %xmm11, %xmm1 addps %xmm7, %xmm1 addps %xmm13, %xmm15 movaps %xmm9, %xmm6 andps 0x1d78552(%rip), %xmm6 # 0x1eec6d0 xorps %xmm6, %xmm1 mulps %xmm8, %xmm11 addps %xmm15, %xmm11 xorps %xmm6, %xmm11 movaps %xmm1, %xmm3 xorps %xmm8, %xmm8 cmpnltps %xmm8, %xmm3 movaps %xmm11, %xmm12 cmpnltps %xmm8, %xmm12 andps %xmm3, %xmm12 movaps %xmm9, %xmm7 andps 0x1d7850f(%rip), %xmm7 # 0x1eec6c0 cmpneqps %xmm8, %xmm9 andps %xmm9, %xmm12 movaps %xmm1, %xmm8 addps %xmm11, %xmm8 cmpleps %xmm7, %xmm8 andps %xmm12, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x1741e7 incq %r12 cmpq %rdx, %r12 setb %al jne 0x173fa4 jmp 0x17469d mulps %xmm10, %xmm0 mulps %xmm5, %xmm2 addps %xmm0, %xmm2 movaps 0x10(%rsp), %xmm0 mulps %xmm4, %xmm0 addps %xmm2, %xmm0 xorps %xmm0, %xmm6 movss 0x30(%rbx,%r14,4), %xmm2 movss 0x80(%rbx,%r14,4), %xmm3 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm7, %xmm2 cmpltps %xmm6, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm7, %xmm3 movaps %xmm6, %xmm0 cmpleps %xmm3, %xmm0 andps %xmm2, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1741d3 addq %r13, %r15 movaps %xmm1, 0x160(%rsp) movaps %xmm11, 0x170(%rsp) movaps %xmm6, 0x180(%rsp) movaps %xmm7, 0x190(%rsp) movaps %xmm0, 0x1b0(%rsp) movaps %xmm4, 0x1f0(%rsp) movaps %xmm5, 0x200(%rsp) movaps %xmm10, 0x210(%rsp) movq (%rsi), %rcx movq %rcx, 0x108(%rsp) rcpps %xmm7, %xmm0 mulps %xmm0, %xmm7 movaps 0x1d7877c(%rip), %xmm1 # 0x1eeca10 subps %xmm7, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps 0x180(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x1e0(%rsp) movaps 0x160(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x1c0(%rsp) mulps 0x170(%rsp), %xmm1 movaps %xmm1, 0x1d0(%rsp) movq %rax, 0x10(%rsp) bsfq %rax, %rcx movq %rcx, 0x28(%rsp) movl 0x120(%r15,%rcx,4), %ecx movq 0x108(%rsp), %rax movq 0x1e8(%rax), %rax movq %rcx, 0x100(%rsp) movq (%rax,%rcx,8), %rcx movl 0x90(%rbx,%r14,4), %eax movq %rcx, 0x30(%rsp) testl %eax, 0x34(%rcx) je 0x174364 movq 0x10(%rsi), %rax cmpq $0x0, 0x10(%rax) movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 movaps 0x50(%rsp), %xmm11 jne 0x1743cc movq 0x30(%rsp), %rax cmpq $0x0, 0x48(%rax) jne 0x1743cc xorl %eax, %eax jmp 0x1743ac movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx btcq %rax, %rcx movq %rcx, 0x10(%rsp) movb $0x1, %al movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 movaps 0x50(%rsp), %xmm11 testb %al, %al movl $0x0, %ecx je 0x1746ed movq 0x10(%rsp), %rax testq %rax, %rax jne 0x1742d3 jmp 0x1741d3 movq %rdx, 0xd0(%rsp) movq %r11, 0xd8(%rsp) movq %r10, 0xe0(%rsp) movq %r9, 0xe8(%rsp) movq %r8, 0xf0(%rsp) movq %rdi, 0xf8(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x3c(%rsp) movq 0x28(%rsp), %rcx movss 0x1e0(%rsp,%rcx,4), %xmm0 movss 0x1c0(%rsp,%rcx,4), %xmm1 movss 0x1d0(%rsp,%rcx,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x8(%rsi), %rax movd 0x100(%rsp), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x130(%r15,%rcx,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x1f0(%rsp,%rcx,4), %xmm4 movss 0x200(%rsp,%rcx,4), %xmm5 movss 0x210(%rsp,%rcx,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x220(%rsp) movaps %xmm5, 0x230(%rsp) movaps %xmm6, 0x240(%rsp) movaps %xmm1, 0x250(%rsp) movaps %xmm2, 0x260(%rsp) movdqa %xmm3, 0x270(%rsp) movdqa %xmm0, 0x280(%rsp) leaq 0x290(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x290(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2a0(%rsp) movq 0x110(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0xc0(%rsp) leaq 0xc0(%rsp), %rcx movq %rcx, 0x120(%rsp) movq 0x30(%rsp), %rdx movq 0x18(%rdx), %rcx movq %rcx, 0x128(%rsp) movq %rax, 0x130(%rsp) movq %rbx, 0x138(%rsp) leaq 0x220(%rsp), %rax movq %rax, 0x140(%rsp) movl $0x4, 0x148(%rsp) movq 0x48(%rdx), %rax testq %rax, %rax je 0x17456e leaq 0x120(%rsp), %rdi callq *%rax movdqa 0xc0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x1745eb movq 0xa98(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x1745ad testb $0x2, (%rcx) jne 0x1745a3 movq 0x30(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x1745ad leaq 0x120(%rsp), %rdi callq *%rax movdqa 0xc0(%rsp), %xmm0 pcmpeqd 0x1d77452(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d77856(%rip), %xmm1 # 0x1eebe20 movq 0x138(%rsp), %rax movaps 0x1d77427(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x1745fb pcmpeqd 0x1d7741d(%rip), %xmm1 # 0x1eeba10 pxor 0x1d77825(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x17462d movd 0x3c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x10(%rsp) movq 0xa98(%rsp), %rsi movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movq 0xf8(%rsp), %rdi movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 movq 0xf0(%rsp), %r8 movq 0xe8(%rsp), %r9 movq 0xe0(%rsp), %r10 movq 0xd8(%rsp), %r11 movaps 0x50(%rsp), %xmm11 movq 0xd0(%rsp), %rdx jmp 0x1743ac movaps 0xb0(%rsp), %xmm5 movaps 0xa0(%rsp), %xmm6 movaps 0x90(%rsp), %xmm7 movaps 0x80(%rsp), %xmm8 movaps 0x70(%rsp), %xmm9 movaps 0x60(%rsp), %xmm10 movq 0x48(%rsp), %r15 movq 0x40(%rsp), %r12 movaps 0x50(%rsp), %xmm11 testb $0x3, %cl movq 0x118(%rsp), %rcx je 0x173dc5 jmp 0x17470f testb $0x1, 0xf(%rsp) movq 0x48(%rsp), %r15 movq 0x40(%rsp), %r12 je 0x1746da movl $0xff800000, 0x80(%rbx,%r14,4) # imm = 0xFF800000 pushq $0x1 popq %rcx jmp 0x1746da leaq 0x2b0(%rsp), %rax cmpq %rax, %rcx setne %al addq $0xa58, %rsp # imm = 0xA58 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiMBIntersectorKMoeller<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1258, %rsp # imm = 0x1258 movq %r9, %rbx movq %rcx, %r11 leaq 0x320(%rsp), %r9 movq %rdx, -0x10(%r9) andl $0x0, -0x8(%r9) movq 0x1290(%rsp), %rax movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r14 movslq 0xa0(%rax,%rcx,4), %r15 movslq 0xb0(%rax,%rcx,4), %r12 movq %r14, %rbp xorq $0x10, %rbp movq %r15, %rsi xorq $0x10, %rsi movq %r12, %rdi xorq $0x10, %rdi movss 0xc0(%rax,%rcx,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0xd0(%rax,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1faff2b(%rip), %rax # 0x2124730 movq %rax, 0x98(%rsp) movq %rsi, 0x18(%rsp) movq %rdi, 0x10(%rsp) movq %rbx, 0x38(%rsp) movq %rcx, 0x30(%rsp) movaps %xmm8, 0x240(%rsp) movaps %xmm9, 0x230(%rsp) movaps %xmm10, 0x220(%rsp) movaps %xmm11, 0x210(%rsp) movaps %xmm12, 0x200(%rsp) movaps %xmm13, 0x1f0(%rsp) movq %r14, 0xb8(%rsp) movq %r15, 0xb0(%rsp) movq %r12, 0xa8(%rsp) movq %rbp, 0xa0(%rsp) movaps %xmm14, 0x1e0(%rsp) leaq 0x310(%rsp), %rax cmpq %rax, %r9 je 0x175734 movss -0x8(%r9), %xmm0 addq $-0x10, %r9 ucomiss 0x80(%rbx,%r11,4), %xmm0 ja 0x174880 movq (%r9), %r13 testb $0x8, %r13b jne 0x174997 movq %r13, %rax andq $-0x10, %rax movss 0x70(%rbx,%r11,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%r14), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r14), %xmm3 subps %xmm8, %xmm3 mulps %xmm11, %xmm3 movaps %xmm14, %xmm2 movaps 0x80(%rax,%r15), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%r15), %xmm4 maxps %xmm3, %xmm2 subps %xmm9, %xmm4 mulps %xmm12, %xmm4 movaps 0x80(%rax,%r12), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r12), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 maxps %xmm3, %xmm4 maxps %xmm4, %xmm2 movaps 0x80(%rax,%rbp), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rbp), %xmm4 subps %xmm8, %xmm4 movaps 0x80(%rax,%rsi), %xmm5 mulps %xmm0, %xmm5 addps 0x20(%rax,%rsi), %xmm5 mulps %xmm11, %xmm4 subps %xmm9, %xmm5 mulps %xmm12, %xmm5 movaps 0x80(%rax,%rdi), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rdi), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm3, %xmm5 movaps %xmm1, %xmm3 minps %xmm4, %xmm3 minps %xmm5, %xmm3 movl %r13d, %ecx andl $0x7, %ecx cmpl $0x6, %ecx je 0x1749e3 movaps %xmm2, %xmm0 cmpleps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %r10d movaps %xmm2, 0x120(%rsp) testb $0x8, %r13b jne 0x1749df testq %r10, %r10 je 0x174a05 andq $-0x10, %r13 bsfq %r10, %rcx leaq -0x1(%r10), %r8 xorl %eax, %eax movq (%r13,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) andq %r10, %r8 jne 0x174a0a movq %rdx, %r13 testl %eax, %eax je 0x1748a9 jmp 0x174bfb pushq $0x6 jmp 0x174a07 movaps %xmm2, %xmm4 cmpleps %xmm3, %xmm4 movaps 0xe0(%rax), %xmm3 cmpleps %xmm0, %xmm3 cmpltps 0xf0(%rax), %xmm0 andps %xmm3, %xmm0 andps %xmm4, %xmm0 jmp 0x174986 pushq $0x4 popq %rax jmp 0x1749d2 movq %r10, 0x8(%rsp) movl 0x120(%rsp,%rcx,4), %edi bsfq %r8, %r10 leaq -0x1(%r8), %rcx movq (%r13,%r10,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) prefetcht0 0x80(%rsi) prefetcht0 0xc0(%rsi) movl 0x120(%rsp,%r10,4), %r10d andq %r8, %rcx jne 0x174a7e leaq 0x10(%r9), %rcx cmpl %r10d, %edi jae 0x174a5d movq %rsi, (%r9) movl %r10d, 0x8(%r9) movq %rcx, %r9 movq %rdx, %r13 jmp 0x174a6a movq %rdx, (%r9) movl %edi, 0x8(%r9) movq %rcx, %r9 movq %rsi, %r13 movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdi movq 0x8(%rsp), %r10 jmp 0x1749d2 movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm4 movd %r10d, %xmm0 punpcklqdq %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%r13,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) prefetcht0 0x80(%rdi) prefetcht0 0xc0(%rdi) movq %rdi, %xmm3 movd 0x120(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x174b36 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 blendvps %xmm0, %xmm4, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm3, %xmm5 movaps %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, (%r9) movaps %xmm3, 0x10(%r9) movq %xmm4, %r13 addq $0x20, %r9 jmp 0x174a6a bsfq %rdx, %rcx movq (%r13,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 movd 0x120(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm4, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm4 blendvps %xmm0, %xmm3, %xmm4 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm4, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm5 movaps %xmm6, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm6, %xmm5 movaps %xmm2, (%r9) movaps %xmm5, 0x10(%r9) movaps %xmm4, 0x20(%r9) movq %xmm3, %r13 addq $0x30, %r9 jmp 0x174a6a cmpl $0x6, %eax jne 0x174880 movq %r10, 0x8(%rsp) movq %r9, 0xc0(%rsp) movl %r13d, %eax andl $0xf, %eax addq $-0x8, %rax movq %rax, 0xd0(%rsp) je 0x1756ab andq $-0x10, %r13 xorl %r9d, %r9d movq %r9, 0xd8(%rsp) imulq $0x50, %r9, %rax movq 0x1298(%rsp), %rcx movq (%rcx), %rdx movss 0x70(%rbx,%r11,4), %xmm5 movl 0x30(%r13,%rax), %ecx movq %rdx, 0xc8(%rsp) movq 0x1e8(%rdx), %rdx movq (%rdx,%rcx,8), %rcx movss 0x28(%rcx), %xmm0 movss 0x2c(%rcx), %xmm1 movss 0x30(%rcx), %xmm2 subss %xmm1, %xmm5 subss %xmm1, %xmm2 divss %xmm2, %xmm5 mulss %xmm0, %xmm5 roundss $0x9, %xmm5, %xmm2 addss 0x1d7bd39(%rip), %xmm0 # 0x1ef09cc minss %xmm0, %xmm2 xorps %xmm1, %xmm1 maxss %xmm2, %xmm1 cvttss2si %xmm1, %edx movslq %edx, %rdx movq 0xe0(%rcx), %rcx imulq $0x38, %rdx, %rsi movl (%r13,%rax), %r12d movl 0x4(%r13,%rax), %edx movq (%rcx,%rsi), %rbp movq 0x38(%rcx,%rsi), %rcx movups (%rbp,%r12,4), %xmm0 movl 0x10(%r13,%rax), %r15d movups (%rbp,%r15,4), %xmm11 movl 0x20(%r13,%rax), %r9d movups (%rbp,%r9,4), %xmm10 movups (%rbp,%rdx,4), %xmm2 movl 0x14(%r13,%rax), %r8d movups (%rbp,%r8,4), %xmm4 movl 0x24(%r13,%rax), %esi movq %rsi, 0x40(%rsp) movups (%rbp,%rsi,4), %xmm6 movl 0x8(%r13,%rax), %r14d movups (%rbp,%r14,4), %xmm7 movl 0x18(%r13,%rax), %r11d movups (%rbp,%r11,4), %xmm15 movl 0x28(%r13,%rax), %edi movups (%rbp,%rdi,4), %xmm8 movl 0xc(%r13,%rax), %ebx movups (%rbp,%rbx,4), %xmm9 movl 0x1c(%r13,%rax), %r10d movups (%rbp,%r10,4), %xmm14 movl 0x2c(%r13,%rax), %esi movups (%rbp,%rsi,4), %xmm13 movups (%rcx,%r12,4), %xmm12 movups (%rcx,%r15,4), %xmm3 movaps %xmm3, 0x20(%rsp) subss %xmm1, %xmm5 movaps %xmm0, %xmm3 unpcklps %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[0],xmm3[1],xmm7[1] unpckhps %xmm7, %xmm0 # xmm0 = xmm0[2],xmm7[2],xmm0[3],xmm7[3] movaps %xmm0, %xmm7 movaps %xmm2, %xmm1 unpcklps %xmm9, %xmm1 # xmm1 = xmm1[0],xmm9[0],xmm1[1],xmm9[1] unpckhps %xmm9, %xmm2 # xmm2 = xmm2[2],xmm9[2],xmm2[3],xmm9[3] movups (%rcx,%rdx,4), %xmm0 unpcklps %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1] movaps %xmm7, 0x50(%rsp) movaps %xmm3, %xmm9 unpcklps %xmm1, %xmm9 # xmm9 = xmm9[0],xmm1[0],xmm9[1],xmm1[1] unpckhps %xmm1, %xmm3 # xmm3 = xmm3[2],xmm1[2],xmm3[3],xmm1[3] movaps %xmm11, %xmm7 unpcklps %xmm15, %xmm11 # xmm11 = xmm11[0],xmm15[0],xmm11[1],xmm15[1] unpckhps %xmm15, %xmm7 # xmm7 = xmm7[2],xmm15[2],xmm7[3],xmm15[3] movaps %xmm4, %xmm1 unpcklps %xmm14, %xmm1 # xmm1 = xmm1[0],xmm14[0],xmm1[1],xmm14[1] unpckhps %xmm14, %xmm4 # xmm4 = xmm4[2],xmm14[2],xmm4[3],xmm14[3] movups (%rcx,%r14,4), %xmm2 unpcklps %xmm4, %xmm7 # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1] movaps %xmm7, 0x260(%rsp) movaps %xmm11, %xmm4 unpcklps %xmm1, %xmm4 # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1] movaps %xmm4, 0x250(%rsp) unpckhps %xmm1, %xmm11 # xmm11 = xmm11[2],xmm1[2],xmm11[3],xmm1[3] movaps %xmm10, %xmm4 unpcklps %xmm8, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1] unpckhps %xmm8, %xmm10 # xmm10 = xmm10[2],xmm8[2],xmm10[3],xmm8[3] movaps %xmm6, %xmm1 unpcklps %xmm13, %xmm1 # xmm1 = xmm1[0],xmm13[0],xmm1[1],xmm13[1] unpckhps %xmm13, %xmm6 # xmm6 = xmm6[2],xmm13[2],xmm6[3],xmm13[3] movups (%rcx,%rbx,4), %xmm7 unpcklps %xmm6, %xmm10 # xmm10 = xmm10[0],xmm6[0],xmm10[1],xmm6[1] movaps %xmm10, 0x70(%rsp) movaps %xmm4, %xmm10 unpcklps %xmm1, %xmm10 # xmm10 = xmm10[0],xmm1[0],xmm10[1],xmm1[1] unpckhps %xmm1, %xmm4 # xmm4 = xmm4[2],xmm1[2],xmm4[3],xmm1[3] movaps %xmm12, %xmm15 unpcklps %xmm2, %xmm15 # xmm15 = xmm15[0],xmm2[0],xmm15[1],xmm2[1] unpckhps %xmm2, %xmm12 # xmm12 = xmm12[2],xmm2[2],xmm12[3],xmm2[3] movaps %xmm0, %xmm2 unpcklps %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1] unpckhps %xmm7, %xmm0 # xmm0 = xmm0[2],xmm7[2],xmm0[3],xmm7[3] movups (%rcx,%r11,4), %xmm7 movq 0x30(%rsp), %r11 unpcklps %xmm0, %xmm12 # xmm12 = xmm12[0],xmm0[0],xmm12[1],xmm0[1] movaps %xmm15, %xmm1 unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] unpckhps %xmm2, %xmm15 # xmm15 = xmm15[2],xmm2[2],xmm15[3],xmm2[3] movaps 0x20(%rsp), %xmm6 movaps %xmm6, %xmm13 unpcklps %xmm7, %xmm13 # xmm13 = xmm13[0],xmm7[0],xmm13[1],xmm7[1] unpckhps %xmm7, %xmm6 # xmm6 = xmm6[2],xmm7[2],xmm6[3],xmm7[3] movups (%rcx,%r8,4), %xmm0 movups (%rcx,%r10,4), %xmm2 movq 0x38(%rsp), %rbx movaps %xmm0, %xmm7 unpcklps %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1] unpckhps %xmm2, %xmm0 # xmm0 = xmm0[2],xmm2[2],xmm0[3],xmm2[3] unpcklps %xmm0, %xmm6 # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1] movaps %xmm6, 0x20(%rsp) movaps %xmm13, %xmm0 unpcklps %xmm7, %xmm0 # xmm0 = xmm0[0],xmm7[0],xmm0[1],xmm7[1] unpckhps %xmm7, %xmm13 # xmm13 = xmm13[2],xmm7[2],xmm13[3],xmm7[3] movups (%rcx,%r9,4), %xmm2 movq 0xd8(%rsp), %r9 movups (%rcx,%rdi,4), %xmm7 movaps %xmm2, %xmm14 unpcklps %xmm7, %xmm14 # xmm14 = xmm14[0],xmm7[0],xmm14[1],xmm7[1] unpckhps %xmm7, %xmm2 # xmm2 = xmm2[2],xmm7[2],xmm2[3],xmm7[3] movq 0x40(%rsp), %rdx movups (%rcx,%rdx,4), %xmm7 movups (%rcx,%rsi,4), %xmm8 movaps %xmm7, %xmm6 unpcklps %xmm8, %xmm6 # xmm6 = xmm6[0],xmm8[0],xmm6[1],xmm8[1] unpckhps %xmm8, %xmm7 # xmm7 = xmm7[2],xmm8[2],xmm7[3],xmm8[3] unpcklps %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1] movaps %xmm14, %xmm7 unpcklps %xmm6, %xmm7 # xmm7 = xmm7[0],xmm6[0],xmm7[1],xmm6[1] unpckhps %xmm6, %xmm14 # xmm14 = xmm14[2],xmm6[2],xmm14[3],xmm6[3] movss 0x1d77874(%rip), %xmm8 # 0x1eec714 subss %xmm5, %xmm8 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm5, %xmm1 mulps %xmm8, %xmm9 addps %xmm1, %xmm9 mulps %xmm5, %xmm15 mulps %xmm8, %xmm3 addps %xmm15, %xmm3 movaps %xmm3, 0x40(%rsp) movaps %xmm9, %xmm15 mulps %xmm5, %xmm12 movaps 0x50(%rsp), %xmm6 mulps %xmm8, %xmm6 addps %xmm12, %xmm6 mulps %xmm5, %xmm0 movaps 0x250(%rsp), %xmm9 mulps %xmm8, %xmm9 addps %xmm0, %xmm9 mulps %xmm5, %xmm13 movaps 0x20(%rsp), %xmm1 mulps %xmm5, %xmm1 mulps %xmm8, %xmm11 addps %xmm13, %xmm11 movaps 0x260(%rsp), %xmm0 mulps %xmm8, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, %xmm3 mulps %xmm5, %xmm7 mulps %xmm5, %xmm14 mulps %xmm2, %xmm5 mulps %xmm8, %xmm10 addps %xmm7, %xmm10 mulps %xmm8, %xmm4 addps %xmm14, %xmm4 movaps %xmm6, %xmm1 mulps 0x70(%rsp), %xmm8 addps %xmm5, %xmm8 movaps 0x30(%r13,%rax), %xmm0 movaps %xmm0, 0x270(%rsp) movaps 0x40(%r13,%rax), %xmm0 movaps %xmm0, 0x110(%rsp) movaps %xmm15, %xmm2 subps %xmm9, %xmm2 movaps %xmm2, 0x20(%rsp) movaps 0x40(%rsp), %xmm14 movaps %xmm14, %xmm5 subps %xmm11, %xmm5 movaps %xmm6, %xmm11 subps %xmm3, %xmm11 subps %xmm15, %xmm10 subps %xmm14, %xmm4 subps %xmm6, %xmm8 movaps %xmm5, %xmm0 mulps %xmm8, %xmm0 movaps %xmm11, %xmm3 mulps %xmm4, %xmm3 subps %xmm0, %xmm3 mulps %xmm8, %xmm2 movss (%rbx,%r11,4), %xmm0 movss 0x10(%rbx,%r11,4), %xmm6 movss 0x40(%rbx,%r11,4), %xmm9 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r11,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm0, %xmm15 subps %xmm6, %xmm14 movaps %xmm14, %xmm0 mulps %xmm9, %xmm0 movaps %xmm15, %xmm13 mulps %xmm12, %xmm13 subps %xmm0, %xmm13 mulps %xmm13, %xmm8 mulps %xmm11, %xmm13 mulps %xmm10, %xmm11 subps %xmm11, %xmm2 movss 0x20(%rbx,%r11,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movss 0x60(%rbx,%r11,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm0, %xmm1 movaps %xmm15, 0x70(%rsp) mulps %xmm6, %xmm15 movaps %xmm1, %xmm7 mulps %xmm9, %xmm7 subps %xmm15, %xmm7 movaps 0x20(%rsp), %xmm15 movaps %xmm15, %xmm0 mulps %xmm4, %xmm0 mulps %xmm7, %xmm4 mulps %xmm5, %xmm7 mulps %xmm10, %xmm5 subps %xmm0, %xmm5 movaps %xmm1, 0x50(%rsp) movaps %xmm1, %xmm0 mulps %xmm12, %xmm0 movaps %xmm14, %xmm11 mulps %xmm6, %xmm11 subps %xmm0, %xmm11 mulps %xmm5, %xmm6 movaps %xmm2, 0x40(%rsp) mulps %xmm2, %xmm12 addps %xmm6, %xmm12 mulps %xmm3, %xmm9 addps %xmm12, %xmm9 addps %xmm8, %xmm4 mulps %xmm11, %xmm10 addps %xmm4, %xmm10 addps %xmm13, %xmm7 movaps %xmm9, %xmm4 andps 0x1d77644(%rip), %xmm4 # 0x1eec6d0 xorps %xmm4, %xmm10 mulps %xmm15, %xmm11 addps %xmm7, %xmm11 xorps %xmm4, %xmm11 movaps %xmm10, %xmm0 xorps %xmm7, %xmm7 cmpnltps %xmm7, %xmm0 movaps %xmm11, %xmm6 cmpnltps %xmm7, %xmm6 andps %xmm0, %xmm6 movaps %xmm9, %xmm2 andps 0x1d77603(%rip), %xmm2 # 0x1eec6c0 cmpneqps %xmm7, %xmm9 andps %xmm9, %xmm6 movaps %xmm10, %xmm7 addps %xmm11, %xmm7 cmpleps %xmm2, %xmm7 andps %xmm6, %xmm7 movmskps %xmm7, %eax testl %eax, %eax jne 0x1750f2 incq %r9 cmpq 0xd0(%rsp), %r9 jne 0x174c30 jmp 0x1756ab movaps %xmm14, %xmm1 movaps %xmm3, %xmm14 movaps 0x50(%rsp), %xmm0 mulps %xmm5, %xmm0 mulps 0x40(%rsp), %xmm1 addps %xmm0, %xmm1 movaps 0x70(%rsp), %xmm0 mulps %xmm3, %xmm0 addps %xmm1, %xmm0 xorps %xmm0, %xmm4 movss 0x30(%rbx,%r11,4), %xmm6 movss 0x80(%rbx,%r11,4), %xmm8 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm2, %xmm6 cmpltps %xmm4, %xmm6 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm2, %xmm8 movaps %xmm4, %xmm0 cmpleps %xmm8, %xmm0 andps %xmm6, %xmm0 andps %xmm7, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1750dc movq 0xc8(%rsp), %r12 movq %r9, %r14 movaps %xmm10, 0x120(%rsp) movaps %xmm11, 0x130(%rsp) movaps %xmm4, 0x140(%rsp) movaps %xmm2, 0x150(%rsp) movaps %xmm0, 0x170(%rsp) movaps %xmm14, 0x1b0(%rsp) movaps 0x40(%rsp), %xmm1 movaps %xmm1, 0x1c0(%rsp) movaps %xmm5, 0x1d0(%rsp) movaps %xmm0, 0x60(%rsp) rcpps %xmm2, %xmm1 mulps %xmm1, %xmm2 movaps 0x1d77859(%rip), %xmm3 # 0x1eeca10 subps %xmm2, %xmm3 mulps %xmm1, %xmm3 addps %xmm1, %xmm3 movaps 0x140(%rsp), %xmm4 mulps %xmm3, %xmm4 movaps %xmm4, 0x1a0(%rsp) movaps 0x120(%rsp), %xmm1 mulps %xmm3, %xmm1 movaps %xmm1, 0x180(%rsp) mulps 0x130(%rsp), %xmm3 movaps %xmm3, 0x190(%rsp) movaps 0x1d767f3(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 movaps %xmm1, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %eax pcmpeqd %xmm2, %xmm2 testl %eax, %eax je 0x17522e movaps %xmm1, %xmm2 andps %xmm2, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rbp movq %r12, %rdx movl 0x270(%rsp,%rbp,4), %eax movq 0x1e8(%rdx), %rcx movq (%rcx,%rax,8), %r15 movl 0x90(%rbx,%r11,4), %ecx testl %ecx, 0x34(%r15) je 0x175534 movq 0x1298(%rsp), %rcx movq 0x10(%rcx), %rcx cmpq $0x0, 0x10(%rcx) jne 0x17527d cmpq $0x0, 0x40(%r15) je 0x1755f5 movaps %xmm4, 0x20(%rsp) movss 0x180(%rsp,%rbp,4), %xmm0 movss 0x190(%rsp,%rbp,4), %xmm1 movss 0x1b0(%rsp,%rbp,4), %xmm2 movss 0x1c0(%rsp,%rbp,4), %xmm3 movq 0x1298(%rsp), %rdx movq 0x8(%rdx), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x110(%rsp,%rbp,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1d0(%rsp,%rbp,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x280(%rsp) movaps %xmm3, 0x290(%rsp) movaps %xmm6, 0x2a0(%rsp) movaps %xmm0, 0x2b0(%rsp) movaps %xmm1, 0x2c0(%rsp) movdqa %xmm5, 0x2d0(%rsp) movdqa %xmm4, 0x2e0(%rsp) leaq 0x2f0(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2f0(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x300(%rsp) movss 0x80(%rbx,%r11,4), %xmm0 movss %xmm0, 0x50(%rsp) movss 0x1a0(%rsp,%rbp,4), %xmm0 movss %xmm0, 0x80(%rbx,%r11,4) movq 0x98(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x80(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0x18(%r15), %rax movq %rax, 0xe8(%rsp) movq 0x8(%rdx), %rax movq %rax, 0xf0(%rsp) movq %rbx, 0xf8(%rsp) leaq 0x280(%rsp), %rax movq %rax, 0x100(%rsp) movl $0x4, 0x108(%rsp) movq 0x40(%r15), %rax testq %rax, %rax je 0x1753f0 leaq 0xe0(%rsp), %rdi callq *%rax movdqa 0x80(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x175586 movq 0x1298(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x17542f testb $0x2, (%rcx) jne 0x175425 testb $0x40, 0x3e(%r15) je 0x17542f leaq 0xe0(%rsp), %rdi callq *%rax movdqa 0x80(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d765cb(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d769cf(%rip), %xmm1 # 0x1eebe20 je 0x175596 movq 0xf8(%rsp), %rax movq 0x100(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x175596 andl $0x0, 0x60(%rsp,%rbp,4) movaps 0x60(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1756a3 movaps 0x1d764a0(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17557a movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rbp jmp 0x17523b pcmpeqd 0x1d76482(%rip), %xmm1 # 0x1eeba10 pxor 0x1d7688a(%rip), %xmm1 # 0x1eebe20 ptest 0x1d77581(%rip), %xmm1 # 0x1eecb20 jne 0x1755ba movq 0x38(%rsp), %rax movq 0x30(%rsp), %rcx movd 0x50(%rsp), %xmm0 movd %xmm0, 0x80(%rax,%rcx,4) andl $0x0, 0x60(%rsp,%rbp,4) movq 0x38(%rsp), %rbx movq 0x30(%rsp), %r11 movss 0x80(%rbx,%r11,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x20(%rsp), %xmm4 movaps %xmm4, %xmm1 cmpleps %xmm0, %xmm1 andps 0x60(%rsp), %xmm1 movaps %xmm1, 0x60(%rsp) movq %r12, %rdx jmp 0x175539 movss 0x180(%rsp,%rbp,4), %xmm0 movss 0x190(%rsp,%rbp,4), %xmm1 movss 0x1a0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0x80(%rbx,%r11,4) movss 0x1b0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r11,4) movss 0x1c0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r11,4) movss 0x1d0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r11,4) movss %xmm0, 0xf0(%rbx,%r11,4) movss %xmm1, 0x100(%rbx,%r11,4) movl 0x110(%rsp,%rbp,4), %ecx movl %ecx, 0x110(%rbx,%r11,4) movl %eax, 0x120(%rbx,%r11,4) movq 0x1298(%rsp), %rcx movq 0x8(%rcx), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r11,4) movq 0x8(%rcx), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r11,4) movq %r14, %r9 jmp 0x1750dc movss 0x80(%rbx,%r11,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movq 0xc0(%rsp), %r9 movaps 0x240(%rsp), %xmm8 movaps 0x230(%rsp), %xmm9 movaps 0x220(%rsp), %xmm10 movaps 0x210(%rsp), %xmm11 movaps 0x200(%rsp), %xmm12 movaps 0x1f0(%rsp), %xmm13 movq 0xb8(%rsp), %r14 movq 0xb0(%rsp), %r15 movq 0xa8(%rsp), %r12 movq 0xa0(%rsp), %rbp movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdi movaps 0x1e0(%rsp), %xmm14 movq 0x8(%rsp), %r10 jmp 0x174880 addq $0x1258, %rsp # imm = 0x1258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiMBIntersectorKMoeller<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::MoellerTrumboreIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xac8, %rsp # imm = 0xAC8 movq 0xb00(%rsp), %rax leaq 0x328(%rsp), %rdi movq %rdx, -0x8(%rdi) movss (%rax,%rcx,4), %xmm5 movss 0x10(%rax,%rcx,4), %xmm6 movss 0x20(%rax,%rcx,4), %xmm7 movss 0x60(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r10 movslq 0xb0(%rax,%rcx,4), %r11 movq %r8, %rbx xorq $0x10, %rbx movq %r10, %rdx xorq $0x10, %rdx movq %rdx, 0x150(%rsp) movq %r11, %rdx xorq $0x10, %rdx movq %rdx, 0x148(%rsp) movss 0xc0(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0xd0(%rax,%rcx,4), %xmm0 pushq $0x1 popq %rax shll %cl, %eax shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x190(%rsp) cltq shlq $0x4, %rax addq 0x1faef0e(%rip), %rax # 0x2124730 movq %rax, 0x128(%rsp) movq %r9, 0x28(%rsp) movq %rcx, 0x20(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0x90(%rsp) movaps %xmm7, 0x80(%rsp) movaps %xmm8, 0x70(%rsp) movaps %xmm9, 0xd0(%rsp) movaps %xmm10, 0xc0(%rsp) movq %r8, 0x58(%rsp) movq %r10, 0x50(%rsp) movq %r11, 0x48(%rsp) movq %rbx, 0x40(%rsp) movaps %xmm11, 0xb0(%rsp) movq %rdi, %rdx leaq 0x320(%rsp), %rax cmpq %rax, %rdi je 0x176451 leaq -0x8(%rdx), %rdi movq %rdx, 0x130(%rsp) movq -0x8(%rdx), %r15 testb $0x8, %r15b jne 0x175997 movq %r15, %rax andq $-0x10, %rax movss 0x70(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%r8), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r8), %xmm2 subps %xmm5, %xmm2 mulps %xmm8, %xmm2 movaps %xmm11, %xmm1 movaps 0x80(%rax,%r10), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r10), %xmm3 maxps %xmm2, %xmm1 subps %xmm6, %xmm3 mulps %xmm9, %xmm3 movaps 0x80(%rax,%r11), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r11), %xmm2 subps %xmm7, %xmm2 mulps %xmm10, %xmm2 maxps %xmm2, %xmm3 maxps %xmm3, %xmm1 movaps 0x80(%rax,%rbx), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rbx), %xmm3 subps %xmm5, %xmm3 mulps %xmm8, %xmm3 movaps 0x190(%rsp), %xmm2 minps %xmm3, %xmm2 movq 0x150(%rsp), %rdx movaps 0x80(%rax,%rdx), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rdx), %xmm3 subps %xmm6, %xmm3 movq 0x148(%rsp), %rdx movaps 0x80(%rax,%rdx), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rdx), %xmm4 mulps %xmm9, %xmm3 subps %xmm7, %xmm4 mulps %xmm10, %xmm4 minps %xmm4, %xmm3 minps %xmm3, %xmm2 movl %r15d, %edx andl $0x7, %edx cmpleps %xmm2, %xmm1 cmpl $0x6, %edx je 0x1759df pslld $0x1f, %xmm1 movmskps %xmm1, %r14d testb $0x8, %r15b jne 0x1759db testq %r14, %r14 je 0x1759fa andq $-0x10, %r15 bsfq %r14, %rax leaq -0x1(%r14), %rdx xorl %ebp, %ebp movq (%r15,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) prefetcht0 0x80(%rax) prefetcht0 0xc0(%rax) andq %r14, %rdx jne 0x1759ff movq %rax, %r15 testl %ebp, %ebp je 0x1758a5 jmp 0x175a42 pushq $0x6 jmp 0x1759fc movaps 0xe0(%rax), %xmm2 cmpleps %xmm0, %xmm2 cmpltps 0xf0(%rax), %xmm0 andps %xmm2, %xmm0 andps %xmm0, %xmm1 jmp 0x17598e pushq $0x4 popq %rbp jmp 0x1759d1 movq %rax, (%rdi) addq $0x8, %rdi bsfq %rdx, %rsi leaq -0x1(%rdx), %rax movq (%r15,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) prefetcht0 0x80(%rsi) prefetcht0 0xc0(%rsi) andq %rdx, %rax je 0x175a3d movq %rsi, (%rdi) addq $0x8, %rdi bsfq %rax, %rsi leaq -0x1(%rax), %rdx jmp 0x175a0e movq %rsi, %r15 jmp 0x1759d1 cmpl $0x6, %ebp jne 0x17640c movl %r15d, %eax andl $0xf, %eax xorl %ebp, %ebp addq $-0x8, %rax movq %rax, 0x140(%rsp) setne %al je 0x17640c movq %rdi, 0x60(%rsp) andq $-0x10, %r15 xorl %edx, %edx movq %r14, 0x68(%rsp) movq %rdx, 0x158(%rsp) movb %al, 0xf(%rsp) imulq $0x50, %rdx, %rax movq 0xb08(%rsp), %rdx movq (%rdx), %rdx movss 0x70(%r9,%rcx,4), %xmm5 movl 0x30(%r15,%rax), %ecx movq %rdx, 0x138(%rsp) movq 0x1e8(%rdx), %rdx movq (%rdx,%rcx,8), %rcx movss 0x28(%rcx), %xmm0 movss 0x2c(%rcx), %xmm1 movss 0x30(%rcx), %xmm2 subss %xmm1, %xmm5 subss %xmm1, %xmm2 divss %xmm2, %xmm5 mulss %xmm0, %xmm5 roundss $0x9, %xmm5, %xmm2 addss 0x1d7aeed(%rip), %xmm0 # 0x1ef09cc minss %xmm0, %xmm2 xorps %xmm1, %xmm1 maxss %xmm2, %xmm1 cvttss2si %xmm1, %edx movslq %edx, %rdx movq 0xe0(%rcx), %rcx imulq $0x38, %rdx, %rsi movl (%r15,%rax), %ebp movl 0x4(%r15,%rax), %edx movq (%rcx,%rsi), %r12 movq 0x38(%rcx,%rsi), %rsi movups (%r12,%rbp,4), %xmm0 movl 0x10(%r15,%rax), %r13d movups (%r12,%r13,4), %xmm11 movl 0x20(%r15,%rax), %ecx movq %rcx, 0xe0(%rsp) movups (%r12,%rcx,4), %xmm10 movups (%r12,%rdx,4), %xmm2 movl 0x14(%r15,%rax), %r8d movups (%r12,%r8,4), %xmm4 movl 0x24(%r15,%rax), %ecx movups (%r12,%rcx,4), %xmm6 movl 0x8(%r15,%rax), %r14d movups (%r12,%r14,4), %xmm7 movl 0x18(%r15,%rax), %r11d movups (%r12,%r11,4), %xmm15 movl 0x28(%r15,%rax), %edi movups (%r12,%rdi,4), %xmm8 movl 0xc(%r15,%rax), %ebx movups (%r12,%rbx,4), %xmm9 movl 0x1c(%r15,%rax), %r10d movups (%r12,%r10,4), %xmm14 movl 0x2c(%r15,%rax), %r9d movups (%r12,%r9,4), %xmm13 movups (%rsi,%rbp,4), %xmm12 movl $0x0, %ebp movups (%rsi,%r13,4), %xmm3 movaps %xmm3, 0x10(%rsp) subss %xmm1, %xmm5 movaps %xmm0, %xmm3 unpcklps %xmm7, %xmm3 # xmm3 = xmm3[0],xmm7[0],xmm3[1],xmm7[1] unpckhps %xmm7, %xmm0 # xmm0 = xmm0[2],xmm7[2],xmm0[3],xmm7[3] movaps %xmm0, %xmm7 movaps %xmm2, %xmm1 unpcklps %xmm9, %xmm1 # xmm1 = xmm1[0],xmm9[0],xmm1[1],xmm9[1] unpckhps %xmm9, %xmm2 # xmm2 = xmm2[2],xmm9[2],xmm2[3],xmm9[3] movups (%rsi,%rdx,4), %xmm0 movq 0x158(%rsp), %rdx unpcklps %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1] movaps %xmm7, 0x30(%rsp) movaps %xmm3, %xmm9 unpcklps %xmm1, %xmm9 # xmm9 = xmm9[0],xmm1[0],xmm9[1],xmm1[1] unpckhps %xmm1, %xmm3 # xmm3 = xmm3[2],xmm1[2],xmm3[3],xmm1[3] movaps %xmm11, %xmm7 unpcklps %xmm15, %xmm11 # xmm11 = xmm11[0],xmm15[0],xmm11[1],xmm15[1] unpckhps %xmm15, %xmm7 # xmm7 = xmm7[2],xmm15[2],xmm7[3],xmm15[3] movaps %xmm4, %xmm1 unpcklps %xmm14, %xmm1 # xmm1 = xmm1[0],xmm14[0],xmm1[1],xmm14[1] unpckhps %xmm14, %xmm4 # xmm4 = xmm4[2],xmm14[2],xmm4[3],xmm14[3] movups (%rsi,%r14,4), %xmm2 movq 0x68(%rsp), %r14 unpcklps %xmm4, %xmm7 # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1] movaps %xmm7, 0xf0(%rsp) movaps %xmm11, %xmm4 unpcklps %xmm1, %xmm4 # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1] movaps %xmm4, 0x1a0(%rsp) unpckhps %xmm1, %xmm11 # xmm11 = xmm11[2],xmm1[2],xmm11[3],xmm1[3] movaps %xmm10, %xmm4 unpcklps %xmm8, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1] unpckhps %xmm8, %xmm10 # xmm10 = xmm10[2],xmm8[2],xmm10[3],xmm8[3] movaps %xmm6, %xmm1 unpcklps %xmm13, %xmm1 # xmm1 = xmm1[0],xmm13[0],xmm1[1],xmm13[1] unpckhps %xmm13, %xmm6 # xmm6 = xmm6[2],xmm13[2],xmm6[3],xmm13[3] movups (%rsi,%rbx,4), %xmm7 unpcklps %xmm6, %xmm10 # xmm10 = xmm10[0],xmm6[0],xmm10[1],xmm6[1] movaps %xmm10, 0x100(%rsp) movaps %xmm4, %xmm10 unpcklps %xmm1, %xmm10 # xmm10 = xmm10[0],xmm1[0],xmm10[1],xmm1[1] unpckhps %xmm1, %xmm4 # xmm4 = xmm4[2],xmm1[2],xmm4[3],xmm1[3] movaps %xmm12, %xmm15 unpcklps %xmm2, %xmm15 # xmm15 = xmm15[0],xmm2[0],xmm15[1],xmm2[1] unpckhps %xmm2, %xmm12 # xmm12 = xmm12[2],xmm2[2],xmm12[3],xmm2[3] movaps %xmm0, %xmm2 unpcklps %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1] unpckhps %xmm7, %xmm0 # xmm0 = xmm0[2],xmm7[2],xmm0[3],xmm7[3] movups (%rsi,%r11,4), %xmm7 unpcklps %xmm0, %xmm12 # xmm12 = xmm12[0],xmm0[0],xmm12[1],xmm0[1] movaps %xmm15, %xmm1 unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] unpckhps %xmm2, %xmm15 # xmm15 = xmm15[2],xmm2[2],xmm15[3],xmm2[3] movaps 0x10(%rsp), %xmm6 movaps %xmm6, %xmm13 unpcklps %xmm7, %xmm13 # xmm13 = xmm13[0],xmm7[0],xmm13[1],xmm7[1] unpckhps %xmm7, %xmm6 # xmm6 = xmm6[2],xmm7[2],xmm6[3],xmm7[3] movups (%rsi,%r8,4), %xmm0 movups (%rsi,%r10,4), %xmm2 movaps %xmm0, %xmm7 unpcklps %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1] unpckhps %xmm2, %xmm0 # xmm0 = xmm0[2],xmm2[2],xmm0[3],xmm2[3] unpcklps %xmm0, %xmm6 # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1] movaps %xmm6, 0x10(%rsp) movaps %xmm13, %xmm0 unpcklps %xmm7, %xmm0 # xmm0 = xmm0[0],xmm7[0],xmm0[1],xmm7[1] unpckhps %xmm7, %xmm13 # xmm13 = xmm13[2],xmm7[2],xmm13[3],xmm7[3] movq 0xe0(%rsp), %r8 movups (%rsi,%r8,4), %xmm2 movups (%rsi,%rdi,4), %xmm7 movaps %xmm2, %xmm14 unpcklps %xmm7, %xmm14 # xmm14 = xmm14[0],xmm7[0],xmm14[1],xmm7[1] unpckhps %xmm7, %xmm2 # xmm2 = xmm2[2],xmm7[2],xmm2[3],xmm7[3] movups (%rsi,%rcx,4), %xmm7 movq 0x20(%rsp), %rcx movups (%rsi,%r9,4), %xmm8 movq 0x28(%rsp), %r9 movaps %xmm7, %xmm6 unpcklps %xmm8, %xmm6 # xmm6 = xmm6[0],xmm8[0],xmm6[1],xmm8[1] unpckhps %xmm8, %xmm7 # xmm7 = xmm7[2],xmm8[2],xmm7[3],xmm8[3] unpcklps %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1] movaps %xmm14, %xmm7 unpcklps %xmm6, %xmm7 # xmm7 = xmm7[0],xmm6[0],xmm7[1],xmm6[1] unpckhps %xmm6, %xmm14 # xmm14 = xmm14[2],xmm6[2],xmm14[3],xmm6[3] movss 0x1d76a20(%rip), %xmm8 # 0x1eec714 subss %xmm5, %xmm8 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm5, %xmm1 mulps %xmm8, %xmm9 addps %xmm1, %xmm9 mulps %xmm5, %xmm15 mulps %xmm8, %xmm3 addps %xmm15, %xmm3 movaps %xmm9, %xmm15 mulps %xmm5, %xmm12 movaps 0x30(%rsp), %xmm6 mulps %xmm8, %xmm6 addps %xmm12, %xmm6 mulps %xmm5, %xmm0 movaps 0x1a0(%rsp), %xmm9 mulps %xmm8, %xmm9 addps %xmm0, %xmm9 mulps %xmm5, %xmm13 movaps 0x10(%rsp), %xmm1 mulps %xmm5, %xmm1 mulps %xmm8, %xmm11 addps %xmm13, %xmm11 movaps 0xf0(%rsp), %xmm0 mulps %xmm8, %xmm0 addps %xmm1, %xmm0 movaps %xmm0, %xmm1 mulps %xmm5, %xmm7 mulps %xmm5, %xmm14 mulps %xmm2, %xmm5 mulps %xmm8, %xmm10 addps %xmm7, %xmm10 mulps %xmm8, %xmm4 addps %xmm14, %xmm4 movaps %xmm6, %xmm2 mulps 0x100(%rsp), %xmm8 addps %xmm5, %xmm8 movaps 0x30(%r15,%rax), %xmm0 movaps %xmm0, 0x1c0(%rsp) movaps 0x40(%r15,%rax), %xmm0 movaps %xmm0, 0x1b0(%rsp) movaps %xmm15, %xmm0 subps %xmm9, %xmm0 movaps %xmm0, %xmm6 movaps %xmm0, 0x10(%rsp) movaps %xmm3, %xmm14 movaps %xmm3, %xmm5 subps %xmm11, %xmm5 movaps %xmm2, %xmm11 subps %xmm1, %xmm11 subps %xmm15, %xmm10 subps %xmm3, %xmm4 subps %xmm2, %xmm8 movaps %xmm5, %xmm0 mulps %xmm8, %xmm0 movaps %xmm11, %xmm3 mulps %xmm4, %xmm3 subps %xmm0, %xmm3 movaps %xmm6, %xmm0 mulps %xmm8, %xmm0 movss (%r9,%rcx,4), %xmm1 movss 0x10(%r9,%rcx,4), %xmm6 movss 0x40(%r9,%rcx,4), %xmm9 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%r9,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm1, %xmm15 subps %xmm6, %xmm14 movaps %xmm14, %xmm1 mulps %xmm9, %xmm1 movaps %xmm15, %xmm13 mulps %xmm12, %xmm13 subps %xmm1, %xmm13 mulps %xmm13, %xmm8 mulps %xmm11, %xmm13 mulps %xmm10, %xmm11 subps %xmm11, %xmm0 movss 0x20(%r9,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movss 0x60(%r9,%rcx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] subps %xmm1, %xmm2 movaps %xmm15, 0x100(%rsp) mulps %xmm6, %xmm15 movaps %xmm2, %xmm7 mulps %xmm9, %xmm7 subps %xmm15, %xmm7 movaps 0x10(%rsp), %xmm15 movaps %xmm15, %xmm1 mulps %xmm4, %xmm1 mulps %xmm7, %xmm4 mulps %xmm5, %xmm7 mulps %xmm10, %xmm5 subps %xmm1, %xmm5 movaps %xmm2, 0x30(%rsp) mulps %xmm12, %xmm2 movaps %xmm14, 0xf0(%rsp) mulps %xmm6, %xmm14 subps %xmm2, %xmm14 mulps %xmm5, %xmm6 mulps %xmm0, %xmm12 addps %xmm6, %xmm12 movaps %xmm3, 0xe0(%rsp) mulps %xmm3, %xmm9 addps %xmm12, %xmm9 addps %xmm8, %xmm4 mulps %xmm14, %xmm10 addps %xmm4, %xmm10 addps %xmm13, %xmm7 movaps %xmm9, %xmm4 andps 0x1d767e8(%rip), %xmm4 # 0x1eec6d0 xorps %xmm4, %xmm10 mulps %xmm15, %xmm14 addps %xmm7, %xmm14 xorps %xmm4, %xmm14 movaps %xmm10, %xmm1 xorps %xmm7, %xmm7 cmpnltps %xmm7, %xmm1 movaps %xmm14, %xmm6 cmpnltps %xmm7, %xmm6 andps %xmm1, %xmm6 movaps %xmm9, %xmm2 andps 0x1d767a7(%rip), %xmm2 # 0x1eec6c0 cmpneqps %xmm7, %xmm9 andps %xmm9, %xmm6 movaps %xmm10, %xmm1 addps %xmm14, %xmm1 cmpleps %xmm2, %xmm1 andps %xmm6, %xmm1 movmskps %xmm1, %eax testl %eax, %eax jne 0x175f51 incq %rdx cmpq 0x140(%rsp), %rdx setb %al jne 0x175a78 jmp 0x1763ba movaps 0x30(%rsp), %xmm3 mulps %xmm5, %xmm3 movaps 0xf0(%rsp), %xmm15 mulps %xmm0, %xmm15 addps %xmm3, %xmm15 movaps 0x100(%rsp), %xmm3 mulps 0xe0(%rsp), %xmm3 addps %xmm15, %xmm3 xorps %xmm3, %xmm4 movss 0x30(%r9,%rcx,4), %xmm7 movss 0x80(%r9,%rcx,4), %xmm8 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm2, %xmm7 cmpltps %xmm4, %xmm7 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm2, %xmm8 movaps %xmm4, %xmm6 cmpleps %xmm8, %xmm6 andps %xmm7, %xmm6 andps %xmm1, %xmm6 movmskps %xmm6, %esi testl %esi, %esi je 0x175f38 movaps %xmm10, 0x1d0(%rsp) movaps %xmm14, 0x1e0(%rsp) movaps %xmm4, 0x1f0(%rsp) movaps %xmm2, 0x200(%rsp) movaps %xmm6, 0x220(%rsp) movaps 0xe0(%rsp), %xmm1 movaps %xmm1, 0x260(%rsp) movaps %xmm0, 0x270(%rsp) movaps %xmm5, 0x280(%rsp) rcpps %xmm2, %xmm0 mulps %xmm0, %xmm2 movaps 0x1d769fa(%rip), %xmm1 # 0x1eeca10 subps %xmm2, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps 0x1f0(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x250(%rsp) movaps 0x1d0(%rsp), %xmm0 mulps %xmm1, %xmm0 movaps %xmm0, 0x230(%rsp) mulps 0x1e0(%rsp), %xmm1 movaps %xmm1, 0x240(%rsp) movq %rdx, %r12 bsfq %rsi, %rdi movl 0x1c0(%rsp,%rdi,4), %edx movq 0x138(%rsp), %r13 movq 0x1e8(%r13), %rax movq (%rax,%rdx,8), %rbx movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%rbx) je 0x1760de movq 0xb08(%rsp), %rax movq 0x10(%rax), %rax cmpq $0x0, 0x10(%rax) movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movaps 0xb0(%rsp), %xmm11 jne 0x176136 cmpq $0x0, 0x48(%rbx) jne 0x176136 xorl %eax, %eax movaps 0xa0(%rsp), %xmm5 movaps 0x90(%rsp), %xmm6 movaps 0x80(%rsp), %xmm7 movaps 0x70(%rsp), %xmm8 jmp 0x17611d btcq %rdi, %rsi movb $0x1, %al movaps 0xa0(%rsp), %xmm5 movaps 0x90(%rsp), %xmm6 movaps 0x80(%rsp), %xmm7 movaps 0x70(%rsp), %xmm8 movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movaps 0xb0(%rsp), %xmm11 testb %al, %al je 0x176420 testq %rsi, %rsi movq %r12, %rdx jne 0x176055 jmp 0x175f38 movq %rsi, 0x10(%rsp) movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x30(%rsp) movss 0x250(%rsp,%rdi,4), %xmm0 movss 0x230(%rsp,%rdi,4), %xmm1 movss 0x240(%rsp,%rdi,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0xb08(%rsp), %rax movq 0x8(%rax), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x1b0(%rsp,%rdi,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x260(%rsp,%rdi,4), %xmm4 movss 0x270(%rsp,%rdi,4), %xmm5 movq %rdi, %r14 movss 0x280(%rsp,%rdi,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x290(%rsp) movaps %xmm5, 0x2a0(%rsp) movaps %xmm6, 0x2b0(%rsp) movaps %xmm1, 0x2c0(%rsp) movaps %xmm2, 0x2d0(%rsp) movdqa %xmm3, 0x2e0(%rsp) movdqa %xmm0, 0x2f0(%rsp) leaq 0x300(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x300(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x310(%rsp) movq 0x128(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0x110(%rsp) leaq 0x110(%rsp), %rcx movq %rcx, 0x160(%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x168(%rsp) movq %rax, 0x170(%rsp) movq %r9, 0x178(%rsp) leaq 0x290(%rsp), %rax movq %rax, 0x180(%rsp) movl $0x4, 0x188(%rsp) movq 0x48(%rbx), %rax testq %rax, %rax je 0x1762a8 leaq 0x160(%rsp), %rdi callq *%rax movdqa 0x110(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x176320 movq 0xb08(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x1762e2 testb $0x2, (%rcx) jne 0x1762d8 testb $0x40, 0x3e(%rbx) je 0x1762e2 leaq 0x160(%rsp), %rdi callq *%rax movdqa 0x110(%rsp), %xmm0 pcmpeqd 0x1d7571d(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d75b21(%rip), %xmm1 # 0x1eebe20 movq 0x178(%rsp), %rax movaps 0x1d756f2(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x176330 pcmpeqd 0x1d756e8(%rip), %xmm1 # 0x1eeba10 pxor 0x1d75af0(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x176366 movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rdx movd 0x30(%rsp), %xmm0 movd %xmm0, 0x80(%rcx,%rdx,4) movq 0x10(%rsp), %rcx btcq %r14, %rcx movq %rcx, 0x10(%rsp) movq 0x28(%rsp), %r9 movq 0x20(%rsp), %rcx movaps 0xa0(%rsp), %xmm5 movaps 0x90(%rsp), %xmm6 movaps 0x80(%rsp), %xmm7 movaps 0x70(%rsp), %xmm8 movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movaps 0xb0(%rsp), %xmm11 movq 0x68(%rsp), %r14 xorl %ebp, %ebp movq 0x10(%rsp), %rsi jmp 0x17611d movaps 0xa0(%rsp), %xmm5 movaps 0x90(%rsp), %xmm6 movaps 0x80(%rsp), %xmm7 movaps 0x70(%rsp), %xmm8 movq 0x60(%rsp), %rdi movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movq 0x58(%rsp), %r8 movq 0x50(%rsp), %r10 movq 0x48(%rsp), %r11 movq 0x40(%rsp), %rbx movaps 0xb0(%rsp), %xmm11 testb $0x3, %bpl movq 0x130(%rsp), %rdx je 0x175881 jmp 0x176451 testb $0x1, 0xf(%rsp) movq 0x60(%rsp), %rdi movq 0x58(%rsp), %r8 movq 0x50(%rsp), %r10 movq 0x48(%rsp), %r11 movq 0x40(%rsp), %rbx je 0x17640c movl $0xff800000, 0x80(%r9,%rcx,4) # imm = 0xFF800000 pushq $0x1 popq %rbp jmp 0x17640c leaq 0x320(%rsp), %rax cmpq %rax, %rdx setne %al addq $0xac8, %rsp # imm = 0xAC8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMvMBIntersectorKPluecker<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x12d8, %rsp # imm = 0x12D8 movq %r9, %rbx movq %rcx, %r14 movq 0x1318(%rsp), %r10 movq 0x1310(%rsp), %rax leaq 0x3a0(%rsp), %rcx movq %rdx, -0x10(%rcx) movq %rcx, 0x8(%rsp) andl $0x0, -0x8(%rcx) movss (%rax,%r14,4), %xmm8 movss 0x10(%rax,%r14,4), %xmm9 movss 0x20(%rax,%r14,4), %xmm10 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%r14,4), %xmm11 movss 0x70(%rax,%r14,4), %xmm12 movss 0x80(%rax,%r14,4), %xmm13 movss 0x1da9a1e(%rip), %xmm14 # 0x1f1ff10 movaps %xmm11, %xmm15 mulss %xmm14, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm12, %xmm6 mulss %xmm14, %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x1da99f5(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulss %xmm0, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%r14,4), %rsi movslq 0xa0(%rax,%r14,4), %rdi movslq 0xb0(%rax,%r14,4), %r9 movq %rsi, %r15 xorq $0x10, %r15 movq %rdi, %r12 xorq $0x10, %r12 movq %r9, %r13 xorq $0x10, %r13 movss 0xc0(%rax,%r14,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] pushq $0x1 popq %rax movl %r14d, %ecx shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fae195(%rip), %rax # 0x2124730 movq %rax, 0x98(%rsp) movq %rsi, 0xb8(%rsp) movq %rdi, 0x18(%rsp) movq %r9, 0x10(%rsp) movaps %xmm8, 0x230(%rsp) movaps %xmm9, 0x220(%rsp) movaps %xmm10, 0x210(%rsp) movaps %xmm11, 0x200(%rsp) movaps %xmm12, 0x1f0(%rsp) movaps %xmm13, 0x1e0(%rsp) movaps %xmm14, 0x1d0(%rsp) movaps %xmm15, 0x1c0(%rsp) movaps %xmm6, 0x100(%rsp) movq %r15, 0xb0(%rsp) movq %r12, 0xa8(%rsp) movq %r13, 0xa0(%rsp) movaps %xmm7, 0xf0(%rsp) leaq 0x390(%rsp), %rax cmpq %rax, 0x8(%rsp) je 0x177517 movq 0x8(%rsp), %rax movss -0x8(%rax), %xmm0 addq $-0x10, %rax movq %rax, 0x8(%rsp) ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x176625 movq 0x8(%rsp), %rax movq (%rax), %rbp testb $0x8, %bpl jne 0x176752 movq %rbp, %rax andq $-0x10, %rax movss 0x70(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movq 0xb8(%rsp), %rcx movaps 0x80(%rax,%rcx), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rcx), %xmm3 subps %xmm8, %xmm3 mulps %xmm15, %xmm3 movaps %xmm7, %xmm2 movaps 0x80(%rax,%rdi), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rdi), %xmm4 maxps %xmm3, %xmm2 subps %xmm9, %xmm4 mulps %xmm6, %xmm4 movaps 0x80(%rax,%r9), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r9), %xmm3 subps %xmm10, %xmm3 mulps %xmm14, %xmm3 maxps %xmm3, %xmm4 maxps %xmm4, %xmm2 movaps 0x80(%rax,%r15), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%r15), %xmm4 subps %xmm8, %xmm4 movaps 0x80(%rax,%r12), %xmm5 mulps %xmm0, %xmm5 addps 0x20(%rax,%r12), %xmm5 mulps %xmm11, %xmm4 subps %xmm9, %xmm5 mulps %xmm12, %xmm5 movaps 0x80(%rax,%r13), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r13), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm3, %xmm5 movaps %xmm1, %xmm3 minps %xmm4, %xmm3 minps %xmm5, %xmm3 movl %ebp, %ecx andl $0x7, %ecx cmpl $0x6, %ecx je 0x1767a7 movaps %xmm2, %xmm0 cmpleps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %edx movaps %xmm2, 0x110(%rsp) testb $0x8, %bpl jne 0x1767a3 testq %rdx, %rdx je 0x1767cc andq $-0x10, %rbp bsfq %rdx, %rcx leaq -0x1(%rdx), %r8 xorl %eax, %eax movq %rdx, %r11 movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) movq %r11, %rsi andq %r11, %r8 jne 0x1767d1 movq %rdx, %rbp movq %rsi, %rdx testl %eax, %eax je 0x17665e jmp 0x1769ea pushq $0x6 jmp 0x1767ce movaps %xmm2, %xmm4 cmpleps %xmm3, %xmm4 movaps 0xe0(%rax), %xmm3 cmpleps %xmm0, %xmm3 cmpltps 0xf0(%rax), %xmm0 andps %xmm3, %xmm0 andps %xmm4, %xmm0 jmp 0x176742 pushq $0x4 popq %rax jmp 0x176796 movl 0x110(%rsp,%rcx,4), %edi bsfq %r8, %r9 leaq -0x1(%r8), %rcx movq (%rbp,%r9,8), %r11 prefetcht0 (%r11) prefetcht0 0x40(%r11) prefetcht0 0x80(%r11) prefetcht0 0xc0(%r11) movl 0x110(%rsp,%r9,4), %r9d andq %r8, %rcx jne 0x176852 movq 0x8(%rsp), %rcx addq $0x10, %rcx cmpl %r9d, %edi jae 0x17682f movq 0x8(%rsp), %rdi movq %r11, (%rdi) movl %r9d, 0x8(%rdi) movq %rcx, 0x8(%rsp) movq %rdx, %rbp jmp 0x176843 movq 0x8(%rsp), %r8 movq %rdx, (%r8) movl %edi, 0x8(%r8) movq %rcx, 0x8(%rsp) movq %r11, %rbp movq 0x18(%rsp), %rdi movq 0x10(%rsp), %r9 jmp 0x176793 movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %r11, %xmm4 movd %r9d, %xmm0 punpcklqdq %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0] bsfq %rcx, %r8 leaq -0x1(%rcx), %rdx movq (%rbp,%r8,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) prefetcht0 0x80(%rdi) prefetcht0 0xc0(%rdi) movq %rdi, %xmm3 movd 0x110(%rsp,%r8,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x176913 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 blendvps %xmm0, %xmm4, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm3, %xmm5 movaps %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm5, %xmm2 movq 0x8(%rsp), %rcx movaps %xmm2, (%rcx) movaps %xmm3, 0x10(%rcx) movq %xmm4, %rbp addq $0x20, %rcx movq %rcx, 0x8(%rsp) jmp 0x176843 bsfq %rdx, %rcx movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 movd 0x110(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm4, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps 0xf0(%rsp), %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm4 blendvps %xmm0, %xmm3, %xmm4 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm4, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm5 movaps %xmm6, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm6, %xmm5 movaps 0x100(%rsp), %xmm6 movq 0x8(%rsp), %rcx movaps %xmm2, (%rcx) movaps %xmm5, 0x10(%rcx) movaps %xmm4, 0x20(%rcx) movq %xmm3, %rbp addq $0x30, %rcx jmp 0x176909 cmpl $0x6, %eax jne 0x176625 movl %ebp, %esi andl $0xf, %esi addq $-0x8, %rsi je 0x177494 andq $-0x10, %rbp xorl %r8d, %r8d imulq $0x140, %r8, %r13 # imm = 0x140 movss 0x70(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x90(%rbp,%r13), %xmm2 mulps %xmm1, %xmm2 addps (%rbp,%r13), %xmm2 movaps 0xa0(%rbp,%r13), %xmm12 mulps %xmm1, %xmm12 addps 0x10(%rbp,%r13), %xmm12 movaps 0xb0(%rbp,%r13), %xmm14 mulps %xmm1, %xmm14 addps 0x20(%rbp,%r13), %xmm14 movaps 0xc0(%rbp,%r13), %xmm0 mulps %xmm1, %xmm0 addps 0x30(%rbp,%r13), %xmm0 movaps 0xd0(%rbp,%r13), %xmm5 mulps %xmm1, %xmm5 addps 0x40(%rbp,%r13), %xmm5 movaps 0xe0(%rbp,%r13), %xmm11 mulps %xmm1, %xmm11 addps 0x50(%rbp,%r13), %xmm11 movaps 0xf0(%rbp,%r13), %xmm3 mulps %xmm1, %xmm3 addps 0x60(%rbp,%r13), %xmm3 movaps 0x100(%rbp,%r13), %xmm13 mulps %xmm1, %xmm13 addps 0x70(%rbp,%r13), %xmm13 mulps 0x110(%rbp,%r13), %xmm1 addps 0x80(%rbp,%r13), %xmm1 leaq 0x7(%rsp), %rax movq %rax, 0x140(%rsp) movss (%rbx,%r14,4), %xmm6 movss 0x10(%rbx,%r14,4), %xmm7 movss 0x20(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm6, %xmm2 subps %xmm7, %xmm12 subps %xmm4, %xmm14 subps %xmm6, %xmm0 subps %xmm7, %xmm5 subps %xmm4, %xmm11 subps %xmm6, %xmm3 subps %xmm7, %xmm13 subps %xmm4, %xmm1 movaps %xmm3, %xmm9 subps %xmm2, %xmm9 movaps %xmm13, %xmm15 subps %xmm12, %xmm15 movaps %xmm1, %xmm10 subps %xmm14, %xmm10 movaps %xmm13, %xmm4 addps %xmm12, %xmm4 movaps %xmm1, %xmm7 addps %xmm14, %xmm7 movaps %xmm9, %xmm8 mulps %xmm4, %xmm8 mulps %xmm10, %xmm4 movaps %xmm15, %xmm6 mulps %xmm7, %xmm6 subps %xmm4, %xmm6 movaps %xmm3, %xmm4 addps %xmm2, %xmm4 movaps %xmm9, 0x2e0(%rsp) mulps %xmm9, %xmm7 movaps %xmm4, %xmm9 movaps %xmm10, 0x2d0(%rsp) mulps %xmm10, %xmm9 subps %xmm7, %xmm9 movaps %xmm15, 0x2c0(%rsp) mulps %xmm15, %xmm4 subps %xmm4, %xmm8 movss 0x50(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x20(%rsp) movss 0x60(%rbx,%r14,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm8 mulps %xmm4, %xmm9 addps %xmm8, %xmm9 movss 0x40(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x30(%rsp) mulps %xmm4, %xmm6 addps %xmm9, %xmm6 movaps %xmm2, %xmm4 movaps %xmm0, %xmm9 subps %xmm0, %xmm4 movaps %xmm4, %xmm15 movaps %xmm4, 0x70(%rsp) movaps %xmm12, %xmm8 subps %xmm5, %xmm8 movaps %xmm14, %xmm0 subps %xmm11, %xmm0 movaps %xmm12, 0x60(%rsp) movaps %xmm12, %xmm4 addps %xmm5, %xmm4 movaps %xmm14, 0x2f0(%rsp) movaps %xmm14, %xmm12 addps %xmm11, %xmm12 movaps %xmm15, %xmm14 mulps %xmm4, %xmm14 mulps %xmm0, %xmm4 movaps %xmm8, %xmm7 mulps %xmm12, %xmm7 subps %xmm4, %xmm7 movaps %xmm2, 0x2b0(%rsp) movaps %xmm2, %xmm4 addps %xmm9, %xmm4 movaps %xmm9, %xmm2 mulps %xmm15, %xmm12 movaps %xmm4, %xmm15 movaps %xmm0, 0x290(%rsp) mulps %xmm0, %xmm15 subps %xmm12, %xmm15 mulps %xmm8, %xmm4 subps %xmm4, %xmm14 mulps %xmm10, %xmm14 mulps 0x20(%rsp), %xmm15 addps %xmm14, %xmm15 movaps 0x30(%rsp), %xmm9 mulps %xmm9, %xmm7 addps %xmm15, %xmm7 movaps %xmm2, %xmm14 subps %xmm3, %xmm14 addps %xmm2, %xmm3 movaps %xmm5, %xmm4 subps %xmm13, %xmm4 addps %xmm5, %xmm13 movaps %xmm11, %xmm12 subps %xmm1, %xmm12 addps %xmm11, %xmm1 movaps %xmm14, %xmm5 mulps %xmm13, %xmm5 mulps %xmm12, %xmm13 movaps %xmm4, %xmm2 mulps %xmm1, %xmm2 subps %xmm13, %xmm2 mulps %xmm14, %xmm1 movaps %xmm3, %xmm11 mulps %xmm12, %xmm11 subps %xmm1, %xmm11 mulps %xmm4, %xmm3 subps %xmm3, %xmm5 movaps %xmm10, 0x2a0(%rsp) mulps %xmm10, %xmm5 movaps %xmm9, %xmm0 movaps 0x70(%rsp), %xmm9 mulps 0x20(%rsp), %xmm11 addps %xmm5, %xmm11 mulps %xmm0, %xmm2 addps %xmm11, %xmm2 movaps %xmm6, %xmm5 addps %xmm7, %xmm5 addps %xmm2, %xmm5 movaps %xmm6, %xmm0 minps %xmm7, %xmm0 minps %xmm2, %xmm0 movaps %xmm6, 0x250(%rsp) movaps %xmm6, %xmm13 movaps %xmm7, 0x260(%rsp) maxps %xmm7, %xmm13 maxps %xmm2, %xmm13 movaps %xmm5, 0x240(%rsp) andps 0x1d759a5(%rip), %xmm5 # 0x1eec6c0 movaps %xmm5, %xmm1 mulps 0x1d7b04b(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm13 xorps 0x1d7599f(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm13 movmskps %xmm13, %eax testl %eax, %eax je 0x177488 movaps %xmm8, %xmm0 movaps 0x2d0(%rsp), %xmm11 mulps %xmm11, %xmm0 movaps %xmm9, %xmm1 movaps 0x2c0(%rsp), %xmm6 mulps %xmm6, %xmm1 movaps %xmm4, 0x280(%rsp) movaps %xmm12, %xmm3 movaps %xmm12, 0x270(%rsp) movaps %xmm4, %xmm12 movaps 0x290(%rsp), %xmm15 mulps %xmm15, %xmm12 movaps %xmm14, %xmm10 mulps %xmm8, %xmm10 mulps %xmm15, %xmm6 subps %xmm0, %xmm6 movaps 0x2e0(%rsp), %xmm4 movaps %xmm4, %xmm2 mulps %xmm8, %xmm4 mulps %xmm3, %xmm8 subps %xmm12, %xmm8 movaps 0x2b0(%rsp), %xmm7 movaps 0x1d75900(%rip), %xmm3 # 0x1eec6c0 andps %xmm3, %xmm0 andps %xmm3, %xmm12 cmpltps %xmm12, %xmm0 blendvps %xmm0, %xmm6, %xmm8 movaps %xmm9, %xmm0 mulps 0x270(%rsp), %xmm0 mulps %xmm15, %xmm2 mulps %xmm15, %xmm14 mulps %xmm9, %xmm11 subps %xmm2, %xmm11 subps %xmm0, %xmm14 andps %xmm3, %xmm2 andps %xmm3, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm11, %xmm14 mulps 0x280(%rsp), %xmm9 subps %xmm1, %xmm4 subps %xmm10, %xmm9 andps %xmm3, %xmm1 andps %xmm3, %xmm10 cmpltps %xmm10, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm9 movaps 0x2a0(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x20(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 movaps 0x30(%rsp), %xmm2 mulps %xmm8, %xmm2 addps %xmm0, %xmm2 addps %xmm2, %xmm2 movaps 0x2f0(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x60(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 mulps %xmm8, %xmm7 addps %xmm0, %xmm7 rcpps %xmm2, %xmm0 movaps %xmm2, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d75b8f(%rip), %xmm12 # 0x1eeca10 subps %xmm1, %xmm12 addps %xmm7, %xmm7 mulps %xmm0, %xmm12 addps %xmm0, %xmm12 mulps %xmm7, %xmm12 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm12, %xmm0 cmpleps %xmm1, %xmm0 movss 0x30(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cmpleps %xmm12, %xmm1 andps %xmm1, %xmm0 andps %xmm13, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x177488 movaps %xmm2, %xmm4 cmpneqps 0x1d74b39(%rip), %xmm4 # 0x1eeba10 andps %xmm4, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x177488 movaps 0x250(%rsp), %xmm6 movaps %xmm6, 0x110(%rsp) movaps 0x260(%rsp), %xmm4 movaps %xmm4, 0x120(%rsp) movaps 0x240(%rsp), %xmm7 movaps %xmm7, 0x130(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x140(%rsp) movaps %xmm0, 0x150(%rsp) movaps %xmm12, 0x180(%rsp) movaps %xmm8, 0x190(%rsp) movaps %xmm14, 0x1a0(%rsp) movaps %xmm9, 0x1b0(%rsp) movq (%r10), %r11 movaps 0x150(%rsp), %xmm0 movaps %xmm0, 0x40(%rsp) rcpps %xmm7, %xmm1 mulps %xmm1, %xmm7 movaps 0x1d75aa5(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm2 subps %xmm7, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 cmpnltps 0x1d7adc1(%rip), %xmm5 # 0x1ef1d40 andps %xmm2, %xmm5 mulps %xmm5, %xmm6 minps %xmm3, %xmm6 movaps %xmm6, 0x160(%rsp) mulps %xmm4, %xmm5 minps %xmm3, %xmm5 movaps %xmm5, 0x170(%rsp) movaps 0x1d74a4b(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm12, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x176fd0 movaps %xmm1, %xmm0 addq %rbp, %r13 movmskps %xmm0, %eax bsfq %rax, %r12 movl 0x120(%r13,%r12,4), %eax movq 0x1e8(%r11), %rcx movq (%rcx,%rax,8), %r15 movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%r15) je 0x177331 movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x177015 cmpq $0x0, 0x40(%r15) je 0x1773db movss 0x160(%rsp,%r12,4), %xmm0 movss 0x170(%rsp,%r12,4), %xmm1 movss 0x190(%rsp,%r12,4), %xmm2 movss 0x1a0(%rsp,%r12,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x130(%r13,%r12,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1b0(%rsp,%r12,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x300(%rsp) movaps %xmm3, 0x310(%rsp) movaps %xmm6, 0x320(%rsp) movaps %xmm0, 0x330(%rsp) movaps %xmm1, 0x340(%rsp) movdqa %xmm5, 0x350(%rsp) movdqa %xmm4, 0x360(%rsp) leaq 0x370(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x370(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x380(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x70(%rsp) movss 0x180(%rsp,%r12,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x98(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x80(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x18(%r15), %rax movq %rax, 0xc8(%rsp) movq 0x8(%r10), %rax movq %rax, 0xd0(%rsp) movq %rbx, 0xd8(%rsp) leaq 0x300(%rsp), %rax movq %rax, 0xe0(%rsp) movl $0x4, 0xe8(%rsp) movq 0x40(%r15), %rax testq %rax, %rax movq %rdx, 0x58(%rsp) movq %r8, 0x50(%rsp) movaps %xmm12, 0x20(%rsp) movq %r11, 0x30(%rsp) je 0x1771c8 leaq 0xc0(%rsp), %rdi movq %rsi, 0x60(%rsp) callq *%rax movq 0x30(%rsp), %r11 movaps 0x20(%rsp), %xmm12 movq 0x50(%rsp), %r8 movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x10(%rsp), %r9 movq 0x18(%rsp), %rdi movq 0x1318(%rsp), %r10 movdqa 0x80(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x177385 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x17722c testb $0x2, (%rcx) jne 0x1771f5 testb $0x40, 0x3e(%r15) je 0x17722c leaq 0xc0(%rsp), %rdi movq %rsi, %r15 callq *%rax movq 0x30(%rsp), %r11 movaps 0x20(%rsp), %xmm12 movq 0x50(%rsp), %r8 movq %r15, %rsi movq 0x58(%rsp), %rdx movq 0x10(%rsp), %r9 movq 0x18(%rsp), %rdi movq 0x1318(%rsp), %r10 movdqa 0x80(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d747ce(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d74bd2(%rip), %xmm1 # 0x1eebe20 je 0x177395 movq 0xd8(%rsp), %rax movq 0xe0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x177395 andl $0x0, 0x40(%rsp,%r12,4) movaps 0x40(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x177488 movaps 0x1d746a2(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm12, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x177379 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r12 jmp 0x176fda pcmpeqd 0x1d74683(%rip), %xmm1 # 0x1eeba10 pxor 0x1d74a8b(%rip), %xmm1 # 0x1eebe20 ptest 0x1d75782(%rip), %xmm1 # 0x1eecb20 jne 0x1773b0 movd 0x70(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x40(%rsp,%r12,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm12, %xmm1 cmpleps %xmm0, %xmm1 andps 0x40(%rsp), %xmm1 movaps %xmm1, 0x40(%rsp) jmp 0x177337 movss 0x160(%rsp,%r12,4), %xmm0 movss 0x170(%rsp,%r12,4), %xmm1 movss 0x180(%rsp,%r12,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x190(%rsp,%r12,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1a0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1b0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x130(%r13,%r12,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) incq %r8 cmpq %rsi, %r8 jne 0x176a09 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x230(%rsp), %xmm8 movaps 0x220(%rsp), %xmm9 movaps 0x210(%rsp), %xmm10 movaps 0x200(%rsp), %xmm11 movaps 0x1f0(%rsp), %xmm12 movaps 0x1e0(%rsp), %xmm13 movaps 0x1d0(%rsp), %xmm14 movaps 0x1c0(%rsp), %xmm15 movaps 0x100(%rsp), %xmm6 movq 0xb0(%rsp), %r15 movq 0xa8(%rsp), %r12 movq 0xa0(%rsp), %r13 movaps 0xf0(%rsp), %xmm7 jmp 0x176625 addq $0x12d8, %rsp # imm = 0x12D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMvMBIntersectorKPluecker<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb58, %rsp # imm = 0xB58 movq 0xb98(%rsp), %rdi movq 0xb90(%rsp), %rax leaq 0x3b8(%rsp), %r8 movq %rdx, -0x8(%r8) movss (%rax,%rcx,4), %xmm12 movss 0x10(%rax,%rcx,4), %xmm14 movss 0x20(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x260(%rsp) movss 0x60(%rax,%rcx,4), %xmm1 movss 0x70(%rax,%rcx,4), %xmm2 movss 0x80(%rax,%rcx,4), %xmm3 movss 0x1da8973(%rip), %xmm0 # 0x1f1ff10 movaps %xmm1, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x210(%rsp) movaps %xmm2, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x200(%rsp) mulss %xmm3, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x220(%rsp) movss 0x1da8939(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, 0x250(%rsp) mulss %xmm0, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm2, 0x240(%rsp) mulss %xmm0, %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, 0x230(%rsp) movslq 0x90(%rax,%rcx,4), %r10 movslq 0xa0(%rax,%rcx,4), %r11 movslq 0xb0(%rax,%rcx,4), %rsi movq %r10, %r13 xorq $0x10, %r13 movq %r11, %rbp xorq $0x10, %rbp movq %rsi, %rdx xorq $0x10, %rdx movq %rdx, 0xd8(%rsp) movss 0xc0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1f0(%rsp) movss 0xd0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1e0(%rsp) pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fad0b4(%rip), %rax # 0x2124730 movq %rax, 0xb8(%rsp) movaps %xmm12, 0x70(%rsp) movaps %xmm14, 0x60(%rsp) movq %r13, 0x58(%rsp) movq %rbp, 0x50(%rsp) movq %r8, %rdx leaq 0x3b0(%rsp), %rax cmpq %rax, %r8 je 0x1781e1 leaq -0x8(%rdx), %r8 movq %rdx, 0xd0(%rsp) movq -0x8(%rdx), %r12 testb $0x8, %r12b jne 0x1777cf movq %r12, %rax andq $-0x10, %rax movss 0x70(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%r10), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r10), %xmm2 subps %xmm12, %xmm2 mulps 0x210(%rsp), %xmm2 movaps 0x1f0(%rsp), %xmm1 movaps 0x80(%rax,%r11), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r11), %xmm3 maxps %xmm2, %xmm1 subps %xmm14, %xmm3 mulps 0x200(%rsp), %xmm3 movaps 0x80(%rax,%rsi), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%rsi), %xmm2 movaps 0x260(%rsp), %xmm5 subps %xmm5, %xmm2 mulps 0x220(%rsp), %xmm2 maxps %xmm2, %xmm3 maxps %xmm3, %xmm1 movaps 0x80(%rax,%r13), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r13), %xmm3 subps %xmm12, %xmm3 mulps 0x250(%rsp), %xmm3 movaps 0x1e0(%rsp), %xmm2 minps %xmm3, %xmm2 movaps 0x80(%rax,%rbp), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rbp), %xmm3 subps %xmm14, %xmm3 movq 0xd8(%rsp), %rdx movaps 0x80(%rax,%rdx), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rdx), %xmm4 mulps 0x240(%rsp), %xmm3 subps %xmm5, %xmm4 mulps 0x230(%rsp), %xmm4 minps %xmm4, %xmm3 minps %xmm3, %xmm2 movl %r12d, %edx andl $0x7, %edx cmpleps %xmm2, %xmm1 cmpl $0x6, %edx je 0x177819 pslld $0x1f, %xmm1 movmskps %xmm1, %ebx testb $0x8, %r12b jne 0x177815 testq %rbx, %rbx je 0x177834 andq $-0x10, %r12 bsfq %rbx, %rax leaq -0x1(%rbx), %rdx xorl %r14d, %r14d movq (%r12,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) prefetcht0 0x80(%rax) prefetcht0 0xc0(%rax) andq %rbx, %rdx jne 0x17783a movq %rax, %r12 testl %r14d, %r14d je 0x1776be jmp 0x177883 pushq $0x6 jmp 0x177836 movaps 0xe0(%rax), %xmm2 cmpleps %xmm0, %xmm2 cmpltps 0xf0(%rax), %xmm0 andps %xmm2, %xmm0 andps %xmm0, %xmm1 jmp 0x1777c7 pushq $0x4 popq %r14 jmp 0x17780a movq %rsi, %r15 movq %rax, (%r8) addq $0x8, %r8 bsfq %rdx, %rsi leaq -0x1(%rdx), %rax movq (%r12,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) prefetcht0 0x80(%rsi) prefetcht0 0xc0(%rsi) andq %rdx, %rax je 0x17787b movq %rsi, (%r8) addq $0x8, %r8 bsfq %rax, %rsi leaq -0x1(%rax), %rdx jmp 0x17784c movq %rsi, %r12 movq %r15, %rsi jmp 0x17780a cmpl $0x6, %r14d jne 0x1781cf movl %r12d, %eax andl $0xf, %eax xorl %r14d, %r14d addq $-0x8, %rax setne 0x6(%rsp) je 0x1781cf andq $-0x10, %r12 xorl %edx, %edx movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) imulq $0x140, %rdx, %rax # imm = 0x140 movss 0x70(%r9,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x90(%r12,%rax), %xmm2 mulps %xmm1, %xmm2 addps (%r12,%rax), %xmm2 movaps 0xa0(%r12,%rax), %xmm12 mulps %xmm1, %xmm12 addps 0x10(%r12,%rax), %xmm12 movaps 0xb0(%r12,%rax), %xmm14 mulps %xmm1, %xmm14 addps 0x20(%r12,%rax), %xmm14 movaps 0xc0(%r12,%rax), %xmm0 mulps %xmm1, %xmm0 addps 0x30(%r12,%rax), %xmm0 movaps 0xd0(%r12,%rax), %xmm5 mulps %xmm1, %xmm5 addps 0x40(%r12,%rax), %xmm5 movaps 0xe0(%r12,%rax), %xmm11 mulps %xmm1, %xmm11 addps 0x50(%r12,%rax), %xmm11 movaps 0xf0(%r12,%rax), %xmm3 mulps %xmm1, %xmm3 addps 0x60(%r12,%rax), %xmm3 movaps 0x100(%r12,%rax), %xmm13 mulps %xmm1, %xmm13 addps 0x70(%r12,%rax), %xmm13 mulps 0x110(%r12,%rax), %xmm1 movq %rax, 0x8(%rsp) addps 0x80(%r12,%rax), %xmm1 leaq 0x7(%rsp), %rax movq %rax, 0x2a0(%rsp) movss (%r9,%rcx,4), %xmm6 movss 0x10(%r9,%rcx,4), %xmm7 movss 0x20(%r9,%rcx,4), %xmm4 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm6, %xmm2 subps %xmm7, %xmm12 subps %xmm4, %xmm14 subps %xmm6, %xmm0 subps %xmm7, %xmm5 subps %xmm4, %xmm11 subps %xmm6, %xmm3 subps %xmm7, %xmm13 subps %xmm4, %xmm1 movaps %xmm3, %xmm9 subps %xmm2, %xmm9 movaps %xmm13, %xmm15 subps %xmm12, %xmm15 movaps %xmm1, %xmm10 subps %xmm14, %xmm10 movaps %xmm13, %xmm4 addps %xmm12, %xmm4 movaps %xmm1, %xmm7 addps %xmm14, %xmm7 movaps %xmm9, %xmm8 mulps %xmm4, %xmm8 mulps %xmm10, %xmm4 movaps %xmm15, %xmm6 mulps %xmm7, %xmm6 subps %xmm4, %xmm6 movaps %xmm3, %xmm4 addps %xmm2, %xmm4 movaps %xmm9, 0x1a0(%rsp) mulps %xmm9, %xmm7 movaps %xmm4, %xmm9 movaps %xmm10, 0x190(%rsp) mulps %xmm10, %xmm9 subps %xmm7, %xmm9 movaps %xmm15, 0x180(%rsp) mulps %xmm15, %xmm4 subps %xmm4, %xmm8 movss 0x50(%r9,%rcx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x10(%rsp) movss 0x60(%r9,%rcx,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm10, %xmm8 mulps %xmm4, %xmm9 addps %xmm8, %xmm9 movss 0x40(%r9,%rcx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x90(%rsp) mulps %xmm4, %xmm6 addps %xmm9, %xmm6 movaps %xmm2, %xmm4 movaps %xmm0, %xmm9 subps %xmm0, %xmm4 movaps %xmm4, %xmm15 movaps %xmm4, 0x1d0(%rsp) movaps %xmm12, %xmm8 subps %xmm5, %xmm8 movaps %xmm14, %xmm0 subps %xmm11, %xmm0 movaps %xmm12, 0x1c0(%rsp) movaps %xmm12, %xmm4 addps %xmm5, %xmm4 movaps %xmm14, 0x1b0(%rsp) movaps %xmm14, %xmm12 addps %xmm11, %xmm12 movaps %xmm15, %xmm14 mulps %xmm4, %xmm14 mulps %xmm0, %xmm4 movaps %xmm8, %xmm7 mulps %xmm12, %xmm7 subps %xmm4, %xmm7 movaps %xmm2, 0x170(%rsp) movaps %xmm2, %xmm4 addps %xmm9, %xmm4 movaps %xmm9, %xmm2 mulps %xmm15, %xmm12 movaps %xmm4, %xmm15 movaps %xmm0, 0x150(%rsp) mulps %xmm0, %xmm15 subps %xmm12, %xmm15 movaps 0x70(%rsp), %xmm12 mulps %xmm8, %xmm4 subps %xmm4, %xmm14 mulps %xmm10, %xmm14 mulps 0x10(%rsp), %xmm15 addps %xmm14, %xmm15 movaps 0x60(%rsp), %xmm14 movaps 0x90(%rsp), %xmm9 mulps %xmm9, %xmm7 addps %xmm15, %xmm7 movaps %xmm2, %xmm4 subps %xmm3, %xmm4 addps %xmm2, %xmm3 movaps %xmm5, %xmm15 subps %xmm13, %xmm15 addps %xmm5, %xmm13 movaps %xmm11, %xmm0 subps %xmm1, %xmm0 addps %xmm11, %xmm1 movaps %xmm4, %xmm5 mulps %xmm13, %xmm5 mulps %xmm0, %xmm13 movaps %xmm15, %xmm2 mulps %xmm1, %xmm2 subps %xmm13, %xmm2 mulps %xmm4, %xmm1 movaps %xmm3, %xmm11 movaps %xmm0, 0x80(%rsp) mulps %xmm0, %xmm11 subps %xmm1, %xmm11 mulps %xmm15, %xmm3 subps %xmm3, %xmm5 movaps %xmm10, 0x160(%rsp) mulps %xmm10, %xmm5 movaps %xmm9, %xmm0 movaps 0x1d0(%rsp), %xmm9 mulps 0x10(%rsp), %xmm11 addps %xmm5, %xmm11 mulps %xmm0, %xmm2 addps %xmm11, %xmm2 movaps %xmm6, %xmm5 addps %xmm7, %xmm5 addps %xmm2, %xmm5 movaps %xmm6, %xmm0 minps %xmm7, %xmm0 minps %xmm2, %xmm0 movaps %xmm6, 0x120(%rsp) movaps %xmm6, %xmm13 movaps %xmm7, 0x130(%rsp) maxps %xmm7, %xmm13 maxps %xmm2, %xmm13 movaps %xmm5, 0x110(%rsp) andps 0x1d74ace(%rip), %xmm5 # 0x1eec6c0 movaps %xmm5, %xmm1 mulps 0x1d7a174(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm13 xorps 0x1d74ac8(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm13 movmskps %xmm13, %eax testl %eax, %eax je 0x178181 movaps %xmm8, %xmm0 movaps 0x190(%rsp), %xmm11 mulps %xmm11, %xmm0 movaps %xmm9, %xmm1 movaps 0x180(%rsp), %xmm6 mulps %xmm6, %xmm1 movaps %xmm15, %xmm12 movaps %xmm4, %xmm10 movaps %xmm15, 0x140(%rsp) movaps 0x150(%rsp), %xmm15 mulps %xmm15, %xmm12 movaps %xmm4, %xmm14 mulps %xmm8, %xmm14 mulps %xmm15, %xmm6 subps %xmm0, %xmm6 movaps 0x1a0(%rsp), %xmm4 movaps %xmm4, %xmm2 mulps %xmm8, %xmm4 mulps 0x80(%rsp), %xmm8 subps %xmm12, %xmm8 movaps 0x170(%rsp), %xmm7 movaps 0x1d74a2c(%rip), %xmm3 # 0x1eec6c0 andps %xmm3, %xmm0 andps %xmm3, %xmm12 cmpltps %xmm12, %xmm0 movaps 0x70(%rsp), %xmm12 blendvps %xmm0, %xmm6, %xmm8 movaps %xmm9, %xmm0 mulps 0x80(%rsp), %xmm0 mulps %xmm15, %xmm2 mulps %xmm15, %xmm10 mulps %xmm9, %xmm11 subps %xmm2, %xmm11 subps %xmm0, %xmm10 andps %xmm3, %xmm2 andps %xmm3, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm11, %xmm10 mulps 0x140(%rsp), %xmm9 subps %xmm1, %xmm4 subps %xmm14, %xmm9 andps %xmm3, %xmm1 andps %xmm3, %xmm14 cmpltps %xmm14, %xmm1 movaps 0x60(%rsp), %xmm14 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm4, %xmm9 movaps 0x160(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x10(%rsp), %xmm0 mulps %xmm10, %xmm0 addps %xmm1, %xmm0 movaps 0x90(%rsp), %xmm2 mulps %xmm8, %xmm2 addps %xmm0, %xmm2 addps %xmm2, %xmm2 movaps 0x1b0(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x1c0(%rsp), %xmm0 mulps %xmm10, %xmm0 addps %xmm1, %xmm0 mulps %xmm8, %xmm7 addps %xmm0, %xmm7 rcpps %xmm2, %xmm1 movaps %xmm2, %xmm3 mulps %xmm1, %xmm2 movaps 0x1d74caa(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm7, %xmm7 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm7, %xmm0 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm13, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x178181 cmpneqps 0x1d73c5d(%rip), %xmm3 # 0x1eeba10 andps %xmm3, %xmm1 movmskps %xmm1, %ebp testl %ebp, %ebp je 0x178181 addq %r12, 0x8(%rsp) movaps 0x120(%rsp), %xmm4 movaps %xmm4, 0x270(%rsp) movaps 0x130(%rsp), %xmm3 movaps %xmm3, 0x280(%rsp) movaps 0x110(%rsp), %xmm6 movaps %xmm6, 0x290(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x2a0(%rsp) movaps %xmm1, 0x2b0(%rsp) movaps %xmm0, 0x2e0(%rsp) movaps %xmm8, 0x2f0(%rsp) movaps %xmm10, 0x300(%rsp) movaps %xmm9, 0x310(%rsp) movq (%rdi), %rax movq %rax, 0x10(%rsp) rcpps %xmm6, %xmm0 mulps %xmm0, %xmm6 movaps 0x1d74bcd(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm1 subps %xmm6, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 cmpnltps 0x1d79ee9(%rip), %xmm5 # 0x1ef1d40 andps %xmm1, %xmm5 mulps %xmm5, %xmm4 minps %xmm2, %xmm4 movaps %xmm4, 0x2c0(%rsp) mulps %xmm3, %xmm5 minps %xmm2, %xmm5 movaps %xmm5, 0x2d0(%rsp) bsfq %rbp, %r13 movq 0x8(%rsp), %rax movl 0x120(%rax,%r13,4), %edx movq 0x10(%rsp), %rax movq 0x1e8(%rax), %rax movq (%rax,%rdx,8), %r15 movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%r15) je 0x177ebb movq 0x10(%rdi), %rax cmpq $0x0, 0x10(%rax) jne 0x177ed3 cmpq $0x0, 0x48(%r15) jne 0x177ed3 xorl %eax, %eax jmp 0x177ec1 btcq %r13, %rbp movb $0x1, %al testb %al, %al je 0x1781ae testq %rbp, %rbp jne 0x177e76 jmp 0x178181 movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x90(%rsp) movss 0x2e0(%rsp,%r13,4), %xmm0 movss 0x2c0(%rsp,%r13,4), %xmm1 movss 0x2d0(%rsp,%r13,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0x8(%rdi), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movq 0x8(%rsp), %rdx movd 0x130(%rdx,%r13,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x2f0(%rsp,%r13,4), %xmm4 movss 0x300(%rsp,%r13,4), %xmm5 movss 0x310(%rsp,%r13,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x320(%rsp) movaps %xmm5, 0x330(%rsp) movaps %xmm6, 0x340(%rsp) movaps %xmm1, 0x350(%rsp) movaps %xmm2, 0x360(%rsp) movdqa %xmm3, 0x370(%rsp) movdqa %xmm0, 0x380(%rsp) leaq 0x390(%rsp), %rdx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rdx) movdqa %xmm0, (%rdx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x390(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3a0(%rsp) movq 0xb8(%rsp), %rdx movdqa (%rdx), %xmm0 movdqa %xmm0, 0xa0(%rsp) leaq 0xa0(%rsp), %rdx movq %rdx, 0xe0(%rsp) movq 0x18(%r15), %rdx movq %rdx, 0xe8(%rsp) movq %rax, 0xf0(%rsp) movq %r9, 0xf8(%rsp) leaq 0x320(%rsp), %rax movq %rax, 0x100(%rsp) movl $0x4, 0x108(%rsp) movq 0x48(%r15), %rax testq %rax, %rax movq %r9, 0x48(%rsp) movq %r8, 0x40(%rsp) movq %r10, 0x38(%rsp) movq %r11, 0x30(%rsp) movq %rsi, 0x28(%rsp) je 0x17809a leaq 0xe0(%rsp), %rdi movq %rcx, 0x80(%rsp) callq *%rax movq 0x28(%rsp), %rsi movq 0x30(%rsp), %r11 movq 0x38(%rsp), %r10 movq 0x40(%rsp), %r8 movaps 0x60(%rsp), %xmm14 movaps 0x70(%rsp), %xmm12 movq 0xb98(%rsp), %rdi movq 0x80(%rsp), %rcx movq 0x48(%rsp), %r9 movdqa 0xa0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x178142 movq 0x10(%rdi), %rdx movq 0x10(%rdx), %rax testq %rax, %rax je 0x178104 testb $0x2, (%rdx) jne 0x1780c7 testb $0x40, 0x3e(%r15) je 0x178104 leaq 0xe0(%rsp), %rdi movq %rcx, %r15 callq *%rax movq 0x28(%rsp), %rsi movq 0x30(%rsp), %r11 movq 0x38(%rsp), %r10 movq 0x40(%rsp), %r8 movaps 0x60(%rsp), %xmm14 movaps 0x70(%rsp), %xmm12 movq 0xb98(%rsp), %rdi movq %r15, %rcx movq 0x48(%rsp), %r9 movdqa 0xa0(%rsp), %xmm0 pcmpeqd 0x1d738fb(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d73cff(%rip), %xmm1 # 0x1eebe20 movq 0xf8(%rsp), %rax movaps 0x1d738d0(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x178152 pcmpeqd 0x1d738c6(%rip), %xmm1 # 0x1eeba10 pxor 0x1d73cce(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x177ec1 movss 0x90(%rsp), %xmm0 movss %xmm0, 0x80(%r9,%rcx,4) btcq %r13, %rbp jmp 0x177ec1 movq 0xc8(%rsp), %rdx incq %rdx movq 0xc0(%rsp), %rax cmpq %rax, %rdx setb 0x6(%rsp) jne 0x1778b3 movq 0x58(%rsp), %r13 movq 0x50(%rsp), %rbp jmp 0x1781cf testb $0x1, 0x6(%rsp) movq 0x58(%rsp), %r13 movq 0x50(%rsp), %rbp je 0x1781cf movl $0xff800000, 0x80(%r9,%rcx,4) # imm = 0xFF800000 pushq $0x1 popq %r14 testb $0x3, %r14b movq 0xd0(%rsp), %rdx je 0x17769a leaq 0x3b0(%rsp), %rax cmpq %rax, %rdx setne %al addq $0xb58, %rsp # imm = 0xB58 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiMBIntersectorKPluecker<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x12e8, %rsp # imm = 0x12E8 movq %r9, %rbx movq %rcx, %r14 leaq 0x3b0(%rsp), %rax movq %rdx, -0x10(%rax) movq %rax, %rdx andl $0x0, -0x8(%rax) movq 0x1328(%rsp), %r15 movq 0x1320(%rsp), %rax movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm11 movss 0x70(%rax,%rcx,4), %xmm12 movss 0x80(%rax,%rcx,4), %xmm13 movss 0x1da7c90(%rip), %xmm14 # 0x1f1ff10 movaps %xmm11, %xmm15 mulss %xmm14, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm12, %xmm6 mulss %xmm14, %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x1da7c67(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulss %xmm0, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r11 movslq 0xa0(%rax,%rcx,4), %r12 movslq 0xb0(%rax,%rcx,4), %r13 movq %r11, %rbp xorq $0x10, %rbp movq %r12, %rsi xorq $0x10, %rsi movq %r13, %rdi xorq $0x10, %rdi movss 0xc0(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xd0(%rax,%rcx,4), %xmm1 pushq $0x1 popq %rax shll %cl, %eax shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cltq shlq $0x4, %rax addq 0x1fac40c(%rip), %rax # 0x2124730 movq %rax, 0xc0(%rsp) movq %rsi, 0x28(%rsp) movq %rdi, 0x20(%rsp) movaps %xmm8, 0x280(%rsp) movaps %xmm9, 0x270(%rsp) movaps %xmm10, 0x260(%rsp) movaps %xmm11, 0x250(%rsp) movaps %xmm12, 0x240(%rsp) movaps %xmm13, 0x230(%rsp) movaps %xmm14, 0x220(%rsp) movaps %xmm15, 0x210(%rsp) movaps %xmm6, 0x140(%rsp) movq %r11, 0xe0(%rsp) movq %r12, 0xd8(%rsp) movq %r13, 0xd0(%rsp) movq %rbp, 0xc8(%rsp) movaps %xmm7, 0x130(%rsp) leaq 0x3a0(%rsp), %rax cmpq %rax, %rdx je 0x17951d movss -0x8(%rdx), %xmm0 addq $-0x10, %rdx ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x1783ae movq %rdx, 0x10(%rsp) movq (%rdx), %rdx testb $0x8, %dl jne 0x1784c5 movq %rdx, %rax andq $-0x10, %rax movss 0x70(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%r11), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r11), %xmm3 subps %xmm8, %xmm3 mulps %xmm15, %xmm3 movaps %xmm7, %xmm2 movaps 0x80(%rax,%r12), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%r12), %xmm4 maxps %xmm3, %xmm2 subps %xmm9, %xmm4 mulps %xmm6, %xmm4 movaps 0x80(%rax,%r13), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r13), %xmm3 subps %xmm10, %xmm3 mulps %xmm14, %xmm3 maxps %xmm3, %xmm4 maxps %xmm4, %xmm2 movaps 0x80(%rax,%rbp), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rbp), %xmm4 subps %xmm8, %xmm4 movaps 0x80(%rax,%rsi), %xmm5 mulps %xmm0, %xmm5 addps 0x20(%rax,%rsi), %xmm5 mulps %xmm11, %xmm4 subps %xmm9, %xmm5 mulps %xmm12, %xmm5 movaps 0x80(%rax,%rdi), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rdi), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm3, %xmm5 movaps %xmm1, %xmm3 minps %xmm4, %xmm3 minps %xmm5, %xmm3 movl %edx, %ecx andl $0x7, %ecx cmpl $0x6, %ecx je 0x17850f movaps %xmm2, %xmm0 cmpleps %xmm3, %xmm0 pslld $0x1f, %xmm0 movmskps %xmm0, %r9d movaps %xmm2, 0x160(%rsp) testb $0x8, %dl jne 0x17850b testq %r9, %r9 je 0x178531 andq $-0x10, %rdx bsfq %r9, %rcx leaq -0x1(%r9), %r8 xorl %eax, %eax movq %rdx, %r10 movq (%rdx,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) andq %r9, %r8 jne 0x178536 testl %eax, %eax je 0x1783db jmp 0x17873f pushq $0x6 jmp 0x178533 movaps %xmm2, %xmm4 cmpleps %xmm3, %xmm4 movaps 0xe0(%rax), %xmm3 cmpleps %xmm0, %xmm3 cmpltps 0xf0(%rax), %xmm0 andps %xmm3, %xmm0 andps %xmm4, %xmm0 jmp 0x1784b4 pushq $0x4 popq %rax jmp 0x1784fe movq %r9, 0x18(%rsp) movl 0x160(%rsp,%rcx,4), %edi bsfq %r8, %r9 leaq -0x1(%r8), %rcx movq (%r10,%r9,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) prefetcht0 0x80(%rsi) prefetcht0 0xc0(%rsi) movl 0x160(%rsp,%r9,4), %r9d andq %r8, %rcx jne 0x1785af movq 0x10(%rsp), %r8 leaq 0x10(%r8), %rcx cmpl %r9d, %edi jae 0x17858c movq %rsi, (%r8) movl %r9d, 0x8(%r8) movq %rcx, 0x10(%rsp) jmp 0x17859b movq %rdx, (%r8) movl %edi, 0x8(%r8) movq %rcx, 0x10(%rsp) movq %rsi, %rdx movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdi movq 0x18(%rsp), %r9 jmp 0x1784fe movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm4 movd %r9d, %xmm0 punpcklqdq %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%r10,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) prefetcht0 0x80(%rdi) prefetcht0 0xc0(%rdi) movq %rdi, %xmm3 movd 0x160(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x178669 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 blendvps %xmm0, %xmm4, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm3, %xmm5 movaps %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm5, %xmm2 movq 0x10(%rsp), %rcx movaps %xmm2, (%rcx) movaps %xmm3, 0x10(%rcx) movq %xmm4, %rdx addq $0x20, %rcx jmp 0x178585 bsfq %rdx, %rcx movq (%r10,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) prefetcht0 0x80(%rdx) prefetcht0 0xc0(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm4, %xmm5 blendvps %xmm0, %xmm2, %xmm5 movd 0x160(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm4, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps 0x130(%rsp), %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm4 blendvps %xmm0, %xmm3, %xmm4 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm4, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm5 movaps %xmm6, %xmm0 pcmpgtd %xmm5, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm4 blendvps %xmm0, %xmm5, %xmm4 blendvps %xmm0, %xmm6, %xmm5 movaps 0x140(%rsp), %xmm6 movq 0x10(%rsp), %rcx movaps %xmm2, (%rcx) movaps %xmm5, 0x10(%rcx) movaps %xmm4, 0x20(%rcx) movq %xmm3, %rdx addq $0x30, %rcx jmp 0x178585 cmpl $0x6, %eax jne 0x179513 movq %r9, 0x18(%rsp) movl %edx, %eax andl $0xf, %eax addq $-0x8, %rax movq %rax, 0xe8(%rsp) je 0x179474 andq $-0x10, %rdx xorl %eax, %eax movq %rdx, (%rsp) movq %rax, 0xf8(%rsp) imulq $0x50, %rax, %rax movq (%r15), %rsi movss 0x70(%rbx,%r14,4), %xmm6 movl 0x30(%rdx,%rax), %ecx movq %rsi, 0xf0(%rsp) movq 0x1e8(%rsi), %rdx movq (%rdx,%rcx,8), %rcx movss 0x28(%rcx), %xmm0 movss 0x2c(%rcx), %xmm1 movss 0x30(%rcx), %xmm2 subss %xmm1, %xmm6 subss %xmm1, %xmm2 divss %xmm2, %xmm6 mulss %xmm0, %xmm6 roundss $0x9, %xmm6, %xmm2 addss 0x1d78204(%rip), %xmm0 # 0x1ef09cc minss %xmm0, %xmm2 xorps %xmm1, %xmm1 maxss %xmm2, %xmm1 cvttss2si %xmm1, %edx movslq %edx, %rdx movq 0xe0(%rcx), %rcx imulq $0x38, %rdx, %rdx movq %rbx, %rsi movq (%rsp), %rdi movl (%rdi,%rax), %ebx movq (%rsp), %rdi movl 0x4(%rdi,%rax), %r12d movq (%rcx,%rdx), %rbp movq 0x38(%rcx,%rdx), %rcx movups (%rbp,%rbx,4), %xmm0 movq %r14, %rdx movq (%rsp), %rdi movl 0x10(%rdi,%rax), %r14d movups (%rbp,%r14,4), %xmm7 movq (%rsp), %rdi movl 0x20(%rdi,%rax), %edi movq %rdi, 0x50(%rsp) movups (%rbp,%rdi,4), %xmm2 movaps %xmm2, 0x30(%rsp) movups (%rbp,%r12,4), %xmm9 movq (%rsp), %rdi movl 0x14(%rdi,%rax), %r8d movups (%rbp,%r8,4), %xmm2 movq (%rsp), %rdi movl 0x24(%rdi,%rax), %edi movq %rdi, 0x90(%rsp) movups (%rbp,%rdi,4), %xmm15 movq (%rsp), %rdi movl 0x8(%rdi,%rax), %r15d movups (%rbp,%r15,4), %xmm3 movq (%rsp), %rdi movl 0x18(%rdi,%rax), %r11d movups (%rbp,%r11,4), %xmm11 movq (%rsp), %rdi movl 0x28(%rdi,%rax), %edi movups (%rbp,%rdi,4), %xmm8 movq (%rsp), %r9 movl 0xc(%r9,%rax), %r13d movups (%rbp,%r13,4), %xmm14 movq (%rsp), %r9 movl 0x1c(%r9,%rax), %r10d movups (%rbp,%r10,4), %xmm12 movq (%rsp), %r9 movl 0x2c(%r9,%rax), %r9d movups (%rbp,%r9,4), %xmm10 movups (%rcx,%rbx,4), %xmm5 movq %rsi, %rbx movups (%rcx,%r14,4), %xmm4 movq %rdx, %r14 movq (%rsp), %rdx subss %xmm1, %xmm6 movaps %xmm0, %xmm13 unpcklps %xmm3, %xmm13 # xmm13 = xmm13[0],xmm3[0],xmm13[1],xmm3[1] unpckhps %xmm3, %xmm0 # xmm0 = xmm0[2],xmm3[2],xmm0[3],xmm3[3] movaps %xmm0, %xmm3 movaps %xmm9, %xmm1 unpcklps %xmm14, %xmm1 # xmm1 = xmm1[0],xmm14[0],xmm1[1],xmm14[1] unpckhps %xmm14, %xmm9 # xmm9 = xmm9[2],xmm14[2],xmm9[3],xmm14[3] movups (%rcx,%r12,4), %xmm0 unpcklps %xmm9, %xmm3 # xmm3 = xmm3[0],xmm9[0],xmm3[1],xmm9[1] movaps %xmm3, 0xa0(%rsp) movaps %xmm13, %xmm3 unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1] unpckhps %xmm1, %xmm13 # xmm13 = xmm13[2],xmm1[2],xmm13[3],xmm1[3] movaps %xmm7, %xmm1 unpcklps %xmm11, %xmm7 # xmm7 = xmm7[0],xmm11[0],xmm7[1],xmm11[1] unpckhps %xmm11, %xmm1 # xmm1 = xmm1[2],xmm11[2],xmm1[3],xmm11[3] movaps %xmm2, %xmm9 unpcklps %xmm12, %xmm9 # xmm9 = xmm9[0],xmm12[0],xmm9[1],xmm12[1] unpckhps %xmm12, %xmm2 # xmm2 = xmm2[2],xmm12[2],xmm2[3],xmm12[3] movups (%rcx,%r15,4), %xmm11 movq 0x1328(%rsp), %r15 unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] movaps %xmm1, 0x40(%rsp) movaps %xmm7, %xmm1 unpcklps %xmm9, %xmm1 # xmm1 = xmm1[0],xmm9[0],xmm1[1],xmm9[1] movaps %xmm1, 0x80(%rsp) unpckhps %xmm9, %xmm7 # xmm7 = xmm7[2],xmm9[2],xmm7[3],xmm9[3] movaps %xmm7, 0x60(%rsp) movaps 0x30(%rsp), %xmm1 movaps %xmm1, %xmm2 unpcklps %xmm8, %xmm2 # xmm2 = xmm2[0],xmm8[0],xmm2[1],xmm8[1] unpckhps %xmm8, %xmm1 # xmm1 = xmm1[2],xmm8[2],xmm1[3],xmm8[3] movaps %xmm15, %xmm8 unpcklps %xmm10, %xmm8 # xmm8 = xmm8[0],xmm10[0],xmm8[1],xmm10[1] unpckhps %xmm10, %xmm15 # xmm15 = xmm15[2],xmm10[2],xmm15[3],xmm10[3] movups (%rcx,%r13,4), %xmm9 unpcklps %xmm15, %xmm1 # xmm1 = xmm1[0],xmm15[0],xmm1[1],xmm15[1] movaps %xmm1, 0x30(%rsp) movaps %xmm2, %xmm7 unpcklps %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1] unpckhps %xmm8, %xmm2 # xmm2 = xmm2[2],xmm8[2],xmm2[3],xmm8[3] movaps %xmm5, %xmm10 unpcklps %xmm11, %xmm10 # xmm10 = xmm10[0],xmm11[0],xmm10[1],xmm11[1] unpckhps %xmm11, %xmm5 # xmm5 = xmm5[2],xmm11[2],xmm5[3],xmm11[3] movaps %xmm0, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movups (%rcx,%r11,4), %xmm9 unpcklps %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1] movaps %xmm10, %xmm1 unpcklps %xmm8, %xmm1 # xmm1 = xmm1[0],xmm8[0],xmm1[1],xmm8[1] unpckhps %xmm8, %xmm10 # xmm10 = xmm10[2],xmm8[2],xmm10[3],xmm8[3] movaps %xmm4, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm4 # xmm4 = xmm4[2],xmm9[2],xmm4[3],xmm9[3] movups (%rcx,%r8,4), %xmm9 movups (%rcx,%r10,4), %xmm11 movaps %xmm9, %xmm12 unpcklps %xmm11, %xmm12 # xmm12 = xmm12[0],xmm11[0],xmm12[1],xmm11[1] unpckhps %xmm11, %xmm9 # xmm9 = xmm9[2],xmm11[2],xmm9[3],xmm11[3] unpcklps %xmm9, %xmm4 # xmm4 = xmm4[0],xmm9[0],xmm4[1],xmm9[1] movaps %xmm8, %xmm15 unpcklps %xmm12, %xmm15 # xmm15 = xmm15[0],xmm12[0],xmm15[1],xmm12[1] unpckhps %xmm12, %xmm8 # xmm8 = xmm8[2],xmm12[2],xmm8[3],xmm12[3] movq 0x50(%rsp), %rsi movups (%rcx,%rsi,4), %xmm11 movups (%rcx,%rdi,4), %xmm12 movaps %xmm11, %xmm9 unpcklps %xmm12, %xmm9 # xmm9 = xmm9[0],xmm12[0],xmm9[1],xmm12[1] unpckhps %xmm12, %xmm11 # xmm11 = xmm11[2],xmm12[2],xmm11[3],xmm12[3] movq 0x90(%rsp), %rsi movups (%rcx,%rsi,4), %xmm12 movups (%rcx,%r9,4), %xmm14 movaps %xmm12, %xmm0 unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] unpckhps %xmm14, %xmm12 # xmm12 = xmm12[2],xmm14[2],xmm12[3],xmm14[3] unpcklps %xmm12, %xmm11 # xmm11 = xmm11[0],xmm12[0],xmm11[1],xmm12[1] movaps %xmm9, %xmm12 unpcklps %xmm0, %xmm12 # xmm12 = xmm12[0],xmm0[0],xmm12[1],xmm0[1] unpckhps %xmm0, %xmm9 # xmm9 = xmm9[2],xmm0[2],xmm9[3],xmm0[3] movss 0x1d73ceb(%rip), %xmm14 # 0x1eec714 subss %xmm6, %xmm14 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm6, %xmm1 mulps %xmm14, %xmm3 addps %xmm1, %xmm3 movaps %xmm3, 0x50(%rsp) mulps %xmm6, %xmm10 mulps %xmm14, %xmm13 addps %xmm10, %xmm13 mulps %xmm6, %xmm5 movaps 0xa0(%rsp), %xmm3 mulps %xmm14, %xmm3 addps %xmm5, %xmm3 movaps %xmm3, %xmm5 mulps %xmm6, %xmm15 movaps 0x80(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm15, %xmm0 movaps %xmm0, %xmm10 mulps %xmm6, %xmm8 mulps %xmm6, %xmm4 movaps 0x60(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm8, %xmm0 movaps %xmm0, %xmm15 movaps 0x40(%rsp), %xmm3 mulps %xmm14, %xmm3 addps %xmm4, %xmm3 movaps %xmm3, %xmm8 mulps %xmm6, %xmm12 mulps %xmm6, %xmm9 mulps %xmm11, %xmm6 mulps %xmm14, %xmm7 addps %xmm12, %xmm7 movaps %xmm7, %xmm4 mulps %xmm14, %xmm2 addps %xmm9, %xmm2 mulps 0x30(%rsp), %xmm14 addps %xmm6, %xmm14 movaps 0x30(%rdx,%rax), %xmm0 movaps %xmm0, 0x300(%rsp) movaps 0x40(%rdx,%rax), %xmm0 movaps %xmm0, 0x150(%rsp) leaq 0xf(%rsp), %rax movq %rax, 0x190(%rsp) movss (%rbx,%r14,4), %xmm1 movss 0x10(%rbx,%r14,4), %xmm3 movss 0x20(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x50(%rsp), %xmm6 subps %xmm1, %xmm6 subps %xmm3, %xmm13 subps %xmm0, %xmm5 movaps %xmm10, %xmm7 subps %xmm1, %xmm7 subps %xmm3, %xmm15 movaps %xmm15, 0x60(%rsp) subps %xmm0, %xmm8 movaps %xmm8, 0x40(%rsp) movaps %xmm4, %xmm8 subps %xmm1, %xmm8 subps %xmm3, %xmm2 subps %xmm0, %xmm14 movaps %xmm8, %xmm4 movaps %xmm8, %xmm9 movaps %xmm8, 0x30(%rsp) subps %xmm6, %xmm4 movaps %xmm6, %xmm11 movaps %xmm2, %xmm10 subps %xmm13, %xmm10 movaps %xmm14, %xmm8 subps %xmm5, %xmm8 movaps %xmm5, %xmm15 movaps %xmm2, %xmm0 addps %xmm13, %xmm0 movaps %xmm14, %xmm1 addps %xmm5, %xmm1 movaps %xmm4, %xmm3 mulps %xmm0, %xmm3 mulps %xmm8, %xmm0 movaps %xmm10, %xmm6 mulps %xmm1, %xmm6 subps %xmm0, %xmm6 movaps %xmm9, %xmm0 addps %xmm11, %xmm0 movaps %xmm11, %xmm5 movaps %xmm4, 0x2e0(%rsp) mulps %xmm4, %xmm1 movaps %xmm0, %xmm4 movaps %xmm8, 0x80(%rsp) mulps %xmm8, %xmm4 subps %xmm1, %xmm4 movaps %xmm10, 0x2f0(%rsp) mulps %xmm10, %xmm0 subps %xmm0, %xmm3 movss 0x50(%rbx,%r14,4), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm9, %xmm3 mulps %xmm10, %xmm4 addps %xmm3, %xmm4 movss 0x40(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulps %xmm12, %xmm6 addps %xmm4, %xmm6 subps %xmm7, %xmm11 movaps %xmm13, %xmm0 movaps 0x60(%rsp), %xmm8 subps %xmm8, %xmm13 movaps %xmm15, %xmm1 movaps 0x40(%rsp), %xmm3 subps %xmm3, %xmm15 movaps %xmm0, 0x90(%rsp) addps %xmm8, %xmm0 movaps %xmm1, 0xa0(%rsp) addps %xmm3, %xmm1 movaps %xmm11, %xmm4 mulps %xmm0, %xmm4 mulps %xmm15, %xmm0 movaps %xmm13, %xmm3 mulps %xmm1, %xmm3 subps %xmm0, %xmm3 movaps %xmm5, 0x50(%rsp) movaps %xmm5, %xmm0 addps %xmm7, %xmm0 mulps %xmm11, %xmm1 movaps %xmm0, %xmm5 movaps %xmm15, 0x2d0(%rsp) mulps %xmm15, %xmm5 subps %xmm1, %xmm5 mulps %xmm13, %xmm0 subps %xmm0, %xmm4 mulps %xmm9, %xmm4 mulps %xmm10, %xmm5 addps %xmm4, %xmm5 mulps %xmm12, %xmm3 addps %xmm5, %xmm3 movaps %xmm7, %xmm15 movaps 0x30(%rsp), %xmm4 subps %xmm4, %xmm15 addps %xmm7, %xmm4 movaps %xmm8, %xmm5 subps %xmm2, %xmm5 addps %xmm8, %xmm2 movaps 0x40(%rsp), %xmm0 movaps %xmm0, %xmm8 subps %xmm14, %xmm8 addps %xmm0, %xmm14 movaps %xmm15, %xmm1 mulps %xmm2, %xmm1 mulps %xmm8, %xmm2 movaps %xmm5, %xmm0 mulps %xmm14, %xmm0 subps %xmm2, %xmm0 mulps %xmm15, %xmm14 movaps %xmm4, %xmm2 mulps %xmm8, %xmm2 subps %xmm14, %xmm2 mulps %xmm5, %xmm4 subps %xmm4, %xmm1 movaps %xmm9, 0x40(%rsp) mulps %xmm9, %xmm1 movaps %xmm10, %xmm4 mulps %xmm10, %xmm2 movaps %xmm13, %xmm10 addps %xmm1, %xmm2 mulps %xmm12, %xmm0 addps %xmm2, %xmm0 movaps %xmm6, %xmm13 addps %xmm3, %xmm13 addps %xmm0, %xmm13 movaps %xmm6, %xmm1 minps %xmm3, %xmm1 minps %xmm0, %xmm1 movaps %xmm6, 0x2a0(%rsp) movaps %xmm6, %xmm14 movaps %xmm3, 0x2b0(%rsp) maxps %xmm3, %xmm14 maxps %xmm0, %xmm14 movaps %xmm13, 0x290(%rsp) andps 0x1d73977(%rip), %xmm13 # 0x1eec6c0 movaps %xmm13, %xmm0 mulps 0x1d7901c(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm14 xorps 0x1d73970(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm14 movmskps %xmm14, %eax testl %eax, %eax je 0x17945b movaps %xmm10, %xmm0 movaps %xmm4, 0x30(%rsp) movaps %xmm8, %xmm3 movaps %xmm8, 0x2c0(%rsp) movaps 0x80(%rsp), %xmm8 mulps %xmm8, %xmm0 movaps %xmm11, %xmm1 movaps 0x2f0(%rsp), %xmm7 mulps %xmm7, %xmm1 movaps %xmm5, %xmm4 movaps 0x2d0(%rsp), %xmm6 mulps %xmm6, %xmm4 movaps %xmm5, 0x60(%rsp) movaps 0x2e0(%rsp), %xmm5 movaps %xmm15, %xmm9 mulps %xmm10, %xmm9 mulps %xmm6, %xmm7 subps %xmm0, %xmm7 movaps %xmm5, %xmm2 mulps %xmm10, %xmm5 mulps %xmm3, %xmm10 subps %xmm4, %xmm10 movaps 0x1d738db(%rip), %xmm3 # 0x1eec6c0 andps %xmm3, %xmm0 andps %xmm3, %xmm4 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm7, %xmm10 movaps %xmm11, %xmm0 mulps 0x2c0(%rsp), %xmm0 mulps %xmm6, %xmm2 mulps %xmm6, %xmm15 mulps %xmm11, %xmm8 subps %xmm2, %xmm8 subps %xmm0, %xmm15 andps %xmm3, %xmm2 andps %xmm3, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm8, %xmm15 mulps 0x60(%rsp), %xmm11 subps %xmm1, %xmm5 subps %xmm9, %xmm11 andps %xmm3, %xmm1 andps %xmm3, %xmm9 cmpltps %xmm9, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm5, %xmm11 movaps 0x40(%rsp), %xmm0 mulps %xmm11, %xmm0 movaps 0x30(%rsp), %xmm1 mulps %xmm15, %xmm1 addps %xmm0, %xmm1 mulps %xmm10, %xmm12 addps %xmm1, %xmm12 addps %xmm12, %xmm12 movaps 0xa0(%rsp), %xmm0 mulps %xmm11, %xmm0 movaps 0x90(%rsp), %xmm1 mulps %xmm15, %xmm1 addps %xmm0, %xmm1 movaps 0x50(%rsp), %xmm3 mulps %xmm10, %xmm3 addps %xmm1, %xmm3 rcpps %xmm12, %xmm0 movaps %xmm12, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d73b6c(%rip), %xmm9 # 0x1eeca10 subps %xmm1, %xmm9 addps %xmm3, %xmm3 mulps %xmm0, %xmm9 addps %xmm0, %xmm9 mulps %xmm3, %xmm9 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm9, %xmm0 cmpleps %xmm1, %xmm0 movss 0x30(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] cmpleps %xmm9, %xmm1 andps %xmm1, %xmm0 andps %xmm14, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17945b cmpneqps 0x1d72b18(%rip), %xmm12 # 0x1eeba10 andps %xmm12, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17945b movaps 0x2a0(%rsp), %xmm5 movaps %xmm5, 0x160(%rsp) movaps 0x2b0(%rsp), %xmm4 movaps %xmm4, 0x170(%rsp) movaps 0x290(%rsp), %xmm6 movaps %xmm6, 0x180(%rsp) leaq 0xf(%rsp), %rax movq %rax, 0x190(%rsp) movaps %xmm0, 0x1a0(%rsp) movaps %xmm9, 0x1d0(%rsp) movaps %xmm10, 0x1e0(%rsp) movaps %xmm15, 0x1f0(%rsp) movaps %xmm11, 0x200(%rsp) movaps %xmm0, 0x70(%rsp) rcpps %xmm6, %xmm1 mulps %xmm1, %xmm6 movaps 0x1d73a8e(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm2 subps %xmm6, %xmm2 mulps %xmm1, %xmm2 addps %xmm1, %xmm2 cmpnltps 0x1d78da9(%rip), %xmm13 # 0x1ef1d40 andps %xmm2, %xmm13 mulps %xmm13, %xmm5 minps %xmm3, %xmm5 movaps %xmm5, 0x1b0(%rsp) mulps %xmm4, %xmm13 minps %xmm3, %xmm13 movaps %xmm13, 0x1c0(%rsp) movaps 0x1d72a2e(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 movaps %xmm1, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %eax pcmpeqd %xmm2, %xmm2 testl %eax, %eax je 0x178ff4 movaps %xmm1, %xmm2 andps %xmm2, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r12 movq 0xf0(%rsp), %rbp movl 0x300(%rsp,%r12,4), %eax movq 0x1e8(%rbp), %rcx movq (%rcx,%rax,8), %r13 movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%r13) je 0x179304 movq 0x10(%r15), %rcx cmpq $0x0, 0x10(%rcx) jne 0x179041 cmpq $0x0, 0x40(%r13) je 0x1793ae movss 0x1b0(%rsp,%r12,4), %xmm0 movss 0x1c0(%rsp,%r12,4), %xmm1 movss 0x1e0(%rsp,%r12,4), %xmm2 movss 0x1f0(%rsp,%r12,4), %xmm3 movq 0x8(%r15), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x150(%rsp,%r12,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x200(%rsp,%r12,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x310(%rsp) movaps %xmm3, 0x320(%rsp) movaps %xmm6, 0x330(%rsp) movaps %xmm0, 0x340(%rsp) movaps %xmm1, 0x350(%rsp) movdqa %xmm5, 0x360(%rsp) movdqa %xmm4, 0x370(%rsp) leaq 0x380(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x380(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x390(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x30(%rsp) movss 0x1d0(%rsp,%r12,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xc0(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0xb0(%rsp) leaq 0xb0(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x18(%r13), %rax movq %rax, 0x108(%rsp) movq 0x8(%r15), %rax movq %rax, 0x110(%rsp) movq %rbx, 0x118(%rsp) leaq 0x310(%rsp), %rax movq %rax, 0x120(%rsp) movl $0x4, 0x128(%rsp) movq 0x40(%r13), %rax testq %rax, %rax movaps %xmm9, 0x40(%rsp) je 0x1791be leaq 0x100(%rsp), %rdi callq *%rax movaps 0x40(%rsp), %xmm9 movq (%rsp), %rdx movdqa 0xb0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x179358 movq 0x10(%r15), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x1791ff testb $0x2, (%rcx) jne 0x1791eb testb $0x40, 0x3e(%r13) je 0x1791ff leaq 0x100(%rsp), %rdi callq *%rax movaps 0x40(%rsp), %xmm9 movq (%rsp), %rdx movdqa 0xb0(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d727fb(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d72bff(%rip), %xmm1 # 0x1eebe20 je 0x179368 movq 0x118(%rsp), %rax movq 0x120(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x179368 andl $0x0, 0x70(%rsp,%r12,4) movaps 0x70(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17945b movaps 0x1d726cf(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17934c movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r12 jmp 0x179006 pcmpeqd 0x1d726b0(%rip), %xmm1 # 0x1eeba10 pxor 0x1d72ab8(%rip), %xmm1 # 0x1eebe20 ptest 0x1d737af(%rip), %xmm1 # 0x1eecb20 jne 0x179383 movd 0x30(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x70(%rsp,%r12,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm9, %xmm1 cmpleps %xmm0, %xmm1 andps 0x70(%rsp), %xmm1 movaps %xmm1, 0x70(%rsp) jmp 0x17930a movss 0x1b0(%rsp,%r12,4), %xmm0 movss 0x1c0(%rsp,%r12,4), %xmm1 movss 0x1d0(%rsp,%r12,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x1e0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1f0(%rsp,%r12,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x200(%rsp,%r12,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x150(%rsp,%r12,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r15), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r15), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movq 0xf8(%rsp), %rax incq %rax cmpq 0xe8(%rsp), %rax jne 0x17876e movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movq 0x10(%rsp), %rdx movaps 0x280(%rsp), %xmm8 movaps 0x270(%rsp), %xmm9 movaps 0x260(%rsp), %xmm10 movaps 0x250(%rsp), %xmm11 movaps 0x240(%rsp), %xmm12 movaps 0x230(%rsp), %xmm13 movaps 0x220(%rsp), %xmm14 movaps 0x210(%rsp), %xmm15 movaps 0x140(%rsp), %xmm6 movq 0xe0(%rsp), %r11 movq 0xd8(%rsp), %r12 movq 0xd0(%rsp), %r13 movq 0xc8(%rsp), %rbp movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdi movaps 0x130(%rsp), %xmm7 movq 0x18(%rsp), %r9 jmp 0x1783ae movq 0x10(%rsp), %rdx jmp 0x1783ae addq $0x12e8, %rsp # imm = 0x12E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 16777232, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::TriangleMiMBIntersectorKPluecker<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::PlueckerIntersectorK<4, 4>&, embree::RayK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb68, %rsp # imm = 0xB68 movq 0xba8(%rsp), %rdi movq 0xba0(%rsp), %rax leaq 0x3c8(%rsp), %r8 movq %rdx, -0x8(%r8) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm0 movss 0x20(%rax,%rcx,4), %xmm1 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x250(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, 0x240(%rsp) movss 0x60(%rax,%rcx,4), %xmm1 movss 0x70(%rax,%rcx,4), %xmm2 movss 0x80(%rax,%rcx,4), %xmm3 movss 0x1da6967(%rip), %xmm0 # 0x1f1ff10 movaps %xmm1, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x1f0(%rsp) movaps %xmm2, %xmm4 mulss %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x1e0(%rsp) mulss %xmm3, %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x200(%rsp) movss 0x1da692d(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, 0x230(%rsp) mulss %xmm0, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm2, 0x220(%rsp) mulss %xmm0, %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, 0x210(%rsp) movslq 0x90(%rax,%rcx,4), %r10 movslq 0xa0(%rax,%rcx,4), %r11 movslq 0xb0(%rax,%rcx,4), %r15 movq %r10, %r13 xorq $0x10, %r13 movq %r11, %rbp xorq $0x10, %rbp movq %r15, %rsi xorq $0x10, %rsi movss 0xc0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1d0(%rsp) movss 0xd0(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1c0(%rsp) pushq $0x1 popq %rax shll %cl, %eax cltq shlq $0x4, %rax addq 0x1fab0b0(%rip), %rax # 0x2124730 movq %rax, 0x100(%rsp) movq %r9, 0x38(%rsp) movq %rcx, 0x30(%rsp) movaps %xmm8, 0xb0(%rsp) movq %r10, 0x98(%rsp) movq %r11, 0x90(%rsp) movq %r15, 0x88(%rsp) movq %r13, 0x80(%rsp) movq %rbp, 0x78(%rsp) movq %rsi, 0x8(%rsp) movq %r8, %rdx leaq 0x3c0(%rsp), %rax cmpq %rax, %r8 je 0x17a490 leaq -0x8(%rdx), %r8 movq %rdx, 0x118(%rsp) movq -0x8(%rdx), %r12 testb $0x8, %r12b jne 0x1797fa movq %r12, %rax andq $-0x10, %rax movss 0x70(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x80(%rax,%r10), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r10), %xmm2 subps %xmm8, %xmm2 mulps 0x1f0(%rsp), %xmm2 movaps 0x1d0(%rsp), %xmm1 movaps 0x80(%rax,%r11), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r11), %xmm3 maxps %xmm2, %xmm1 movaps 0x250(%rsp), %xmm4 subps %xmm4, %xmm3 mulps 0x1e0(%rsp), %xmm3 movaps 0x80(%rax,%r15), %xmm2 mulps %xmm0, %xmm2 addps 0x20(%rax,%r15), %xmm2 movaps 0x240(%rsp), %xmm5 subps %xmm5, %xmm2 mulps 0x200(%rsp), %xmm2 maxps %xmm2, %xmm3 maxps %xmm3, %xmm1 movaps 0x80(%rax,%r13), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%r13), %xmm3 subps %xmm8, %xmm3 mulps 0x230(%rsp), %xmm3 movaps 0x1c0(%rsp), %xmm2 minps %xmm3, %xmm2 movaps 0x80(%rax,%rbp), %xmm3 mulps %xmm0, %xmm3 addps 0x20(%rax,%rbp), %xmm3 subps %xmm4, %xmm3 movaps 0x80(%rax,%rsi), %xmm4 mulps %xmm0, %xmm4 addps 0x20(%rax,%rsi), %xmm4 mulps 0x220(%rsp), %xmm3 subps %xmm5, %xmm4 mulps 0x210(%rsp), %xmm4 minps %xmm4, %xmm3 minps %xmm3, %xmm2 movl %r12d, %edx andl $0x7, %edx cmpleps %xmm2, %xmm1 cmpl $0x6, %edx je 0x179844 pslld $0x1f, %xmm1 movmskps %xmm1, %ebx testb $0x8, %r12b jne 0x179840 testq %rbx, %rbx je 0x17985f andq $-0x10, %r12 bsfq %rbx, %rax leaq -0x1(%rbx), %rdx xorl %r14d, %r14d movq (%r12,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) prefetcht0 0x80(%rax) prefetcht0 0xc0(%rax) andq %rbx, %rdx jne 0x179865 movq %rax, %r12 testl %r14d, %r14d je 0x1796e9 jmp 0x1798ad pushq $0x6 jmp 0x179861 movaps 0xe0(%rax), %xmm2 cmpleps %xmm0, %xmm2 cmpltps 0xf0(%rax), %xmm0 andps %xmm2, %xmm0 andps %xmm0, %xmm1 jmp 0x1797f2 pushq $0x4 popq %r14 jmp 0x179835 movq %rax, (%r8) addq $0x8, %r8 bsfq %rdx, %rsi leaq -0x1(%rdx), %rax movq (%r12,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) prefetcht0 0x80(%rsi) prefetcht0 0xc0(%rsi) andq %rdx, %rax je 0x1798a3 movq %rsi, (%r8) addq $0x8, %r8 bsfq %rax, %rsi leaq -0x1(%rax), %rdx jmp 0x179874 movq %rsi, %r12 movq 0x8(%rsp), %rsi jmp 0x179835 cmpl $0x6, %r14d jne 0x17a47e movl %r12d, %eax andl $0xf, %eax xorl %r14d, %r14d addq $-0x8, %rax setne 0x6(%rsp) je 0x17a47e movq %r8, 0xa0(%rsp) andq $-0x10, %r12 xorl %edx, %edx movq %rax, 0x108(%rsp) movq %rdx, 0x110(%rsp) imulq $0x50, %rdx, %rdx movq (%rdi), %rsi movq %rsi, 0xa8(%rsp) movss 0x70(%r9,%rcx,4), %xmm6 movl 0x30(%r12,%rdx), %eax movq 0x1e8(%rsi), %rcx movq (%rcx,%rax,8), %rax movss 0x28(%rax), %xmm0 movss 0x2c(%rax), %xmm1 movss 0x30(%rax), %xmm2 subss %xmm1, %xmm6 subss %xmm1, %xmm2 divss %xmm2, %xmm6 mulss %xmm0, %xmm6 roundss $0x9, %xmm6, %xmm2 addss 0x1d7708c(%rip), %xmm0 # 0x1ef09cc minss %xmm0, %xmm2 xorps %xmm1, %xmm1 maxss %xmm2, %xmm1 cvttss2si %xmm1, %ecx movslq %ecx, %rcx movq 0xe0(%rax), %rsi imulq $0x38, %rcx, %rcx movl (%r12,%rdx), %edi movl 0x4(%r12,%rdx), %r15d movq (%rsi,%rcx), %rax movq 0x38(%rsi,%rcx), %rsi movups (%rax,%rdi,4), %xmm3 movl 0x10(%r12,%rdx), %ecx movups (%rax,%rcx,4), %xmm7 movl 0x20(%r12,%rdx), %r8d movq %r8, 0x40(%rsp) movups (%rax,%r8,4), %xmm0 movaps %xmm0, 0x20(%rsp) movups (%rax,%r15,4), %xmm9 movl 0x14(%r12,%rdx), %r8d movups (%rax,%r8,4), %xmm2 movl 0x24(%r12,%rdx), %r9d movq %r9, 0xd0(%rsp) movups (%rax,%r9,4), %xmm15 movl 0x8(%r12,%rdx), %r13d movups (%rax,%r13,4), %xmm0 movl 0x18(%r12,%rdx), %r11d movups (%rax,%r11,4), %xmm11 movl 0x28(%r12,%rdx), %r9d movq %r9, 0xc0(%rsp) movups (%rax,%r9,4), %xmm8 movl 0xc(%r12,%rdx), %ebp movups (%rax,%rbp,4), %xmm14 movl 0x1c(%r12,%rdx), %r10d movups (%rax,%r10,4), %xmm12 movl 0x2c(%r12,%rdx), %r9d movups (%rax,%r9,4), %xmm10 movups (%rsi,%rdi,4), %xmm5 movq 0xba8(%rsp), %rdi movups (%rsi,%rcx,4), %xmm4 movq 0x30(%rsp), %rcx subss %xmm1, %xmm6 movaps %xmm3, %xmm1 movaps %xmm3, %xmm13 unpcklps %xmm0, %xmm13 # xmm13 = xmm13[0],xmm0[0],xmm13[1],xmm0[1] unpckhps %xmm0, %xmm1 # xmm1 = xmm1[2],xmm0[2],xmm1[3],xmm0[3] movaps %xmm1, %xmm3 movaps %xmm9, %xmm1 unpcklps %xmm14, %xmm1 # xmm1 = xmm1[0],xmm14[0],xmm1[1],xmm14[1] unpckhps %xmm14, %xmm9 # xmm9 = xmm9[2],xmm14[2],xmm9[3],xmm14[3] movups (%rsi,%r15,4), %xmm0 unpcklps %xmm9, %xmm3 # xmm3 = xmm3[0],xmm9[0],xmm3[1],xmm9[1] movaps %xmm3, 0xe0(%rsp) movaps %xmm13, %xmm3 unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1] unpckhps %xmm1, %xmm13 # xmm13 = xmm13[2],xmm1[2],xmm13[3],xmm1[3] movaps %xmm7, %xmm1 unpcklps %xmm11, %xmm1 # xmm1 = xmm1[0],xmm11[0],xmm1[1],xmm11[1] unpckhps %xmm11, %xmm7 # xmm7 = xmm7[2],xmm11[2],xmm7[3],xmm11[3] movaps %xmm2, %xmm9 unpcklps %xmm12, %xmm9 # xmm9 = xmm9[0],xmm12[0],xmm9[1],xmm12[1] unpckhps %xmm12, %xmm2 # xmm2 = xmm2[2],xmm12[2],xmm2[3],xmm12[3] movups (%rsi,%r13,4), %xmm11 unpcklps %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1] movaps %xmm7, 0x10(%rsp) movaps %xmm1, %xmm2 unpcklps %xmm9, %xmm2 # xmm2 = xmm2[0],xmm9[0],xmm2[1],xmm9[1] movaps %xmm2, 0x50(%rsp) unpckhps %xmm9, %xmm1 # xmm1 = xmm1[2],xmm9[2],xmm1[3],xmm9[3] movaps %xmm1, 0x60(%rsp) movaps 0x20(%rsp), %xmm1 movaps %xmm1, %xmm2 unpcklps %xmm8, %xmm2 # xmm2 = xmm2[0],xmm8[0],xmm2[1],xmm8[1] unpckhps %xmm8, %xmm1 # xmm1 = xmm1[2],xmm8[2],xmm1[3],xmm8[3] movaps %xmm15, %xmm8 unpcklps %xmm10, %xmm8 # xmm8 = xmm8[0],xmm10[0],xmm8[1],xmm10[1] unpckhps %xmm10, %xmm15 # xmm15 = xmm15[2],xmm10[2],xmm15[3],xmm10[3] movups (%rsi,%rbp,4), %xmm9 unpcklps %xmm15, %xmm1 # xmm1 = xmm1[0],xmm15[0],xmm1[1],xmm15[1] movaps %xmm1, 0x20(%rsp) movaps %xmm2, %xmm7 unpcklps %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1] unpckhps %xmm8, %xmm2 # xmm2 = xmm2[2],xmm8[2],xmm2[3],xmm8[3] movaps %xmm5, %xmm10 unpcklps %xmm11, %xmm10 # xmm10 = xmm10[0],xmm11[0],xmm10[1],xmm11[1] unpckhps %xmm11, %xmm5 # xmm5 = xmm5[2],xmm11[2],xmm5[3],xmm11[3] movaps %xmm0, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movups (%rsi,%r11,4), %xmm9 unpcklps %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1] movaps %xmm10, %xmm1 unpcklps %xmm8, %xmm1 # xmm1 = xmm1[0],xmm8[0],xmm1[1],xmm8[1] unpckhps %xmm8, %xmm10 # xmm10 = xmm10[2],xmm8[2],xmm10[3],xmm8[3] movaps %xmm4, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm4 # xmm4 = xmm4[2],xmm9[2],xmm4[3],xmm9[3] movups (%rsi,%r8,4), %xmm9 movq 0xa8(%rsp), %r8 movups (%rsi,%r10,4), %xmm11 movaps %xmm9, %xmm12 unpcklps %xmm11, %xmm12 # xmm12 = xmm12[0],xmm11[0],xmm12[1],xmm11[1] unpckhps %xmm11, %xmm9 # xmm9 = xmm9[2],xmm11[2],xmm9[3],xmm11[3] unpcklps %xmm9, %xmm4 # xmm4 = xmm4[0],xmm9[0],xmm4[1],xmm9[1] movaps %xmm8, %xmm15 unpcklps %xmm12, %xmm15 # xmm15 = xmm15[0],xmm12[0],xmm15[1],xmm12[1] unpckhps %xmm12, %xmm8 # xmm8 = xmm8[2],xmm12[2],xmm8[3],xmm12[3] movq 0x40(%rsp), %rax movups (%rsi,%rax,4), %xmm11 movq 0xc0(%rsp), %rax movups (%rsi,%rax,4), %xmm12 movaps %xmm11, %xmm9 unpcklps %xmm12, %xmm9 # xmm9 = xmm9[0],xmm12[0],xmm9[1],xmm12[1] unpckhps %xmm12, %xmm11 # xmm11 = xmm11[2],xmm12[2],xmm11[3],xmm12[3] movq 0xd0(%rsp), %rax movups (%rsi,%rax,4), %xmm12 movups (%rsi,%r9,4), %xmm14 movq 0x8(%rsp), %rsi movq 0x38(%rsp), %r9 movaps %xmm12, %xmm0 unpcklps %xmm14, %xmm0 # xmm0 = xmm0[0],xmm14[0],xmm0[1],xmm14[1] unpckhps %xmm14, %xmm12 # xmm12 = xmm12[2],xmm14[2],xmm12[3],xmm14[3] unpcklps %xmm12, %xmm11 # xmm11 = xmm11[0],xmm12[0],xmm11[1],xmm12[1] movaps %xmm9, %xmm12 unpcklps %xmm0, %xmm12 # xmm12 = xmm12[0],xmm0[0],xmm12[1],xmm0[1] unpckhps %xmm0, %xmm9 # xmm9 = xmm9[2],xmm0[2],xmm9[3],xmm0[3] movss 0x1d72b95(%rip), %xmm14 # 0x1eec714 subss %xmm6, %xmm14 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] mulps %xmm6, %xmm1 mulps %xmm14, %xmm3 addps %xmm1, %xmm3 movaps %xmm3, 0x40(%rsp) mulps %xmm6, %xmm10 mulps %xmm14, %xmm13 addps %xmm10, %xmm13 mulps %xmm6, %xmm5 movaps 0xe0(%rsp), %xmm3 mulps %xmm14, %xmm3 addps %xmm5, %xmm3 movaps %xmm3, %xmm5 mulps %xmm6, %xmm15 movaps 0x50(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm15, %xmm0 movaps %xmm0, %xmm10 mulps %xmm6, %xmm8 mulps %xmm6, %xmm4 movaps 0x60(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm8, %xmm0 movaps %xmm0, %xmm15 movaps 0xb0(%rsp), %xmm8 movaps 0x10(%rsp), %xmm3 mulps %xmm14, %xmm3 addps %xmm4, %xmm3 movaps %xmm3, %xmm4 mulps %xmm6, %xmm12 mulps %xmm6, %xmm9 mulps %xmm11, %xmm6 mulps %xmm14, %xmm7 addps %xmm12, %xmm7 movaps %xmm7, %xmm11 mulps %xmm14, %xmm2 addps %xmm9, %xmm2 mulps 0x20(%rsp), %xmm14 addps %xmm6, %xmm14 movaps 0x30(%r12,%rdx), %xmm0 movaps %xmm0, 0x270(%rsp) movaps 0x40(%r12,%rdx), %xmm0 movaps %xmm0, 0x260(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x2b0(%rsp) movss (%r9,%rcx,4), %xmm1 movss 0x10(%r9,%rcx,4), %xmm3 movss 0x20(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x40(%rsp), %xmm6 subps %xmm1, %xmm6 subps %xmm3, %xmm13 subps %xmm0, %xmm5 movaps %xmm10, %xmm7 subps %xmm1, %xmm7 subps %xmm3, %xmm15 movaps %xmm15, 0x60(%rsp) subps %xmm0, %xmm4 movaps %xmm4, 0x10(%rsp) movaps %xmm11, %xmm9 subps %xmm1, %xmm9 subps %xmm3, %xmm2 subps %xmm0, %xmm14 movaps %xmm9, %xmm4 movaps %xmm9, %xmm11 movaps %xmm9, 0x20(%rsp) subps %xmm6, %xmm4 movaps %xmm6, %xmm12 movaps %xmm2, %xmm10 subps %xmm13, %xmm10 movaps %xmm14, %xmm9 movaps %xmm5, %xmm15 subps %xmm5, %xmm9 movaps %xmm2, %xmm0 addps %xmm13, %xmm0 movaps %xmm14, %xmm1 addps %xmm5, %xmm1 movaps %xmm4, %xmm3 mulps %xmm0, %xmm3 mulps %xmm9, %xmm0 movaps %xmm10, %xmm6 mulps %xmm1, %xmm6 subps %xmm0, %xmm6 movaps %xmm11, %xmm0 addps %xmm12, %xmm0 movaps %xmm12, %xmm5 movaps %xmm4, 0x1b0(%rsp) mulps %xmm4, %xmm1 movaps %xmm0, %xmm4 movaps %xmm9, 0x1a0(%rsp) mulps %xmm9, %xmm4 subps %xmm1, %xmm4 movaps %xmm10, 0x190(%rsp) mulps %xmm10, %xmm0 subps %xmm0, %xmm3 movss 0x50(%r9,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x60(%r9,%rcx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm9, %xmm3 mulps %xmm12, %xmm4 addps %xmm3, %xmm4 movss 0x40(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0xd0(%rsp) mulps %xmm0, %xmm6 addps %xmm4, %xmm6 movaps %xmm5, %xmm11 subps %xmm7, %xmm11 movaps %xmm7, 0x50(%rsp) movaps %xmm13, %xmm10 movaps 0x60(%rsp), %xmm1 subps %xmm1, %xmm10 movaps %xmm15, %xmm4 movaps 0x10(%rsp), %xmm3 subps %xmm3, %xmm15 movaps %xmm13, 0xc0(%rsp) movaps %xmm13, %xmm0 addps %xmm1, %xmm0 movaps %xmm1, %xmm13 movaps %xmm4, 0xe0(%rsp) movaps %xmm4, %xmm1 addps %xmm3, %xmm1 movaps %xmm11, %xmm4 mulps %xmm0, %xmm4 mulps %xmm15, %xmm0 movaps %xmm10, %xmm3 mulps %xmm1, %xmm3 subps %xmm0, %xmm3 movaps %xmm5, 0x40(%rsp) movaps %xmm5, %xmm0 addps %xmm7, %xmm0 mulps %xmm11, %xmm1 movaps %xmm0, %xmm5 movaps %xmm15, 0x180(%rsp) mulps %xmm15, %xmm5 subps %xmm1, %xmm5 mulps %xmm10, %xmm0 subps %xmm0, %xmm4 mulps %xmm9, %xmm4 mulps %xmm12, %xmm5 addps %xmm4, %xmm5 movaps 0xd0(%rsp), %xmm7 mulps %xmm7, %xmm3 addps %xmm5, %xmm3 movaps 0x50(%rsp), %xmm0 movaps %xmm0, %xmm15 movaps 0x20(%rsp), %xmm4 subps %xmm4, %xmm15 addps %xmm0, %xmm4 movaps %xmm13, %xmm5 subps %xmm2, %xmm5 addps %xmm13, %xmm2 movaps 0x10(%rsp), %xmm0 movaps %xmm0, %xmm13 subps %xmm14, %xmm13 addps %xmm0, %xmm14 movaps %xmm15, %xmm1 mulps %xmm2, %xmm1 mulps %xmm13, %xmm2 movaps %xmm5, %xmm0 mulps %xmm14, %xmm0 subps %xmm2, %xmm0 mulps %xmm15, %xmm14 movaps %xmm4, %xmm2 movaps %xmm13, 0x10(%rsp) mulps %xmm13, %xmm2 subps %xmm14, %xmm2 mulps %xmm5, %xmm4 subps %xmm4, %xmm1 movaps %xmm9, 0x20(%rsp) mulps %xmm9, %xmm1 mulps %xmm12, %xmm2 addps %xmm1, %xmm2 mulps %xmm7, %xmm0 addps %xmm2, %xmm0 movaps %xmm6, %xmm13 addps %xmm3, %xmm13 addps %xmm0, %xmm13 movaps %xmm6, %xmm1 minps %xmm3, %xmm1 minps %xmm0, %xmm1 movaps %xmm6, 0x160(%rsp) movaps %xmm6, %xmm14 movaps %xmm3, 0x170(%rsp) maxps %xmm3, %xmm14 maxps %xmm0, %xmm14 movaps %xmm13, 0x150(%rsp) andps 0x1d727f9(%rip), %xmm13 # 0x1eec6c0 movaps %xmm13, %xmm0 mulps 0x1d77e9e(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm14 xorps 0x1d727f2(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm14 movmskps %xmm14, %eax testl %eax, %eax je 0x17a3ea movaps %xmm12, %xmm4 movaps %xmm7, %xmm12 movaps %xmm10, %xmm0 movaps %xmm4, 0x60(%rsp) movaps 0x1a0(%rsp), %xmm9 mulps %xmm9, %xmm0 movaps %xmm11, %xmm1 movaps 0x190(%rsp), %xmm7 mulps %xmm7, %xmm1 movaps %xmm5, %xmm4 movaps 0x180(%rsp), %xmm6 mulps %xmm6, %xmm4 movaps %xmm15, %xmm8 mulps %xmm10, %xmm8 mulps %xmm6, %xmm7 subps %xmm0, %xmm7 movaps %xmm5, 0x50(%rsp) movaps 0x1b0(%rsp), %xmm5 movaps %xmm5, %xmm2 mulps %xmm10, %xmm5 mulps 0x10(%rsp), %xmm10 subps %xmm4, %xmm10 movaps 0x1d72760(%rip), %xmm3 # 0x1eec6c0 andps %xmm3, %xmm0 andps %xmm3, %xmm4 cmpltps %xmm4, %xmm0 blendvps %xmm0, %xmm7, %xmm10 movaps %xmm11, %xmm0 mulps 0x10(%rsp), %xmm0 mulps %xmm6, %xmm2 mulps %xmm6, %xmm15 mulps %xmm11, %xmm9 subps %xmm2, %xmm9 subps %xmm0, %xmm15 andps %xmm3, %xmm2 andps %xmm3, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm9, %xmm15 mulps 0x50(%rsp), %xmm11 subps %xmm1, %xmm5 subps %xmm8, %xmm11 andps %xmm3, %xmm1 andps %xmm3, %xmm8 cmpltps %xmm8, %xmm1 movaps 0xb0(%rsp), %xmm8 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm5, %xmm11 movaps 0x20(%rsp), %xmm0 mulps %xmm11, %xmm0 movaps 0x60(%rsp), %xmm1 mulps %xmm15, %xmm1 addps %xmm0, %xmm1 mulps %xmm10, %xmm12 addps %xmm1, %xmm12 addps %xmm12, %xmm12 movaps 0xe0(%rsp), %xmm0 mulps %xmm11, %xmm0 movaps 0xc0(%rsp), %xmm1 mulps %xmm15, %xmm1 addps %xmm0, %xmm1 movaps 0x40(%rsp), %xmm3 mulps %xmm10, %xmm3 addps %xmm1, %xmm3 rcpps %xmm12, %xmm1 movaps %xmm12, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d729ec(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm3, %xmm3 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm3, %xmm0 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm14, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17a3ea cmpneqps 0x1d7199e(%rip), %xmm12 # 0x1eeba10 andps %xmm12, %xmm1 movmskps %xmm1, %ebp testl %ebp, %ebp je 0x17a3ea movaps 0x160(%rsp), %xmm4 movaps %xmm4, 0x280(%rsp) movaps 0x170(%rsp), %xmm3 movaps %xmm3, 0x290(%rsp) movaps 0x150(%rsp), %xmm5 movaps %xmm5, 0x2a0(%rsp) leaq 0x7(%rsp), %rax movq %rax, 0x2b0(%rsp) movaps %xmm1, 0x2c0(%rsp) movaps %xmm0, 0x2f0(%rsp) movaps %xmm10, 0x300(%rsp) movaps %xmm15, 0x310(%rsp) movaps %xmm11, 0x320(%rsp) rcpps %xmm5, %xmm0 mulps %xmm0, %xmm5 movaps 0x1d7291a(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm1 subps %xmm5, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 cmpnltps 0x1d77c35(%rip), %xmm13 # 0x1ef1d40 andps %xmm1, %xmm13 mulps %xmm13, %xmm4 minps %xmm2, %xmm4 movaps %xmm4, 0x2d0(%rsp) mulps %xmm3, %xmm13 minps %xmm2, %xmm13 movaps %xmm13, 0x2e0(%rsp) bsfq %rbp, %r15 movl 0x270(%rsp,%r15,4), %edx movq 0x1e8(%r8), %rax movq (%rax,%rdx,8), %r13 movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%r13) je 0x17a16a movq 0x10(%rdi), %rax cmpq $0x0, 0x10(%rax) jne 0x17a182 cmpq $0x0, 0x48(%r13) jne 0x17a182 xorl %eax, %eax jmp 0x17a170 btcq %r15, %rbp movb $0x1, %al testb %al, %al je 0x17a43a testq %rbp, %rbp jne 0x17a12f jmp 0x17a3ea movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x10(%rsp) movss 0x2f0(%rsp,%r15,4), %xmm0 movss 0x2d0(%rsp,%r15,4), %xmm1 movss 0x2e0(%rsp,%r15,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0x8(%rdi), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x260(%rsp,%r15,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x300(%rsp,%r15,4), %xmm4 movss 0x310(%rsp,%r15,4), %xmm5 movss 0x320(%rsp,%r15,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x330(%rsp) movaps %xmm5, 0x340(%rsp) movaps %xmm6, 0x350(%rsp) movaps %xmm1, 0x360(%rsp) movaps %xmm2, 0x370(%rsp) movdqa %xmm3, 0x380(%rsp) movdqa %xmm0, 0x390(%rsp) leaq 0x3a0(%rsp), %rdx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rdx) movdqa %xmm0, (%rdx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3a0(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3b0(%rsp) movq 0x100(%rsp), %rdx movdqa (%rdx), %xmm0 movdqa %xmm0, 0xf0(%rsp) leaq 0xf0(%rsp), %rdx movq %rdx, 0x120(%rsp) movq 0x18(%r13), %rdx movq %rdx, 0x128(%rsp) movq %rax, 0x130(%rsp) movq %r9, 0x138(%rsp) leaq 0x330(%rsp), %rax movq %rax, 0x140(%rsp) movl $0x4, 0x148(%rsp) movq 0x48(%r13), %rax testq %rax, %rax je 0x17a313 leaq 0x120(%rsp), %rdi callq *%rax movq 0xa8(%rsp), %r8 movq 0x8(%rsp), %rsi movaps 0xb0(%rsp), %xmm8 movq 0xba8(%rsp), %rdi movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r9 movdqa 0xf0(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x17a3ae movq 0x10(%rdi), %rdx movq 0x10(%rdx), %rax testq %rax, %rax je 0x17a370 testb $0x2, (%rdx) jne 0x17a340 testb $0x40, 0x3e(%r13) je 0x17a370 leaq 0x120(%rsp), %rdi movq %r8, %r13 callq *%rax movq %r13, %r8 movq 0x8(%rsp), %rsi movaps 0xb0(%rsp), %xmm8 movq 0xba8(%rsp), %rdi movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r9 movdqa 0xf0(%rsp), %xmm0 pcmpeqd 0x1d7168f(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d71a93(%rip), %xmm1 # 0x1eebe20 movq 0x138(%rsp), %rax movaps 0x1d71664(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x17a3be pcmpeqd 0x1d7165a(%rip), %xmm1 # 0x1eeba10 pxor 0x1d71a62(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x17a170 movss 0x10(%rsp), %xmm0 movss %xmm0, 0x80(%r9,%rcx,4) btcq %r15, %rbp jmp 0x17a170 movq 0x110(%rsp), %rdx incq %rdx movq 0x108(%rsp), %rax cmpq %rax, %rdx setb 0x6(%rsp) jne 0x1798e5 movq 0xa0(%rsp), %r8 movq 0x98(%rsp), %r10 movq 0x90(%rsp), %r11 movq 0x88(%rsp), %r15 movq 0x80(%rsp), %r13 movq 0x78(%rsp), %rbp jmp 0x17a47e testb $0x1, 0x6(%rsp) movq 0xa0(%rsp), %r8 movq 0x98(%rsp), %r10 movq 0x90(%rsp), %r11 movq 0x88(%rsp), %r15 movq 0x80(%rsp), %r13 movq 0x78(%rsp), %rbp je 0x17a47e movl $0xff800000, 0x80(%r9,%rcx,4) # imm = 0xFF800000 pushq $0x1 popq %r14 testb $0x3, %r14b movq 0x118(%rsp), %rdx je 0x1796c5 leaq 0x3c0(%rsp), %rax cmpq %rax, %rdx setne %al addq $0xb68, %rsp # imm = 0xB68 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMvIntersectorKMoeller<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKMoellerTrumbore<4, 4, true>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1258, %rsp # imm = 0x1258 movq %r9, %rbx movq %rcx, %r14 leaq 0x320(%rsp), %r10 movq %rdx, -0x10(%r10) andl $0x0, -0x8(%r10) movq 0x1290(%rsp), %rax movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rsi movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rsi, %r11 xorq $0x10, %r11 movq %rdi, %r15 xorq $0x10, %r15 movq %r8, %r13 xorq $0x10, %r13 movss 0xc0(%rax,%rcx,4), %xmm4 movss 0xd0(%rax,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] leaq 0x1fd4078(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x290(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x280(%rsp) pushq $0x1 popq %rdx shll %cl, %edx movslq %edx, %rcx shlq $0x4, %rcx addq %rax, %rcx movq %rcx, 0xd8(%rsp) movq %r15, 0x58(%rsp) movq %r13, 0x50(%rsp) movaps %xmm8, 0x300(%rsp) movaps %xmm9, 0x2f0(%rsp) movaps %xmm10, 0x2e0(%rsp) movaps %xmm11, 0x2d0(%rsp) movaps %xmm6, 0x2c0(%rsp) movaps %xmm7, 0x2b0(%rsp) movq %r11, 0x28(%rsp) movaps %xmm4, 0x2a0(%rsp) leaq 0x310(%rsp), %rax cmpq %rax, %r10 je 0x17d371 movss -0x8(%r10), %xmm0 addq $-0x10, %r10 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x17bf84 movq (%r10), %rbp testb $0x8, %bpl jne 0x17c039 movaps 0x20(%rbp,%rsi), %xmm0 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 movaps 0x20(%rbp,%rdi), %xmm2 subps %xmm9, %xmm2 mulps %xmm6, %xmm2 pmaxsd %xmm0, %xmm2 movaps 0x20(%rbp,%r8), %xmm0 subps %xmm10, %xmm0 mulps %xmm7, %xmm0 pmaxsd %xmm4, %xmm0 pmaxsd %xmm2, %xmm0 movaps 0x20(%rbp,%r11), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movaps 0x20(%rbp,%r15), %xmm3 subps %xmm9, %xmm3 mulps %xmm6, %xmm3 pminsd %xmm2, %xmm3 movaps 0x20(%rbp,%r13), %xmm2 subps %xmm10, %xmm2 mulps %xmm7, %xmm2 pminsd %xmm1, %xmm2 pminsd %xmm3, %xmm2 movdqa %xmm0, 0x100(%rsp) pcmpgtd %xmm2, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %r12d testb $0x8, %bpl jne 0x17c074 testq %r12, %r12 je 0x17c078 andq $-0x10, %rbp bsfq %r12, %rcx leaq -0x1(%r12), %r9 xorl %eax, %eax movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %r12, %r9 jne 0x17c07d movq %rdx, %rbp testl %eax, %eax je 0x17bfad jmp 0x17c281 pushq $0x6 jmp 0x17c07a pushq $0x4 popq %rax jmp 0x17c067 movq %r8, %r11 movq %rdi, %r13 movq %rsi, %r15 movl 0x100(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%rbp,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0x100(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x17c0f0 leaq 0x10(%r10), %rcx cmpl %r8d, %edi jae 0x17c0c6 movq %rsi, (%r10) movl %r8d, 0x8(%r10) movq %rcx, %r10 movq %rdx, %rbp jmp 0x17c0d3 movq %rdx, (%r10) movl %edi, 0x8(%r10) movq %rcx, %r10 movq %rsi, %rbp movq %r15, %rsi movq %r13, %rdi movq %r11, %r8 movq 0x28(%rsp), %r11 movq 0x58(%rsp), %r15 movq 0x50(%rsp), %r13 jmp 0x17c067 movaps %xmm4, %xmm14 movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%rbp,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0x100(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x17c1ba pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r10) movaps %xmm3, 0x10(%r10) movq %xmm5, %rbp addq $0x20, %r10 movq %r15, %rsi movq %r13, %rdi movq %r11, %r8 movq 0x28(%rsp), %r11 movq 0x58(%rsp), %r15 movq 0x50(%rsp), %r13 movaps %xmm14, %xmm4 jmp 0x17c067 bsfq %rdx, %rcx movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movaps %xmm6, %xmm12 movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movaps %xmm7, %xmm13 movd 0x100(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps %xmm13, %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm12, %xmm6 movaps %xmm2, (%r10) movaps %xmm4, 0x10(%r10) movaps %xmm5, 0x20(%r10) movq %xmm3, %rbp addq $0x30, %r10 jmp 0x17c199 cmpl $0x6, %eax jne 0x17bf84 movl %ebp, %edx andl $0xf, %edx addq $-0x8, %rdx je 0x17d318 andq $-0x10, %rbp xorl %r15d, %r15d imulq $0xe0, %r15, %rax movaps 0xd0(%rbp,%rax), %xmm0 movaps %xmm0, 0xe0(%rsp) movaps (%rbp,%rax), %xmm5 movaps 0x10(%rbp,%rax), %xmm7 movaps 0x20(%rbp,%rax), %xmm0 movaps %xmm5, %xmm1 subps 0x30(%rbp,%rax), %xmm1 movaps %xmm1, %xmm9 movaps 0x90(%rbp,%rax), %xmm2 movaps %xmm7, %xmm3 subps 0x40(%rbp,%rax), %xmm3 movaps %xmm0, %xmm11 subps 0x50(%rbp,%rax), %xmm11 subps %xmm5, %xmm2 movaps 0xa0(%rbp,%rax), %xmm8 subps %xmm7, %xmm8 movaps 0xb0(%rbp,%rax), %xmm10 subps %xmm0, %xmm10 movaps %xmm3, %xmm4 mulps %xmm10, %xmm4 movaps %xmm11, %xmm1 mulps %xmm8, %xmm1 subps %xmm4, %xmm1 movaps %xmm9, %xmm6 movaps %xmm9, %xmm4 mulps %xmm10, %xmm6 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm5 subps %xmm14, %xmm7 movaps %xmm7, %xmm14 mulps %xmm9, %xmm14 movaps %xmm5, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm10 mulps %xmm11, %xmm13 mulps %xmm2, %xmm11 subps %xmm11, %xmm6 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm0 movaps %xmm5, (%rsp) movaps %xmm5, %xmm11 mulps %xmm14, %xmm11 movaps %xmm0, %xmm15 mulps %xmm9, %xmm15 subps %xmm11, %xmm15 movaps %xmm4, %xmm11 mulps %xmm8, %xmm11 mulps %xmm15, %xmm8 mulps %xmm3, %xmm15 mulps %xmm2, %xmm3 subps %xmm11, %xmm3 movaps %xmm0, 0x30(%rsp) mulps %xmm12, %xmm0 movaps %xmm7, 0x60(%rsp) movaps %xmm7, %xmm11 mulps %xmm14, %xmm11 subps %xmm0, %xmm11 mulps %xmm3, %xmm14 movaps %xmm6, 0x10(%rsp) mulps %xmm6, %xmm12 addps %xmm14, %xmm12 mulps %xmm1, %xmm9 addps %xmm12, %xmm9 addps %xmm10, %xmm8 mulps %xmm11, %xmm2 addps %xmm8, %xmm2 addps %xmm13, %xmm15 movaps %xmm9, %xmm12 andps 0x1d702b4(%rip), %xmm12 # 0x1eec6d0 xorps %xmm12, %xmm2 mulps %xmm4, %xmm11 addps %xmm15, %xmm11 movaps 0x1d70290(%rip), %xmm15 # 0x1eec6c0 xorps %xmm12, %xmm11 movaps %xmm2, %xmm5 xorps %xmm0, %xmm0 cmpnltps %xmm0, %xmm5 movaps %xmm11, %xmm10 cmpnltps %xmm0, %xmm10 andps %xmm5, %xmm10 xorps %xmm5, %xmm5 movaps %xmm9, %xmm6 andps %xmm15, %xmm6 cmpneqps %xmm5, %xmm9 andps %xmm9, %xmm10 movaps %xmm2, %xmm8 addps %xmm11, %xmm8 cmpleps %xmm6, %xmm8 andps %xmm10, %xmm8 leaq (%rax,%rbp), %r13 movmskps %xmm8, %eax testl %eax, %eax jne 0x17c64e movaps 0x30(%r13), %xmm2 movaps 0x40(%r13), %xmm7 movaps 0x50(%r13), %xmm8 movaps 0x60(%r13), %xmm0 movaps %xmm0, %xmm1 subps 0x90(%r13), %xmm1 movaps %xmm1, %xmm10 movaps 0x70(%r13), %xmm9 movaps %xmm9, %xmm3 subps 0xa0(%r13), %xmm3 movaps 0x80(%r13), %xmm5 movaps %xmm5, %xmm11 subps 0xb0(%r13), %xmm11 subps %xmm0, %xmm2 subps %xmm9, %xmm7 subps %xmm5, %xmm8 movaps %xmm3, %xmm4 mulps %xmm8, %xmm4 movaps %xmm11, %xmm1 mulps %xmm7, %xmm1 subps %xmm4, %xmm1 movaps %xmm10, %xmm6 movaps %xmm10, %xmm4 mulps %xmm8, %xmm6 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm10 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm0 subps %xmm14, %xmm9 movaps %xmm9, %xmm14 mulps %xmm10, %xmm14 movaps %xmm0, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm8 mulps %xmm11, %xmm13 mulps %xmm2, %xmm11 subps %xmm11, %xmm6 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm5 movaps %xmm0, (%rsp) movaps %xmm0, %xmm11 mulps %xmm14, %xmm11 movaps %xmm15, %xmm0 movaps %xmm5, %xmm15 mulps %xmm10, %xmm15 subps %xmm11, %xmm15 movaps %xmm4, %xmm11 mulps %xmm7, %xmm11 mulps %xmm15, %xmm7 mulps %xmm3, %xmm15 mulps %xmm2, %xmm3 subps %xmm11, %xmm3 movaps %xmm5, 0x60(%rsp) mulps %xmm12, %xmm5 movaps %xmm9, 0x30(%rsp) mulps %xmm14, %xmm9 subps %xmm5, %xmm9 mulps %xmm3, %xmm14 movaps %xmm6, 0x10(%rsp) mulps %xmm6, %xmm12 addps %xmm14, %xmm12 movaps %xmm1, %xmm14 mulps %xmm1, %xmm10 addps %xmm12, %xmm10 addps %xmm8, %xmm7 mulps %xmm9, %xmm2 addps %xmm7, %xmm2 addps %xmm13, %xmm15 movaps %xmm10, %xmm13 movaps 0x1d700e8(%rip), %xmm1 # 0x1eec6d0 andps %xmm1, %xmm13 xorps %xmm13, %xmm2 mulps %xmm4, %xmm9 addps %xmm15, %xmm9 xorps %xmm13, %xmm9 movaps %xmm2, %xmm5 xorps %xmm1, %xmm1 cmpnltps %xmm1, %xmm5 movaps %xmm9, %xmm8 cmpnltps %xmm1, %xmm8 andps %xmm5, %xmm8 movaps %xmm10, %xmm6 andps %xmm0, %xmm6 cmpneqps %xmm1, %xmm10 andps %xmm10, %xmm8 movaps %xmm2, %xmm7 addps %xmm9, %xmm7 cmpleps %xmm6, %xmm7 andps %xmm8, %xmm7 movmskps %xmm7, %eax testl %eax, %eax jne 0x17cbf7 incq %r15 cmpq %rdx, %r15 jne 0x17c2a0 jmp 0x17d318 movaps %xmm1, %xmm14 movaps 0x30(%rsp), %xmm0 mulps %xmm3, %xmm0 movaps 0x60(%rsp), %xmm1 mulps 0x10(%rsp), %xmm1 addps %xmm0, %xmm1 movaps (%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 xorps %xmm0, %xmm12 movss 0x30(%rbx,%r14,4), %xmm0 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm6, %xmm0 cmpltps %xmm12, %xmm0 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm6, %xmm4 movaps %xmm12, %xmm1 cmpleps %xmm4, %xmm1 andps %xmm0, %xmm1 andps %xmm8, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17c480 movaps %xmm2, 0x100(%rsp) movaps %xmm11, 0x110(%rsp) movaps %xmm12, 0x120(%rsp) movaps %xmm6, 0x130(%rsp) movaps %xmm14, 0x140(%rsp) movaps 0x10(%rsp), %xmm7 movaps %xmm7, 0x150(%rsp) movaps %xmm3, 0x160(%rsp) movaps %xmm1, 0x170(%rsp) movaps 0x290(%rsp), %xmm0 movaps %xmm0, 0x1e0(%rsp) movq 0x1298(%rsp), %rax movq (%rax), %rcx movaps %xmm1, 0x40(%rsp) rcpps %xmm6, %xmm5 mulps %xmm5, %xmm6 movaps 0x1d702e6(%rip), %xmm8 # 0x1eeca10 movaps %xmm8, %xmm4 subps %xmm6, %xmm4 mulps %xmm5, %xmm4 addps %xmm5, %xmm4 mulps %xmm4, %xmm12 movaps %xmm12, 0x1a0(%rsp) mulps %xmm4, %xmm2 minps %xmm8, %xmm2 mulps %xmm11, %xmm4 minps %xmm8, %xmm4 movaps %xmm8, %xmm5 subps %xmm2, %xmm5 movaps %xmm8, %xmm6 subps %xmm4, %xmm6 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0x180(%rsp) blendvps %xmm0, %xmm6, %xmm4 movaps %xmm4, 0x190(%rsp) movaps %xmm14, 0x1b0(%rsp) movaps %xmm7, 0x1c0(%rsp) movaps %xmm3, 0x1d0(%rsp) movaps 0x1d6f255(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm12, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17c7c9 movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %r9 movq %rcx, 0x60(%rsp) movl 0xc0(%r13,%r9,4), %eax movq 0x1e8(%rcx), %rcx movq %rax, (%rsp) movq (%rcx,%rax,8), %rax movl 0x90(%rbx,%r14,4), %ecx movq %rax, 0x10(%rsp) testl %ecx, 0x34(%rax) je 0x17cb0f movq %r9, 0x30(%rsp) movq 0x1298(%rsp), %rcx movq 0x10(%rcx), %rcx cmpq $0x0, 0x10(%rcx) jne 0x17c82a movq 0x10(%rsp), %rcx cmpq $0x0, 0x40(%rcx) je 0x17d198 movaps %xmm12, 0xf0(%rsp) movq %rdx, 0x80(%rsp) movq %r8, 0x88(%rsp) movq %rdi, 0x90(%rsp) movq %rsi, 0x98(%rsp) movq %r10, 0xa0(%rsp) movq 0x30(%rsp), %rsi movss 0x180(%rsp,%rsi,4), %xmm0 movss 0x190(%rsp,%rsi,4), %xmm1 movss 0x1b0(%rsp,%rsi,4), %xmm2 movss 0x1c0(%rsp,%rsi,4), %xmm3 movq 0x1298(%rsp), %rdx movq 0x8(%rdx), %rcx movd (%rsp), %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xe0(%rsp,%rsi,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1d0(%rsp,%rsi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x1f0(%rsp) movaps %xmm3, 0x200(%rsp) movaps %xmm6, 0x210(%rsp) movaps %xmm0, 0x220(%rsp) movaps %xmm1, 0x230(%rsp) movdqa %xmm5, 0x240(%rsp) movdqa %xmm4, 0x250(%rsp) leaq 0x260(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x260(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x270(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, (%rsp) movss 0x1a0(%rsp,%rsi,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xd8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x70(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x10(%rsp), %rcx movq 0x18(%rcx), %rax movq %rax, 0xb0(%rsp) movq 0x8(%rdx), %rax movq %rax, 0xb8(%rsp) movq %rbx, 0xc0(%rsp) leaq 0x1f0(%rsp), %rax movq %rax, 0xc8(%rsp) movl $0x4, 0xd0(%rsp) movq 0x40(%rcx), %rax testq %rax, %rax je 0x17c9cd leaq 0xa8(%rsp), %rdi callq *%rax movdqa 0x70(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x17cb68 movq 0x1298(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x17ca0d testb $0x2, (%rcx) jne 0x17ca03 movq 0x10(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x17ca0d leaq 0xa8(%rsp), %rdi callq *%rax movdqa 0x70(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d6eff0(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d6f3f4(%rip), %xmm1 # 0x1eebe20 je 0x17cb78 movq 0xc0(%rsp), %rax movq 0xc8(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x17cb78 andl $0x0, 0x40(%rsp,%r9,4) movaps 0x40(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x60(%rsp), %rcx je 0x17d24f movaps 0x1d6eebf(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm12, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17cb5c movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r9 jmp 0x17c7d5 pcmpeqd 0x1d6eea0(%rip), %xmm1 # 0x1eeba10 pxor 0x1d6f2a8(%rip), %xmm1 # 0x1eebe20 ptest 0x1d6ff9f(%rip), %xmm1 # 0x1eecb20 jne 0x17cb92 movd (%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x30(%rsp), %rax andl $0x0, 0x40(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0xf0(%rsp), %xmm12 movaps %xmm12, %xmm1 cmpleps %xmm0, %xmm1 andps 0x40(%rsp), %xmm1 movaps %xmm1, 0x40(%rsp) movq 0xa0(%rsp), %r10 movq 0x98(%rsp), %rsi movq 0x90(%rsp), %rdi movq 0x88(%rsp), %r8 movq 0x28(%rsp), %r11 movq 0x80(%rsp), %rdx jmp 0x17cb15 movaps 0x60(%rsp), %xmm0 mulps %xmm3, %xmm0 movaps 0x30(%rsp), %xmm1 mulps 0x10(%rsp), %xmm1 addps %xmm0, %xmm1 movaps (%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 xorps %xmm0, %xmm13 movss 0x30(%rbx,%r14,4), %xmm0 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm6, %xmm0 cmpltps %xmm13, %xmm0 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm6, %xmm4 movaps %xmm13, %xmm1 cmpleps %xmm4, %xmm1 andps %xmm0, %xmm1 andps %xmm7, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17c63d movaps %xmm2, 0x100(%rsp) movaps %xmm9, 0x110(%rsp) movaps %xmm13, 0x120(%rsp) movaps %xmm6, 0x130(%rsp) movaps %xmm14, 0x140(%rsp) movaps 0x10(%rsp), %xmm8 movaps %xmm8, 0x150(%rsp) movaps %xmm3, 0x160(%rsp) movaps %xmm1, 0x170(%rsp) movaps 0x280(%rsp), %xmm0 movaps %xmm0, 0x1e0(%rsp) movq 0x1298(%rsp), %rax movq (%rax), %rcx movaps %xmm1, 0x40(%rsp) rcpps %xmm6, %xmm5 mulps %xmm5, %xmm6 movaps 0x1d6fd41(%rip), %xmm7 # 0x1eeca10 movaps %xmm7, %xmm4 subps %xmm6, %xmm4 mulps %xmm5, %xmm4 addps %xmm5, %xmm4 mulps %xmm4, %xmm13 movaps %xmm13, 0x1a0(%rsp) mulps %xmm4, %xmm2 minps %xmm7, %xmm2 mulps %xmm9, %xmm4 minps %xmm7, %xmm4 movaps %xmm7, %xmm5 subps %xmm2, %xmm5 movaps %xmm7, %xmm6 subps %xmm4, %xmm6 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0x180(%rsp) blendvps %xmm0, %xmm6, %xmm4 movaps %xmm4, 0x190(%rsp) movaps %xmm14, 0x1b0(%rsp) movaps %xmm8, 0x1c0(%rsp) movaps %xmm3, 0x1d0(%rsp) movaps 0x1d6ecb4(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17cd6a movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %r9 movq %rcx, 0x60(%rsp) movl 0xc0(%r13,%r9,4), %eax movq 0x1e8(%rcx), %rcx movq %rax, (%rsp) movq (%rcx,%rax,8), %rax movl 0x90(%rbx,%r14,4), %ecx movq %rax, 0x10(%rsp) testl %ecx, 0x34(%rax) je 0x17d0b0 movq %r9, 0x30(%rsp) movq 0x1298(%rsp), %rcx movq 0x10(%rcx), %rcx cmpq $0x0, 0x10(%rcx) jne 0x17cdcb movq 0x10(%rsp), %rcx cmpq $0x0, 0x40(%rcx) je 0x17d25c movaps %xmm13, 0xf0(%rsp) movq %rdx, 0x80(%rsp) movq %r8, 0x88(%rsp) movq %rdi, 0x90(%rsp) movq %rsi, 0x98(%rsp) movq %r10, 0xa0(%rsp) movq 0x30(%rsp), %rsi movss 0x180(%rsp,%rsi,4), %xmm0 movss 0x190(%rsp,%rsi,4), %xmm1 movss 0x1b0(%rsp,%rsi,4), %xmm2 movss 0x1c0(%rsp,%rsi,4), %xmm3 movq 0x1298(%rsp), %rdx movq 0x8(%rdx), %rcx movd (%rsp), %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xe0(%rsp,%rsi,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1d0(%rsp,%rsi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x1f0(%rsp) movaps %xmm3, 0x200(%rsp) movaps %xmm6, 0x210(%rsp) movaps %xmm0, 0x220(%rsp) movaps %xmm1, 0x230(%rsp) movdqa %xmm5, 0x240(%rsp) movdqa %xmm4, 0x250(%rsp) leaq 0x260(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x260(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x270(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, (%rsp) movss 0x1a0(%rsp,%rsi,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xd8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x70(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x10(%rsp), %rcx movq 0x18(%rcx), %rax movq %rax, 0xb0(%rsp) movq 0x8(%rdx), %rax movq %rax, 0xb8(%rsp) movq %rbx, 0xc0(%rsp) leaq 0x1f0(%rsp), %rax movq %rax, 0xc8(%rsp) movl $0x4, 0xd0(%rsp) movq 0x40(%rcx), %rax testq %rax, %rax je 0x17cf6e leaq 0xa8(%rsp), %rdi callq *%rax movdqa 0x70(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x17d109 movq 0x1298(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x17cfae testb $0x2, (%rcx) jne 0x17cfa4 movq 0x10(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x17cfae leaq 0xa8(%rsp), %rdi callq *%rax movdqa 0x70(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d6ea4f(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d6ee53(%rip), %xmm1 # 0x1eebe20 je 0x17d119 movq 0xc0(%rsp), %rax movq 0xc8(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x17d119 andl $0x0, 0x40(%rsp,%r9,4) movaps 0x40(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax movq 0x60(%rsp), %rcx je 0x17c63d movaps 0x1d6e91e(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm13, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x17d0fd movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r9 jmp 0x17cd76 pcmpeqd 0x1d6e8ff(%rip), %xmm1 # 0x1eeba10 pxor 0x1d6ed07(%rip), %xmm1 # 0x1eebe20 ptest 0x1d6f9fe(%rip), %xmm1 # 0x1eecb20 jne 0x17d133 movd (%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x30(%rsp), %rax andl $0x0, 0x40(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0xf0(%rsp), %xmm13 movaps %xmm13, %xmm1 cmpleps %xmm0, %xmm1 andps 0x40(%rsp), %xmm1 movaps %xmm1, 0x40(%rsp) movq 0xa0(%rsp), %r10 movq 0x98(%rsp), %rsi movq 0x90(%rsp), %rdi movq 0x88(%rsp), %r8 movq 0x28(%rsp), %r11 movq 0x80(%rsp), %rdx jmp 0x17d0b6 movq 0x30(%rsp), %rcx movss 0x180(%rsp,%rcx,4), %xmm0 movss 0x190(%rsp,%rcx,4), %xmm1 movss 0x1a0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x1b0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1c0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1d0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xe0(%rsp,%rcx,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movq (%rsp), %rax movl %eax, 0x120(%rbx,%r14,4) movq 0x1298(%rsp), %rcx movq 0x8(%rcx), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%rcx), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movaps 0x1d6f469(%rip), %xmm15 # 0x1eec6c0 jmp 0x17c480 movq 0x30(%rsp), %rcx movss 0x180(%rsp,%rcx,4), %xmm0 movss 0x190(%rsp,%rcx,4), %xmm1 movss 0x1a0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x1b0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1c0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1d0(%rsp,%rcx,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xe0(%rsp,%rcx,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movq (%rsp), %rax movl %eax, 0x120(%rbx,%r14,4) movq 0x1298(%rsp), %rcx movq 0x8(%rcx), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%rcx), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) jmp 0x17c63d movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x300(%rsp), %xmm8 movaps 0x2f0(%rsp), %xmm9 movaps 0x2e0(%rsp), %xmm10 movaps 0x2d0(%rsp), %xmm11 movaps 0x2c0(%rsp), %xmm6 movaps 0x2b0(%rsp), %xmm7 movq 0x58(%rsp), %r15 movq 0x50(%rsp), %r13 movaps 0x2a0(%rsp), %xmm4 jmp 0x17bf84 addq $0x1258, %rsp # imm = 0x1258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMvIntersectorKMoeller<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKMoellerTrumbore<4, 4, true>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xab8, %rsp # imm = 0xAB8 movq %r9, %rbx movq %rcx, %r14 movq 0xaf0(%rsp), %rax leaq 0x318(%rsp), %rdi movq %rdx, -0x8(%rdi) movss (%rax,%rcx,4), %xmm3 movss 0x10(%rax,%rcx,4), %xmm4 movss 0x20(%rax,%rcx,4), %xmm5 movss 0x60(%rax,%rcx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r9 movslq 0xb0(%rax,%rcx,4), %r10 movq %r8, %r11 xorq $0x10, %r11 movq %r9, %r15 xorq $0x10, %r15 movq %r10, %r12 xorq $0x10, %r12 movss 0xc0(%rax,%rcx,4), %xmm9 movss 0xd0(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] leaq 0x1fd1495(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x300(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x2f0(%rsp) pushq $0x1 popq %rdx shll %cl, %edx movq %r15, %rcx movslq %edx, %rdx shlq $0x4, %rdx addq %rax, %rdx movq %rdx, 0x120(%rsp) leaq 0x310(%rsp), %r15 pushq $0x6 popq %rsi movaps %xmm3, 0x110(%rsp) movaps %xmm4, 0x100(%rsp) movaps %xmm5, 0xf0(%rsp) movaps %xmm6, 0xe0(%rsp) movaps %xmm7, 0xd0(%rsp) movaps %xmm8, 0xc0(%rsp) movq %r12, 0x128(%rsp) movaps %xmm9, 0xb0(%rsp) movaps %xmm10, 0xa0(%rsp) movq %rdi, %rdx cmpq %r15, %rdi je 0x17fab7 leaq -0x8(%rdx), %rdi movq %rdx, 0x48(%rsp) movq -0x8(%rdx), %r13 testb $0x8, %r13b jne 0x17ec0a movaps 0x20(%r13,%r8), %xmm0 subps %xmm3, %xmm0 mulps %xmm6, %xmm0 movaps 0x20(%r13,%r9), %xmm1 subps %xmm4, %xmm1 mulps %xmm7, %xmm1 pmaxsd %xmm0, %xmm1 movaps 0x20(%r13,%r10), %xmm0 subps %xmm5, %xmm0 mulps %xmm8, %xmm0 pmaxsd %xmm9, %xmm0 pmaxsd %xmm1, %xmm0 movaps 0x20(%r13,%r11), %xmm1 subps %xmm3, %xmm1 mulps %xmm6, %xmm1 movaps 0x20(%r13,%rcx), %xmm2 subps %xmm4, %xmm2 mulps %xmm7, %xmm2 pminsd %xmm1, %xmm2 movaps 0x20(%r13,%r12), %xmm1 subps %xmm5, %xmm1 mulps %xmm8, %xmm1 pminsd %xmm10, %xmm1 pminsd %xmm2, %xmm1 pcmpgtd %xmm1, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %ebp testb $0x8, %r13b jne 0x17ec41 testq %rbp, %rbp je 0x17ec45 andq $-0x10, %r13 bsfq %rbp, %rax leaq -0x1(%rbp), %rdx movq (%r13,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %rbp, %rdx jne 0x17ec4a movq %rax, %r13 xorl %eax, %eax testl %eax, %eax je 0x17eb8e jmp 0x17ec8f movl %esi, %eax jmp 0x17ec37 pushq $0x4 popq %rax jmp 0x17ec37 movq %r15, %rsi movq %rcx, %r15 movq %rax, (%rdi) addq $0x8, %rdi bsfq %rdx, %rcx leaq -0x1(%rdx), %rax movq (%r13,%rcx,8), %rcx prefetcht0 (%rcx) prefetcht0 0x40(%rcx) andq %rdx, %rax je 0x17ec81 movq %rcx, (%rdi) addq $0x8, %rdi bsfq %rax, %rcx leaq -0x1(%rax), %rdx jmp 0x17ec5f movq %rcx, %r13 movq %r15, %rcx movq %rsi, %r15 pushq $0x6 popq %rsi jmp 0x17ec35 cmpl $0x6, %eax jne 0x17fa1d movl %r13d, %edx andl $0xf, %edx xorl %eax, %eax addq $-0x8, %rdx setne 0xf(%rsp) je 0x17fa1d andq $-0x10, %r13 xorl %r15d, %r15d imulq $0xe0, %r15, %rax movaps 0xd0(%r13,%rax), %xmm0 movaps %xmm0, 0x160(%rsp) movaps (%r13,%rax), %xmm5 movaps 0x10(%r13,%rax), %xmm4 movaps 0x20(%r13,%rax), %xmm2 movaps %xmm5, %xmm6 subps 0x30(%r13,%rax), %xmm6 movaps 0x90(%r13,%rax), %xmm1 movaps %xmm4, %xmm7 subps 0x40(%r13,%rax), %xmm7 movaps %xmm2, %xmm11 subps 0x50(%r13,%rax), %xmm11 subps %xmm5, %xmm1 movaps 0xa0(%r13,%rax), %xmm8 subps %xmm4, %xmm8 movaps 0xb0(%r13,%rax), %xmm10 subps %xmm2, %xmm10 movaps %xmm7, %xmm3 mulps %xmm10, %xmm3 movaps %xmm11, %xmm0 mulps %xmm8, %xmm0 subps %xmm3, %xmm0 movaps %xmm6, %xmm3 mulps %xmm10, %xmm3 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm5 subps %xmm14, %xmm4 movaps %xmm4, %xmm14 mulps %xmm9, %xmm14 movaps %xmm5, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm10 mulps %xmm11, %xmm13 mulps %xmm1, %xmm11 subps %xmm11, %xmm3 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm2 movaps %xmm5, 0x10(%rsp) movaps %xmm5, %xmm11 mulps %xmm14, %xmm11 movaps %xmm2, %xmm15 mulps %xmm9, %xmm15 subps %xmm11, %xmm15 movaps %xmm6, %xmm11 mulps %xmm8, %xmm11 mulps %xmm15, %xmm8 mulps %xmm7, %xmm15 mulps %xmm1, %xmm7 subps %xmm11, %xmm7 movaps %xmm2, %xmm5 mulps %xmm12, %xmm5 movaps %xmm4, %xmm11 mulps %xmm14, %xmm11 subps %xmm5, %xmm11 mulps %xmm7, %xmm14 mulps %xmm3, %xmm12 addps %xmm14, %xmm12 mulps %xmm0, %xmm9 addps %xmm12, %xmm9 addps %xmm10, %xmm8 mulps %xmm11, %xmm1 addps %xmm8, %xmm1 addps %xmm13, %xmm15 xorps %xmm13, %xmm13 movaps 0x1d6d8ab(%rip), %xmm10 # 0x1eec6d0 movaps 0x1d6d893(%rip), %xmm12 # 0x1eec6c0 movaps %xmm9, %xmm8 andps %xmm10, %xmm8 xorps %xmm8, %xmm1 mulps %xmm6, %xmm11 addps %xmm15, %xmm11 xorps %xmm8, %xmm11 movaps %xmm1, %xmm5 cmpnltps %xmm13, %xmm5 movaps %xmm11, %xmm10 cmpnltps %xmm13, %xmm10 andps %xmm5, %xmm10 movaps %xmm9, %xmm6 andps %xmm12, %xmm6 cmpneqps %xmm13, %xmm9 andps %xmm9, %xmm10 movaps %xmm1, %xmm9 addps %xmm11, %xmm9 cmpleps %xmm6, %xmm9 andps %xmm10, %xmm9 leaq (%rax,%r13), %r12 movmskps %xmm9, %eax testl %eax, %eax jne 0x17f05e movaps 0x30(%r12), %xmm1 movaps 0x40(%r12), %xmm7 movaps 0x50(%r12), %xmm8 movaps 0x60(%r12), %xmm5 movaps %xmm5, %xmm6 subps 0x90(%r12), %xmm6 movaps 0x70(%r12), %xmm4 movaps %xmm4, %xmm9 subps 0xa0(%r12), %xmm9 movaps 0x80(%r12), %xmm2 movaps %xmm2, %xmm11 subps 0xb0(%r12), %xmm11 subps %xmm5, %xmm1 subps %xmm4, %xmm7 subps %xmm2, %xmm8 movaps %xmm9, %xmm3 mulps %xmm8, %xmm3 movaps %xmm11, %xmm0 mulps %xmm7, %xmm0 subps %xmm3, %xmm0 movaps %xmm6, %xmm3 mulps %xmm8, %xmm3 movss (%rbx,%r14,4), %xmm13 movss 0x10(%rbx,%r14,4), %xmm14 movss 0x40(%rbx,%r14,4), %xmm10 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] subps %xmm13, %xmm5 subps %xmm14, %xmm4 movaps %xmm4, %xmm14 mulps %xmm10, %xmm14 movaps %xmm5, %xmm13 mulps %xmm12, %xmm13 subps %xmm14, %xmm13 mulps %xmm13, %xmm8 mulps %xmm11, %xmm13 mulps %xmm1, %xmm11 subps %xmm11, %xmm3 movss 0x20(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] subps %xmm11, %xmm2 movaps %xmm5, 0x10(%rsp) movaps %xmm5, %xmm11 mulps %xmm14, %xmm11 movaps %xmm2, %xmm15 mulps %xmm10, %xmm15 subps %xmm11, %xmm15 movaps %xmm6, %xmm11 mulps %xmm7, %xmm11 mulps %xmm15, %xmm7 mulps %xmm9, %xmm15 mulps %xmm1, %xmm9 subps %xmm11, %xmm9 movaps %xmm2, %xmm5 mulps %xmm12, %xmm5 movaps %xmm4, %xmm11 mulps %xmm14, %xmm11 subps %xmm5, %xmm11 mulps %xmm9, %xmm14 mulps %xmm3, %xmm12 addps %xmm14, %xmm12 mulps %xmm0, %xmm10 addps %xmm12, %xmm10 addps %xmm8, %xmm7 mulps %xmm11, %xmm1 addps %xmm7, %xmm1 addps %xmm13, %xmm15 xorps %xmm13, %xmm13 movaps 0x1d6d6ea(%rip), %xmm12 # 0x1eec6d0 movaps 0x1d6d6d2(%rip), %xmm8 # 0x1eec6c0 movaps %xmm10, %xmm7 andps %xmm12, %xmm7 xorps %xmm7, %xmm1 mulps %xmm6, %xmm11 addps %xmm15, %xmm11 xorps %xmm7, %xmm11 movaps %xmm1, %xmm5 cmpnltps %xmm13, %xmm5 movaps %xmm11, %xmm12 cmpnltps %xmm13, %xmm12 andps %xmm5, %xmm12 movaps %xmm10, %xmm6 andps %xmm8, %xmm6 cmpneqps %xmm13, %xmm10 andps %xmm10, %xmm12 movaps %xmm1, %xmm8 addps %xmm11, %xmm8 cmpleps %xmm6, %xmm8 andps %xmm12, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x17f535 incq %r15 cmpq %rdx, %r15 setb 0xf(%rsp) jne 0x17ecb6 jmp 0x17fa24 movaps %xmm0, %xmm14 mulps %xmm7, %xmm2 mulps %xmm3, %xmm4 addps %xmm2, %xmm4 movaps 0x10(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm4, %xmm0 xorps %xmm0, %xmm8 movss 0x30(%rbx,%r14,4), %xmm2 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm6, %xmm2 cmpltps %xmm8, %xmm2 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm6, %xmm4 movaps %xmm8, %xmm0 cmpleps %xmm4, %xmm0 andps %xmm2, %xmm0 andps %xmm9, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17ee8c movq %rcx, 0x40(%rsp) movaps %xmm1, 0x170(%rsp) movaps %xmm11, 0x180(%rsp) movaps %xmm8, 0x190(%rsp) movaps %xmm6, 0x1a0(%rsp) movaps %xmm14, 0x1b0(%rsp) movaps %xmm3, 0x1c0(%rsp) movaps %xmm7, 0x1d0(%rsp) movaps %xmm0, 0x1e0(%rsp) movdqa 0x300(%rsp), %xmm0 movdqa %xmm0, 0x250(%rsp) movq 0xaf8(%rsp), %rcx movq (%rcx), %rcx movq %rcx, 0x98(%rsp) rcpps %xmm6, %xmm4 mulps %xmm4, %xmm6 movaps 0x1d6d8dd(%rip), %xmm5 # 0x1eeca10 movaps %xmm5, %xmm2 subps %xmm6, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 mulps %xmm2, %xmm8 movaps %xmm8, 0x210(%rsp) mulps %xmm2, %xmm1 minps %xmm5, %xmm1 mulps %xmm11, %xmm2 minps %xmm5, %xmm2 movaps %xmm5, %xmm4 subps %xmm1, %xmm4 subps %xmm2, %xmm5 blendvps %xmm0, %xmm4, %xmm1 movaps %xmm1, 0x1f0(%rsp) blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0x200(%rsp) movaps %xmm14, 0x220(%rsp) movaps %xmm3, 0x230(%rsp) movaps %xmm7, 0x240(%rsp) movzbl %al, %eax movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 movaps 0xf0(%rsp), %xmm5 movaps 0xe0(%rsp), %xmm6 movaps 0xd0(%rsp), %xmm7 movaps 0xc0(%rsp), %xmm8 movaps 0xb0(%rsp), %xmm9 movaps 0xa0(%rsp), %xmm10 movq %rax, 0x10(%rsp) bsfq %rax, %rcx movq %rcx, 0x28(%rsp) movl 0xc0(%r12,%rcx,4), %ecx movq 0x98(%rsp), %rax movq 0x1e8(%rax), %rax movq %rcx, 0x90(%rsp) movq (%rax,%rcx,8), %rcx movl 0x90(%rbx,%r14,4), %eax movq %rcx, 0x30(%rsp) testl %eax, 0x34(%rcx) je 0x17f241 movq 0xaf8(%rsp), %rax movq 0x10(%rax), %rax cmpq $0x0, 0x10(%rax) jne 0x17f276 movq 0x30(%rsp), %rax cmpq $0x0, 0x48(%rax) jne 0x17f276 xorl %eax, %eax jmp 0x17f256 movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx btcq %rax, %rcx movq %rcx, 0x10(%rsp) movb $0x1, %al testb %al, %al movq 0x40(%rsp), %rcx je 0x17fa88 movq 0x10(%rsp), %rax testq %rax, %rax jne 0x17f1db jmp 0x17fa09 movq %rdx, 0x60(%rsp) movq %r11, 0x68(%rsp) movq %r10, 0x70(%rsp) movq %r9, 0x78(%rsp) movq %r8, 0x80(%rsp) movq %rdi, 0x88(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x3c(%rsp) movq 0x28(%rsp), %rcx movss 0x210(%rsp,%rcx,4), %xmm0 movss 0x1f0(%rsp,%rcx,4), %xmm1 movss 0x200(%rsp,%rcx,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xaf8(%rsp), %rax movq 0x8(%rax), %rax movd 0x90(%rsp), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x160(%rsp,%rcx,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x220(%rsp,%rcx,4), %xmm4 movss 0x230(%rsp,%rcx,4), %xmm5 movss 0x240(%rsp,%rcx,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x260(%rsp) movaps %xmm5, 0x270(%rsp) movaps %xmm6, 0x280(%rsp) movaps %xmm1, 0x290(%rsp) movaps %xmm2, 0x2a0(%rsp) movdqa %xmm3, 0x2b0(%rsp) movdqa %xmm0, 0x2c0(%rsp) leaq 0x2d0(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2d0(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2e0(%rsp) movq 0x120(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0x50(%rsp) leaq 0x50(%rsp), %rcx movq %rcx, 0x130(%rsp) movq 0x30(%rsp), %rdx movq 0x18(%rdx), %rcx movq %rcx, 0x138(%rsp) movq %rax, 0x140(%rsp) movq %rbx, 0x148(%rsp) leaq 0x260(%rsp), %rax movq %rax, 0x150(%rsp) movl $0x4, 0x158(%rsp) movq 0x48(%rdx), %rax testq %rax, %rax je 0x17f40d leaq 0x130(%rsp), %rdi callq *%rax movdqa 0x50(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x17f484 movq 0xaf8(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x17f449 testb $0x2, (%rcx) jne 0x17f43f movq 0x30(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x17f449 leaq 0x130(%rsp), %rdi callq *%rax movdqa 0x50(%rsp), %xmm0 pcmpeqd 0x1d6c5b9(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d6c9bd(%rip), %xmm1 # 0x1eebe20 movq 0x148(%rsp), %rax movaps 0x1d6c58e(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x17f494 pcmpeqd 0x1d6c584(%rip), %xmm1 # 0x1eeba10 pxor 0x1d6c98c(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x17f4c6 movd 0x3c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x10(%rsp) movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 movaps 0xf0(%rsp), %xmm5 movaps 0xe0(%rsp), %xmm6 movq 0x88(%rsp), %rdi movaps 0xd0(%rsp), %xmm7 movaps 0xc0(%rsp), %xmm8 movq 0x80(%rsp), %r8 movq 0x78(%rsp), %r9 movq 0x70(%rsp), %r10 movq 0x68(%rsp), %r11 movaps 0xb0(%rsp), %xmm9 movaps 0xa0(%rsp), %xmm10 pushq $0x6 popq %rsi movq 0x60(%rsp), %rdx jmp 0x17f256 movaps %xmm0, %xmm14 mulps %xmm9, %xmm2 mulps %xmm3, %xmm4 addps %xmm2, %xmm4 movaps 0x10(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm4, %xmm0 xorps %xmm0, %xmm7 movss 0x30(%rbx,%r14,4), %xmm2 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm6, %xmm2 cmpltps %xmm7, %xmm2 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm6, %xmm4 movaps %xmm7, %xmm0 cmpleps %xmm4, %xmm0 andps %xmm2, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x17f048 movq %rcx, 0x40(%rsp) movaps %xmm1, 0x170(%rsp) movaps %xmm11, 0x180(%rsp) movaps %xmm7, 0x190(%rsp) movaps %xmm6, 0x1a0(%rsp) movaps %xmm14, 0x1b0(%rsp) movaps %xmm3, 0x1c0(%rsp) movaps %xmm9, 0x1d0(%rsp) movaps %xmm0, 0x1e0(%rsp) movdqa 0x2f0(%rsp), %xmm0 movdqa %xmm0, 0x250(%rsp) movq 0xaf8(%rsp), %rcx movq (%rcx), %rcx movq %rcx, 0x98(%rsp) rcpps %xmm6, %xmm4 mulps %xmm4, %xmm6 movaps 0x1d6d408(%rip), %xmm5 # 0x1eeca10 movaps %xmm5, %xmm2 subps %xmm6, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 mulps %xmm2, %xmm7 movaps %xmm7, 0x210(%rsp) mulps %xmm2, %xmm1 minps %xmm5, %xmm1 mulps %xmm11, %xmm2 minps %xmm5, %xmm2 movaps %xmm5, %xmm4 subps %xmm1, %xmm4 subps %xmm2, %xmm5 blendvps %xmm0, %xmm4, %xmm1 movaps %xmm1, 0x1f0(%rsp) blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0x200(%rsp) movaps %xmm14, 0x220(%rsp) movaps %xmm3, 0x230(%rsp) movaps %xmm9, 0x240(%rsp) movzbl %al, %eax movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 movaps 0xf0(%rsp), %xmm5 movaps 0xe0(%rsp), %xmm6 movaps 0xd0(%rsp), %xmm7 movaps 0xc0(%rsp), %xmm8 movaps 0xb0(%rsp), %xmm9 movaps 0xa0(%rsp), %xmm10 movq %rax, 0x10(%rsp) bsfq %rax, %rcx movq %rcx, 0x28(%rsp) movl 0xc0(%r12,%rcx,4), %ecx movq 0x98(%rsp), %rax movq 0x1e8(%rax), %rax movq %rcx, 0x90(%rsp) movq (%rax,%rcx,8), %rcx movl 0x90(%rbx,%r14,4), %eax movq %rcx, 0x30(%rsp) testl %eax, 0x34(%rcx) je 0x17f715 movq 0xaf8(%rsp), %rax movq 0x10(%rax), %rax cmpq $0x0, 0x10(%rax) jne 0x17f74a movq 0x30(%rsp), %rax cmpq $0x0, 0x48(%rax) jne 0x17f74a xorl %eax, %eax jmp 0x17f72a movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx btcq %rax, %rcx movq %rcx, 0x10(%rsp) movb $0x1, %al testb %al, %al movq 0x40(%rsp), %rcx je 0x17fa88 movq 0x10(%rsp), %rax testq %rax, %rax jne 0x17f6af jmp 0x17fa13 movq %rdx, 0x60(%rsp) movq %r11, 0x68(%rsp) movq %r10, 0x70(%rsp) movq %r9, 0x78(%rsp) movq %r8, 0x80(%rsp) movq %rdi, 0x88(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x3c(%rsp) movq 0x28(%rsp), %rcx movss 0x210(%rsp,%rcx,4), %xmm0 movss 0x1f0(%rsp,%rcx,4), %xmm1 movss 0x200(%rsp,%rcx,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xaf8(%rsp), %rax movq 0x8(%rax), %rax movd 0x90(%rsp), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x160(%rsp,%rcx,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x220(%rsp,%rcx,4), %xmm4 movss 0x230(%rsp,%rcx,4), %xmm5 movss 0x240(%rsp,%rcx,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x260(%rsp) movaps %xmm5, 0x270(%rsp) movaps %xmm6, 0x280(%rsp) movaps %xmm1, 0x290(%rsp) movaps %xmm2, 0x2a0(%rsp) movdqa %xmm3, 0x2b0(%rsp) movdqa %xmm0, 0x2c0(%rsp) leaq 0x2d0(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2d0(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2e0(%rsp) movq 0x120(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0x50(%rsp) leaq 0x50(%rsp), %rcx movq %rcx, 0x130(%rsp) movq 0x30(%rsp), %rdx movq 0x18(%rdx), %rcx movq %rcx, 0x138(%rsp) movq %rax, 0x140(%rsp) movq %rbx, 0x148(%rsp) leaq 0x260(%rsp), %rax movq %rax, 0x150(%rsp) movl $0x4, 0x158(%rsp) movq 0x48(%rdx), %rax testq %rax, %rax je 0x17f8e1 leaq 0x130(%rsp), %rdi callq *%rax movdqa 0x50(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x17f958 movq 0xaf8(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x17f91d testb $0x2, (%rcx) jne 0x17f913 movq 0x30(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x17f91d leaq 0x130(%rsp), %rdi callq *%rax movdqa 0x50(%rsp), %xmm0 pcmpeqd 0x1d6c0e5(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d6c4e9(%rip), %xmm1 # 0x1eebe20 movq 0x148(%rsp), %rax movaps 0x1d6c0ba(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x17f968 pcmpeqd 0x1d6c0b0(%rip), %xmm1 # 0x1eeba10 pxor 0x1d6c4b8(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x17f99a movd 0x3c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x10(%rsp) movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 movaps 0xf0(%rsp), %xmm5 movaps 0xe0(%rsp), %xmm6 movq 0x88(%rsp), %rdi movaps 0xd0(%rsp), %xmm7 movaps 0xc0(%rsp), %xmm8 movq 0x80(%rsp), %r8 movq 0x78(%rsp), %r9 movq 0x70(%rsp), %r10 movq 0x68(%rsp), %r11 movaps 0xb0(%rsp), %xmm9 movaps 0xa0(%rsp), %xmm10 pushq $0x6 popq %rsi movq 0x60(%rsp), %rdx jmp 0x17f72a movq 0x40(%rsp), %rcx jmp 0x17ee8c movq 0x40(%rsp), %rcx jmp 0x17f048 movq 0x48(%rsp), %rdx jmp 0x17fa7e movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 movaps 0xf0(%rsp), %xmm5 movaps 0xe0(%rsp), %xmm6 movaps 0xd0(%rsp), %xmm7 movaps 0xc0(%rsp), %xmm8 movq 0x128(%rsp), %r12 movaps 0xb0(%rsp), %xmm9 movaps 0xa0(%rsp), %xmm10 leaq 0x310(%rsp), %r15 movq 0x48(%rsp), %rdx xorl %eax, %eax testb $0x3, %al je 0x17eb75 jmp 0x17fab7 xorl %eax, %eax testb $0x1, 0xf(%rsp) movq 0x128(%rsp), %r12 leaq 0x310(%rsp), %r15 movq 0x48(%rsp), %rdx je 0x17fa7e movl $0xff800000, 0x80(%rbx,%r14,4) # imm = 0xFF800000 pushq $0x1 popq %rax jmp 0x17fa7e cmpq %r15, %rdx setne %al addq $0xab8, %rsp # imm = 0xAB8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMvIntersectorKMoeller<4, 4, false>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKMoellerTrumbore<4, 4, false>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1118, %rsp # imm = 0x1118 movq 0x1150(%rsp), %rax leaq 0x1e0(%rsp), %rsi movq %rdx, -0x10(%rsi) andl $0x0, -0x8(%rsi) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 movss 0x60(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rdx movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rdx, %r10 xorq $0x10, %r10 movq %rdi, %r11 xorq $0x10, %r11 movq %r8, %rbx xorq $0x10, %rbx movss 0xc0(%rax,%rcx,4), %xmm14 movss 0xd0(%rax,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] leaq 0x1fcefa3(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x120(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x110(%rsp) movaps 0x1d6b6d1(%rip), %xmm15 # 0x1eec6d0 movaps %xmm8, 0x190(%rsp) movaps %xmm9, 0x180(%rsp) movaps %xmm10, 0x170(%rsp) movaps %xmm11, 0x160(%rsp) movaps %xmm12, 0x150(%rsp) movaps %xmm13, 0x140(%rsp) movaps %xmm14, 0x130(%rsp) leaq 0x1d0(%rsp), %rax cmpq %rax, %rsi je 0x181d68 movss -0x8(%rsi), %xmm0 addq $-0x10, %rsi ucomiss 0x80(%r9,%rcx,4), %xmm0 ja 0x18103e movq (%rsi), %r13 testb $0x8, %r13b jne 0x1810f6 movaps 0x20(%r13,%rdx), %xmm0 subps %xmm8, %xmm0 mulps %xmm11, %xmm0 movaps 0x20(%r13,%rdi), %xmm2 subps %xmm9, %xmm2 mulps %xmm12, %xmm2 pmaxsd %xmm0, %xmm2 movaps 0x20(%r13,%r8), %xmm0 subps %xmm10, %xmm0 mulps %xmm13, %xmm0 pmaxsd %xmm14, %xmm0 pmaxsd %xmm2, %xmm0 movaps 0x20(%r13,%r10), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movaps 0x20(%r13,%r11), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 pminsd %xmm2, %xmm3 movaps 0x20(%r13,%rbx), %xmm2 subps %xmm10, %xmm2 mulps %xmm13, %xmm2 pminsd %xmm1, %xmm2 pminsd %xmm3, %xmm2 movdqa %xmm0, 0x10(%rsp) pcmpgtd %xmm2, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %r12d testb $0x8, %r13b jne 0x181132 testq %r12, %r12 je 0x181139 andq $-0x10, %r13 bsfq %r12, %r15 leaq -0x1(%r12), %r14 xorl %eax, %eax movq (%r13,%r15,8), %rbp prefetcht0 (%rbp) prefetcht0 0x40(%rbp) andq %r12, %r14 jne 0x181140 movq %rbp, %r13 testl %eax, %eax je 0x181066 jmp 0x181333 movl $0x6, %eax jmp 0x181125 movl $0x4, %eax jmp 0x181125 movl 0x10(%rsp,%r15,4), %r15d movq %r15, -0x10(%rsp) bsfq %r14, %r15 movq %r15, -0x80(%rsp) leaq -0x1(%r14), %r15 movq %r15, (%rsp) movq -0x80(%rsp), %r15 movq (%r13,%r15,8), %r15 prefetcht0 (%r15) movq %r15, -0x30(%rsp) prefetcht0 0x40(%r15) movq -0x80(%rsp), %r15 movl 0x10(%rsp,%r15,4), %r15d movq %r15, -0x80(%rsp) movq (%rsp), %r15 andq %r14, %r15 jne 0x1811c6 leaq 0x10(%rsi), %r14 movq -0x10(%rsp), %r15 movq -0x80(%rsp), %r13 cmpl %r13d, %r15d jae 0x1811b2 movq -0x30(%rsp), %r15 movq %r15, (%rsi) movl %r13d, 0x8(%rsi) movq %r14, %rsi jmp 0x181122 movq %rbp, (%rsi) movl %r15d, 0x8(%rsi) movq %r14, %rsi movq -0x30(%rsp), %r13 jmp 0x181125 movq %rbp, %xmm2 movd -0x10(%rsp), %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq -0x30(%rsp), %xmm5 movd -0x80(%rsp), %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %r15, %r14 movq %r14, -0x80(%rsp) leaq -0x1(%r15), %r14 movq -0x80(%rsp), %rbp movq (%r13,%rbp,8), %rbp prefetcht0 (%rbp) prefetcht0 0x40(%rbp) movq %rbp, %xmm3 movq -0x80(%rsp), %rbp movd 0x10(%rsp,%rbp,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %r15, %r14 jne 0x18127f pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%rsi) movaps %xmm3, 0x10(%rsi) movq %xmm5, %r13 addq $0x20, %rsi jmp 0x181125 bsfq %r14, %r14 movq (%r13,%r14,8), %r15 prefetcht0 (%r15) prefetcht0 0x40(%r15) movq %r15, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0x10(%rsp,%r14,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm2, (%rsi) movaps %xmm4, 0x10(%rsi) movaps %xmm5, 0x20(%rsi) movq %xmm3, %r13 addq $0x30, %rsi jmp 0x181125 cmpl $0x6, %eax jne 0x18103e movl %r13d, %eax andl $0xf, %eax addq $-0x8, %rax je 0x181d16 andq $-0x10, %r13 movss (%r9,%rcx,4), %xmm0 movss 0x10(%r9,%rcx,4), %xmm1 movss 0x20(%r9,%rcx,4), %xmm2 movss 0x40(%r9,%rcx,4), %xmm3 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, -0x30(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps %xmm1, (%rsp) shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm2, -0x10(%rsp) shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, 0x1c0(%rsp) movss 0x50(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1b0(%rsp) movss 0x60(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x1a0(%rsp) xorl %ebp, %ebp imulq $0xe0, %rbp, %r15 movaps 0xd0(%r13,%r15), %xmm0 movaps %xmm0, 0x100(%rsp) movaps (%r13,%r15), %xmm0 movaps 0x10(%r13,%r15), %xmm13 movaps %xmm0, %xmm1 subps 0x30(%r13,%r15), %xmm1 movaps %xmm1, %xmm2 movaps 0x20(%r13,%r15), %xmm3 movaps %xmm13, %xmm4 subps 0x40(%r13,%r15), %xmm4 movaps 0x90(%r13,%r15), %xmm12 movaps %xmm3, %xmm6 subps 0x50(%r13,%r15), %xmm6 subps %xmm0, %xmm12 movaps 0xa0(%r13,%r15), %xmm1 subps %xmm13, %xmm1 movaps 0xb0(%r13,%r15), %xmm7 subps %xmm3, %xmm7 movaps %xmm6, %xmm11 mulps %xmm1, %xmm11 movaps %xmm2, %xmm9 movaps %xmm2, %xmm14 movaps %xmm2, -0x80(%rsp) mulps %xmm1, %xmm9 movaps %xmm4, %xmm10 subps -0x30(%rsp), %xmm0 subps -0x10(%rsp), %xmm3 movaps %xmm0, %xmm2 movaps 0x1a0(%rsp), %xmm5 mulps %xmm5, %xmm2 movaps %xmm3, %xmm8 movaps 0x1c0(%rsp), %xmm15 mulps %xmm15, %xmm8 subps %xmm2, %xmm8 mulps %xmm8, %xmm1 mulps %xmm4, %xmm8 mulps %xmm7, %xmm4 subps %xmm4, %xmm11 movaps %xmm14, %xmm4 mulps %xmm7, %xmm4 subps (%rsp), %xmm13 movaps %xmm13, %xmm2 mulps %xmm15, %xmm2 movaps %xmm0, -0x40(%rsp) movaps 0x1b0(%rsp), %xmm14 mulps %xmm14, %xmm0 subps %xmm2, %xmm0 mulps %xmm0, %xmm7 mulps %xmm6, %xmm0 mulps %xmm12, %xmm6 subps %xmm6, %xmm4 mulps %xmm12, %xmm10 subps %xmm9, %xmm10 movaps %xmm3, -0x60(%rsp) mulps %xmm14, %xmm3 movaps %xmm13, -0x50(%rsp) mulps %xmm5, %xmm13 subps %xmm3, %xmm13 movaps %xmm10, -0x70(%rsp) mulps %xmm5, %xmm10 movaps %xmm4, %xmm9 mulps %xmm14, %xmm9 addps %xmm10, %xmm9 movaps %xmm11, %xmm2 mulps %xmm15, %xmm2 addps %xmm9, %xmm2 movaps 0x1d6b1d1(%rip), %xmm3 # 0x1eec6d0 addps %xmm7, %xmm1 mulps %xmm13, %xmm12 addps %xmm1, %xmm12 addps %xmm0, %xmm8 movaps %xmm2, %xmm1 andps %xmm3, %xmm1 xorps %xmm1, %xmm12 mulps -0x80(%rsp), %xmm13 addps %xmm8, %xmm13 xorps %xmm1, %xmm13 movaps %xmm12, %xmm0 xorps %xmm3, %xmm3 cmpnltps %xmm3, %xmm0 movaps %xmm13, %xmm7 cmpnltps %xmm3, %xmm7 andps %xmm0, %xmm7 movaps %xmm2, %xmm5 andps 0x1d6b17a(%rip), %xmm5 # 0x1eec6c0 cmpneqps %xmm3, %xmm2 andps %xmm2, %xmm7 movaps %xmm12, %xmm2 addps %xmm13, %xmm2 cmpleps %xmm5, %xmm2 andps %xmm7, %xmm2 addq %r13, %r15 movmskps %xmm2, %r14d testl %r14d, %r14d jne 0x18172c movaps 0x30(%r15), %xmm12 movaps 0x40(%r15), %xmm7 movaps 0x50(%r15), %xmm5 movaps 0x60(%r15), %xmm13 movaps %xmm13, %xmm2 subps 0x90(%r15), %xmm2 movaps 0x70(%r15), %xmm8 movaps %xmm8, %xmm6 subps 0xa0(%r15), %xmm6 movaps 0x80(%r15), %xmm14 movaps %xmm14, %xmm10 subps 0xb0(%r15), %xmm10 subps %xmm13, %xmm12 subps %xmm8, %xmm7 subps %xmm14, %xmm5 movaps %xmm6, %xmm0 mulps %xmm5, %xmm0 movaps %xmm10, %xmm15 mulps %xmm7, %xmm15 subps %xmm0, %xmm15 movaps %xmm2, %xmm4 mulps %xmm5, %xmm4 movss (%r9,%rcx,4), %xmm0 movss 0x10(%r9,%rcx,4), %xmm3 movss 0x40(%r9,%rcx,4), %xmm1 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movss 0x50(%r9,%rcx,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] subps %xmm0, %xmm13 subps %xmm3, %xmm8 movaps %xmm8, %xmm3 mulps %xmm1, %xmm3 movaps %xmm13, %xmm0 mulps %xmm9, %xmm0 subps %xmm3, %xmm0 mulps %xmm0, %xmm5 mulps %xmm10, %xmm0 mulps %xmm12, %xmm10 subps %xmm10, %xmm4 movss 0x20(%r9,%rcx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x60(%r9,%rcx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] subps %xmm3, %xmm14 movaps %xmm13, -0x70(%rsp) movaps %xmm13, %xmm3 mulps %xmm11, %xmm3 movaps %xmm14, %xmm13 mulps %xmm1, %xmm13 subps %xmm3, %xmm13 movaps %xmm2, %xmm3 mulps %xmm7, %xmm3 mulps %xmm13, %xmm7 mulps %xmm6, %xmm13 mulps %xmm12, %xmm6 subps %xmm3, %xmm6 movaps %xmm14, %xmm3 mulps %xmm9, %xmm3 movaps %xmm8, %xmm10 mulps %xmm11, %xmm10 subps %xmm3, %xmm10 mulps %xmm6, %xmm11 movaps %xmm4, -0x80(%rsp) mulps %xmm4, %xmm9 addps %xmm11, %xmm9 movaps %xmm15, %xmm11 mulps %xmm15, %xmm1 addps %xmm9, %xmm1 addps %xmm5, %xmm7 mulps %xmm10, %xmm12 addps %xmm7, %xmm12 addps %xmm0, %xmm13 movaps %xmm1, %xmm5 movaps 0x1d6b012(%rip), %xmm7 # 0x1eec6d0 andps %xmm7, %xmm5 xorps %xmm5, %xmm12 mulps %xmm2, %xmm10 addps %xmm13, %xmm10 xorps %xmm5, %xmm10 movaps %xmm12, %xmm0 xorps %xmm2, %xmm2 cmpnltps %xmm2, %xmm0 movaps %xmm10, %xmm3 cmpnltps %xmm2, %xmm3 andps %xmm0, %xmm3 movaps %xmm1, %xmm4 movaps 0x1d6afcf(%rip), %xmm0 # 0x1eec6c0 andps %xmm0, %xmm4 cmpneqps %xmm2, %xmm1 andps %xmm1, %xmm3 movaps %xmm12, %xmm0 addps %xmm10, %xmm0 cmpleps %xmm4, %xmm0 andps %xmm3, %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d movaps %xmm7, %xmm15 jne 0x181963 incq %rbp cmpq %rax, %rbp jne 0x1813b9 jmp 0x181d16 movaps -0x60(%rsp), %xmm0 mulps -0x70(%rsp), %xmm0 movaps -0x50(%rsp), %xmm3 mulps %xmm4, %xmm3 addps %xmm0, %xmm3 movaps -0x40(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm3, %xmm0 xorps %xmm0, %xmm1 movss 0x30(%r9,%rcx,4), %xmm0 movss 0x80(%r9,%rcx,4), %xmm3 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm5, %xmm0 cmpltps %xmm1, %xmm0 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm5, %xmm3 movaps %xmm1, %xmm7 cmpleps %xmm3, %xmm7 andps %xmm0, %xmm7 andps %xmm2, %xmm7 movmskps %xmm7, %r14d testl %r14d, %r14d je 0x18156c movq %rsi, -0x40(%rsp) movaps %xmm12, 0x10(%rsp) movaps %xmm13, 0x20(%rsp) movaps %xmm1, 0x30(%rsp) movaps %xmm5, 0x40(%rsp) movaps %xmm11, 0x50(%rsp) movaps %xmm4, 0x60(%rsp) movaps -0x70(%rsp), %xmm9 movaps %xmm9, 0x70(%rsp) movaps %xmm7, 0x80(%rsp) movaps 0x120(%rsp), %xmm0 movaps %xmm0, 0xf0(%rsp) movq 0x1158(%rsp), %r14 movq (%r14), %r14 movq %r14, -0x80(%rsp) movaps %xmm7, -0x20(%rsp) rcpps %xmm5, %xmm3 mulps %xmm3, %xmm5 movaps 0x1d6b216(%rip), %xmm8 # 0x1eeca10 movaps %xmm8, %xmm2 subps %xmm5, %xmm2 mulps %xmm3, %xmm2 addps %xmm3, %xmm2 mulps %xmm2, %xmm1 movaps %xmm1, 0xb0(%rsp) mulps %xmm2, %xmm12 minps %xmm8, %xmm12 mulps %xmm13, %xmm2 minps %xmm8, %xmm2 movaps %xmm8, %xmm3 subps %xmm12, %xmm3 movaps %xmm8, %xmm5 subps %xmm2, %xmm5 blendvps %xmm0, %xmm3, %xmm12 movaps %xmm12, 0x90(%rsp) blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, 0xa0(%rsp) movaps %xmm11, 0xc0(%rsp) movaps %xmm4, 0xd0(%rsp) movaps %xmm9, 0xe0(%rsp) movaps 0x1d6a182(%rip), %xmm5 # 0x1eeb9f0 movaps %xmm5, %xmm2 movaps %xmm7, %xmm0 blendvps %xmm0, %xmm1, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm7, %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d je 0x1818a0 movaps %xmm0, %xmm7 movmskps %xmm7, %r14d bsfq %r14, %rsi movq -0x80(%rsp), %r14 movq 0x1e8(%r14), %r14 movq %r14, -0x70(%rsp) movl 0x90(%r9,%rcx,4), %r14d movl %r14d, -0x50(%rsp) movq %rsi, -0x80(%rsp) movl 0xc0(%r15,%rsi,4), %esi movq %rsi, -0x60(%rsp) movq -0x70(%rsp), %r14 movq (%r14,%rsi,8), %r14 movl -0x50(%rsp), %esi testl %esi, 0x34(%r14) jne 0x181b8c movq -0x80(%rsp), %rsi andl $0x0, -0x20(%rsp,%rsi,4) movaps -0x20(%rsp), %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d movq -0x40(%rsp), %rsi je 0x18156c movaps %xmm5, %xmm3 blendvps %xmm0, %xmm1, %xmm3 movaps %xmm3, %xmm4 shufps $0xb1, %xmm3, %xmm4 # xmm4 = xmm4[1,0],xmm3[3,2] minps %xmm3, %xmm4 movaps %xmm4, %xmm2 shufps $0x4e, %xmm4, %xmm2 # xmm2 = xmm2[2,3],xmm4[0,1] minps %xmm4, %xmm2 cmpeqps %xmm3, %xmm2 andps %xmm0, %xmm2 movmskps %xmm2, %r14d testl %r14d, %r14d je 0x18193f movaps %xmm2, %xmm0 movmskps %xmm0, %r14d bsfq %r14, %rsi movq %rsi, -0x80(%rsp) movl 0xc0(%r15,%rsi,4), %esi movq -0x70(%rsp), %r14 movq %rsi, -0x60(%rsp) jmp 0x1818dd mulps %xmm6, %xmm14 mulps -0x80(%rsp), %xmm8 addps %xmm14, %xmm8 movaps -0x70(%rsp), %xmm1 mulps %xmm11, %xmm1 addps %xmm8, %xmm1 xorps %xmm1, %xmm5 movss 0x30(%r9,%rcx,4), %xmm1 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm4, %xmm1 cmpltps %xmm5, %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm4, %xmm2 movaps %xmm5, %xmm7 cmpleps %xmm2, %xmm7 andps %xmm1, %xmm7 andps %xmm0, %xmm7 movmskps %xmm7, %r14d testl %r14d, %r14d je 0x18171b movq %rsi, -0x40(%rsp) movaps %xmm12, 0x10(%rsp) movaps %xmm10, 0x20(%rsp) movaps %xmm5, 0x30(%rsp) movaps %xmm4, 0x40(%rsp) movaps %xmm11, 0x50(%rsp) movaps -0x80(%rsp), %xmm8 movaps %xmm8, 0x60(%rsp) movaps %xmm6, 0x70(%rsp) movaps %xmm7, 0x80(%rsp) movaps 0x110(%rsp), %xmm0 movaps %xmm0, 0xf0(%rsp) movq 0x1158(%rsp), %r14 movq (%r14), %r14 movq %r14, -0x70(%rsp) movaps %xmm7, -0x20(%rsp) rcpps %xmm4, %xmm2 mulps %xmm2, %xmm4 movaps 0x1d6afe6(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm1 subps %xmm4, %xmm1 mulps %xmm2, %xmm1 addps %xmm2, %xmm1 mulps %xmm1, %xmm5 movaps %xmm5, 0xb0(%rsp) mulps %xmm1, %xmm12 minps %xmm3, %xmm12 mulps %xmm10, %xmm1 minps %xmm3, %xmm1 movaps %xmm3, %xmm2 subps %xmm12, %xmm2 subps %xmm1, %xmm3 blendvps %xmm0, %xmm2, %xmm12 movaps %xmm12, 0x90(%rsp) blendvps %xmm0, %xmm3, %xmm1 movaps %xmm1, 0xa0(%rsp) movaps %xmm11, 0xc0(%rsp) movaps %xmm8, 0xd0(%rsp) movaps %xmm6, 0xe0(%rsp) movaps 0x1d69f59(%rip), %xmm4 # 0x1eeb9f0 movaps %xmm4, %xmm1 movaps %xmm7, %xmm0 blendvps %xmm0, %xmm5, %xmm1 movaps %xmm1, %xmm2 shufps $0xb1, %xmm1, %xmm2 # xmm2 = xmm2[1,0],xmm1[3,2] minps %xmm1, %xmm2 movaps %xmm2, %xmm0 shufps $0x4e, %xmm2, %xmm0 # xmm0 = xmm0[2,3],xmm2[0,1] minps %xmm2, %xmm0 cmpeqps %xmm1, %xmm0 andps %xmm7, %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d je 0x181ac9 movaps %xmm0, %xmm7 movmskps %xmm7, %r14d bsfq %r14, %rsi movq -0x70(%rsp), %r14 movq 0x1e8(%r14), %r14 movq %r14, -0x70(%rsp) movl 0x90(%r9,%rcx,4), %r14d movl %r14d, -0x50(%rsp) movq %rsi, -0x80(%rsp) movl 0xc0(%r15,%rsi,4), %esi movq %rsi, -0x60(%rsp) movq -0x70(%rsp), %r14 movq (%r14,%rsi,8), %r14 movl -0x50(%rsp), %esi testl %esi, 0x34(%r14) jne 0x181c51 movq -0x80(%rsp), %rsi andl $0x0, -0x20(%rsp,%rsi,4) movaps -0x20(%rsp), %xmm0 movmskps %xmm0, %r14d testl %r14d, %r14d movq -0x40(%rsp), %rsi je 0x18171b movaps %xmm4, %xmm2 blendvps %xmm0, %xmm5, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %r14d testl %r14d, %r14d je 0x181b68 movaps %xmm1, %xmm0 movmskps %xmm0, %r14d bsfq %r14, %rsi movq %rsi, -0x80(%rsp) movl 0xc0(%r15,%rsi,4), %esi movq -0x70(%rsp), %r14 movq %rsi, -0x60(%rsp) jmp 0x181b06 movq -0x80(%rsp), %rsi movss 0x90(%rsp,%rsi,4), %xmm0 movss 0xa0(%rsp,%rsi,4), %xmm1 movss 0xb0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0x80(%r9,%rcx,4) movss 0xc0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0xc0(%r9,%rcx,4) movss 0xd0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0xd0(%r9,%rcx,4) movss 0xe0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0xe0(%r9,%rcx,4) movss %xmm0, 0xf0(%r9,%rcx,4) movss %xmm1, 0x100(%r9,%rcx,4) movl 0x100(%rsp,%rsi,4), %r14d movl %r14d, 0x110(%r9,%rcx,4) movq -0x60(%rsp), %rsi movl %esi, 0x120(%r9,%rcx,4) movq 0x1158(%rsp), %rsi movq 0x8(%rsi), %r14 movl (%r14), %r14d movl %r14d, 0x130(%r9,%rcx,4) movq 0x8(%rsi), %r14 movl 0x4(%r14), %r14d movl %r14d, 0x140(%r9,%rcx,4) movq -0x40(%rsp), %rsi jmp 0x18156c movq -0x80(%rsp), %rsi movss 0x90(%rsp,%rsi,4), %xmm0 movss 0xa0(%rsp,%rsi,4), %xmm1 movss 0xb0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0x80(%r9,%rcx,4) movss 0xc0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0xc0(%r9,%rcx,4) movss 0xd0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0xd0(%r9,%rcx,4) movss 0xe0(%rsp,%rsi,4), %xmm2 movss %xmm2, 0xe0(%r9,%rcx,4) movss %xmm0, 0xf0(%r9,%rcx,4) movss %xmm1, 0x100(%r9,%rcx,4) movl 0x100(%rsp,%rsi,4), %r14d movl %r14d, 0x110(%r9,%rcx,4) movq -0x60(%rsp), %rsi movl %esi, 0x120(%r9,%rcx,4) movq 0x1158(%rsp), %r15 movq 0x8(%r15), %r14 movl (%r14), %r14d movl %r14d, 0x130(%r9,%rcx,4) movq 0x8(%r15), %r14 movl 0x4(%r14), %r14d movl %r14d, 0x140(%r9,%rcx,4) movq -0x40(%rsp), %rsi jmp 0x18171b movss 0x80(%r9,%rcx,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x190(%rsp), %xmm8 movaps 0x180(%rsp), %xmm9 movaps 0x170(%rsp), %xmm10 movaps 0x160(%rsp), %xmm11 movaps 0x150(%rsp), %xmm12 movaps 0x140(%rsp), %xmm13 movaps 0x130(%rsp), %xmm14 jmp 0x18103e addq $0x1118, %rsp # imm = 0x1118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMvIntersectorKMoeller<4, 4, false>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKMoellerTrumbore<4, 4, false>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x8b8, %rsp # imm = 0x8B8 movq %r9, -0x70(%rsp) movq 0x8f0(%rsp), %rax leaq 0x118(%rsp), %r13 movq %rdx, -0x8(%r13) movss (%rax,%rcx,4), %xmm3 movss 0x10(%rax,%rcx,4), %xmm4 movss 0x20(%rax,%rcx,4), %xmm5 movss 0x60(%rax,%rcx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rdx movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rdx, %r10 xorq $0x10, %r10 movq %rdi, %r11 xorq $0x10, %r11 movq %r8, %rbx xorq $0x10, %rbx movss 0xc0(%rax,%rcx,4), %xmm9 movq %rcx, -0x78(%rsp) movss 0xd0(%rax,%rcx,4), %xmm11 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] leaq 0x110(%rsp), %r9 movaps %xmm3, 0x90(%rsp) movaps %xmm4, 0x80(%rsp) movaps %xmm5, 0x70(%rsp) movaps %xmm6, 0x60(%rsp) movaps %xmm7, 0x50(%rsp) movaps %xmm8, 0x40(%rsp) movaps %xmm9, 0x30(%rsp) movaps %xmm11, -0x30(%rsp) movq %r13, %rcx cmpq %r9, %r13 je 0x18373e leaq -0x8(%rcx), %r13 movq -0x8(%rcx), %rax testb $0x8, %al jne 0x182fad movaps 0x20(%rax,%rdx), %xmm0 subps %xmm3, %xmm0 mulps %xmm6, %xmm0 movaps 0x20(%rax,%rdi), %xmm1 subps %xmm4, %xmm1 mulps %xmm7, %xmm1 pmaxsd %xmm0, %xmm1 movaps 0x20(%rax,%r8), %xmm0 subps %xmm5, %xmm0 mulps %xmm8, %xmm0 pmaxsd %xmm9, %xmm0 pmaxsd %xmm1, %xmm0 movaps 0x20(%rax,%r10), %xmm1 subps %xmm3, %xmm1 mulps %xmm6, %xmm1 movaps 0x20(%rax,%r11), %xmm2 subps %xmm4, %xmm2 mulps %xmm7, %xmm2 pminsd %xmm1, %xmm2 movaps 0x20(%rax,%rbx), %xmm1 subps %xmm5, %xmm1 mulps %xmm8, %xmm1 pminsd %xmm11, %xmm1 pminsd %xmm2, %xmm1 pcmpgtd %xmm1, %xmm0 movmskps %xmm0, %esi xorb $0xf, %sil movzbl %sil, %r12d testb $0x8, %al jne 0x182fe2 testq %r12, %r12 je 0x182fe9 andq $-0x10, %rax bsfq %r12, %rsi leaq -0x1(%r12), %r14 xorl %ebp, %ebp movq (%rax,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) andq %r12, %r14 jne 0x182ff0 movq %rsi, %rax testl %ebp, %ebp je 0x182f33 jmp 0x183035 movl $0x6, %ebp jmp 0x182fd8 movl $0x4, %ebp jmp 0x182fd8 movq %rcx, %r15 movq %r9, %rcx movq %rsi, (%r13) addq $0x8, %r13 bsfq %r14, %r9 leaq -0x1(%r14), %rsi movq (%rax,%r9,8), %r9 prefetcht0 (%r9) prefetcht0 0x40(%r9) andq %r14, %rsi je 0x18302a movq %r9, (%r13) addq $0x8, %r13 bsfq %rsi, %r9 leaq -0x1(%rsi), %r14 jmp 0x183006 movq %r9, %rax movq %rcx, %r9 movq %r15, %rcx jmp 0x182fd8 cmpl $0x6, %ebp jne 0x1836d8 movl %eax, %r15d andl $0xf, %r15d xorl %ebp, %ebp addq $-0x8, %r15 setne %r14b je 0x1836d8 movq %r13, -0x68(%rsp) andq $-0x10, %rax movq -0x70(%rsp), %rsi movq %rcx, -0x80(%rsp) movq -0x78(%rsp), %rcx movss (%rsi,%rcx,4), %xmm10 movss 0x10(%rsi,%rcx,4), %xmm2 movss 0x20(%rsi,%rcx,4), %xmm1 movss 0x40(%rsi,%rcx,4), %xmm9 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rsi,%rcx,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x60(%rsi,%rcx,4), %xmm0 movq -0x80(%rsp), %rcx shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0xe0(%rsp) xorl %esi, %esi movaps %xmm1, 0xf0(%rsp) movaps %xmm10, 0xd0(%rsp) movaps %xmm2, 0xc0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm9, 0xa0(%rsp) imulq $0xe0, %rsi, %r9 movaps (%rax,%r9), %xmm4 movaps 0x10(%rax,%r9), %xmm5 movaps 0x20(%rax,%r9), %xmm7 movaps %xmm4, %xmm8 movaps 0x40(%rax,%r9), %xmm0 movaps %xmm0, -0x40(%rsp) movaps %xmm5, %xmm1 subps %xmm0, %xmm1 movaps 0x50(%rax,%r9), %xmm0 movaps %xmm0, -0x60(%rsp) movaps %xmm7, %xmm3 subps %xmm0, %xmm3 movaps 0x90(%rax,%r9), %xmm11 movaps %xmm11, -0x10(%rsp) subps %xmm4, %xmm11 movaps 0xa0(%rax,%r9), %xmm12 movaps %xmm12, 0x10(%rsp) subps %xmm5, %xmm12 movaps 0xb0(%rax,%r9), %xmm13 movaps %xmm13, 0x100(%rsp) subps %xmm7, %xmm13 movaps %xmm1, %xmm0 mulps %xmm13, %xmm0 movaps %xmm3, %xmm15 mulps %xmm12, %xmm15 subps %xmm0, %xmm15 subps %xmm10, %xmm4 subps %xmm2, %xmm5 movaps %xmm5, %xmm0 mulps %xmm9, %xmm0 movaps %xmm4, %xmm14 mulps %xmm6, %xmm14 subps %xmm0, %xmm14 movaps 0x30(%rax,%r9), %xmm10 subps %xmm10, %xmm8 movaps %xmm8, %xmm9 mulps %xmm13, %xmm9 mulps %xmm14, %xmm13 mulps %xmm3, %xmm14 mulps %xmm11, %xmm3 subps %xmm3, %xmm9 subps 0xf0(%rsp), %xmm7 movaps %xmm4, -0x20(%rsp) movaps %xmm4, %xmm3 movaps 0xe0(%rsp), %xmm0 mulps %xmm0, %xmm3 movaps %xmm7, %xmm2 movaps 0xa0(%rsp), %xmm4 mulps %xmm4, %xmm2 subps %xmm3, %xmm2 movaps %xmm8, %xmm3 mulps %xmm12, %xmm3 mulps %xmm2, %xmm12 mulps %xmm1, %xmm2 mulps %xmm11, %xmm1 subps %xmm3, %xmm1 movaps %xmm7, %xmm3 mulps %xmm6, %xmm3 movaps %xmm5, -0x50(%rsp) mulps %xmm0, %xmm5 subps %xmm3, %xmm5 movaps %xmm1, %xmm3 mulps %xmm0, %xmm3 movaps %xmm9, %xmm0 mulps %xmm6, %xmm0 addps %xmm3, %xmm0 movaps %xmm15, (%rsp) mulps %xmm4, %xmm15 movaps %xmm4, %xmm6 addps %xmm0, %xmm15 addps %xmm13, %xmm12 movaps 0x10(%rsp), %xmm13 mulps %xmm5, %xmm11 addps %xmm12, %xmm11 xorps %xmm12, %xmm12 addps %xmm14, %xmm2 movaps 0x1d6947d(%rip), %xmm14 # 0x1eec6c0 mulps %xmm8, %xmm5 addps %xmm2, %xmm5 movaps %xmm15, %xmm3 andps 0x1d6947b(%rip), %xmm3 # 0x1eec6d0 xorps %xmm3, %xmm11 xorps %xmm3, %xmm5 movaps %xmm11, %xmm0 cmpnltps %xmm12, %xmm0 addps %xmm5, %xmm11 cmpnltps %xmm12, %xmm5 andps %xmm0, %xmm5 movaps %xmm15, %xmm4 cmpneqps %xmm12, %xmm15 movaps -0x10(%rsp), %xmm12 andps %xmm15, %xmm5 andps %xmm14, %xmm4 cmpleps %xmm4, %xmm11 andps %xmm5, %xmm11 addq %rax, %r9 movmskps %xmm11, %r13d testl %r13d, %r13d movaps %xmm6, %xmm8 movaps -0x60(%rsp), %xmm15 movaps -0x40(%rsp), %xmm14 jne 0x18345f movaps 0x60(%r9), %xmm1 movaps 0x70(%r9), %xmm2 movaps 0x80(%r9), %xmm4 movaps %xmm1, %xmm5 subps %xmm12, %xmm5 movaps %xmm2, %xmm12 subps %xmm13, %xmm12 movaps %xmm4, %xmm0 subps 0x100(%rsp), %xmm0 movaps %xmm0, %xmm7 subps %xmm1, %xmm10 subps %xmm2, %xmm14 subps %xmm4, %xmm15 movaps %xmm14, %xmm0 movaps %xmm5, %xmm3 mulps %xmm14, %xmm3 movaps %xmm3, -0x40(%rsp) movaps %xmm10, %xmm9 mulps %xmm12, %xmm9 subps 0xd0(%rsp), %xmm1 subps 0xf0(%rsp), %xmm4 movaps 0xe0(%rsp), %xmm3 movaps %xmm3, %xmm6 mulps %xmm1, %xmm6 movaps %xmm8, %xmm11 mulps %xmm4, %xmm11 subps %xmm6, %xmm11 mulps %xmm11, %xmm14 mulps %xmm12, %xmm11 mulps %xmm15, %xmm12 movaps %xmm7, -0x10(%rsp) mulps %xmm7, %xmm0 subps %xmm12, %xmm0 movaps %xmm10, %xmm6 mulps %xmm7, %xmm6 subps 0xc0(%rsp), %xmm2 movaps %xmm8, %xmm13 movaps 0xb0(%rsp), %xmm8 movaps %xmm8, %xmm7 movaps %xmm4, -0x60(%rsp) mulps %xmm4, %xmm7 movaps %xmm3, %xmm12 mulps %xmm2, %xmm12 subps %xmm7, %xmm12 mulps %xmm12, %xmm10 mulps %xmm5, %xmm12 mulps %xmm15, %xmm5 subps %xmm6, %xmm5 subps -0x40(%rsp), %xmm9 movaps %xmm13, %xmm6 mulps %xmm2, %xmm6 movaps %xmm8, %xmm7 mulps %xmm1, %xmm7 subps %xmm6, %xmm7 movaps %xmm3, %xmm6 movaps %xmm0, %xmm3 mulps %xmm9, %xmm6 mulps %xmm5, %xmm8 addps %xmm6, %xmm8 mulps %xmm0, %xmm13 addps %xmm8, %xmm13 mulps %xmm7, %xmm15 addps %xmm15, %xmm14 addps %xmm14, %xmm10 mulps -0x10(%rsp), %xmm7 addps %xmm7, %xmm11 movaps %xmm13, %xmm4 andps 0x1d692f6(%rip), %xmm4 # 0x1eec6d0 xorps %xmm4, %xmm10 addps %xmm11, %xmm12 xorps %xmm4, %xmm12 movaps %xmm10, %xmm6 xorps %xmm0, %xmm0 cmpnltps %xmm0, %xmm6 addps %xmm12, %xmm10 cmpnltps %xmm0, %xmm12 andps %xmm6, %xmm12 movaps %xmm13, %xmm6 cmpneqps %xmm0, %xmm13 andps %xmm13, %xmm12 andps 0x1d692ae(%rip), %xmm6 # 0x1eec6c0 cmpleps %xmm6, %xmm10 andps %xmm12, %xmm10 movmskps %xmm10, %r13d testl %r13d, %r13d jne 0x183590 incq %rsi cmpq %r15, %rsi setb %r14b movaps 0xd0(%rsp), %xmm10 movaps 0xc0(%rsp), %xmm2 movaps 0xa0(%rsp), %xmm9 movaps 0xb0(%rsp), %xmm6 jne 0x1830e5 jmp 0x18369a mulps %xmm7, %xmm1 mulps -0x50(%rsp), %xmm9 addps %xmm1, %xmm9 movaps (%rsp), %xmm6 mulps -0x20(%rsp), %xmm6 addps %xmm9, %xmm6 xorps %xmm6, %xmm3 movq -0x70(%rsp), %r13 movq -0x78(%rsp), %rcx movss 0x30(%r13,%rcx,4), %xmm0 movss 0x80(%r13,%rcx,4), %xmm1 movq -0x80(%rsp), %rcx shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm4, %xmm0 cmpltps %xmm3, %xmm0 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm4, %xmm1 cmpleps %xmm1, %xmm3 andps %xmm0, %xmm3 andps %xmm11, %xmm3 movmskps %xmm3, %r13d testl %r13d, %r13d je 0x1832b1 movq 0x8f8(%rsp), %rcx movq (%rcx), %rcx movq %rcx, 0x28(%rsp) movzbl %r13b, %r13d movq %r13, -0x20(%rsp) movaps %xmm13, %xmm7 movaps %xmm12, %xmm3 movaps %xmm15, %xmm5 movaps %xmm8, %xmm15 bsfq %r13, %rcx movq %rcx, (%rsp) movl 0xc0(%r9,%rcx,4), %ecx movq %rcx, -0x50(%rsp) movq 0x28(%rsp), %rcx movq 0x1e8(%rcx), %r13 movq -0x50(%rsp), %rcx movq (%r13,%rcx,8), %rcx movq %rcx, -0x50(%rsp) movq -0x70(%rsp), %r13 movq -0x78(%rsp), %rcx movl 0x90(%r13,%rcx,4), %ecx movq -0x50(%rsp), %r13 andl 0x34(%r13), %ecx movl %ecx, -0x50(%rsp) jne 0x183552 movq (%rsp), %rcx movq -0x20(%rsp), %r13 btcq %rcx, %r13 movq %r13, -0x20(%rsp) movq -0x68(%rsp), %r13 movaps -0x30(%rsp), %xmm11 movq -0x80(%rsp), %rcx cmpl $0x0, -0x50(%rsp) jne 0x1836e4 movq -0x20(%rsp), %r13 testq %r13, %r13 movaps %xmm15, %xmm8 movaps %xmm5, %xmm15 movaps %xmm3, %xmm12 movaps %xmm7, %xmm13 jne 0x1834da jmp 0x1832b1 movaps -0x60(%rsp), %xmm0 mulps %xmm9, %xmm0 mulps %xmm5, %xmm2 addps %xmm0, %xmm2 mulps %xmm3, %xmm1 addps %xmm2, %xmm1 xorps %xmm1, %xmm4 movq -0x70(%rsp), %r13 movq -0x78(%rsp), %rcx movss 0x30(%r13,%rcx,4), %xmm0 movss 0x80(%r13,%rcx,4), %xmm1 movq -0x80(%rsp), %rcx shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm6, %xmm0 cmpltps %xmm4, %xmm0 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm6, %xmm1 cmpleps %xmm1, %xmm4 andps %xmm0, %xmm4 andps %xmm10, %xmm4 movmskps %xmm4, %r13d testl %r13d, %r13d je 0x183428 movq 0x8f8(%rsp), %rcx movq (%rcx), %rcx movq %rcx, 0x10(%rsp) movzbl %r13b, %r13d movq %r13, -0x40(%rsp) bsfq %r13, %rcx movq %rcx, -0x10(%rsp) movl 0xc0(%r9,%rcx,4), %ecx movq %rcx, -0x60(%rsp) movq 0x10(%rsp), %rcx movq 0x1e8(%rcx), %r13 movq -0x60(%rsp), %rcx movq (%r13,%rcx,8), %rcx movq %rcx, -0x60(%rsp) movq -0x70(%rsp), %r13 movq -0x78(%rsp), %rcx movl 0x90(%r13,%rcx,4), %ecx movq -0x60(%rsp), %r13 andl 0x34(%r13), %ecx movl %ecx, -0x60(%rsp) jne 0x183670 movq -0x10(%rsp), %rcx movq -0x40(%rsp), %r13 btcq %rcx, %r13 movq %r13, -0x40(%rsp) movq -0x68(%rsp), %r13 movaps -0x30(%rsp), %xmm11 movq -0x80(%rsp), %rcx cmpl $0x0, -0x60(%rsp) jne 0x1836e4 movq -0x40(%rsp), %r13 testq %r13, %r13 jne 0x183606 jmp 0x183428 movaps 0x90(%rsp), %xmm3 movaps 0x80(%rsp), %xmm4 movaps 0x70(%rsp), %xmm5 movaps 0x60(%rsp), %xmm6 movq -0x68(%rsp), %r13 movaps 0x50(%rsp), %xmm7 movaps 0x40(%rsp), %xmm8 movaps 0x30(%rsp), %xmm9 movaps -0x30(%rsp), %xmm11 leaq 0x110(%rsp), %r9 testb $0x3, %bpl je 0x182f1f jmp 0x18373e testb $0x1, %r14b movaps 0x90(%rsp), %xmm3 movaps 0x80(%rsp), %xmm4 movaps 0x70(%rsp), %xmm5 movaps 0x60(%rsp), %xmm6 movaps 0x50(%rsp), %xmm7 movaps 0x40(%rsp), %xmm8 movaps 0x30(%rsp), %xmm9 leaq 0x110(%rsp), %r9 je 0x1836d8 movq -0x70(%rsp), %rax movq -0x78(%rsp), %rcx movl $0xff800000, 0x80(%rax,%rcx,4) # imm = 0xFF800000 movq -0x80(%rsp), %rcx movl $0x1, %ebp jmp 0x1836d8 cmpq %r9, %rcx setne %al addq $0x8b8, %rsp # imm = 0x8B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMiIntersectorKMoeller<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKMoellerTrumbore<4, 4, true>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x12f8, %rsp # imm = 0x12F8 movq %r9, %rbx movq %rcx, %r14 leaq 0x3c0(%rsp), %r9 movq %rdx, -0x10(%r9) andl $0x0, -0x8(%r9) movq 0x1338(%rsp), %r11 movq 0x1330(%rsp), %rax movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm6 movss 0x20(%rax,%rcx,4), %xmm7 movss 0x60(%rax,%rcx,4), %xmm4 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x390(%rsp) movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r13 movslq 0xb0(%rax,%rcx,4), %rsi movq %r8, %rdi xorq $0x10, %rdi movq %r13, %r15 xorq $0x10, %r15 movq %rsi, %rcx xorq $0x10, %rcx movq %rcx, 0x178(%rsp) movss 0xc0(%rax,%r14,4), %xmm0 movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x380(%rsp) leaq 0x1fcae60(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x320(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x310(%rsp) pushq $0x1 popq %rdx movl %r14d, %ecx shll %cl, %edx movslq %edx, %rcx shlq $0x4, %rcx addq %rax, %rcx movq %rcx, 0x108(%rsp) movq %rsi, 0x38(%rsp) movq %rdi, 0x30(%rsp) movq %r15, 0x28(%rsp) movaps %xmm8, 0x370(%rsp) movaps %xmm6, 0x360(%rsp) movaps %xmm7, 0x350(%rsp) movaps %xmm4, 0x340(%rsp) movaps %xmm5, 0x330(%rsp) movq %r13, 0x170(%rsp) leaq 0x3b0(%rsp), %rax cmpq %rax, %r9 je 0x1866ce movss -0x8(%r9), %xmm0 addq $-0x10, %r9 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x185194 movq %r9, 0x8(%rsp) movq (%r9), %rbp testb $0x8, %bpl jne 0x18525f movaps 0x20(%rbp,%r8), %xmm0 subps %xmm8, %xmm0 mulps %xmm4, %xmm0 movaps 0x20(%rbp,%r13), %xmm2 subps %xmm6, %xmm2 mulps %xmm5, %xmm2 pmaxsd %xmm0, %xmm2 movaps 0x20(%rbp,%rsi), %xmm0 subps %xmm7, %xmm0 movaps 0x390(%rsp), %xmm9 mulps %xmm9, %xmm0 pmaxsd 0x380(%rsp), %xmm0 pmaxsd %xmm2, %xmm0 movaps 0x20(%rbp,%rdi), %xmm2 subps %xmm8, %xmm2 mulps %xmm4, %xmm2 movaps 0x20(%rbp,%r15), %xmm3 subps %xmm6, %xmm3 mulps %xmm5, %xmm3 pminsd %xmm2, %xmm3 movq 0x178(%rsp), %rax movaps 0x20(%rbp,%rax), %xmm2 subps %xmm7, %xmm2 mulps %xmm9, %xmm2 pminsd %xmm1, %xmm2 pminsd %xmm3, %xmm2 movdqa %xmm0, 0x180(%rsp) pcmpgtd %xmm2, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %r12d testb $0x8, %bpl jne 0x18529a testq %r12, %r12 je 0x18529e andq $-0x10, %rbp bsfq %r12, %rcx leaq -0x1(%r12), %r9 xorl %eax, %eax movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %r12, %r9 jne 0x1852a3 movq %rdx, %rbp testl %eax, %eax je 0x1851c2 jmp 0x18549e pushq $0x6 jmp 0x1852a0 pushq $0x4 popq %rax jmp 0x18528d movq %r8, %r15 movl 0x180(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%rbp,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0x180(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x185313 movq 0x8(%rsp), %r9 leaq 0x10(%r9), %rcx cmpl %r8d, %edi jae 0x1852ed movq %rsi, (%r9) movl %r8d, 0x8(%r9) movq %rcx, 0x8(%rsp) movq %rdx, %rbp jmp 0x1852fc movq %rdx, (%r9) movl %edi, 0x8(%r9) movq %rcx, 0x8(%rsp) movq %rsi, %rbp movq %r15, %r8 movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdi movq 0x28(%rsp), %r15 jmp 0x18528d movaps %xmm5, %xmm12 movaps %xmm4, %xmm11 movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%rbp,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0x180(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x1853d5 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movq 0x8(%rsp), %rcx movaps %xmm2, (%rcx) movaps %xmm3, 0x10(%rcx) movq %xmm5, %rbp addq $0x20, %rcx movq %rcx, 0x8(%rsp) movaps %xmm11, %xmm4 movaps %xmm12, %xmm5 jmp 0x1852fc bsfq %rdx, %rcx movq (%rbp,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movaps %xmm6, %xmm9 movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movaps %xmm7, %xmm10 movd 0x180(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps %xmm10, %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm9, %xmm6 movq 0x8(%rsp), %rcx movaps %xmm2, (%rcx) movaps %xmm4, 0x10(%rcx) movaps %xmm5, 0x20(%rcx) movq %xmm3, %rbp addq $0x30, %rcx jmp 0x1853c3 cmpl $0x6, %eax jne 0x1866c4 movl %ebp, %r9d andl $0xf, %r9d addq $-0x8, %r9 je 0x186676 andq $-0x10, %rbp xorl %r15d, %r15d imulq $0x60, %r15, %rax movq (%r11), %r10 leaq (%rax,%rbp), %r13 addq $0x40, %r13 prefetcht0 -0x40(%r13) prefetcht0 (%r13) movl (%r13), %edx movq 0x228(%r10), %rcx movq (%rcx,%rdx,8), %rdx movl -0x40(%r13), %esi movl -0x3c(%r13), %edi movups (%rdx,%rsi,4), %xmm2 movl -0x30(%r13), %esi movups (%rdx,%rsi,4), %xmm0 movl -0x20(%r13), %esi movups (%rdx,%rsi,4), %xmm1 movaps %xmm1, 0x90(%rsp) movl -0x10(%r13), %esi movups (%rdx,%rsi,4), %xmm14 movl 0x4(%r13), %edx movq (%rcx,%rdx,8), %rdx movups (%rdx,%rdi,4), %xmm3 movl -0x2c(%r13), %esi movups (%rdx,%rsi,4), %xmm6 movl -0x1c(%r13), %esi movups (%rdx,%rsi,4), %xmm4 movl -0xc(%r13), %esi movups (%rdx,%rsi,4), %xmm5 movl 0x8(%r13), %edx movq (%rcx,%rdx,8), %rdx movl -0x38(%r13), %esi movups (%rdx,%rsi,4), %xmm8 movl -0x28(%r13), %esi movups (%rdx,%rsi,4), %xmm9 movl -0x18(%r13), %esi movups (%rdx,%rsi,4), %xmm15 movl -0x8(%r13), %esi movups (%rdx,%rsi,4), %xmm1 movaps %xmm1, 0x150(%rsp) movl 0xc(%r13), %edx movq (%rcx,%rdx,8), %rcx movl -0x34(%r13), %edx movups (%rcx,%rdx,4), %xmm11 movl -0x24(%r13), %edx movups (%rcx,%rdx,4), %xmm12 movl -0x14(%r13), %edx movups (%rcx,%rdx,4), %xmm10 movl -0x4(%r13), %edx movaps %xmm2, %xmm1 unpcklps %xmm8, %xmm1 # xmm1 = xmm1[0],xmm8[0],xmm1[1],xmm8[1] unpckhps %xmm8, %xmm2 # xmm2 = xmm2[2],xmm8[2],xmm2[3],xmm8[3] movaps %xmm3, %xmm13 unpcklps %xmm11, %xmm13 # xmm13 = xmm13[0],xmm11[0],xmm13[1],xmm11[1] unpckhps %xmm11, %xmm3 # xmm3 = xmm3[2],xmm11[2],xmm3[3],xmm11[3] movups (%rcx,%rdx,4), %xmm8 unpcklps %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] movaps %xmm1, %xmm7 unpcklps %xmm13, %xmm7 # xmm7 = xmm7[0],xmm13[0],xmm7[1],xmm13[1] unpckhps %xmm13, %xmm1 # xmm1 = xmm1[2],xmm13[2],xmm1[3],xmm13[3] movaps %xmm0, %xmm3 unpcklps %xmm9, %xmm0 # xmm0 = xmm0[0],xmm9[0],xmm0[1],xmm9[1] unpckhps %xmm9, %xmm3 # xmm3 = xmm3[2],xmm9[2],xmm3[3],xmm9[3] movaps %xmm6, %xmm9 unpcklps %xmm12, %xmm9 # xmm9 = xmm9[0],xmm12[0],xmm9[1],xmm12[1] unpckhps %xmm12, %xmm6 # xmm6 = xmm6[2],xmm12[2],xmm6[3],xmm12[3] unpcklps %xmm6, %xmm3 # xmm3 = xmm3[0],xmm6[0],xmm3[1],xmm6[1] movaps %xmm3, %xmm11 movaps %xmm3, 0x120(%rsp) movaps %xmm0, %xmm3 unpcklps %xmm9, %xmm3 # xmm3 = xmm3[0],xmm9[0],xmm3[1],xmm9[1] movaps %xmm3, 0xe0(%rsp) unpckhps %xmm9, %xmm0 # xmm0 = xmm0[2],xmm9[2],xmm0[3],xmm9[3] movaps 0x90(%rsp), %xmm3 movaps %xmm3, %xmm9 unpcklps %xmm15, %xmm9 # xmm9 = xmm9[0],xmm15[0],xmm9[1],xmm15[1] unpckhps %xmm15, %xmm3 # xmm3 = xmm3[2],xmm15[2],xmm3[3],xmm15[3] movaps %xmm4, %xmm6 unpcklps %xmm10, %xmm6 # xmm6 = xmm6[0],xmm10[0],xmm6[1],xmm10[1] unpckhps %xmm10, %xmm4 # xmm4 = xmm4[2],xmm10[2],xmm4[3],xmm10[3] unpcklps %xmm4, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1] movaps %xmm3, 0x90(%rsp) movaps %xmm9, %xmm3 unpcklps %xmm6, %xmm3 # xmm3 = xmm3[0],xmm6[0],xmm3[1],xmm6[1] movaps %xmm3, 0xf0(%rsp) unpckhps %xmm6, %xmm9 # xmm9 = xmm9[2],xmm6[2],xmm9[3],xmm6[3] movaps %xmm9, 0x80(%rsp) movaps %xmm14, %xmm6 movaps 0x150(%rsp), %xmm3 unpcklps %xmm3, %xmm6 # xmm6 = xmm6[0],xmm3[0],xmm6[1],xmm3[1] unpckhps %xmm3, %xmm14 # xmm14 = xmm14[2],xmm3[2],xmm14[3],xmm3[3] movaps %xmm5, %xmm4 unpcklps %xmm8, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1] unpckhps %xmm8, %xmm5 # xmm5 = xmm5[2],xmm8[2],xmm5[3],xmm8[3] unpcklps %xmm5, %xmm14 # xmm14 = xmm14[0],xmm5[0],xmm14[1],xmm5[1] movaps %xmm6, %xmm5 unpcklps %xmm4, %xmm5 # xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1] unpckhps %xmm4, %xmm6 # xmm6 = xmm6[2],xmm4[2],xmm6[3],xmm4[3] movaps %xmm1, %xmm3 movaps %xmm0, 0x150(%rsp) subps %xmm0, %xmm3 movaps %xmm2, %xmm9 subps %xmm11, %xmm9 movaps %xmm6, 0x140(%rsp) subps %xmm1, %xmm6 movaps %xmm14, 0x3a0(%rsp) movaps %xmm14, %xmm8 subps %xmm2, %xmm8 movaps %xmm3, %xmm4 movaps %xmm3, %xmm0 mulps %xmm8, %xmm4 movaps %xmm9, %xmm3 mulps %xmm6, %xmm3 subps %xmm4, %xmm3 movaps %xmm5, 0x130(%rsp) movaps %xmm5, %xmm4 subps %xmm7, %xmm4 movss (%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm7, %xmm10 subps %xmm5, %xmm7 movss 0x10(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm5, %xmm1 movss 0x40(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movaps %xmm1, %xmm5 mulps %xmm11, %xmm5 movaps %xmm7, %xmm13 mulps %xmm12, %xmm13 subps %xmm5, %xmm13 subps 0xe0(%rsp), %xmm10 movaps %xmm10, %xmm5 mulps %xmm8, %xmm5 mulps %xmm13, %xmm8 mulps %xmm9, %xmm13 mulps %xmm4, %xmm9 subps %xmm9, %xmm5 movss 0x20(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] subps %xmm9, %xmm2 movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movaps %xmm7, 0xd0(%rsp) mulps %xmm14, %xmm7 movaps %xmm2, %xmm15 mulps %xmm11, %xmm15 subps %xmm7, %xmm15 movaps %xmm10, %xmm9 mulps %xmm6, %xmm9 mulps %xmm15, %xmm6 mulps %xmm0, %xmm15 movaps %xmm0, %xmm7 mulps %xmm4, %xmm7 subps %xmm9, %xmm7 movaps %xmm2, 0x110(%rsp) movaps %xmm2, %xmm0 mulps %xmm12, %xmm0 movaps %xmm1, %xmm2 movaps %xmm1, %xmm9 mulps %xmm14, %xmm9 subps %xmm0, %xmm9 mulps %xmm7, %xmm14 movaps %xmm5, 0x60(%rsp) mulps %xmm5, %xmm12 addps %xmm14, %xmm12 movaps 0x1d66f17(%rip), %xmm1 # 0x1eec6c0 movaps 0x120(%rsp), %xmm14 movaps %xmm3, 0x70(%rsp) mulps %xmm3, %xmm11 addps %xmm12, %xmm11 movaps 0x80(%rsp), %xmm12 addps %xmm8, %xmm6 mulps %xmm9, %xmm4 addps %xmm6, %xmm4 addps %xmm13, %xmm15 movaps 0xe0(%rsp), %xmm5 mulps %xmm10, %xmm9 addps %xmm15, %xmm9 movaps 0x1d66ee2(%rip), %xmm0 # 0x1eec6d0 movaps %xmm11, %xmm15 andps %xmm0, %xmm15 xorps %xmm15, %xmm4 xorps %xmm15, %xmm9 movaps %xmm4, %xmm0 xorps %xmm3, %xmm3 cmpnltps %xmm3, %xmm0 movaps %xmm9, %xmm10 cmpnltps %xmm3, %xmm10 andps %xmm0, %xmm10 movaps %xmm11, %xmm6 cmpneqps %xmm3, %xmm11 andps %xmm11, %xmm10 movaps 0x90(%rsp), %xmm11 andps %xmm1, %xmm6 movaps %xmm4, %xmm8 addps %xmm9, %xmm8 cmpleps %xmm6, %xmm8 andps %xmm10, %xmm8 leaq (%rax,%rbp), %rdx movmskps %xmm8, %eax testl %eax, %eax jne 0x185a2a movaps 0xf0(%rsp), %xmm3 movaps %xmm3, %xmm0 subps 0x130(%rsp), %xmm0 movaps %xmm0, %xmm7 movaps %xmm0, 0x130(%rsp) movaps %xmm12, %xmm1 subps 0x140(%rsp), %xmm1 movaps %xmm11, %xmm6 subps 0x3a0(%rsp), %xmm6 subps %xmm3, %xmm5 movaps 0x150(%rsp), %xmm4 subps %xmm12, %xmm4 subps %xmm11, %xmm14 movaps %xmm14, %xmm0 mulps %xmm1, %xmm0 movaps %xmm1, %xmm8 movaps %xmm1, 0x140(%rsp) movaps %xmm4, %xmm1 mulps %xmm6, %xmm1 subps %xmm0, %xmm1 movaps %xmm5, %xmm0 mulps %xmm6, %xmm0 movaps %xmm14, %xmm2 mulps %xmm7, %xmm14 subps %xmm0, %xmm14 movaps %xmm4, %xmm0 mulps %xmm7, %xmm0 movaps %xmm5, %xmm13 mulps %xmm8, %xmm13 subps %xmm0, %xmm13 movss (%rbx,%r14,4), %xmm0 movss 0x10(%rbx,%r14,4), %xmm8 movss 0x20(%rbx,%r14,4), %xmm10 movss 0x40(%rbx,%r14,4), %xmm7 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movaps %xmm11, %xmm15 movss 0x60(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] subps %xmm0, %xmm3 subps %xmm8, %xmm12 subps %xmm10, %xmm15 movaps %xmm15, %xmm8 mulps %xmm9, %xmm8 movaps %xmm3, %xmm0 movaps %xmm5, %xmm3 movaps %xmm12, %xmm5 mulps %xmm11, %xmm5 subps %xmm8, %xmm5 movaps %xmm0, %xmm10 mulps %xmm11, %xmm10 movaps %xmm15, %xmm8 mulps %xmm7, %xmm8 subps %xmm10, %xmm8 movaps %xmm12, 0x80(%rsp) mulps %xmm7, %xmm12 movaps %xmm0, 0xf0(%rsp) movaps %xmm0, %xmm10 mulps %xmm9, %xmm10 subps %xmm12, %xmm10 mulps %xmm13, %xmm11 mulps %xmm14, %xmm9 addps %xmm11, %xmm9 movaps %xmm1, %xmm11 mulps %xmm1, %xmm7 addps %xmm9, %xmm7 mulps %xmm10, %xmm2 mulps %xmm8, %xmm4 addps %xmm2, %xmm4 mulps %xmm5, %xmm3 addps %xmm4, %xmm3 mulps %xmm6, %xmm10 mulps 0x140(%rsp), %xmm8 addps %xmm10, %xmm8 movaps %xmm7, %xmm9 andps 0x1d66d10(%rip), %xmm9 # 0x1eec6d0 xorps %xmm9, %xmm3 mulps 0x130(%rsp), %xmm5 addps %xmm8, %xmm5 xorps %xmm9, %xmm5 movaps %xmm3, %xmm1 xorps %xmm0, %xmm0 cmpnltps %xmm0, %xmm1 movaps %xmm5, %xmm8 cmpnltps %xmm0, %xmm8 andps %xmm1, %xmm8 movaps %xmm7, %xmm10 andps 0x1d66cc9(%rip), %xmm10 # 0x1eec6c0 cmpneqps %xmm0, %xmm7 andps %xmm7, %xmm8 movaps %xmm3, %xmm6 addps %xmm5, %xmm6 cmpleps %xmm10, %xmm6 andps %xmm8, %xmm6 movmskps %xmm6, %eax testl %eax, %eax jne 0x185f9e incq %r15 cmpq %r9, %r15 jne 0x1854bf jmp 0x186676 movaps 0x110(%rsp), %xmm0 mulps %xmm7, %xmm0 mulps 0x60(%rsp), %xmm2 addps %xmm0, %xmm2 movaps 0xd0(%rsp), %xmm0 mulps 0x70(%rsp), %xmm0 addps %xmm2, %xmm0 xorps %xmm0, %xmm15 movss 0x30(%rbx,%r14,4), %xmm0 movss 0x80(%rbx,%r14,4), %xmm10 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm6, %xmm0 cmpltps %xmm15, %xmm0 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm6, %xmm10 movaps %xmm15, %xmm3 cmpleps %xmm10, %xmm3 andps %xmm0, %xmm3 andps %xmm8, %xmm3 movmskps %xmm3, %eax testl %eax, %eax je 0x18584f movq %r10, 0x110(%rsp) movaps %xmm4, 0x180(%rsp) movaps %xmm9, 0x190(%rsp) movaps %xmm15, 0x1a0(%rsp) movaps %xmm6, 0x1b0(%rsp) movaps 0x70(%rsp), %xmm1 movaps %xmm1, 0x1c0(%rsp) movaps 0x60(%rsp), %xmm5 movaps %xmm5, 0x1d0(%rsp) movaps %xmm7, 0x1e0(%rsp) movaps %xmm3, 0x1f0(%rsp) movaps 0x320(%rsp), %xmm0 movaps %xmm0, 0x260(%rsp) movaps %xmm3, 0x10(%rsp) rcpps %xmm6, %xmm8 mulps %xmm8, %xmm6 movaps 0x1d66f06(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm11 subps %xmm6, %xmm11 mulps %xmm8, %xmm11 addps %xmm8, %xmm11 mulps %xmm11, %xmm15 movaps %xmm15, 0x220(%rsp) mulps %xmm11, %xmm4 minps %xmm2, %xmm4 mulps %xmm9, %xmm11 minps %xmm2, %xmm11 movaps %xmm2, %xmm6 subps %xmm4, %xmm6 movaps %xmm2, %xmm8 subps %xmm11, %xmm8 blendvps %xmm0, %xmm6, %xmm4 movaps %xmm4, 0x200(%rsp) blendvps %xmm0, %xmm8, %xmm11 movaps %xmm11, 0x210(%rsp) movaps %xmm1, 0x230(%rsp) movaps %xmm5, 0x240(%rsp) movaps %xmm7, 0x250(%rsp) movaps 0x1d65e71(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm3, %xmm0 blendvps %xmm0, %xmm15, %xmm2 movaps %xmm2, %xmm1 shufps $0xb1, %xmm2, %xmm1 # xmm1 = xmm1[1,0],xmm2[3,2] minps %xmm2, %xmm1 movaps %xmm1, %xmm0 shufps $0x4e, %xmm1, %xmm0 # xmm0 = xmm0[2,3],xmm1[0,1] minps %xmm1, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm3, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x185bad movaps %xmm0, %xmm3 movmskps %xmm3, %eax bsfq %rax, %rdi movq 0x110(%rsp), %rsi movl (%r13,%rdi,4), %eax movq 0x1e8(%rsi), %rcx movq (%rcx,%rax,8), %r10 movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%r10) je 0x185ec1 movq 0x10(%r11), %rcx cmpq $0x0, 0x10(%rcx) jne 0x185bf4 cmpq $0x0, 0x40(%r10) je 0x186503 movaps %xmm15, 0x300(%rsp) movq %r9, 0x60(%rsp) movq %r8, 0x70(%rsp) movss 0x200(%rsp,%rdi,4), %xmm0 movss 0x210(%rsp,%rdi,4), %xmm1 movss 0x230(%rsp,%rdi,4), %xmm2 movss 0x240(%rsp,%rdi,4), %xmm3 movq 0x8(%r11), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movq %rdx, 0xd0(%rsp) movd 0x50(%rdx,%rdi,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x250(%rsp,%rdi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x270(%rsp) movaps %xmm3, 0x280(%rsp) movaps %xmm6, 0x290(%rsp) movaps %xmm0, 0x2a0(%rsp) movaps %xmm1, 0x2b0(%rsp) movdqa %xmm5, 0x2c0(%rsp) movdqa %xmm4, 0x2d0(%rsp) leaq 0x2e0(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2e0(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2f0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x5c(%rsp) movq %rdi, 0x168(%rsp) movss 0x220(%rsp,%rdi,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x108(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x40(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x18(%r10), %rax movq %rax, 0xa8(%rsp) movq 0x8(%r11), %rax movq %rax, 0xb0(%rsp) movq %rbx, 0xb8(%rsp) leaq 0x270(%rsp), %rax movq %rax, 0xc0(%rsp) movl $0x4, 0xc8(%rsp) movq %r10, 0x160(%rsp) movq 0x40(%r10), %rax testq %rax, %rax je 0x185d7c leaq 0xa0(%rsp), %rdi callq *%rax movdqa 0x40(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x185f14 movq 0x1338(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x185dbf testb $0x2, (%rcx) jne 0x185db5 movq 0x160(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x185dbf leaq 0xa0(%rsp), %rdi callq *%rax movdqa 0x40(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d65c3e(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d66042(%rip), %xmm1 # 0x1eebe20 je 0x185f24 movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x185f24 andl $0x0, 0x10(%rsp,%rdi,4) movaps 0x10(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1865a6 movaps 0x1d65b13(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm15, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x185f08 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rdi jmp 0x185bbc pcmpeqd 0x1d65af4(%rip), %xmm1 # 0x1eeba10 pxor 0x1d65efc(%rip), %xmm1 # 0x1eebe20 ptest 0x1d66bf3(%rip), %xmm1 # 0x1eecb20 jne 0x185f3f movd 0x5c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x168(%rsp), %rax andl $0x0, 0x10(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x300(%rsp), %xmm2 movaps %xmm2, %xmm1 cmpleps %xmm0, %xmm1 andps 0x10(%rsp), %xmm1 movaps %xmm1, 0x10(%rsp) movq 0x1338(%rsp), %r11 movq 0x70(%rsp), %r8 movaps %xmm2, %xmm15 movq 0x60(%rsp), %r9 movq 0xd0(%rsp), %rdx movq 0x110(%rsp), %rsi jmp 0x185ec6 mulps %xmm13, %xmm15 movaps 0x80(%rsp), %xmm1 mulps %xmm14, %xmm1 addps %xmm15, %xmm1 movaps 0xf0(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 xorps %xmm0, %xmm9 movss 0x30(%rbx,%r14,4), %xmm7 movss 0x80(%rbx,%r14,4), %xmm8 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm10, %xmm7 cmpltps %xmm9, %xmm7 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] mulps %xmm10, %xmm8 movaps %xmm9, %xmm1 cmpleps %xmm8, %xmm1 andps %xmm7, %xmm1 andps %xmm6, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x185a19 movaps %xmm3, 0x180(%rsp) movaps %xmm5, 0x190(%rsp) movaps %xmm9, 0x1a0(%rsp) movaps %xmm10, 0x1b0(%rsp) movaps %xmm11, 0x1c0(%rsp) movaps %xmm14, 0x1d0(%rsp) movaps %xmm13, 0x1e0(%rsp) movaps %xmm1, 0x1f0(%rsp) movaps 0x310(%rsp), %xmm0 movaps %xmm0, 0x260(%rsp) movq (%r11), %rsi movaps %xmm1, 0x10(%rsp) rcpps %xmm10, %xmm6 mulps %xmm6, %xmm10 movaps 0x1d6699e(%rip), %xmm2 # 0x1eeca10 movaps %xmm2, %xmm7 subps %xmm10, %xmm7 mulps %xmm6, %xmm7 addps %xmm6, %xmm7 mulps %xmm7, %xmm9 movaps %xmm9, 0x220(%rsp) mulps %xmm7, %xmm3 minps %xmm2, %xmm3 mulps %xmm5, %xmm7 minps %xmm2, %xmm7 movaps %xmm2, %xmm5 subps %xmm3, %xmm5 movaps %xmm2, %xmm6 subps %xmm7, %xmm6 blendvps %xmm0, %xmm5, %xmm3 movaps %xmm3, 0x200(%rsp) blendvps %xmm0, %xmm6, %xmm7 movaps %xmm7, 0x210(%rsp) movaps %xmm11, 0x230(%rsp) movaps %xmm14, 0x240(%rsp) movaps %xmm13, 0x250(%rsp) movaps 0x1d65910(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x18610e movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %rdi movl (%r13,%rdi,4), %eax movq 0x1e8(%rsi), %rcx movq (%rcx,%rax,8), %r10 movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%r10) je 0x186425 movq 0x10(%r11), %rcx cmpq $0x0, 0x10(%rcx) jne 0x18614d cmpq $0x0, 0x40(%r10) je 0x1865ce movq %rsi, 0x80(%rsp) movaps %xmm9, 0x90(%rsp) movq %r9, 0x60(%rsp) movq %r8, 0x70(%rsp) movss 0x200(%rsp,%rdi,4), %xmm0 movss 0x210(%rsp,%rdi,4), %xmm1 movss 0x230(%rsp,%rdi,4), %xmm2 movss 0x240(%rsp,%rdi,4), %xmm3 movq 0x8(%r11), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movq %rdx, 0xd0(%rsp) movd 0x50(%rdx,%rdi,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x250(%rsp,%rdi,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x270(%rsp) movaps %xmm3, 0x280(%rsp) movaps %xmm6, 0x290(%rsp) movaps %xmm0, 0x2a0(%rsp) movaps %xmm1, 0x2b0(%rsp) movdqa %xmm5, 0x2c0(%rsp) movdqa %xmm4, 0x2d0(%rsp) leaq 0x2e0(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2e0(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x2f0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0xe0(%rsp) movq %rdi, 0xf0(%rsp) movss 0x220(%rsp,%rdi,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0x108(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x40(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x18(%r10), %rax movq %rax, 0xa8(%rsp) movq 0x8(%r11), %rax movq %rax, 0xb0(%rsp) movq %rbx, 0xb8(%rsp) leaq 0x270(%rsp), %rax movq %rax, 0xc0(%rsp) movl $0x4, 0xc8(%rsp) movq %r10, 0x120(%rsp) movq 0x40(%r10), %rax testq %rax, %rax je 0x1862e0 leaq 0xa0(%rsp), %rdi callq *%rax movdqa 0x40(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x186478 movq 0x1338(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x186323 testb $0x2, (%rcx) jne 0x186319 movq 0x120(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x186323 leaq 0xa0(%rsp), %rdi callq *%rax movdqa 0x40(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d656da(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d65ade(%rip), %xmm1 # 0x1eebe20 je 0x186488 movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x186488 andl $0x0, 0x10(%rsp,%rdi,4) movaps 0x10(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x185a19 movaps 0x1d655af(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm9, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18646c movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rdi jmp 0x186115 pcmpeqd 0x1d65590(%rip), %xmm1 # 0x1eeba10 pxor 0x1d65998(%rip), %xmm1 # 0x1eebe20 ptest 0x1d6668f(%rip), %xmm1 # 0x1eecb20 jne 0x1864a6 movd 0xe0(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0xf0(%rsp), %rax andl $0x0, 0x10(%rsp,%rax,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x90(%rsp), %xmm9 movaps %xmm9, %xmm1 cmpleps %xmm0, %xmm1 andps 0x10(%rsp), %xmm1 movaps %xmm1, 0x10(%rsp) movq 0x1338(%rsp), %r11 movq 0x70(%rsp), %r8 movq 0x60(%rsp), %r9 movq 0xd0(%rsp), %rdx movq 0x80(%rsp), %rsi jmp 0x18642a movss 0x200(%rsp,%rdi,4), %xmm0 movss 0x210(%rsp,%rdi,4), %xmm1 movss 0x220(%rsp,%rdi,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x230(%rsp,%rdi,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x240(%rsp,%rdi,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x250(%rsp,%rdi,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x50(%rdx,%rdi,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r11), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r11), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movaps 0x90(%rsp), %xmm11 movaps 0xe0(%rsp), %xmm5 movaps 0x120(%rsp), %xmm14 movaps 0x80(%rsp), %xmm12 jmp 0x18584f movss 0x200(%rsp,%rdi,4), %xmm0 movss 0x210(%rsp,%rdi,4), %xmm1 movss 0x220(%rsp,%rdi,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x230(%rsp,%rdi,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x240(%rsp,%rdi,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x250(%rsp,%rdi,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x50(%rdx,%rdi,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r11), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r11), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) jmp 0x185a19 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x370(%rsp), %xmm8 movaps 0x360(%rsp), %xmm6 movaps 0x350(%rsp), %xmm7 movaps 0x340(%rsp), %xmm4 movaps 0x330(%rsp), %xmm5 movq 0x170(%rsp), %r13 movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdi movq 0x28(%rsp), %r15 movq 0x8(%rsp), %r9 jmp 0x185194 addq $0x12f8, %rsp # imm = 0x12F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, false, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMiIntersectorKMoeller<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKMoellerTrumbore<4, 4, true>&, embree::RayK<4>&, embree::sse42::TravRayK<4, false> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb38, %rsp # imm = 0xB38 movq %r9, %rbx movq %rcx, %r14 movq 0xb70(%rsp), %rax leaq 0x398(%rsp), %rsi movq %rdx, -0x8(%rsi) movss (%rax,%rcx,4), %xmm3 movss 0x10(%rax,%rcx,4), %xmm4 movss 0x20(%rax,%rcx,4), %xmm5 movss 0x60(%rax,%rcx,4), %xmm6 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movss 0x70(%rax,%rcx,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0x80(%rax,%rcx,4), %xmm8 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rdi movslq 0xa0(%rax,%rcx,4), %r8 movslq 0xb0(%rax,%rcx,4), %r9 movq %rdi, %r10 xorq $0x10, %r10 movq %r8, %r11 xorq $0x10, %r11 movq %r9, %r15 xorq $0x10, %r15 movss 0xc0(%rax,%rcx,4), %xmm9 movss 0xd0(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] leaq 0x1fc8179(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x380(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x370(%rsp) pushq $0x1 popq %rdx shll %cl, %edx movslq %edx, %rcx shlq $0x4, %rcx addq %rax, %rcx movq %rcx, 0xf0(%rsp) leaq 0x390(%rsp), %r13 movaps %xmm3, 0xb0(%rsp) movaps %xmm4, 0xa0(%rsp) movaps %xmm5, 0x90(%rsp) movaps %xmm6, 0x80(%rsp) movaps %xmm7, 0x70(%rsp) movaps %xmm8, 0x60(%rsp) movq %rdi, 0x120(%rsp) movq %r8, 0x118(%rsp) movq %r9, 0x110(%rsp) movq %r10, 0x108(%rsp) movq %r11, 0x100(%rsp) movq %r15, 0xf8(%rsp) movaps %xmm9, 0x50(%rsp) movaps %xmm10, 0x40(%rsp) movq %rsi, %rcx cmpq %r13, %rsi je 0x188f12 leaq -0x8(%rcx), %rsi movq -0x8(%rcx), %r12 testb $0x8, %r12b jne 0x187f37 movaps 0x20(%r12,%rdi), %xmm0 subps %xmm3, %xmm0 mulps %xmm6, %xmm0 movaps 0x20(%r12,%r8), %xmm1 subps %xmm4, %xmm1 mulps %xmm7, %xmm1 pmaxsd %xmm0, %xmm1 movaps 0x20(%r12,%r9), %xmm0 subps %xmm5, %xmm0 mulps %xmm8, %xmm0 pmaxsd %xmm9, %xmm0 pmaxsd %xmm1, %xmm0 movaps 0x20(%r12,%r10), %xmm1 subps %xmm3, %xmm1 mulps %xmm6, %xmm1 movaps 0x20(%r12,%r11), %xmm2 subps %xmm4, %xmm2 mulps %xmm7, %xmm2 pminsd %xmm1, %xmm2 movaps 0x20(%r12,%r15), %xmm1 subps %xmm5, %xmm1 mulps %xmm8, %xmm1 pminsd %xmm10, %xmm1 pminsd %xmm2, %xmm1 pcmpgtd %xmm1, %xmm0 movmskps %xmm0, %eax xorb $0xf, %al movzbl %al, %ebp testb $0x8, %r12b jne 0x187f6d testq %rbp, %rbp je 0x187f71 andq $-0x10, %r12 bsfq %rbp, %rax leaq -0x1(%rbp), %rdx movq (%r12,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %rbp, %rdx jne 0x187f76 movq %rax, %r12 xorl %eax, %eax testl %eax, %eax je 0x187ebb jmp 0x187fb5 pushq $0x6 jmp 0x187f73 pushq $0x4 popq %rax jmp 0x187f63 movq %rcx, 0x8(%rsp) movq %rax, (%rsi) addq $0x8, %rsi bsfq %rdx, %rcx leaq -0x1(%rdx), %rax movq (%r12,%rcx,8), %rcx prefetcht0 (%rcx) prefetcht0 0x40(%rcx) andq %rdx, %rax je 0x187fab movq %rcx, (%rsi) addq $0x8, %rsi bsfq %rax, %rcx leaq -0x1(%rax), %rdx jmp 0x187f8a movq %rcx, %r12 movq 0x8(%rsp), %rcx jmp 0x187f61 cmpl $0x6, %eax jne 0x188eab movl %r12d, %edx andl $0xf, %edx xorl %eax, %eax addq $-0x8, %rdx movq %rdx, 0x1b8(%rsp) setne %dl je 0x188eab movq %rcx, 0x8(%rsp) movq %rsi, 0x128(%rsp) andq $-0x10, %r12 xorl %r13d, %r13d movb %dl, 0x7(%rsp) imulq $0x60, %r13, %rax movq 0xb78(%rsp), %rcx movq (%rcx), %rdx leaq (%r12,%rax), %r15 addq $0x40, %r15 prefetcht0 -0x40(%r15) prefetcht0 (%r15) movl (%r15), %ecx movq %rdx, 0x138(%rsp) movq 0x228(%rdx), %rdi movq (%rdi,%rcx,8), %rcx movl -0x40(%r15), %edx movl -0x3c(%r15), %esi movups (%rcx,%rdx,4), %xmm12 movl -0x30(%r15), %edx movups (%rcx,%rdx,4), %xmm0 movl -0x10(%r15), %edx movups (%rcx,%rdx,4), %xmm11 movl 0x4(%r15), %edx movq (%rdi,%rdx,8), %rdx movups (%rdx,%rsi,4), %xmm4 movl -0x2c(%r15), %esi movups (%rdx,%rsi,4), %xmm2 movl -0xc(%r15), %esi movups (%rdx,%rsi,4), %xmm1 movl 0x8(%r15), %esi movq (%rdi,%rsi,8), %rsi movl -0x38(%r15), %r8d movups (%rsi,%r8,4), %xmm8 movl -0x28(%r15), %r8d movups (%rsi,%r8,4), %xmm6 movl -0x8(%r15), %r8d movups (%rsi,%r8,4), %xmm5 movl 0xc(%r15), %r8d movq (%rdi,%r8,8), %rdi movl -0x34(%r15), %r8d movups (%rdi,%r8,4), %xmm9 movl -0x24(%r15), %r8d movups (%rdi,%r8,4), %xmm10 movl -0x4(%r15), %r8d movups (%rdi,%r8,4), %xmm7 movaps %xmm12, %xmm3 unpcklps %xmm8, %xmm3 # xmm3 = xmm3[0],xmm8[0],xmm3[1],xmm8[1] unpckhps %xmm8, %xmm12 # xmm12 = xmm12[2],xmm8[2],xmm12[3],xmm8[3] movaps %xmm4, %xmm8 unpcklps %xmm9, %xmm8 # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1] unpckhps %xmm9, %xmm4 # xmm4 = xmm4[2],xmm9[2],xmm4[3],xmm9[3] unpcklps %xmm4, %xmm12 # xmm12 = xmm12[0],xmm4[0],xmm12[1],xmm4[1] movaps %xmm3, %xmm4 unpcklps %xmm8, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1] unpckhps %xmm8, %xmm3 # xmm3 = xmm3[2],xmm8[2],xmm3[3],xmm8[3] movaps %xmm0, %xmm8 unpcklps %xmm6, %xmm8 # xmm8 = xmm8[0],xmm6[0],xmm8[1],xmm6[1] unpckhps %xmm6, %xmm0 # xmm0 = xmm0[2],xmm6[2],xmm0[3],xmm6[3] movaps %xmm2, %xmm6 unpcklps %xmm10, %xmm6 # xmm6 = xmm6[0],xmm10[0],xmm6[1],xmm10[1] unpckhps %xmm10, %xmm2 # xmm2 = xmm2[2],xmm10[2],xmm2[3],xmm10[3] unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] movaps %xmm8, %xmm14 unpcklps %xmm6, %xmm14 # xmm14 = xmm14[0],xmm6[0],xmm14[1],xmm6[1] unpckhps %xmm6, %xmm8 # xmm8 = xmm8[2],xmm6[2],xmm8[3],xmm6[3] movaps %xmm11, %xmm10 unpcklps %xmm5, %xmm10 # xmm10 = xmm10[0],xmm5[0],xmm10[1],xmm5[1] unpckhps %xmm5, %xmm11 # xmm11 = xmm11[2],xmm5[2],xmm11[3],xmm5[3] movaps %xmm1, %xmm2 unpcklps %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1] unpckhps %xmm7, %xmm1 # xmm1 = xmm1[2],xmm7[2],xmm1[3],xmm7[3] unpcklps %xmm1, %xmm11 # xmm11 = xmm11[0],xmm1[0],xmm11[1],xmm1[1] movaps %xmm10, %xmm1 unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] unpckhps %xmm2, %xmm10 # xmm10 = xmm10[2],xmm2[2],xmm10[3],xmm2[3] movaps %xmm3, %xmm6 movaps %xmm8, 0x190(%rsp) subps %xmm8, %xmm6 movaps %xmm12, %xmm9 movaps %xmm0, 0xe0(%rsp) subps %xmm0, %xmm9 movaps %xmm1, 0x170(%rsp) subps %xmm4, %xmm1 movaps %xmm10, 0xd0(%rsp) movaps %xmm10, %xmm7 subps %xmm3, %xmm7 movaps %xmm11, 0x180(%rsp) movaps %xmm11, %xmm8 subps %xmm12, %xmm8 movaps %xmm12, %xmm0 movaps %xmm6, %xmm5 mulps %xmm8, %xmm5 movaps %xmm9, %xmm2 mulps %xmm7, %xmm2 subps %xmm5, %xmm2 movss (%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm4, %xmm10 subps %xmm5, %xmm4 movss 0x10(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] subps %xmm5, %xmm3 movss 0x40(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movaps %xmm3, %xmm5 mulps %xmm11, %xmm5 movaps %xmm4, %xmm13 mulps %xmm12, %xmm13 subps %xmm5, %xmm13 movaps %xmm14, 0x10(%rsp) subps %xmm14, %xmm10 movaps %xmm10, %xmm5 mulps %xmm8, %xmm5 mulps %xmm13, %xmm8 mulps %xmm9, %xmm13 mulps %xmm1, %xmm9 subps %xmm9, %xmm5 movss 0x20(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] subps %xmm9, %xmm0 movss 0x60(%rbx,%r14,4), %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movaps %xmm4, %xmm9 mulps %xmm14, %xmm9 movaps %xmm0, %xmm15 mulps %xmm11, %xmm15 subps %xmm9, %xmm15 movaps %xmm10, %xmm9 mulps %xmm7, %xmm9 mulps %xmm15, %xmm7 mulps %xmm6, %xmm15 mulps %xmm1, %xmm6 subps %xmm9, %xmm6 movaps %xmm0, 0xc0(%rsp) mulps %xmm12, %xmm0 movaps %xmm3, %xmm9 mulps %xmm14, %xmm9 subps %xmm0, %xmm9 mulps %xmm6, %xmm14 mulps %xmm5, %xmm12 addps %xmm14, %xmm12 mulps %xmm2, %xmm11 addps %xmm12, %xmm11 addps %xmm8, %xmm7 mulps %xmm9, %xmm1 addps %xmm7, %xmm1 addps %xmm13, %xmm15 xorps %xmm13, %xmm13 movaps 0x1d6445d(%rip), %xmm0 # 0x1eec6d0 mulps %xmm10, %xmm9 addps %xmm15, %xmm9 movaps 0x1d6443d(%rip), %xmm15 # 0x1eec6c0 movaps %xmm11, %xmm7 andps %xmm0, %xmm7 xorps %xmm7, %xmm1 xorps %xmm7, %xmm9 movaps %xmm1, %xmm0 cmpnltps %xmm13, %xmm0 movaps %xmm9, %xmm12 cmpnltps %xmm13, %xmm12 andps %xmm0, %xmm12 movaps %xmm11, %xmm8 cmpneqps %xmm13, %xmm11 andps %xmm11, %xmm12 andps %xmm15, %xmm8 movaps %xmm1, %xmm10 addps %xmm9, %xmm10 cmpleps %xmm8, %xmm10 andps %xmm12, %xmm10 leaq (%r12,%rax), %rax movq %rax, 0x130(%rsp) movl -0x20(%r15), %eax movl -0x1c(%r15), %r8d movl -0x18(%r15), %r9d movl -0x14(%r15), %r10d movmskps %xmm10, %r11d movups (%rcx,%rax,4), %xmm14 movups (%rdx,%r8,4), %xmm11 movups (%rsi,%r9,4), %xmm13 movups (%rdi,%r10,4), %xmm12 testl %r11d, %r11d jne 0x188515 movaps %xmm14, %xmm6 unpcklps %xmm13, %xmm6 # xmm6 = xmm6[0],xmm13[0],xmm6[1],xmm13[1] unpckhps %xmm13, %xmm14 # xmm14 = xmm14[2],xmm13[2],xmm14[3],xmm13[3] movaps %xmm11, %xmm1 unpcklps %xmm12, %xmm1 # xmm1 = xmm1[0],xmm12[0],xmm1[1],xmm12[1] unpckhps %xmm12, %xmm11 # xmm11 = xmm11[2],xmm12[2],xmm11[3],xmm12[3] unpcklps %xmm11, %xmm14 # xmm14 = xmm14[0],xmm11[0],xmm14[1],xmm11[1] movaps %xmm6, %xmm0 unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] unpckhps %xmm1, %xmm6 # xmm6 = xmm6[2],xmm1[2],xmm6[3],xmm1[3] movaps %xmm0, %xmm1 subps 0x170(%rsp), %xmm1 movaps %xmm1, %xmm5 movaps %xmm6, %xmm1 subps 0xd0(%rsp), %xmm1 movaps %xmm1, %xmm3 movaps %xmm14, %xmm8 subps 0x180(%rsp), %xmm8 movaps 0x10(%rsp), %xmm1 subps %xmm0, %xmm1 movaps 0x190(%rsp), %xmm4 subps %xmm6, %xmm4 movaps 0xe0(%rsp), %xmm15 subps %xmm14, %xmm15 movaps %xmm15, %xmm2 mulps %xmm3, %xmm2 movaps %xmm3, %xmm10 movaps %xmm3, 0xd0(%rsp) movaps %xmm4, %xmm7 mulps %xmm8, %xmm7 subps %xmm2, %xmm7 movaps %xmm1, %xmm3 mulps %xmm8, %xmm3 movaps %xmm15, %xmm2 movaps %xmm5, %xmm9 movaps %xmm5, 0x170(%rsp) mulps %xmm5, %xmm2 subps %xmm3, %xmm2 movaps %xmm4, %xmm5 mulps %xmm9, %xmm5 movaps %xmm1, %xmm3 mulps %xmm10, %xmm3 subps %xmm5, %xmm3 movss (%rbx,%r14,4), %xmm5 movss 0x10(%rbx,%r14,4), %xmm10 movss 0x20(%rbx,%r14,4), %xmm12 movss 0x40(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x50(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] subps %xmm5, %xmm0 subps %xmm10, %xmm6 subps %xmm12, %xmm14 movaps %xmm14, 0xc0(%rsp) movaps %xmm14, %xmm10 mulps %xmm11, %xmm10 movaps %xmm6, %xmm5 mulps %xmm13, %xmm5 subps %xmm10, %xmm5 movaps %xmm0, %xmm12 mulps %xmm13, %xmm12 movaps %xmm14, %xmm10 mulps %xmm9, %xmm10 subps %xmm12, %xmm10 movaps %xmm6, 0xe0(%rsp) mulps %xmm9, %xmm6 movaps %xmm0, 0x10(%rsp) mulps %xmm11, %xmm0 subps %xmm6, %xmm0 mulps %xmm3, %xmm13 mulps %xmm2, %xmm11 addps %xmm13, %xmm11 movaps 0x1d64265(%rip), %xmm13 # 0x1eec6d0 mulps %xmm7, %xmm9 addps %xmm11, %xmm9 mulps %xmm0, %xmm15 mulps %xmm10, %xmm4 addps %xmm15, %xmm4 mulps %xmm5, %xmm1 addps %xmm4, %xmm1 mulps %xmm8, %xmm0 mulps 0xd0(%rsp), %xmm10 addps %xmm0, %xmm10 movaps %xmm9, %xmm11 andps %xmm13, %xmm11 xorps %xmm8, %xmm8 xorps %xmm11, %xmm1 mulps 0x170(%rsp), %xmm5 addps %xmm10, %xmm5 xorps %xmm11, %xmm5 movaps %xmm1, %xmm6 cmpnltps %xmm8, %xmm6 movaps %xmm5, %xmm10 cmpnltps %xmm8, %xmm10 andps %xmm6, %xmm10 movaps %xmm9, %xmm6 andps 0x1d641ea(%rip), %xmm6 # 0x1eec6c0 cmpneqps %xmm8, %xmm9 andps %xmm9, %xmm10 movaps %xmm1, %xmm8 addps %xmm5, %xmm8 cmpleps %xmm6, %xmm8 andps %xmm10, %xmm8 movmskps %xmm8, %eax testl %eax, %eax jne 0x1889af incq %r13 cmpq 0x1b8(%rsp), %r13 setb %dl jne 0x187fef jmp 0x188e2d movaps 0xc0(%rsp), %xmm0 mulps %xmm6, %xmm0 mulps %xmm5, %xmm3 addps %xmm0, %xmm3 mulps %xmm2, %xmm4 addps %xmm3, %xmm4 xorps %xmm4, %xmm7 movss 0x30(%rbx,%r14,4), %xmm3 movss 0x80(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm8, %xmm3 cmpltps %xmm7, %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm8, %xmm4 movaps %xmm7, %xmm0 cmpleps %xmm4, %xmm0 andps %xmm3, %xmm0 andps %xmm10, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x188305 movaps %xmm1, 0x1c0(%rsp) movaps %xmm9, 0x1d0(%rsp) movaps %xmm7, 0x1e0(%rsp) movaps %xmm8, 0x1f0(%rsp) movaps %xmm2, 0x200(%rsp) movaps %xmm5, 0x210(%rsp) movaps %xmm6, 0x220(%rsp) movaps %xmm0, 0x230(%rsp) movdqa 0x380(%rsp), %xmm0 movdqa %xmm0, 0x2a0(%rsp) rcpps %xmm8, %xmm4 mulps %xmm4, %xmm8 movaps 0x1d6443f(%rip), %xmm10 # 0x1eeca10 movaps %xmm10, %xmm3 subps %xmm8, %xmm3 mulps %xmm4, %xmm3 addps %xmm4, %xmm3 mulps %xmm3, %xmm7 movaps %xmm7, 0x260(%rsp) mulps %xmm3, %xmm1 minps %xmm10, %xmm1 mulps %xmm9, %xmm3 minps %xmm10, %xmm3 movaps %xmm10, %xmm4 subps %xmm1, %xmm4 movaps %xmm10, %xmm7 subps %xmm3, %xmm7 blendvps %xmm0, %xmm4, %xmm1 movaps %xmm1, 0x240(%rsp) blendvps %xmm0, %xmm7, %xmm3 movaps %xmm3, 0x250(%rsp) movaps %xmm2, 0x270(%rsp) movaps %xmm5, 0x280(%rsp) movaps %xmm6, 0x290(%rsp) movzbl %al, %edi movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 movb 0x7(%rsp), %dl movq 0x138(%rsp), %rsi bsfq %rdi, %r8 movl (%r15,%r8,4), %ecx movq 0x1e8(%rsi), %rax movq (%rax,%rcx,8), %r9 movl 0x90(%rbx,%r14,4), %eax testl %eax, 0x34(%r9) je 0x1886be movq 0xb78(%rsp), %rax movq 0x10(%rax), %rax cmpq $0x0, 0x10(%rax) jne 0x1886d6 cmpq $0x0, 0x48(%r9) jne 0x1886d6 xorl %eax, %eax jmp 0x1886c4 btcq %r8, %rdi movb $0x1, %al testb %al, %al je 0x188eb5 testq %rdi, %rdi jne 0x18867f jmp 0x188305 movq %rdi, 0x30(%rsp) movaps %xmm13, 0x340(%rsp) movaps %xmm12, 0x350(%rsp) movaps %xmm11, 0x360(%rsp) movaps %xmm14, 0xc0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x3c(%rsp) movss 0x260(%rsp,%r8,4), %xmm0 movss 0x240(%rsp,%r8,4), %xmm1 movss 0x250(%rsp,%r8,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xb78(%rsp), %rax movq 0x8(%rax), %rax movd %ecx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movq 0x130(%rsp), %rcx movd 0x50(%rcx,%r8,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x270(%rsp,%r8,4), %xmm4 movss 0x280(%rsp,%r8,4), %xmm5 movq %r8, 0x1b0(%rsp) movss 0x290(%rsp,%r8,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x2b0(%rsp) movaps %xmm5, 0x2c0(%rsp) movaps %xmm6, 0x2d0(%rsp) movaps %xmm1, 0x2e0(%rsp) movaps %xmm2, 0x2f0(%rsp) movdqa %xmm3, 0x300(%rsp) movdqa %xmm0, 0x310(%rsp) leaq 0x320(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x320(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x330(%rsp) movq 0xf0(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0x20(%rsp) leaq 0x20(%rsp), %rcx movq %rcx, 0x140(%rsp) movq 0x18(%r9), %rcx movq %rcx, 0x148(%rsp) movq %rax, 0x150(%rsp) movq %rbx, 0x158(%rsp) leaq 0x2b0(%rsp), %rax movq %rax, 0x160(%rsp) movl $0x4, 0x168(%rsp) movq %r9, 0x1a8(%rsp) movq 0x48(%r9), %rax testq %rax, %rax je 0x18887f leaq 0x140(%rsp), %rdi callq *%rax movdqa 0x20(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x1888f9 movq 0xb78(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x1888be testb $0x2, (%rcx) jne 0x1888b4 movq 0x1a8(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x1888be leaq 0x140(%rsp), %rdi callq *%rax movdqa 0x20(%rsp), %xmm0 pcmpeqd 0x1d63144(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d63548(%rip), %xmm1 # 0x1eebe20 movq 0x158(%rsp), %rax movaps 0x1d63119(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x188909 pcmpeqd 0x1d6310f(%rip), %xmm1 # 0x1eeba10 pxor 0x1d63517(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x18893e movd 0x3c(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x30(%rsp), %rcx movq 0x1b0(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x30(%rsp) movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 movb 0x7(%rsp), %dl movq 0x138(%rsp), %rsi movaps 0xc0(%rsp), %xmm14 movaps 0x360(%rsp), %xmm11 movaps 0x350(%rsp), %xmm12 movaps 0x340(%rsp), %xmm13 movq 0x30(%rsp), %rdi jmp 0x1886c4 movaps %xmm1, %xmm10 movaps 0xc0(%rsp), %xmm0 mulps %xmm3, %xmm0 movaps 0xe0(%rsp), %xmm1 mulps %xmm2, %xmm1 addps %xmm0, %xmm1 movaps 0x10(%rsp), %xmm0 mulps %xmm7, %xmm0 addps %xmm1, %xmm0 xorps %xmm0, %xmm11 movss 0x30(%rbx,%r14,4), %xmm4 movss 0x80(%rbx,%r14,4), %xmm9 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm6, %xmm4 cmpltps %xmm11, %xmm4 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm6, %xmm9 movaps %xmm11, %xmm0 cmpleps %xmm9, %xmm0 andps %xmm4, %xmm0 andps %xmm8, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1884fc movaps %xmm10, 0x1c0(%rsp) movaps %xmm5, 0x1d0(%rsp) movaps %xmm11, 0x1e0(%rsp) movaps %xmm6, 0x1f0(%rsp) movaps %xmm7, 0x200(%rsp) movaps %xmm2, 0x210(%rsp) movaps %xmm3, 0x220(%rsp) movaps %xmm0, 0x230(%rsp) movdqa 0x370(%rsp), %xmm0 movdqa %xmm0, 0x2a0(%rsp) movq 0xb78(%rsp), %rcx movq (%rcx), %rsi rcpps %xmm6, %xmm8 mulps %xmm8, %xmm6 movaps 0x1d63f85(%rip), %xmm9 # 0x1eeca10 movaps %xmm9, %xmm4 subps %xmm6, %xmm4 mulps %xmm8, %xmm4 addps %xmm8, %xmm4 mulps %xmm4, %xmm11 movaps %xmm11, 0x260(%rsp) mulps %xmm4, %xmm10 minps %xmm9, %xmm10 mulps %xmm5, %xmm4 minps %xmm9, %xmm4 movaps %xmm9, %xmm5 subps %xmm10, %xmm5 movaps %xmm9, %xmm6 subps %xmm4, %xmm6 blendvps %xmm0, %xmm5, %xmm10 movaps %xmm10, 0x240(%rsp) blendvps %xmm0, %xmm6, %xmm4 movaps %xmm4, 0x250(%rsp) movaps %xmm7, 0x270(%rsp) movaps %xmm2, 0x280(%rsp) movaps %xmm3, 0x290(%rsp) movzbl %al, %edi movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 movb 0x7(%rsp), %dl bsfq %rdi, %r8 movl (%r15,%r8,4), %ecx movq 0x1e8(%rsi), %rax movq (%rax,%rcx,8), %r9 movl 0x90(%rbx,%r14,4), %eax testl %eax, 0x34(%r9) je 0x188b76 movq 0xb78(%rsp), %rax movq 0x10(%rax), %rax cmpq $0x0, 0x10(%rax) jne 0x188b8e cmpq $0x0, 0x48(%r9) jne 0x188b8e xorl %eax, %eax jmp 0x188b7c btcq %r8, %rdi movb $0x1, %al testb %al, %al je 0x188eb5 testq %rdi, %rdi jne 0x188b37 jmp 0x1884fc movq %rdi, 0x10(%rsp) movq %rsi, 0xe0(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x180(%rsp) movss 0x260(%rsp,%r8,4), %xmm0 movss 0x240(%rsp,%r8,4), %xmm1 movss 0x250(%rsp,%r8,4), %xmm2 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xb78(%rsp), %rax movq 0x8(%rax), %rax movd %ecx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movq 0x130(%rsp), %rcx movd 0x50(%rcx,%r8,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x270(%rsp,%r8,4), %xmm4 movss 0x280(%rsp,%r8,4), %xmm5 movq %r8, 0x190(%rsp) movss 0x290(%rsp,%r8,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x2b0(%rsp) movaps %xmm5, 0x2c0(%rsp) movaps %xmm6, 0x2d0(%rsp) movaps %xmm1, 0x2e0(%rsp) movaps %xmm2, 0x2f0(%rsp) movdqa %xmm3, 0x300(%rsp) movdqa %xmm0, 0x310(%rsp) leaq 0x320(%rsp), %rcx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rcx) movdqa %xmm0, (%rcx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x320(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x330(%rsp) movq 0xf0(%rsp), %rcx movdqa (%rcx), %xmm0 movdqa %xmm0, 0x20(%rsp) leaq 0x20(%rsp), %rcx movq %rcx, 0x140(%rsp) movq 0x18(%r9), %rcx movq %rcx, 0x148(%rsp) movq %rax, 0x150(%rsp) movq %rbx, 0x158(%rsp) leaq 0x2b0(%rsp), %rax movq %rax, 0x160(%rsp) movl $0x4, 0x168(%rsp) movq %r9, 0xd0(%rsp) movq 0x48(%r9), %rax testq %rax, %rax je 0x188d1e leaq 0x140(%rsp), %rdi callq *%rax movdqa 0x20(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x188d98 movq 0xb78(%rsp), %rax movq 0x10(%rax), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x188d5d testb $0x2, (%rcx) jne 0x188d53 movq 0xd0(%rsp), %rcx testb $0x40, 0x3e(%rcx) je 0x188d5d leaq 0x140(%rsp), %rdi callq *%rax movdqa 0x20(%rsp), %xmm0 pcmpeqd 0x1d62ca5(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d630a9(%rip), %xmm1 # 0x1eebe20 movq 0x158(%rsp), %rax movaps 0x1d62c7a(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x188da8 pcmpeqd 0x1d62c70(%rip), %xmm1 # 0x1eeba10 pxor 0x1d63078(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al jne 0x188de0 movd 0x180(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) movq 0x10(%rsp), %rcx movq 0x190(%rsp), %rdx btcq %rdx, %rcx movq %rcx, 0x10(%rsp) movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 movb 0x7(%rsp), %dl movq 0xe0(%rsp), %rsi movq 0x10(%rsp), %rdi jmp 0x188b7c movaps 0xb0(%rsp), %xmm3 movaps 0xa0(%rsp), %xmm4 movaps 0x90(%rsp), %xmm5 movaps 0x80(%rsp), %xmm6 movq 0x128(%rsp), %rsi movaps 0x70(%rsp), %xmm7 movaps 0x60(%rsp), %xmm8 movq 0x120(%rsp), %rdi movq 0x118(%rsp), %r8 movq 0x110(%rsp), %r9 movq 0x108(%rsp), %r10 movq 0x100(%rsp), %r11 movq 0xf8(%rsp), %r15 movaps 0x50(%rsp), %xmm9 movaps 0x40(%rsp), %xmm10 leaq 0x390(%rsp), %r13 movq 0x8(%rsp), %rcx xorl %eax, %eax testb $0x3, %al je 0x187ea7 jmp 0x188f12 xorl %eax, %eax testb $0x1, %dl movq 0x128(%rsp), %rsi movq 0x120(%rsp), %rdi movq 0x118(%rsp), %r8 movq 0x110(%rsp), %r9 movq 0x108(%rsp), %r10 movq 0x100(%rsp), %r11 movq 0xf8(%rsp), %r15 leaq 0x390(%rsp), %r13 movq 0x8(%rsp), %rcx je 0x188eab movl $0xff800000, 0x80(%rbx,%r14,4) # imm = 0xFF800000 pushq $0x1 popq %rax jmp 0x188eab cmpq %r13, %rcx setne %al addq $0xb38, %rsp # imm = 0xB38 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMvIntersectorKPluecker<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKPluecker<4, 4, true>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1308, %rsp # imm = 0x1308 movq %r9, %rbx movq %rcx, %r14 movq 0x1348(%rsp), %r10 movq 0x1340(%rsp), %rax leaq 0x3d0(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm11 movss 0x70(%rax,%rcx,4), %xmm12 movss 0x80(%rax,%rcx,4), %xmm13 movss 0x1d952c4(%rip), %xmm14 # 0x1f1ff10 movaps %xmm11, %xmm15 mulss %xmm14, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm12, %xmm6 mulss %xmm14, %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x1d9529b(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulss %xmm0, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %rsi movslq 0xa0(%rax,%rcx,4), %rdi movslq 0xb0(%rax,%rcx,4), %r8 movq %rsi, %r12 xorq $0x10, %r12 movq %rdi, %rcx xorq $0x10, %rcx movq %rcx, 0x260(%rsp) movq %r8, %rcx xorq $0x10, %rcx movq %rcx, 0x258(%rsp) movss 0xc0(%rax,%r14,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] leaq 0x1fc5289(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x3b0(%rsp) pushq $0x1 popq %rdx movl %r14d, %ecx shll %cl, %edx movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x3a0(%rsp) movslq %edx, %rcx shlq $0x4, %rcx addq %rax, %rcx movq %rcx, 0xd8(%rsp) movq %rsi, 0x18(%rsp) movq %rdi, 0x10(%rsp) movq %r8, 0x8(%rsp) movaps %xmm8, 0x390(%rsp) movaps %xmm9, 0x380(%rsp) movaps %xmm10, 0x370(%rsp) movaps %xmm11, 0x360(%rsp) movaps %xmm12, 0x350(%rsp) movaps %xmm13, 0x340(%rsp) movaps %xmm14, 0x330(%rsp) movaps %xmm15, 0x320(%rsp) movaps %xmm6, 0x280(%rsp) movq %r12, 0x250(%rsp) movaps %xmm7, 0x270(%rsp) leaq 0x3c0(%rsp), %rax cmpq %rax, %r11 je 0x18c552 movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x18ad9a movq (%r11), %r15 testb $0x8, %r15b movq 0x268(%rsp), %rax jne 0x18ae59 movaps 0x20(%r15,%rsi), %xmm0 subps %xmm8, %xmm0 mulps %xmm15, %xmm0 movaps 0x20(%r15,%rdi), %xmm2 subps %xmm9, %xmm2 mulps %xmm6, %xmm2 maxps %xmm2, %xmm0 movaps 0x20(%r15,%r8), %xmm2 subps %xmm10, %xmm2 mulps %xmm14, %xmm2 maxps %xmm7, %xmm2 maxps %xmm2, %xmm0 movaps 0x20(%r15,%r12), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movq 0x260(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 minps %xmm3, %xmm2 movq 0x258(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm1, %xmm3 minps %xmm3, %xmm2 movaps %xmm0, 0xf0(%rsp) cmpleps %xmm2, %xmm0 movmskps %xmm0, %eax testb $0x8, %r15b movq %rax, 0x268(%rsp) jne 0x18ae9d testq %rax, %rax je 0x18aea1 andq $-0x10, %r15 bsfq %rax, %rcx leaq -0x1(%rax), %r9 movq %rax, %r13 xorl %eax, %eax movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %r13, %r9 jne 0x18aea6 movq %rdx, %r15 testl %eax, %eax je 0x18adc3 jmp 0x18b072 pushq $0x6 jmp 0x18aea3 pushq $0x4 popq %rax jmp 0x18ae90 movl 0xf0(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%r15,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0xf0(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x18af03 leaq 0x10(%r11), %rcx cmpl %r8d, %edi jae 0x18aee5 movq %rsi, (%r11) movl %r8d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %r15 jmp 0x18aef2 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %r15 movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdi movq 0x8(%rsp), %r8 jmp 0x18ae90 movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%r15,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0xf0(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x18afac pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm5, %r15 addq $0x20, %r11 jmp 0x18aef2 bsfq %rdx, %rcx movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0xf0(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps 0x270(%rsp), %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps 0x280(%rsp), %xmm6 movaps %xmm2, (%r11) movaps %xmm4, 0x10(%r11) movaps %xmm5, 0x20(%r11) movq %xmm3, %r15 addq $0x30, %r11 jmp 0x18aef2 cmpl $0x6, %eax jne 0x18ad9a movl %r15d, %edx andl $0xf, %edx addq $-0x8, %rdx je 0x18c4df andq $-0x10, %r15 xorl %r9d, %r9d imulq $0xe0, %r9, %rax movaps 0xd0(%r15,%rax), %xmm0 movaps %xmm0, 0xe0(%rsp) movss (%rbx,%r14,4), %xmm3 movss 0x10(%rbx,%r14,4), %xmm1 movss 0x20(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps (%r15,%rax), %xmm15 movaps 0x10(%r15,%rax), %xmm13 movaps 0x20(%r15,%rax), %xmm12 movaps 0x30(%r15,%rax), %xmm0 subps %xmm3, %xmm15 subps %xmm1, %xmm13 subps %xmm4, %xmm12 subps %xmm3, %xmm0 movaps %xmm0, %xmm14 movaps %xmm0, 0x20(%rsp) movaps 0x40(%r15,%rax), %xmm2 subps %xmm1, %xmm2 movaps 0x50(%r15,%rax), %xmm0 subps %xmm4, %xmm0 movaps %xmm0, 0x40(%rsp) movaps 0x90(%r15,%rax), %xmm10 subps %xmm3, %xmm10 movaps 0xa0(%r15,%rax), %xmm3 subps %xmm1, %xmm3 movaps 0xb0(%r15,%rax), %xmm1 subps %xmm4, %xmm1 movaps %xmm10, %xmm7 subps %xmm15, %xmm7 movaps %xmm3, %xmm11 subps %xmm13, %xmm11 movaps %xmm1, %xmm9 subps %xmm12, %xmm9 movaps %xmm13, %xmm4 addps %xmm3, %xmm4 movaps %xmm12, %xmm5 addps %xmm1, %xmm5 movaps %xmm7, %xmm6 mulps %xmm4, %xmm6 mulps %xmm9, %xmm4 movaps %xmm11, %xmm8 mulps %xmm5, %xmm8 subps %xmm4, %xmm8 movaps %xmm15, %xmm4 addps %xmm10, %xmm4 movaps %xmm7, 0xc0(%rsp) mulps %xmm7, %xmm5 movaps %xmm4, %xmm7 movaps %xmm9, 0x220(%rsp) mulps %xmm9, %xmm7 subps %xmm5, %xmm7 movaps %xmm11, 0x210(%rsp) mulps %xmm11, %xmm4 subps %xmm4, %xmm6 movss 0x50(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulps %xmm11, %xmm6 mulps %xmm5, %xmm7 addps %xmm6, %xmm7 movss 0x40(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x30(%rsp) mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movaps %xmm15, %xmm9 subps %xmm14, %xmm9 movaps %xmm13, %xmm4 subps %xmm2, %xmm4 movaps %xmm12, %xmm14 movaps 0x40(%rsp), %xmm0 subps %xmm0, %xmm14 movaps %xmm13, 0x240(%rsp) movaps %xmm13, %xmm6 addps %xmm2, %xmm6 movaps %xmm12, 0x230(%rsp) movaps %xmm12, %xmm7 addps %xmm0, %xmm7 movaps %xmm9, %xmm13 mulps %xmm6, %xmm13 mulps %xmm14, %xmm6 movaps %xmm4, %xmm12 mulps %xmm7, %xmm12 subps %xmm6, %xmm12 movaps %xmm15, 0x70(%rsp) movaps 0x20(%rsp), %xmm0 addps %xmm0, %xmm15 mulps %xmm9, %xmm7 movaps %xmm15, %xmm6 mulps %xmm14, %xmm6 subps %xmm7, %xmm6 mulps %xmm4, %xmm15 subps %xmm15, %xmm13 mulps %xmm11, %xmm13 mulps %xmm5, %xmm6 addps %xmm13, %xmm6 mulps 0x30(%rsp), %xmm12 addps %xmm6, %xmm12 movaps %xmm0, %xmm7 subps %xmm10, %xmm7 addps %xmm0, %xmm10 movaps %xmm2, %xmm15 subps %xmm3, %xmm15 addps %xmm2, %xmm3 movaps 0x40(%rsp), %xmm2 movaps %xmm2, %xmm13 subps %xmm1, %xmm13 addps %xmm2, %xmm1 movaps %xmm7, %xmm6 mulps %xmm3, %xmm6 mulps %xmm13, %xmm3 movaps %xmm15, %xmm2 mulps %xmm1, %xmm2 subps %xmm3, %xmm2 mulps %xmm7, %xmm1 movaps %xmm10, %xmm3 mulps %xmm13, %xmm3 subps %xmm1, %xmm3 mulps %xmm15, %xmm10 subps %xmm10, %xmm6 movaps %xmm11, 0x20(%rsp) mulps %xmm11, %xmm6 movaps 0x30(%rsp), %xmm11 movaps %xmm5, 0x40(%rsp) mulps %xmm5, %xmm3 movaps %xmm8, %xmm1 addps %xmm6, %xmm3 mulps %xmm11, %xmm2 addps %xmm3, %xmm2 movaps %xmm12, %xmm8 addps %xmm1, %xmm8 addps %xmm2, %xmm8 movaps %xmm1, %xmm0 minps %xmm12, %xmm0 minps %xmm2, %xmm0 movaps %xmm1, 0x1d0(%rsp) movaps %xmm1, %xmm3 movaps %xmm12, 0x1f0(%rsp) maxps %xmm12, %xmm3 maxps %xmm2, %xmm3 movaps %xmm8, 0x1e0(%rsp) andps 0x1d61399(%rip), %xmm8 # 0x1eec6c0 movaps %xmm8, %xmm1 mulps 0x1d66a3e(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm3 xorps 0x1d61393(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm3 leaq (%r15,%rax), %r12 movmskps %xmm3, %eax testl %eax, %eax je 0x18bac0 movaps %xmm4, %xmm0 movaps 0x220(%rsp), %xmm12 mulps %xmm12, %xmm0 movaps %xmm14, %xmm2 movaps %xmm13, %xmm5 movaps 0xc0(%rsp), %xmm13 mulps %xmm13, %xmm2 movaps %xmm9, %xmm1 movaps 0x210(%rsp), %xmm10 mulps %xmm10, %xmm1 movaps %xmm7, 0x200(%rsp) movaps %xmm14, %xmm7 mulps %xmm15, %xmm7 mulps %xmm14, %xmm10 subps %xmm0, %xmm10 mulps %xmm4, %xmm13 movaps %xmm4, %xmm6 mulps %xmm5, %xmm4 subps %xmm7, %xmm4 movaps %xmm15, 0xc0(%rsp) movaps 0x1d61301(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 andps %xmm15, %xmm7 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm10, %xmm4 movaps %xmm9, %xmm0 mulps %xmm5, %xmm0 mulps %xmm9, %xmm12 subps %xmm2, %xmm12 movaps 0x200(%rsp), %xmm7 mulps %xmm7, %xmm14 subps %xmm0, %xmm14 andps %xmm15, %xmm2 andps %xmm15, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm12, %xmm14 mulps %xmm7, %xmm6 mulps 0xc0(%rsp), %xmm9 subps %xmm1, %xmm13 subps %xmm6, %xmm9 andps %xmm15, %xmm1 andps %xmm15, %xmm6 cmpltps %xmm6, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm9 movaps 0x20(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x40(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 mulps %xmm4, %xmm11 addps %xmm0, %xmm11 addps %xmm11, %xmm11 movaps 0x230(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x240(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 movaps 0x70(%rsp), %xmm6 mulps %xmm4, %xmm6 addps %xmm0, %xmm6 rcpps %xmm11, %xmm0 movaps %xmm11, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d61589(%rip), %xmm7 # 0x1eeca10 subps %xmm1, %xmm7 addps %xmm6, %xmm6 mulps %xmm0, %xmm7 addps %xmm0, %xmm7 mulps %xmm6, %xmm7 movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm7, %xmm1 cmpleps %xmm0, %xmm1 movss 0x30(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] cmpleps %xmm7, %xmm0 andps %xmm0, %xmm1 andps %xmm3, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18bac0 cmpneqps 0x1d6053c(%rip), %xmm11 # 0x1eeba10 andps %xmm11, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18bac0 movaps 0x1d0(%rsp), %xmm5 movaps %xmm5, 0xf0(%rsp) movaps 0x1f0(%rsp), %xmm11 movaps %xmm11, 0x100(%rsp) movaps 0x1e0(%rsp), %xmm10 movaps %xmm10, 0x110(%rsp) movaps %xmm4, 0x120(%rsp) movaps %xmm14, 0x130(%rsp) movaps %xmm9, 0x140(%rsp) movaps %xmm1, 0x150(%rsp) movaps %xmm7, 0x180(%rsp) movaps 0x3b0(%rsp), %xmm0 movaps %xmm0, 0x1c0(%rsp) movq (%r10), %rcx movaps %xmm1, 0x50(%rsp) rcpps %xmm10, %xmm3 mulps %xmm3, %xmm10 movaps 0x1d614a8(%rip), %xmm6 # 0x1eeca10 movaps %xmm6, %xmm2 subps %xmm10, %xmm2 mulps %xmm3, %xmm2 addps %xmm3, %xmm2 cmpnltps 0x1d667c2(%rip), %xmm8 # 0x1ef1d40 andps %xmm2, %xmm8 mulps %xmm8, %xmm5 minps %xmm6, %xmm5 mulps %xmm11, %xmm8 minps %xmm6, %xmm8 movaps %xmm6, %xmm2 subps %xmm5, %xmm2 movaps %xmm6, %xmm3 subps %xmm8, %xmm3 blendvps %xmm0, %xmm2, %xmm5 movaps %xmm5, 0x160(%rsp) blendvps %xmm0, %xmm3, %xmm8 movaps %xmm8, 0x170(%rsp) movaps %xmm4, 0x190(%rsp) movaps %xmm14, 0x1a0(%rsp) movaps %xmm9, 0x1b0(%rsp) movaps 0x1d60415(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x18b608 movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %r13 movq %rcx, 0x30(%rsp) movl 0xc0(%r12,%r13,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %rbp movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%rbp) je 0x18b961 movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x18b64e cmpq $0x0, 0x40(%rbp) je 0x18ba13 movss 0x160(%rsp,%r13,4), %xmm0 movss 0x170(%rsp,%r13,4), %xmm1 movss 0x190(%rsp,%r13,4), %xmm2 movss 0x1a0(%rsp,%r13,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xe0(%rsp,%r13,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1b0(%rsp,%r13,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x290(%rsp) movaps %xmm3, 0x2a0(%rsp) movaps %xmm6, 0x2b0(%rsp) movaps %xmm0, 0x2c0(%rsp) movaps %xmm1, 0x2d0(%rsp) movdqa %xmm5, 0x2e0(%rsp) movdqa %xmm4, 0x2f0(%rsp) leaq 0x300(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x300(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x310(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x70(%rsp) movss 0x180(%rsp,%r13,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xd8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x80(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x18(%rbp), %rax movq %rax, 0x98(%rsp) movq 0x8(%r10), %rax movq %rax, 0xa0(%rsp) movq %rbx, 0xa8(%rsp) leaq 0x290(%rsp), %rax movq %rax, 0xb0(%rsp) movl $0x4, 0xb8(%rsp) movq 0x40(%rbp), %rax testq %rax, %rax movq %rdx, 0x68(%rsp) movq %r9, 0x60(%rsp) movaps %xmm7, 0x20(%rsp) je 0x18b7fa leaq 0x90(%rsp), %rdi movq %r11, 0x40(%rsp) callq *%rax movaps 0x20(%rsp), %xmm7 movq 0x60(%rsp), %r9 movq 0x68(%rsp), %rdx movq 0x8(%rsp), %r8 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x40(%rsp), %r11 movq 0x1348(%rsp), %r10 movdqa 0x80(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x18b9b9 movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x18b85c testb $0x2, (%rcx) jne 0x18b826 testb $0x40, 0x3e(%rbp) je 0x18b85c leaq 0x90(%rsp), %rdi movq %r11, %rbp callq *%rax movaps 0x20(%rsp), %xmm7 movq 0x60(%rsp), %r9 movq 0x68(%rsp), %rdx movq 0x8(%rsp), %r8 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rbp, %r11 movq 0x1348(%rsp), %r10 movdqa 0x80(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d6019e(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d605a2(%rip), %xmm1 # 0x1eebe20 je 0x18b9c9 movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x18b9c9 andl $0x0, 0x50(%rsp,%r13,4) movq 0x30(%rsp), %rcx movaps 0x50(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x18bac0 movaps 0x1d6006d(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm7, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18b9ad movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r13 jmp 0x18b614 pcmpeqd 0x1d6004f(%rip), %xmm1 # 0x1eeba10 pxor 0x1d60457(%rip), %xmm1 # 0x1eebe20 ptest 0x1d6114e(%rip), %xmm1 # 0x1eecb20 movq 0x30(%rsp), %rcx jne 0x18b9e9 movd 0x70(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x50(%rsp,%r13,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm7, %xmm1 cmpleps %xmm0, %xmm1 andps 0x50(%rsp), %xmm1 movaps %xmm1, 0x50(%rsp) jmp 0x18b96c movss 0x160(%rsp,%r13,4), %xmm0 movss 0x170(%rsp,%r13,4), %xmm1 movss 0x180(%rsp,%r13,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x190(%rsp,%r13,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1a0(%rsp,%r13,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1b0(%rsp,%r13,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xe0(%rsp,%r13,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movss (%rbx,%r14,4), %xmm7 movss 0x10(%rbx,%r14,4), %xmm6 movss 0x20(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps 0x30(%r12), %xmm9 movaps 0x40(%r12), %xmm2 movaps 0x50(%r12), %xmm4 movaps 0x60(%r12), %xmm13 subps %xmm7, %xmm13 movaps 0x70(%r12), %xmm10 subps %xmm6, %xmm10 movaps 0x80(%r12), %xmm12 subps %xmm5, %xmm12 movaps 0x90(%r12), %xmm3 subps %xmm7, %xmm3 movaps 0xa0(%r12), %xmm14 subps %xmm6, %xmm14 movaps 0xb0(%r12), %xmm0 subps %xmm5, %xmm0 movaps %xmm0, 0x30(%rsp) subps %xmm7, %xmm9 subps %xmm6, %xmm2 subps %xmm5, %xmm4 movaps %xmm9, %xmm8 subps %xmm13, %xmm8 movaps %xmm2, %xmm15 subps %xmm10, %xmm15 movaps %xmm4, %xmm11 subps %xmm12, %xmm11 movaps %xmm10, %xmm5 addps %xmm2, %xmm5 movaps %xmm12, %xmm6 addps %xmm4, %xmm6 movaps %xmm8, %xmm7 mulps %xmm5, %xmm7 mulps %xmm11, %xmm5 movaps %xmm15, %xmm1 mulps %xmm6, %xmm1 subps %xmm5, %xmm1 movaps %xmm13, %xmm5 addps %xmm9, %xmm5 movaps %xmm8, 0xc0(%rsp) mulps %xmm8, %xmm6 movaps %xmm5, %xmm8 movaps %xmm11, 0x220(%rsp) mulps %xmm11, %xmm8 subps %xmm6, %xmm8 movaps %xmm15, 0x210(%rsp) mulps %xmm15, %xmm5 subps %xmm5, %xmm7 movss 0x50(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x40(%rsp) movss 0x60(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm5, %xmm7 mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movss 0x40(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm0, %xmm1 addps %xmm8, %xmm1 movaps %xmm13, %xmm8 subps %xmm3, %xmm8 movaps %xmm10, %xmm15 movaps %xmm14, %xmm7 movaps %xmm14, 0x20(%rsp) subps %xmm14, %xmm15 movaps %xmm12, %xmm14 movaps 0x30(%rsp), %xmm11 subps %xmm11, %xmm14 movaps %xmm10, 0x240(%rsp) movaps %xmm10, %xmm6 addps %xmm7, %xmm6 movaps %xmm12, 0x230(%rsp) movaps %xmm12, %xmm7 addps %xmm11, %xmm7 movaps %xmm0, %xmm11 movaps %xmm8, %xmm10 mulps %xmm6, %xmm10 mulps %xmm14, %xmm6 movaps %xmm15, %xmm12 mulps %xmm7, %xmm12 subps %xmm6, %xmm12 movaps %xmm13, 0x70(%rsp) movaps %xmm13, %xmm6 addps %xmm3, %xmm6 mulps %xmm8, %xmm7 movaps %xmm6, %xmm13 mulps %xmm14, %xmm13 subps %xmm7, %xmm13 mulps %xmm15, %xmm6 subps %xmm6, %xmm10 mulps %xmm5, %xmm10 movaps 0x40(%rsp), %xmm0 mulps %xmm0, %xmm13 addps %xmm10, %xmm13 mulps %xmm11, %xmm12 addps %xmm13, %xmm12 movaps %xmm3, %xmm7 subps %xmm9, %xmm7 addps %xmm3, %xmm9 movaps 0x20(%rsp), %xmm3 movaps %xmm3, %xmm10 subps %xmm2, %xmm10 addps %xmm3, %xmm2 movaps 0x30(%rsp), %xmm3 movaps %xmm3, %xmm13 subps %xmm4, %xmm13 addps %xmm3, %xmm4 movaps %xmm7, %xmm3 mulps %xmm2, %xmm3 mulps %xmm13, %xmm2 movaps %xmm10, %xmm6 mulps %xmm4, %xmm6 subps %xmm2, %xmm6 mulps %xmm7, %xmm4 movaps %xmm9, %xmm2 mulps %xmm13, %xmm2 subps %xmm4, %xmm2 mulps %xmm10, %xmm9 subps %xmm9, %xmm3 movaps %xmm5, 0x30(%rsp) mulps %xmm5, %xmm3 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 mulps %xmm11, %xmm6 addps %xmm2, %xmm6 movaps %xmm12, %xmm9 addps %xmm1, %xmm9 addps %xmm6, %xmm9 movaps %xmm1, %xmm0 minps %xmm12, %xmm0 minps %xmm6, %xmm0 movaps %xmm1, 0x1d0(%rsp) movaps %xmm1, %xmm3 movaps %xmm12, 0x1f0(%rsp) maxps %xmm12, %xmm3 maxps %xmm6, %xmm3 movaps %xmm9, 0x1e0(%rsp) andps 0x1d6097d(%rip), %xmm9 # 0x1eec6c0 movaps %xmm9, %xmm1 mulps 0x1d66022(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm3 xorps 0x1d60977(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm3 movmskps %xmm3, %eax testl %eax, %eax je 0x18c4d3 movaps %xmm15, %xmm0 movaps 0x220(%rsp), %xmm12 mulps %xmm12, %xmm0 movaps %xmm14, %xmm2 movaps %xmm13, %xmm5 movaps 0xc0(%rsp), %xmm13 mulps %xmm13, %xmm2 movaps %xmm8, %xmm1 movaps %xmm10, %xmm4 movaps %xmm10, 0x200(%rsp) movaps 0x210(%rsp), %xmm10 mulps %xmm10, %xmm1 movaps %xmm7, 0x20(%rsp) movaps %xmm14, %xmm7 mulps %xmm4, %xmm7 mulps %xmm14, %xmm10 subps %xmm0, %xmm10 mulps %xmm15, %xmm13 movaps %xmm15, %xmm6 mulps %xmm5, %xmm15 subps %xmm7, %xmm15 movaps 0x1d608e6(%rip), %xmm4 # 0x1eec6c0 andps %xmm4, %xmm0 andps %xmm4, %xmm7 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm10, %xmm15 movaps %xmm8, %xmm0 mulps %xmm5, %xmm0 mulps %xmm8, %xmm12 subps %xmm2, %xmm12 movaps 0x20(%rsp), %xmm7 mulps %xmm7, %xmm14 subps %xmm0, %xmm14 andps %xmm4, %xmm2 andps %xmm4, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm12, %xmm14 mulps %xmm7, %xmm6 mulps 0x200(%rsp), %xmm8 subps %xmm1, %xmm13 subps %xmm6, %xmm8 andps %xmm4, %xmm1 andps %xmm4, %xmm6 cmpltps %xmm6, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm8 movaps 0x30(%rsp), %xmm1 mulps %xmm8, %xmm1 movaps 0x40(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 mulps %xmm15, %xmm11 addps %xmm0, %xmm11 addps %xmm11, %xmm11 movaps 0x230(%rsp), %xmm1 mulps %xmm8, %xmm1 movaps 0x240(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 movaps 0x70(%rsp), %xmm4 mulps %xmm15, %xmm4 addps %xmm0, %xmm4 rcpps %xmm11, %xmm0 movaps %xmm11, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d60b76(%rip), %xmm7 # 0x1eeca10 subps %xmm1, %xmm7 addps %xmm4, %xmm4 mulps %xmm0, %xmm7 addps %xmm0, %xmm7 mulps %xmm4, %xmm7 movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm7, %xmm1 cmpleps %xmm0, %xmm1 movss 0x30(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] cmpleps %xmm7, %xmm0 andps %xmm0, %xmm1 andps %xmm3, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18c4d3 cmpneqps 0x1d5fb29(%rip), %xmm11 # 0x1eeba10 andps %xmm11, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18c4d3 movaps 0x1d0(%rsp), %xmm5 movaps %xmm5, 0xf0(%rsp) movaps 0x1f0(%rsp), %xmm6 movaps %xmm6, 0x100(%rsp) movaps 0x1e0(%rsp), %xmm10 movaps %xmm10, 0x110(%rsp) movaps %xmm15, 0x120(%rsp) movaps %xmm14, 0x130(%rsp) movaps %xmm8, 0x140(%rsp) movaps %xmm1, 0x150(%rsp) movaps %xmm7, 0x180(%rsp) movaps 0x3a0(%rsp), %xmm0 movaps %xmm0, 0x1c0(%rsp) movq (%r10), %rcx movaps %xmm1, 0x50(%rsp) rcpps %xmm10, %xmm3 mulps %xmm3, %xmm10 movaps 0x1d60a96(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm2 subps %xmm10, %xmm2 mulps %xmm3, %xmm2 addps %xmm3, %xmm2 cmpnltps 0x1d65db0(%rip), %xmm9 # 0x1ef1d40 andps %xmm2, %xmm9 mulps %xmm9, %xmm5 minps %xmm4, %xmm5 mulps %xmm6, %xmm9 minps %xmm4, %xmm9 movaps %xmm4, %xmm2 subps %xmm5, %xmm2 movaps %xmm4, %xmm3 subps %xmm9, %xmm3 blendvps %xmm0, %xmm2, %xmm5 movaps %xmm5, 0x160(%rsp) blendvps %xmm0, %xmm3, %xmm9 movaps %xmm9, 0x170(%rsp) movaps %xmm15, 0x190(%rsp) movaps %xmm14, 0x1a0(%rsp) movaps %xmm8, 0x1b0(%rsp) movaps 0x1d5fa02(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x18c01b movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %r13 movq %rcx, 0x30(%rsp) movl 0xc0(%r12,%r13,4), %eax movq 0x1e8(%rcx), %rcx movq (%rcx,%rax,8), %rbp movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%rbp) je 0x18c374 movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x18c061 cmpq $0x0, 0x40(%rbp) je 0x18c426 movss 0x160(%rsp,%r13,4), %xmm0 movss 0x170(%rsp,%r13,4), %xmm1 movss 0x190(%rsp,%r13,4), %xmm2 movss 0x1a0(%rsp,%r13,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0xe0(%rsp,%r13,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1b0(%rsp,%r13,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x290(%rsp) movaps %xmm3, 0x2a0(%rsp) movaps %xmm6, 0x2b0(%rsp) movaps %xmm0, 0x2c0(%rsp) movaps %xmm1, 0x2d0(%rsp) movdqa %xmm5, 0x2e0(%rsp) movdqa %xmm4, 0x2f0(%rsp) leaq 0x300(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x300(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x310(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0x70(%rsp) movss 0x180(%rsp,%r13,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xd8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x80(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x18(%rbp), %rax movq %rax, 0x98(%rsp) movq 0x8(%r10), %rax movq %rax, 0xa0(%rsp) movq %rbx, 0xa8(%rsp) leaq 0x290(%rsp), %rax movq %rax, 0xb0(%rsp) movl $0x4, 0xb8(%rsp) movq 0x40(%rbp), %rax testq %rax, %rax movq %rdx, 0x68(%rsp) movq %r9, 0x60(%rsp) movaps %xmm7, 0x20(%rsp) je 0x18c20d leaq 0x90(%rsp), %rdi movq %r11, 0x40(%rsp) callq *%rax movaps 0x20(%rsp), %xmm7 movq 0x60(%rsp), %r9 movq 0x68(%rsp), %rdx movq 0x8(%rsp), %r8 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x40(%rsp), %r11 movq 0x1348(%rsp), %r10 movdqa 0x80(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x18c3cc movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x18c26f testb $0x2, (%rcx) jne 0x18c239 testb $0x40, 0x3e(%rbp) je 0x18c26f leaq 0x90(%rsp), %rdi movq %r11, %rbp callq *%rax movaps 0x20(%rsp), %xmm7 movq 0x60(%rsp), %r9 movq 0x68(%rsp), %rdx movq 0x8(%rsp), %r8 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rbp, %r11 movq 0x1348(%rsp), %r10 movdqa 0x80(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d5f78b(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d5fb8f(%rip), %xmm1 # 0x1eebe20 je 0x18c3dc movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x18c3dc andl $0x0, 0x50(%rsp,%r13,4) movq 0x30(%rsp), %rcx movaps 0x50(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x18c4d3 movaps 0x1d5f65a(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm7, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18c3c0 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r13 jmp 0x18c027 pcmpeqd 0x1d5f63c(%rip), %xmm1 # 0x1eeba10 pxor 0x1d5fa44(%rip), %xmm1 # 0x1eebe20 ptest 0x1d6073b(%rip), %xmm1 # 0x1eecb20 movq 0x30(%rsp), %rcx jne 0x18c3fc movd 0x70(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x50(%rsp,%r13,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm7, %xmm1 cmpleps %xmm0, %xmm1 andps 0x50(%rsp), %xmm1 movaps %xmm1, 0x50(%rsp) jmp 0x18c37f movss 0x160(%rsp,%r13,4), %xmm0 movss 0x170(%rsp,%r13,4), %xmm1 movss 0x180(%rsp,%r13,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x190(%rsp,%r13,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1a0(%rsp,%r13,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1b0(%rsp,%r13,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0xe0(%rsp,%r13,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) incq %r9 cmpq %rdx, %r9 jne 0x18b092 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x390(%rsp), %xmm8 movaps 0x380(%rsp), %xmm9 movaps 0x370(%rsp), %xmm10 movaps 0x360(%rsp), %xmm11 movaps 0x350(%rsp), %xmm12 movaps 0x340(%rsp), %xmm13 movaps 0x330(%rsp), %xmm14 movaps 0x320(%rsp), %xmm15 movaps 0x280(%rsp), %xmm6 movq 0x250(%rsp), %r12 movaps 0x270(%rsp), %xmm7 jmp 0x18ad9a addq $0x1308, %rsp # imm = 0x1308 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMvIntersectorKPluecker<4, 4, true>>, true>::occluded1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKPluecker<4, 4, true>&, embree::RayK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed NodeRef* stackPtr = stack+1; // current stack pointer NodeRef* stackEnd = stack+stackSizeSingle; stack[0] = root; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = (NodeRef)*stackPtr; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(shadow.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(shadow.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) { ray.tfar[k] = neg_inf; return true; } if (unlikely(lazy_node)) { *stackPtr = lazy_node; stackPtr++; } } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xba8, %rsp # imm = 0xBA8 movq 0xbe8(%rsp), %rdi movq 0xbe0(%rsp), %rax leaq 0x408(%rsp), %r8 movq %rdx, -0x8(%r8) movss (%rax,%rcx,4), %xmm7 movss 0x10(%rax,%rcx,4), %xmm8 movss 0x20(%rax,%rcx,4), %xmm9 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm10 movss 0x70(%rax,%rcx,4), %xmm11 movss 0x80(%rax,%rcx,4), %xmm12 movss 0x1d91e6f(%rip), %xmm13 # 0x1f1ff10 movaps %xmm10, %xmm14 mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movaps %xmm11, %xmm15 mulss %xmm13, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] mulss %xmm12, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movss 0x1d91e45(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r10 movslq 0xa0(%rax,%rcx,4), %r11 movslq 0xb0(%rax,%rcx,4), %rsi movq %r10, %r15 xorq $0x10, %r15 movq %r11, %r13 xorq $0x10, %r13 movq %rsi, %rbp xorq $0x10, %rbp movss 0xc0(%rax,%rcx,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0xd0(%rax,%rcx,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] leaq 0x1fc1e45(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x3f0(%rsp) movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x3e0(%rsp) pushq $0x1 popq %rdx shll %cl, %edx movslq %edx, %rdx shlq $0x4, %rdx addq %rax, %rdx movq %rdx, 0x188(%rsp) movaps %xmm7, 0xf0(%rsp) movaps %xmm8, 0xe0(%rsp) movaps %xmm9, 0xd0(%rsp) movaps %xmm10, 0xc0(%rsp) movaps %xmm11, 0xb0(%rsp) movaps %xmm12, 0xa0(%rsp) movaps %xmm13, 0x90(%rsp) movaps %xmm14, 0x80(%rsp) movaps %xmm15, 0x70(%rsp) movq %r15, 0x148(%rsp) movq %r13, 0x140(%rsp) movq %rbp, 0x138(%rsp) movaps %xmm3, 0x110(%rsp) movaps %xmm4, 0x100(%rsp) movq %r8, %rdx leaq 0x400(%rsp), %rax cmpq %rax, %r8 je 0x18f6c4 leaq -0x8(%rdx), %r8 movq %rdx, 0x48(%rsp) movq -0x8(%rdx), %rbx testb $0x8, %bl jne 0x18e271 movaps 0x20(%rbx,%r10), %xmm0 subps %xmm7, %xmm0 mulps %xmm14, %xmm0 movaps 0x20(%rbx,%r11), %xmm1 subps %xmm8, %xmm1 mulps %xmm15, %xmm1 maxps %xmm1, %xmm0 movaps 0x20(%rbx,%rsi), %xmm1 subps %xmm9, %xmm1 mulps %xmm13, %xmm1 maxps %xmm3, %xmm1 maxps %xmm1, %xmm0 movaps 0x20(%rbx,%r15), %xmm1 subps %xmm7, %xmm1 mulps %xmm10, %xmm1 movaps 0x20(%rbx,%r13), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 minps %xmm2, %xmm1 movaps 0x20(%rbx,%rbp), %xmm2 subps %xmm9, %xmm2 mulps %xmm12, %xmm2 minps %xmm4, %xmm2 minps %xmm2, %xmm1 cmpleps %xmm1, %xmm0 movmskps %xmm0, %r12d testb $0x8, %bl jne 0x18e2a9 testq %r12, %r12 je 0x18e2ad andq $-0x10, %rbx bsfq %r12, %rax leaq -0x1(%r12), %rdx xorl %r14d, %r14d movq (%rbx,%rax,8), %rax prefetcht0 (%rax) prefetcht0 0x40(%rax) andq %r12, %rdx jne 0x18e2b3 movq %rax, %rbx testl %r14d, %r14d je 0x18e202 jmp 0x18e2f1 pushq $0x6 jmp 0x18e2af pushq $0x4 popq %r14 jmp 0x18e29e movq %rsi, %r14 movq %rax, (%r8) addq $0x8, %r8 bsfq %rdx, %rsi leaq -0x1(%rdx), %rax movq (%rbx,%rsi,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) andq %rdx, %rax je 0x18e2e6 movq %rsi, (%r8) addq $0x8, %r8 bsfq %rax, %rsi leaq -0x1(%rax), %rdx jmp 0x18e2c5 movq %rsi, %rbx movq %r14, %rsi xorl %r14d, %r14d jmp 0x18e29e cmpl $0x6, %r14d jne 0x18f67d movl %ebx, %eax andl $0xf, %eax xorl %r14d, %r14d addq $-0x8, %rax setne 0xf(%rsp) je 0x18f67d andq $-0x10, %rbx xorl %edx, %edx movq %rax, 0x258(%rsp) imulq $0xe0, %rdx, %rax movaps 0xd0(%rbx,%rax), %xmm0 movaps %xmm0, 0x260(%rsp) movss (%r9,%rcx,4), %xmm3 movss 0x10(%r9,%rcx,4), %xmm1 movss 0x20(%r9,%rcx,4), %xmm4 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps (%rbx,%rax), %xmm15 movaps 0x10(%rbx,%rax), %xmm13 movaps 0x20(%rbx,%rax), %xmm12 movaps 0x30(%rbx,%rax), %xmm0 subps %xmm3, %xmm15 subps %xmm1, %xmm13 subps %xmm4, %xmm12 subps %xmm3, %xmm0 movaps %xmm0, %xmm14 movaps %xmm0, 0x60(%rsp) movaps 0x40(%rbx,%rax), %xmm2 subps %xmm1, %xmm2 movaps 0x50(%rbx,%rax), %xmm0 subps %xmm4, %xmm0 movaps %xmm0, 0x150(%rsp) movaps 0x90(%rbx,%rax), %xmm10 subps %xmm3, %xmm10 movaps 0xa0(%rbx,%rax), %xmm3 subps %xmm1, %xmm3 movaps 0xb0(%rbx,%rax), %xmm1 subps %xmm4, %xmm1 movaps %xmm10, %xmm7 subps %xmm15, %xmm7 movaps %xmm3, %xmm11 subps %xmm13, %xmm11 movaps %xmm1, %xmm9 subps %xmm12, %xmm9 movaps %xmm13, %xmm4 addps %xmm3, %xmm4 movaps %xmm12, %xmm5 addps %xmm1, %xmm5 movaps %xmm7, %xmm6 mulps %xmm4, %xmm6 mulps %xmm9, %xmm4 movaps %xmm11, %xmm8 mulps %xmm5, %xmm8 subps %xmm4, %xmm8 movaps %xmm15, %xmm4 addps %xmm10, %xmm4 movaps %xmm7, 0x160(%rsp) mulps %xmm7, %xmm5 movaps %xmm4, %xmm7 movaps %xmm9, 0x230(%rsp) mulps %xmm9, %xmm7 subps %xmm5, %xmm7 movaps %xmm11, 0x220(%rsp) mulps %xmm11, %xmm4 subps %xmm4, %xmm6 movss 0x50(%r9,%rcx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movss 0x60(%r9,%rcx,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulps %xmm11, %xmm6 mulps %xmm5, %xmm7 addps %xmm6, %xmm7 movss 0x40(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x10(%rsp) mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movaps %xmm15, %xmm9 subps %xmm14, %xmm9 movaps %xmm13, %xmm4 subps %xmm2, %xmm4 movaps %xmm12, %xmm14 movaps 0x150(%rsp), %xmm0 subps %xmm0, %xmm14 movaps %xmm13, 0x170(%rsp) movaps %xmm13, %xmm6 addps %xmm2, %xmm6 movaps %xmm12, 0x240(%rsp) movaps %xmm12, %xmm7 addps %xmm0, %xmm7 movaps %xmm9, %xmm13 mulps %xmm6, %xmm13 mulps %xmm14, %xmm6 movaps %xmm4, %xmm12 mulps %xmm7, %xmm12 subps %xmm6, %xmm12 movaps %xmm15, 0x50(%rsp) movaps 0x60(%rsp), %xmm0 addps %xmm0, %xmm15 mulps %xmm9, %xmm7 movaps %xmm15, %xmm6 mulps %xmm14, %xmm6 subps %xmm7, %xmm6 mulps %xmm4, %xmm15 subps %xmm15, %xmm13 mulps %xmm11, %xmm13 mulps %xmm5, %xmm6 addps %xmm13, %xmm6 mulps 0x10(%rsp), %xmm12 addps %xmm6, %xmm12 movaps %xmm0, %xmm7 subps %xmm10, %xmm7 addps %xmm0, %xmm10 movaps %xmm2, %xmm15 subps %xmm3, %xmm15 addps %xmm2, %xmm3 movaps 0x150(%rsp), %xmm2 movaps %xmm2, %xmm13 subps %xmm1, %xmm13 addps %xmm2, %xmm1 movaps %xmm7, %xmm6 mulps %xmm3, %xmm6 mulps %xmm13, %xmm3 movaps %xmm15, %xmm2 mulps %xmm1, %xmm2 subps %xmm3, %xmm2 mulps %xmm7, %xmm1 movaps %xmm10, %xmm3 mulps %xmm13, %xmm3 subps %xmm1, %xmm3 mulps %xmm15, %xmm10 subps %xmm10, %xmm6 movaps %xmm11, 0x200(%rsp) mulps %xmm11, %xmm6 movaps 0x10(%rsp), %xmm11 movaps %xmm5, 0x210(%rsp) mulps %xmm5, %xmm3 movaps %xmm8, %xmm1 addps %xmm6, %xmm3 mulps %xmm11, %xmm2 addps %xmm3, %xmm2 movaps %xmm12, %xmm8 addps %xmm1, %xmm8 addps %xmm2, %xmm8 movaps %xmm1, %xmm0 minps %xmm12, %xmm0 minps %xmm2, %xmm0 movaps %xmm1, 0x1c0(%rsp) movaps %xmm1, %xmm3 movaps %xmm12, 0x1e0(%rsp) maxps %xmm12, %xmm3 maxps %xmm2, %xmm3 movaps %xmm8, 0x1d0(%rsp) andps 0x1d5e102(%rip), %xmm8 # 0x1eec6c0 movaps %xmm8, %xmm1 mulps 0x1d637a7(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm3 xorps 0x1d5e0fc(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm3 addq %rbx, %rax movq %rax, 0x150(%rsp) movmskps %xmm3, %eax testl %eax, %eax movq %rdx, 0x60(%rsp) je 0x18eca5 movaps %xmm4, %xmm0 movaps 0x230(%rsp), %xmm12 mulps %xmm12, %xmm0 movaps %xmm14, %xmm2 movaps %xmm13, %xmm5 movaps 0x160(%rsp), %xmm13 mulps %xmm13, %xmm2 movaps %xmm9, %xmm1 movaps 0x220(%rsp), %xmm10 mulps %xmm10, %xmm1 movaps %xmm7, 0x1f0(%rsp) movaps %xmm14, %xmm7 mulps %xmm15, %xmm7 mulps %xmm14, %xmm10 subps %xmm0, %xmm10 mulps %xmm4, %xmm13 movaps %xmm4, %xmm6 mulps %xmm5, %xmm4 subps %xmm7, %xmm4 movaps %xmm15, 0x160(%rsp) movaps 0x1d5e05e(%rip), %xmm15 # 0x1eec6c0 andps %xmm15, %xmm0 andps %xmm15, %xmm7 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm10, %xmm4 movaps %xmm9, %xmm0 mulps %xmm5, %xmm0 mulps %xmm9, %xmm12 subps %xmm2, %xmm12 movaps 0x1f0(%rsp), %xmm7 mulps %xmm7, %xmm14 subps %xmm0, %xmm14 andps %xmm15, %xmm2 andps %xmm15, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm12, %xmm14 mulps %xmm7, %xmm6 mulps 0x160(%rsp), %xmm9 subps %xmm1, %xmm13 subps %xmm6, %xmm9 andps %xmm15, %xmm1 andps %xmm15, %xmm6 cmpltps %xmm6, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm9 movaps 0x200(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x210(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 mulps %xmm4, %xmm11 addps %xmm0, %xmm11 addps %xmm11, %xmm11 movaps 0x240(%rsp), %xmm1 mulps %xmm9, %xmm1 movaps 0x170(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 movaps 0x50(%rsp), %xmm6 mulps %xmm4, %xmm6 addps %xmm0, %xmm6 rcpps %xmm11, %xmm1 movaps %xmm11, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d5e2e0(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm6, %xmm6 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm6, %xmm0 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm3, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18eca5 cmpneqps 0x1d5d293(%rip), %xmm11 # 0x1eeba10 andps %xmm11, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18eca5 movaps 0x1c0(%rsp), %xmm5 movaps %xmm5, 0x270(%rsp) movaps 0x1e0(%rsp), %xmm6 movaps %xmm6, 0x280(%rsp) movaps 0x1d0(%rsp), %xmm7 movaps %xmm7, 0x290(%rsp) movaps %xmm4, 0x2a0(%rsp) movaps %xmm14, 0x2b0(%rsp) movaps %xmm9, 0x2c0(%rsp) movaps %xmm1, 0x2d0(%rsp) movaps %xmm0, 0x300(%rsp) movdqa 0x3f0(%rsp), %xmm0 movdqa %xmm0, 0x340(%rsp) movq (%rdi), %rbp rcpps %xmm7, %xmm2 mulps %xmm2, %xmm7 movaps 0x1d5e208(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm1 subps %xmm7, %xmm1 mulps %xmm2, %xmm1 addps %xmm2, %xmm1 cmpnltps 0x1d63523(%rip), %xmm8 # 0x1ef1d40 andps %xmm1, %xmm8 mulps %xmm8, %xmm5 minps %xmm3, %xmm5 mulps %xmm6, %xmm8 minps %xmm3, %xmm8 movaps %xmm3, %xmm1 subps %xmm5, %xmm1 movaps %xmm3, %xmm2 subps %xmm8, %xmm2 blendvps %xmm0, %xmm1, %xmm5 movaps %xmm5, 0x2e0(%rsp) blendvps %xmm0, %xmm2, %xmm8 movaps %xmm8, 0x2f0(%rsp) movaps %xmm4, 0x310(%rsp) movaps %xmm14, 0x320(%rsp) movaps %xmm9, 0x330(%rsp) movzbl %al, %r15d movaps 0xf0(%rsp), %xmm7 movaps 0xe0(%rsp), %xmm8 movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movaps 0xb0(%rsp), %xmm11 movaps 0xa0(%rsp), %xmm12 movaps 0x90(%rsp), %xmm13 movaps 0x80(%rsp), %xmm14 movaps 0x70(%rsp), %xmm15 movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 bsfq %r15, %r13 movq 0x150(%rsp), %rax movl 0xc0(%rax,%r13,4), %edx movq 0x1e8(%rbp), %rax movq (%rax,%rdx,8), %r14 movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%r14) je 0x18e917 movq 0x10(%rdi), %rax cmpq $0x0, 0x10(%rax) jne 0x18e937 cmpq $0x0, 0x48(%r14) jne 0x18e937 xorl %eax, %eax jmp 0x18e91d btcq %r13, %r15 movb $0x1, %al xorl %r14d, %r14d movq 0x60(%rsp), %rdx testb %al, %al je 0x18f68e testq %r15, %r15 jne 0x18e8d4 jmp 0x18ec8d movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x10(%rsp) movss 0x300(%rsp,%r13,4), %xmm0 movss 0x2e0(%rsp,%r13,4), %xmm1 movss 0x2f0(%rsp,%r13,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0x8(%rdi), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x260(%rsp,%r13,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x310(%rsp,%r13,4), %xmm4 movss 0x320(%rsp,%r13,4), %xmm5 movss 0x330(%rsp,%r13,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x350(%rsp) movaps %xmm5, 0x360(%rsp) movaps %xmm6, 0x370(%rsp) movaps %xmm1, 0x380(%rsp) movaps %xmm2, 0x390(%rsp) movdqa %xmm3, 0x3a0(%rsp) movdqa %xmm0, 0x3b0(%rsp) leaq 0x3c0(%rsp), %rdx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rdx) movdqa %xmm0, (%rdx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3c0(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3d0(%rsp) movq 0x188(%rsp), %rdx movdqa (%rdx), %xmm0 movdqa %xmm0, 0x120(%rsp) leaq 0x120(%rsp), %rdx movq %rdx, 0x190(%rsp) movq 0x18(%r14), %rdx movq %rdx, 0x198(%rsp) movq %rax, 0x1a0(%rsp) movq %r9, 0x1a8(%rsp) leaq 0x350(%rsp), %rax movq %rax, 0x1b0(%rsp) movl $0x4, 0x1b8(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %r9, 0x40(%rsp) movq %r8, 0x38(%rsp) movq %r10, 0x30(%rsp) movq %r11, 0x28(%rsp) movq %rsi, 0x20(%rsp) je 0x18eb35 leaq 0x190(%rsp), %rdi movq %rcx, 0x50(%rsp) callq *%rax movq 0x20(%rsp), %rsi movq 0x28(%rsp), %r11 movq 0x30(%rsp), %r10 movaps 0x70(%rsp), %xmm15 movaps 0x80(%rsp), %xmm14 movaps 0x90(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm12 movaps 0xb0(%rsp), %xmm11 movaps 0xc0(%rsp), %xmm10 movq 0x38(%rsp), %r8 movaps 0xd0(%rsp), %xmm9 movaps 0xe0(%rsp), %xmm8 movaps 0xf0(%rsp), %xmm7 movq 0xbe8(%rsp), %rdi movq 0x50(%rsp), %rcx movq 0x40(%rsp), %r9 movdqa 0x120(%rsp), %xmm1 ptest %xmm1, %xmm1 movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 je 0x18ec46 movq 0x10(%rdi), %rdx movq 0x10(%rdx), %rax testq %rax, %rax je 0x18ec08 testb $0x2, (%rdx) jne 0x18eb7a testb $0x40, 0x3e(%r14) je 0x18ec08 leaq 0x190(%rsp), %rdi movq %rcx, %r14 callq *%rax movaps 0x100(%rsp), %xmm4 movaps 0x110(%rsp), %xmm3 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %r11 movq 0x30(%rsp), %r10 movaps 0x70(%rsp), %xmm15 movaps 0x80(%rsp), %xmm14 movaps 0x90(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm12 movaps 0xb0(%rsp), %xmm11 movaps 0xc0(%rsp), %xmm10 movq 0x38(%rsp), %r8 movaps 0xd0(%rsp), %xmm9 movaps 0xe0(%rsp), %xmm8 movaps 0xf0(%rsp), %xmm7 movq 0xbe8(%rsp), %rdi movq %r14, %rcx movq 0x40(%rsp), %r9 movdqa 0x120(%rsp), %xmm0 pcmpeqd 0x1d5cdf7(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d5d1fb(%rip), %xmm1 # 0x1eebe20 movq 0x1a8(%rsp), %rax movaps 0x1d5cdcc(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x18ec56 pcmpeqd 0x1d5cdc2(%rip), %xmm1 # 0x1eeba10 pxor 0x1d5d1ca(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al movl $0x0, %r14d movq 0x60(%rsp), %rdx jne 0x18e925 movd 0x10(%rsp), %xmm0 movd %xmm0, 0x80(%r9,%rcx,4) btcq %r13, %r15 jmp 0x18e925 movq 0x148(%rsp), %r15 movq 0x140(%rsp), %r13 movq 0x138(%rsp), %rbp movss (%r9,%rcx,4), %xmm7 movss 0x10(%r9,%rcx,4), %xmm6 movss 0x20(%r9,%rcx,4), %xmm5 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movq 0x150(%rsp), %rax movaps 0x30(%rax), %xmm9 movaps 0x40(%rax), %xmm2 movaps 0x50(%rax), %xmm4 movaps 0x60(%rax), %xmm13 subps %xmm7, %xmm13 movaps 0x70(%rax), %xmm10 subps %xmm6, %xmm10 movaps 0x80(%rax), %xmm12 subps %xmm5, %xmm12 movaps 0x90(%rax), %xmm3 subps %xmm7, %xmm3 movaps 0xa0(%rax), %xmm14 subps %xmm6, %xmm14 movaps 0xb0(%rax), %xmm0 subps %xmm5, %xmm0 movaps %xmm0, 0x10(%rsp) subps %xmm7, %xmm9 subps %xmm6, %xmm2 subps %xmm5, %xmm4 movaps %xmm9, %xmm8 subps %xmm13, %xmm8 movaps %xmm2, %xmm15 subps %xmm10, %xmm15 movaps %xmm4, %xmm11 subps %xmm12, %xmm11 movaps %xmm10, %xmm5 addps %xmm2, %xmm5 movaps %xmm12, %xmm6 addps %xmm4, %xmm6 movaps %xmm8, %xmm7 mulps %xmm5, %xmm7 mulps %xmm11, %xmm5 movaps %xmm15, %xmm1 mulps %xmm6, %xmm1 subps %xmm5, %xmm1 movaps %xmm13, %xmm5 addps %xmm9, %xmm5 movaps %xmm8, 0x220(%rsp) mulps %xmm8, %xmm6 movaps %xmm5, %xmm8 movaps %xmm11, 0x210(%rsp) mulps %xmm11, %xmm8 subps %xmm6, %xmm8 movaps %xmm15, 0x200(%rsp) mulps %xmm15, %xmm5 subps %xmm5, %xmm7 movss 0x50(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm0, 0x50(%rsp) movss 0x60(%r9,%rcx,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm5, %xmm7 mulps %xmm0, %xmm8 addps %xmm7, %xmm8 movss 0x40(%r9,%rcx,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm0, %xmm1 addps %xmm8, %xmm1 movaps %xmm13, %xmm8 subps %xmm3, %xmm8 movaps %xmm10, %xmm15 movaps %xmm14, %xmm7 movaps %xmm14, 0x170(%rsp) subps %xmm14, %xmm15 movaps %xmm12, %xmm14 movaps 0x10(%rsp), %xmm11 subps %xmm11, %xmm14 movaps %xmm10, 0x160(%rsp) movaps %xmm10, %xmm6 addps %xmm7, %xmm6 movaps %xmm12, 0x230(%rsp) movaps %xmm12, %xmm7 addps %xmm11, %xmm7 movaps %xmm0, %xmm11 movaps %xmm8, %xmm10 mulps %xmm6, %xmm10 mulps %xmm14, %xmm6 movaps %xmm15, %xmm12 mulps %xmm7, %xmm12 subps %xmm6, %xmm12 movaps %xmm13, 0x240(%rsp) movaps %xmm13, %xmm6 addps %xmm3, %xmm6 mulps %xmm8, %xmm7 movaps %xmm6, %xmm13 mulps %xmm14, %xmm13 subps %xmm7, %xmm13 mulps %xmm15, %xmm6 subps %xmm6, %xmm10 mulps %xmm5, %xmm10 movaps 0x50(%rsp), %xmm0 mulps %xmm0, %xmm13 addps %xmm10, %xmm13 mulps %xmm11, %xmm12 addps %xmm13, %xmm12 movaps %xmm3, %xmm7 subps %xmm9, %xmm7 addps %xmm3, %xmm9 movaps 0x170(%rsp), %xmm3 movaps %xmm3, %xmm10 subps %xmm2, %xmm10 addps %xmm3, %xmm2 movaps 0x10(%rsp), %xmm3 movaps %xmm3, %xmm13 subps %xmm4, %xmm13 addps %xmm3, %xmm4 movaps %xmm7, %xmm3 mulps %xmm2, %xmm3 mulps %xmm13, %xmm2 movaps %xmm10, %xmm6 mulps %xmm4, %xmm6 subps %xmm2, %xmm6 mulps %xmm7, %xmm4 movaps %xmm9, %xmm2 mulps %xmm13, %xmm2 subps %xmm4, %xmm2 mulps %xmm10, %xmm9 subps %xmm9, %xmm3 movaps %xmm5, 0x10(%rsp) mulps %xmm5, %xmm3 mulps %xmm0, %xmm2 addps %xmm3, %xmm2 mulps %xmm11, %xmm6 addps %xmm2, %xmm6 movaps %xmm12, %xmm9 addps %xmm1, %xmm9 addps %xmm6, %xmm9 movaps %xmm1, %xmm0 minps %xmm12, %xmm0 minps %xmm6, %xmm0 movaps %xmm1, 0x1c0(%rsp) movaps %xmm1, %xmm3 movaps %xmm12, 0x1e0(%rsp) maxps %xmm12, %xmm3 maxps %xmm6, %xmm3 movaps %xmm9, 0x1d0(%rsp) andps 0x1d5d794(%rip), %xmm9 # 0x1eec6c0 movaps %xmm9, %xmm1 mulps 0x1d62e39(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm3 xorps 0x1d5d78e(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm3 movmskps %xmm3, %eax testl %eax, %eax je 0x18f61e movaps %xmm15, %xmm0 movaps 0x210(%rsp), %xmm12 mulps %xmm12, %xmm0 movaps %xmm14, %xmm2 movaps %xmm13, %xmm5 movaps 0x220(%rsp), %xmm13 mulps %xmm13, %xmm2 movaps %xmm8, %xmm1 movaps %xmm10, %xmm4 movaps %xmm10, 0x1f0(%rsp) movaps 0x200(%rsp), %xmm10 mulps %xmm10, %xmm1 movaps %xmm7, 0x170(%rsp) movaps %xmm14, %xmm7 mulps %xmm4, %xmm7 mulps %xmm14, %xmm10 subps %xmm0, %xmm10 mulps %xmm15, %xmm13 movaps %xmm15, %xmm6 mulps %xmm5, %xmm15 subps %xmm7, %xmm15 movaps 0x1d5d6fa(%rip), %xmm4 # 0x1eec6c0 andps %xmm4, %xmm0 andps %xmm4, %xmm7 cmpltps %xmm7, %xmm0 blendvps %xmm0, %xmm10, %xmm15 movaps %xmm8, %xmm0 mulps %xmm5, %xmm0 mulps %xmm8, %xmm12 subps %xmm2, %xmm12 movaps 0x170(%rsp), %xmm7 mulps %xmm7, %xmm14 subps %xmm0, %xmm14 andps %xmm4, %xmm2 andps %xmm4, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm12, %xmm14 mulps %xmm7, %xmm6 mulps 0x1f0(%rsp), %xmm8 subps %xmm1, %xmm13 subps %xmm6, %xmm8 andps %xmm4, %xmm1 andps %xmm4, %xmm6 cmpltps %xmm6, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm13, %xmm8 movaps 0x10(%rsp), %xmm1 mulps %xmm8, %xmm1 movaps 0x50(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 mulps %xmm15, %xmm11 addps %xmm0, %xmm11 addps %xmm11, %xmm11 movaps 0x230(%rsp), %xmm1 mulps %xmm8, %xmm1 movaps 0x160(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 movaps 0x240(%rsp), %xmm4 mulps %xmm15, %xmm4 addps %xmm0, %xmm4 rcpps %xmm11, %xmm1 movaps %xmm11, %xmm2 mulps %xmm1, %xmm2 movaps 0x1d5d984(%rip), %xmm0 # 0x1eeca10 subps %xmm2, %xmm0 addps %xmm4, %xmm4 mulps %xmm1, %xmm0 addps %xmm1, %xmm0 mulps %xmm4, %xmm0 movss 0x80(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps %xmm0, %xmm1 cmpleps %xmm2, %xmm1 movss 0x30(%r9,%rcx,4), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] cmpleps %xmm0, %xmm2 andps %xmm2, %xmm1 andps %xmm3, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18f61e cmpneqps 0x1d5c937(%rip), %xmm11 # 0x1eeba10 andps %xmm11, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x18f61e movaps 0x1c0(%rsp), %xmm5 movaps %xmm5, 0x270(%rsp) movaps 0x1e0(%rsp), %xmm4 movaps %xmm4, 0x280(%rsp) movaps 0x1d0(%rsp), %xmm6 movaps %xmm6, 0x290(%rsp) movaps %xmm15, 0x2a0(%rsp) movaps %xmm14, 0x2b0(%rsp) movaps %xmm8, 0x2c0(%rsp) movaps %xmm1, 0x2d0(%rsp) movaps %xmm0, 0x300(%rsp) movdqa 0x3e0(%rsp), %xmm0 movdqa %xmm0, 0x340(%rsp) movq (%rdi), %rbp rcpps %xmm6, %xmm2 mulps %xmm2, %xmm6 movaps 0x1d5d8ab(%rip), %xmm3 # 0x1eeca10 movaps %xmm3, %xmm1 subps %xmm6, %xmm1 mulps %xmm2, %xmm1 addps %xmm2, %xmm1 cmpnltps 0x1d62bc6(%rip), %xmm9 # 0x1ef1d40 andps %xmm1, %xmm9 mulps %xmm9, %xmm5 minps %xmm3, %xmm5 mulps %xmm4, %xmm9 minps %xmm3, %xmm9 movaps %xmm3, %xmm1 subps %xmm5, %xmm1 movaps %xmm3, %xmm2 subps %xmm9, %xmm2 blendvps %xmm0, %xmm1, %xmm5 movaps %xmm5, 0x2e0(%rsp) blendvps %xmm0, %xmm2, %xmm9 movaps %xmm9, 0x2f0(%rsp) movaps %xmm15, 0x310(%rsp) movaps %xmm14, 0x320(%rsp) movaps %xmm8, 0x330(%rsp) movzbl %al, %r15d movaps 0xf0(%rsp), %xmm7 movaps 0xe0(%rsp), %xmm8 movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movaps 0xb0(%rsp), %xmm11 movaps 0xa0(%rsp), %xmm12 movaps 0x90(%rsp), %xmm13 movaps 0x80(%rsp), %xmm14 movaps 0x70(%rsp), %xmm15 movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 bsfq %r15, %r13 movq 0x150(%rsp), %rax movl 0xc0(%rax,%r13,4), %edx movq 0x1e8(%rbp), %rax movq (%rax,%rdx,8), %r14 movl 0x90(%r9,%rcx,4), %eax testl %eax, 0x34(%r14) je 0x18f275 movq 0x10(%rdi), %rax cmpq $0x0, 0x10(%rax) jne 0x18f295 cmpq $0x0, 0x48(%r14) jne 0x18f295 xorl %eax, %eax jmp 0x18f27b btcq %r13, %r15 movb $0x1, %al xorl %r14d, %r14d movq 0x60(%rsp), %rdx testb %al, %al je 0x18f68e testq %r15, %r15 jne 0x18f232 jmp 0x18f5eb movss 0x80(%r9,%rcx,4), %xmm0 movss %xmm0, 0x10(%rsp) movss 0x300(%rsp,%r13,4), %xmm0 movss 0x2e0(%rsp,%r13,4), %xmm1 movss 0x2f0(%rsp,%r13,4), %xmm2 movss %xmm0, 0x80(%r9,%rcx,4) movq 0x8(%rdi), %rax movd %edx, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movd 0x260(%rsp,%r13,4), %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss 0x310(%rsp,%r13,4), %xmm4 movss 0x320(%rsp,%r13,4), %xmm5 movss 0x330(%rsp,%r13,4), %xmm6 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm4, 0x350(%rsp) movaps %xmm5, 0x360(%rsp) movaps %xmm6, 0x370(%rsp) movaps %xmm1, 0x380(%rsp) movaps %xmm2, 0x390(%rsp) movdqa %xmm3, 0x3a0(%rsp) movdqa %xmm0, 0x3b0(%rsp) leaq 0x3c0(%rsp), %rdx pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rdx) movdqa %xmm0, (%rdx) movd (%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3c0(%rsp) movd 0x4(%rax), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x3d0(%rsp) movq 0x188(%rsp), %rdx movdqa (%rdx), %xmm0 movdqa %xmm0, 0x120(%rsp) leaq 0x120(%rsp), %rdx movq %rdx, 0x190(%rsp) movq 0x18(%r14), %rdx movq %rdx, 0x198(%rsp) movq %rax, 0x1a0(%rsp) movq %r9, 0x1a8(%rsp) leaq 0x350(%rsp), %rax movq %rax, 0x1b0(%rsp) movl $0x4, 0x1b8(%rsp) movq 0x48(%r14), %rax testq %rax, %rax movq %r9, 0x40(%rsp) movq %r8, 0x38(%rsp) movq %r10, 0x30(%rsp) movq %r11, 0x28(%rsp) movq %rsi, 0x20(%rsp) je 0x18f493 leaq 0x190(%rsp), %rdi movq %rcx, 0x50(%rsp) callq *%rax movq 0x20(%rsp), %rsi movq 0x28(%rsp), %r11 movq 0x30(%rsp), %r10 movaps 0x70(%rsp), %xmm15 movaps 0x80(%rsp), %xmm14 movaps 0x90(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm12 movaps 0xb0(%rsp), %xmm11 movaps 0xc0(%rsp), %xmm10 movq 0x38(%rsp), %r8 movaps 0xd0(%rsp), %xmm9 movaps 0xe0(%rsp), %xmm8 movaps 0xf0(%rsp), %xmm7 movq 0xbe8(%rsp), %rdi movq 0x50(%rsp), %rcx movq 0x40(%rsp), %r9 movdqa 0x120(%rsp), %xmm1 ptest %xmm1, %xmm1 movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 je 0x18f5a4 movq 0x10(%rdi), %rdx movq 0x10(%rdx), %rax testq %rax, %rax je 0x18f566 testb $0x2, (%rdx) jne 0x18f4d8 testb $0x40, 0x3e(%r14) je 0x18f566 leaq 0x190(%rsp), %rdi movq %rcx, %r14 callq *%rax movaps 0x100(%rsp), %xmm4 movaps 0x110(%rsp), %xmm3 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %r11 movq 0x30(%rsp), %r10 movaps 0x70(%rsp), %xmm15 movaps 0x80(%rsp), %xmm14 movaps 0x90(%rsp), %xmm13 movaps 0xa0(%rsp), %xmm12 movaps 0xb0(%rsp), %xmm11 movaps 0xc0(%rsp), %xmm10 movq 0x38(%rsp), %r8 movaps 0xd0(%rsp), %xmm9 movaps 0xe0(%rsp), %xmm8 movaps 0xf0(%rsp), %xmm7 movq 0xbe8(%rsp), %rdi movq %r14, %rcx movq 0x40(%rsp), %r9 movdqa 0x120(%rsp), %xmm0 pcmpeqd 0x1d5c499(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d5c89d(%rip), %xmm1 # 0x1eebe20 movq 0x1a8(%rsp), %rax movaps 0x1d5c46e(%rip), %xmm2 # 0x1eeba00 blendvps %xmm0, 0x80(%rax), %xmm2 movaps %xmm2, 0x80(%rax) jmp 0x18f5b4 pcmpeqd 0x1d5c464(%rip), %xmm1 # 0x1eeba10 pxor 0x1d5c86c(%rip), %xmm1 # 0x1eebe20 pslld $0x1f, %xmm1 movmskps %xmm1, %eax testl %eax, %eax sete %al movl $0x0, %r14d movq 0x60(%rsp), %rdx jne 0x18f283 movd 0x10(%rsp), %xmm0 movd %xmm0, 0x80(%r9,%rcx,4) btcq %r13, %r15 jmp 0x18f283 movq 0x148(%rsp), %r15 movq 0x140(%rsp), %r13 movq 0x138(%rsp), %rbp incq %rdx movq 0x258(%rsp), %rax cmpq %rax, %rdx setb 0xf(%rsp) jne 0x18e320 jmp 0x18f67d movaps 0xf0(%rsp), %xmm7 movaps 0xe0(%rsp), %xmm8 movaps 0xd0(%rsp), %xmm9 movaps 0xc0(%rsp), %xmm10 movaps 0xb0(%rsp), %xmm11 movaps 0xa0(%rsp), %xmm12 movaps 0x90(%rsp), %xmm13 movaps 0x80(%rsp), %xmm14 movaps 0x70(%rsp), %xmm15 movaps 0x110(%rsp), %xmm3 movaps 0x100(%rsp), %xmm4 jmp 0x18f603 movq 0x48(%rsp), %rdx testb $0x3, %r14b je 0x18e1e1 jmp 0x18f6c4 testb $0x1, 0xf(%rsp) movq 0x148(%rsp), %r15 movq 0x140(%rsp), %r13 movq 0x138(%rsp), %rbp movq 0x48(%rsp), %rdx je 0x18f682 movl $0xff800000, 0x80(%r9,%rcx,4) # imm = 0xFF800000 pushq $0x1 popq %r14 jmp 0x18f682 leaq 0x400(%rsp), %rax cmpq %rax, %rdx setne %al addq $0xba8, %rsp # imm = 0xBA8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp
embree::sse42::BVHNIntersectorKHybrid<4, 4, 1, true, embree::sse42::ArrayIntersectorK_1<4, embree::sse42::QuadMiIntersectorKPluecker<4, 4, true>>, true>::intersect1(embree::Accel::Intersectors*, embree::BVHN<4> const*, embree::NodeRefPtr<4>, unsigned long, embree::sse42::QuadMIntersectorKPluecker<4, 4, true>&, embree::RayHitK<4>&, embree::sse42::TravRayK<4, true> const&, embree::RayQueryContext*)
void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This, const BVH* bvh, NodeRef root, size_t k, Precalculations& pre, RayHitK<K>& ray, const TravRayK<K, robust>& tray, RayQueryContext* context) { /* stack state */ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle; stack[0].ptr = root; stack[0].dist = neg_inf; /* load the ray into SIMD registers */ TravRay<N,robust> tray1; tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]); /* pop loop */ while (true) pop: { /* pop next node */ if (unlikely(stackPtr == stack)) break; stackPtr--; NodeRef cur = NodeRef(stackPtr->ptr); /* if popped node is too far, pop next one */ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k])) continue; /* downtraversal loop */ while (true) { /* intersect node */ size_t mask; vfloat<N> tNear; STAT3(normal.trav_nodes, 1, 1, 1); bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask); if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; } /* if no child is hit, pop next node */ if (unlikely(mask == 0)) goto pop; /* select next child and push other children */ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd); } /* this is a leaf node */ assert(cur != BVH::emptyNode); STAT3(normal.trav_leaves, 1, 1, 1); size_t num; Primitive* prim = (Primitive*)cur.leaf(num); size_t lazy_node = 0; PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node); tray1.tfar = ray.tfar[k]; if (unlikely(lazy_node)) { stackPtr->ptr = lazy_node; stackPtr->dist = neg_inf; stackPtr++; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x13b8, %rsp # imm = 0x13B8 movq %r9, %rbx movq %rcx, %r14 movq 0x13f8(%rsp), %r10 movq 0x13f0(%rsp), %rax leaq 0x480(%rsp), %r11 movq %rdx, -0x10(%r11) andl $0x0, -0x8(%r11) movss (%rax,%rcx,4), %xmm8 movss 0x10(%rax,%rcx,4), %xmm9 movss 0x20(%rax,%rcx,4), %xmm10 shufps $0x0, %xmm8, %xmm8 # xmm8 = xmm8[0,0,0,0] shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] movss 0x60(%rax,%rcx,4), %xmm11 movss 0x70(%rax,%rcx,4), %xmm12 movss 0x80(%rax,%rcx,4), %xmm13 movss 0x1d8eb28(%rip), %xmm14 # 0x1f1ff10 movaps %xmm11, %xmm15 mulss %xmm14, %xmm15 shufps $0x0, %xmm15, %xmm15 # xmm15 = xmm15[0,0,0,0] movaps %xmm12, %xmm6 mulss %xmm14, %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulss %xmm13, %xmm14 shufps $0x0, %xmm14, %xmm14 # xmm14 = xmm14[0,0,0,0] movss 0x1d8eaff(%rip), %xmm0 # 0x1f1ff14 mulss %xmm0, %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] mulss %xmm0, %xmm12 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] mulss %xmm0, %xmm13 shufps $0x0, %xmm13, %xmm13 # xmm13 = xmm13[0,0,0,0] movslq 0x90(%rax,%rcx,4), %r8 movslq 0xa0(%rax,%rcx,4), %r12 movslq 0xb0(%rax,%rcx,4), %rdx movq %r8, %rcx xorq $0x10, %rcx movq %rcx, 0x2a8(%rsp) movq %r12, %rcx xorq $0x10, %rcx movq %rcx, 0x2a0(%rsp) movq %rdx, 0x2b0(%rsp) xorq $0x10, %rdx movq %rdx, 0x298(%rsp) movss 0xc0(%rax,%r14,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] movss 0xd0(%rax,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] leaq 0x1fbeae0(%rip), %rax # 0x214ff80 movaps (%rax), %xmm0 movaps %xmm0, 0x400(%rsp) pushq $0x1 popq %rdx movl %r14d, %ecx shll %cl, %edx movaps 0xf0(%rax), %xmm0 movaps %xmm0, 0x3f0(%rsp) movslq %edx, %rcx shlq $0x4, %rcx addq %rax, %rcx movq %rcx, 0xe8(%rsp) movq %r8, 0x8(%rsp) movaps %xmm8, 0x3e0(%rsp) movaps %xmm9, 0x3d0(%rsp) movaps %xmm10, 0x3c0(%rsp) movaps %xmm11, 0x3b0(%rsp) movaps %xmm12, 0x3a0(%rsp) movaps %xmm13, 0x390(%rsp) movaps %xmm14, 0x380(%rsp) movaps %xmm15, 0x370(%rsp) movaps %xmm6, 0x2d0(%rsp) movq %r12, 0x290(%rsp) movaps %xmm7, 0x2c0(%rsp) leaq 0x470(%rsp), %rax cmpq %rax, %r11 je 0x192ec8 movss -0x8(%r11), %xmm0 addq $-0x10, %r11 ucomiss 0x80(%rbx,%r14,4), %xmm0 ja 0x191539 movq (%r11), %r15 testb $0x8, %r15b jne 0x191600 movaps 0x20(%r15,%r8), %xmm0 subps %xmm8, %xmm0 mulps %xmm15, %xmm0 movaps 0x20(%r15,%r12), %xmm2 subps %xmm9, %xmm2 mulps %xmm6, %xmm2 maxps %xmm2, %xmm0 movq 0x2b0(%rsp), %rax movaps 0x20(%r15,%rax), %xmm2 subps %xmm10, %xmm2 mulps %xmm14, %xmm2 maxps %xmm7, %xmm2 maxps %xmm2, %xmm0 movq 0x2a8(%rsp), %rax movaps 0x20(%r15,%rax), %xmm2 subps %xmm8, %xmm2 mulps %xmm11, %xmm2 movq 0x2a0(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm9, %xmm3 mulps %xmm12, %xmm3 minps %xmm3, %xmm2 movq 0x298(%rsp), %rax movaps 0x20(%r15,%rax), %xmm3 subps %xmm10, %xmm3 mulps %xmm13, %xmm3 minps %xmm1, %xmm3 minps %xmm3, %xmm2 movaps %xmm0, 0xf0(%rsp) cmpleps %xmm2, %xmm0 movmskps %xmm0, %esi testb $0x8, %r15b jne 0x191639 testq %rsi, %rsi je 0x19163d andq $-0x10, %r15 bsfq %rsi, %rcx leaq -0x1(%rsi), %r9 xorl %eax, %eax movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) andq %rsi, %r9 jne 0x191642 movq %rdx, %r15 testl %eax, %eax je 0x191562 jmp 0x19180a pushq $0x6 jmp 0x19163f pushq $0x4 popq %rax jmp 0x19162c movq %rsi, %r13 movl 0xf0(%rsp,%rcx,4), %edi bsfq %r9, %r8 leaq -0x1(%r9), %rcx movq (%r15,%r8,8), %rsi prefetcht0 (%rsi) prefetcht0 0x40(%rsi) movl 0xf0(%rsp,%r8,4), %r8d andq %r9, %rcx jne 0x19169b leaq 0x10(%r11), %rcx cmpl %r8d, %edi jae 0x191684 movq %rsi, (%r11) movl %r8d, 0x8(%r11) movq %rcx, %r11 movq %rdx, %r15 jmp 0x191691 movq %rdx, (%r11) movl %edi, 0x8(%r11) movq %rcx, %r11 movq %rsi, %r15 movq 0x8(%rsp), %r8 movq %r13, %rsi jmp 0x19162c movq %rdx, %xmm2 movd %edi, %xmm0 punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0] movq %rsi, %xmm5 movd %r8d, %xmm0 punpcklqdq %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] bsfq %rcx, %rsi leaq -0x1(%rcx), %rdx movq (%r15,%rsi,8), %rdi prefetcht0 (%rdi) prefetcht0 0x40(%rdi) movq %rdi, %xmm3 movd 0xf0(%rsp,%rsi,4), %xmm0 punpcklqdq %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0] movdqa %xmm5, %xmm0 pcmpgtd %xmm2, %xmm0 andq %rcx, %rdx jne 0x191744 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 blendvps %xmm0, %xmm5, %xmm2 movdqa %xmm3, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm3, %xmm4 movaps %xmm4, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm4, %xmm3 blendvps %xmm0, %xmm2, %xmm3 blendvps %xmm0, %xmm4, %xmm2 movaps %xmm2, (%r11) movaps %xmm3, 0x10(%r11) movq %xmm5, %r15 addq $0x20, %r11 jmp 0x191691 bsfq %rdx, %rcx movq (%r15,%rcx,8), %rdx prefetcht0 (%rdx) prefetcht0 0x40(%rdx) movq %rdx, %xmm6 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm5, %xmm4 blendvps %xmm0, %xmm2, %xmm4 movd 0xf0(%rsp,%rcx,4), %xmm7 blendvps %xmm0, %xmm5, %xmm2 punpcklqdq %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0] movaps 0x2c0(%rsp), %xmm7 movdqa %xmm6, %xmm0 pcmpgtd %xmm3, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movdqa %xmm6, %xmm5 blendvps %xmm0, %xmm3, %xmm5 blendvps %xmm0, %xmm6, %xmm3 movaps %xmm3, %xmm0 pcmpgtd %xmm2, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm3, %xmm6 blendvps %xmm0, %xmm2, %xmm6 blendvps %xmm0, %xmm3, %xmm2 movaps %xmm5, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm5, %xmm3 blendvps %xmm0, %xmm4, %xmm3 blendvps %xmm0, %xmm5, %xmm4 movaps %xmm6, %xmm0 pcmpgtd %xmm4, %xmm0 pshufd $0xaa, %xmm0, %xmm0 # xmm0 = xmm0[2,2,2,2] movaps %xmm6, %xmm5 blendvps %xmm0, %xmm4, %xmm5 blendvps %xmm0, %xmm6, %xmm4 movaps 0x2d0(%rsp), %xmm6 movaps %xmm2, (%r11) movaps %xmm4, 0x10(%r11) movaps %xmm5, 0x20(%r11) movq %xmm3, %r15 addq $0x30, %r11 jmp 0x191691 cmpl $0x6, %eax jne 0x191539 movl %r15d, %r9d andl $0xf, %r9d addq $-0x8, %r9 je 0x192e55 andq $-0x10, %r15 xorl %eax, %eax movq %rsi, 0x80(%rsp) movq %rax, 0x2b8(%rsp) imulq $0x60, %rax, %rax movq (%r10), %rcx leaq (%r15,%rax), %r12 addq $0x40, %r12 prefetcht0 -0x40(%r12) prefetcht0 (%r12) movl (%r12), %edx movq %rcx, 0x88(%rsp) movq 0x228(%rcx), %rcx movq (%rcx,%rdx,8), %rdx movl -0x40(%r12), %esi movl -0x3c(%r12), %edi movups (%rdx,%rsi,4), %xmm15 movl -0x30(%r12), %esi movups (%rdx,%rsi,4), %xmm13 movl -0x20(%r12), %esi movups (%rdx,%rsi,4), %xmm12 movl -0x10(%r12), %esi movups (%rdx,%rsi,4), %xmm14 movl 0x4(%r12), %edx movq (%rcx,%rdx,8), %rdx movups (%rdx,%rdi,4), %xmm5 movl -0x2c(%r12), %esi movups (%rdx,%rsi,4), %xmm3 movl -0x1c(%r12), %esi movups (%rdx,%rsi,4), %xmm1 movl -0xc(%r12), %esi movups (%rdx,%rsi,4), %xmm2 movl 0x8(%r12), %edx movq (%rcx,%rdx,8), %rdx movl -0x38(%r12), %esi movups (%rdx,%rsi,4), %xmm6 movl -0x28(%r12), %esi movups (%rdx,%rsi,4), %xmm7 movl -0x18(%r12), %esi movups (%rdx,%rsi,4), %xmm4 movl -0x8(%r12), %esi movups (%rdx,%rsi,4), %xmm0 movaps %xmm0, 0x20(%rsp) movl 0xc(%r12), %edx movq (%rcx,%rdx,8), %rcx movl -0x34(%r12), %edx movups (%rcx,%rdx,4), %xmm9 movl -0x24(%r12), %edx movups (%rcx,%rdx,4), %xmm0 movl -0x14(%r12), %edx movups (%rcx,%rdx,4), %xmm8 movl -0x4(%r12), %edx movaps %xmm15, %xmm10 unpcklps %xmm6, %xmm10 # xmm10 = xmm10[0],xmm6[0],xmm10[1],xmm6[1] unpckhps %xmm6, %xmm15 # xmm15 = xmm15[2],xmm6[2],xmm15[3],xmm6[3] movaps %xmm5, %xmm11 unpcklps %xmm9, %xmm11 # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1] unpckhps %xmm9, %xmm5 # xmm5 = xmm5[2],xmm9[2],xmm5[3],xmm9[3] movups (%rcx,%rdx,4), %xmm6 unpcklps %xmm5, %xmm15 # xmm15 = xmm15[0],xmm5[0],xmm15[1],xmm5[1] movaps %xmm10, %xmm5 unpcklps %xmm11, %xmm5 # xmm5 = xmm5[0],xmm11[0],xmm5[1],xmm11[1] movaps %xmm5, 0x10(%rsp) unpckhps %xmm11, %xmm10 # xmm10 = xmm10[2],xmm11[2],xmm10[3],xmm11[3] movaps %xmm13, %xmm9 unpcklps %xmm7, %xmm9 # xmm9 = xmm9[0],xmm7[0],xmm9[1],xmm7[1] unpckhps %xmm7, %xmm13 # xmm13 = xmm13[2],xmm7[2],xmm13[3],xmm7[3] movaps %xmm3, %xmm5 unpcklps %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1] unpckhps %xmm0, %xmm3 # xmm3 = xmm3[2],xmm0[2],xmm3[3],xmm0[3] unpcklps %xmm3, %xmm13 # xmm13 = xmm13[0],xmm3[0],xmm13[1],xmm3[1] movaps %xmm9, %xmm7 unpcklps %xmm5, %xmm7 # xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1] unpckhps %xmm5, %xmm9 # xmm9 = xmm9[2],xmm5[2],xmm9[3],xmm5[3] movaps %xmm12, %xmm5 unpcklps %xmm4, %xmm5 # xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1] unpckhps %xmm4, %xmm12 # xmm12 = xmm12[2],xmm4[2],xmm12[3],xmm4[3] movaps %xmm1, %xmm3 unpcklps %xmm8, %xmm3 # xmm3 = xmm3[0],xmm8[0],xmm3[1],xmm8[1] unpckhps %xmm8, %xmm1 # xmm1 = xmm1[2],xmm8[2],xmm1[3],xmm8[3] unpcklps %xmm1, %xmm12 # xmm12 = xmm12[0],xmm1[0],xmm12[1],xmm1[1] movaps %xmm12, 0xd0(%rsp) movaps %xmm5, %xmm1 unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1] movaps %xmm1, 0x280(%rsp) unpckhps %xmm3, %xmm5 # xmm5 = xmm5[2],xmm3[2],xmm5[3],xmm3[3] movaps %xmm5, 0x270(%rsp) movaps %xmm14, %xmm4 movaps 0x20(%rsp), %xmm0 unpcklps %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1] unpckhps %xmm0, %xmm14 # xmm14 = xmm14[2],xmm0[2],xmm14[3],xmm0[3] movaps %xmm2, %xmm1 unpcklps %xmm6, %xmm1 # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1] unpckhps %xmm6, %xmm2 # xmm2 = xmm2[2],xmm6[2],xmm2[3],xmm6[3] unpcklps %xmm2, %xmm14 # xmm14 = xmm14[0],xmm2[0],xmm14[1],xmm2[1] movaps %xmm4, %xmm5 unpcklps %xmm1, %xmm5 # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1] unpckhps %xmm1, %xmm4 # xmm4 = xmm4[2],xmm1[2],xmm4[3],xmm1[3] movss (%rbx,%r14,4), %xmm1 movss 0x10(%rbx,%r14,4), %xmm2 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps 0x10(%rsp), %xmm6 subps %xmm1, %xmm6 subps %xmm2, %xmm10 movaps %xmm7, 0x250(%rsp) subps %xmm1, %xmm7 movaps %xmm7, %xmm12 movaps %xmm5, 0x230(%rsp) subps %xmm1, %xmm5 movaps %xmm9, 0x240(%rsp) subps %xmm2, %xmm9 movaps %xmm9, 0x50(%rsp) movaps %xmm4, 0x60(%rsp) movaps %xmm4, %xmm1 subps %xmm2, %xmm1 movss 0x20(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] subps %xmm4, %xmm15 movaps %xmm13, 0x260(%rsp) movaps %xmm13, %xmm3 subps %xmm4, %xmm3 movaps %xmm14, 0x20(%rsp) movaps %xmm14, %xmm0 subps %xmm4, %xmm0 movaps %xmm5, %xmm9 subps %xmm6, %xmm9 movaps %xmm1, %xmm13 subps %xmm10, %xmm13 movaps %xmm0, %xmm11 subps %xmm15, %xmm11 movaps %xmm1, %xmm4 addps %xmm10, %xmm4 movaps %xmm0, %xmm7 addps %xmm15, %xmm7 movaps %xmm9, %xmm8 mulps %xmm4, %xmm8 mulps %xmm11, %xmm4 movaps %xmm13, %xmm2 mulps %xmm7, %xmm2 subps %xmm4, %xmm2 movaps %xmm5, %xmm4 addps %xmm6, %xmm4 movaps %xmm6, 0x10(%rsp) movaps %xmm9, 0x200(%rsp) mulps %xmm9, %xmm7 movaps %xmm4, %xmm9 movaps %xmm11, 0x1f0(%rsp) mulps %xmm11, %xmm9 subps %xmm7, %xmm9 movaps %xmm13, 0x1e0(%rsp) mulps %xmm13, %xmm4 subps %xmm4, %xmm8 movss 0x50(%rbx,%r14,4), %xmm11 shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] movss 0x60(%rbx,%r14,4), %xmm7 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm7, %xmm8 mulps %xmm11, %xmm9 addps %xmm8, %xmm9 movss 0x40(%rbx,%r14,4), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0xc0(%rsp) mulps %xmm4, %xmm2 addps %xmm9, %xmm2 movaps %xmm6, %xmm9 movaps %xmm12, %xmm6 subps %xmm12, %xmm9 movaps %xmm10, %xmm12 movaps 0x50(%rsp), %xmm4 subps %xmm4, %xmm12 movaps %xmm15, %xmm8 subps %xmm3, %xmm8 movaps %xmm10, 0x210(%rsp) addps %xmm4, %xmm10 movaps %xmm15, 0x220(%rsp) movaps %xmm15, %xmm13 addps %xmm3, %xmm13 movaps %xmm9, %xmm14 mulps %xmm10, %xmm14 mulps %xmm8, %xmm10 movaps %xmm12, %xmm4 mulps %xmm13, %xmm4 subps %xmm10, %xmm4 movaps 0x10(%rsp), %xmm10 addps %xmm6, %xmm10 mulps %xmm9, %xmm13 movaps %xmm10, %xmm15 movaps %xmm8, 0x460(%rsp) mulps %xmm8, %xmm15 subps %xmm13, %xmm15 mulps %xmm12, %xmm10 subps %xmm10, %xmm14 mulps %xmm7, %xmm14 mulps %xmm11, %xmm15 addps %xmm14, %xmm15 movaps 0xc0(%rsp), %xmm13 mulps %xmm13, %xmm4 addps %xmm15, %xmm4 movaps %xmm6, %xmm14 subps %xmm5, %xmm14 addps %xmm6, %xmm5 movaps 0x50(%rsp), %xmm6 movaps %xmm6, %xmm15 subps %xmm1, %xmm15 addps %xmm6, %xmm1 movaps %xmm3, %xmm10 subps %xmm0, %xmm10 addps %xmm3, %xmm0 movaps %xmm14, %xmm6 mulps %xmm1, %xmm6 mulps %xmm10, %xmm1 movaps %xmm15, %xmm3 mulps %xmm0, %xmm3 subps %xmm1, %xmm3 mulps %xmm14, %xmm0 movaps %xmm5, %xmm1 mulps %xmm10, %xmm1 subps %xmm0, %xmm1 mulps %xmm15, %xmm5 subps %xmm5, %xmm6 movaps %xmm7, 0x1d0(%rsp) mulps %xmm7, %xmm6 movaps %xmm11, 0x50(%rsp) mulps %xmm11, %xmm1 addps %xmm6, %xmm1 mulps %xmm13, %xmm3 addps %xmm1, %xmm3 movaps %xmm2, %xmm1 addps %xmm4, %xmm1 addps %xmm3, %xmm1 movaps %xmm2, %xmm0 minps %xmm4, %xmm0 minps %xmm3, %xmm0 movaps %xmm2, 0x410(%rsp) movaps %xmm2, %xmm6 movaps %xmm4, 0x430(%rsp) maxps %xmm4, %xmm6 maxps %xmm3, %xmm6 movaps %xmm1, 0x420(%rsp) movaps %xmm1, %xmm3 andps 0x1d5aa65(%rip), %xmm3 # 0x1eec6c0 movaps %xmm3, %xmm1 mulps 0x1d6010b(%rip), %xmm1 # 0x1ef1d70 cmpleps %xmm1, %xmm6 xorps 0x1d5aa60(%rip), %xmm1 # 0x1eec6d0 cmpnltps %xmm1, %xmm0 orps %xmm0, %xmm6 leaq (%r15,%rax), %rdx movmskps %xmm6, %eax testl %eax, %eax je 0x1923da movaps %xmm9, %xmm7 movaps %xmm13, %xmm11 movaps %xmm12, %xmm0 movaps 0x1f0(%rsp), %xmm9 mulps %xmm9, %xmm0 movaps %xmm7, %xmm1 movaps 0x1e0(%rsp), %xmm13 mulps %xmm13, %xmm1 movaps %xmm15, 0x450(%rsp) movaps 0x460(%rsp), %xmm8 mulps %xmm8, %xmm15 movaps %xmm10, %xmm4 movaps %xmm10, 0x440(%rsp) movaps %xmm14, %xmm10 mulps %xmm12, %xmm10 mulps %xmm8, %xmm13 subps %xmm0, %xmm13 movaps 0x200(%rsp), %xmm5 movaps %xmm5, %xmm2 mulps %xmm12, %xmm5 mulps %xmm4, %xmm12 subps %xmm15, %xmm12 movaps 0x1d5a9c0(%rip), %xmm4 # 0x1eec6c0 andps %xmm4, %xmm0 andps %xmm4, %xmm15 cmpltps %xmm15, %xmm0 blendvps %xmm0, %xmm13, %xmm12 movaps %xmm7, %xmm0 mulps 0x440(%rsp), %xmm0 mulps %xmm8, %xmm2 mulps %xmm8, %xmm14 mulps %xmm7, %xmm9 subps %xmm2, %xmm9 subps %xmm0, %xmm14 andps %xmm4, %xmm2 andps %xmm4, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm9, %xmm14 mulps 0x450(%rsp), %xmm7 subps %xmm1, %xmm5 subps %xmm10, %xmm7 andps %xmm4, %xmm1 andps %xmm4, %xmm10 cmpltps %xmm10, %xmm1 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm5, %xmm7 movaps 0x1d0(%rsp), %xmm1 mulps %xmm7, %xmm1 movaps 0x50(%rsp), %xmm0 mulps %xmm14, %xmm0 addps %xmm1, %xmm0 mulps %xmm12, %xmm11 addps %xmm0, %xmm11 addps %xmm11, %xmm11 movaps 0x220(%rsp), %xmm0 mulps %xmm7, %xmm0 movaps 0x210(%rsp), %xmm1 mulps %xmm14, %xmm1 addps %xmm0, %xmm1 movaps 0x10(%rsp), %xmm4 mulps %xmm12, %xmm4 addps %xmm1, %xmm4 rcpps %xmm11, %xmm0 movaps %xmm11, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d5ac4d(%rip), %xmm10 # 0x1eeca10 subps %xmm1, %xmm10 addps %xmm4, %xmm4 mulps %xmm0, %xmm10 addps %xmm0, %xmm10 mulps %xmm4, %xmm10 movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm10, %xmm1 cmpleps %xmm0, %xmm1 movss 0x30(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] cmpleps %xmm10, %xmm0 andps %xmm0, %xmm1 andps %xmm6, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x1923da cmpneqps 0x1d59bfa(%rip), %xmm11 # 0x1eeba10 andps %xmm11, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x1923da movaps 0x410(%rsp), %xmm11 movaps %xmm11, 0xf0(%rsp) movaps 0x430(%rsp), %xmm6 movaps %xmm6, 0x100(%rsp) movaps 0x420(%rsp), %xmm9 movaps %xmm9, 0x110(%rsp) movaps %xmm12, 0x120(%rsp) movaps %xmm14, 0x130(%rsp) movaps %xmm7, 0x140(%rsp) movaps %xmm1, 0x150(%rsp) movaps %xmm10, 0x180(%rsp) movaps 0x400(%rsp), %xmm0 movaps %xmm0, 0x1c0(%rsp) movaps %xmm1, 0x30(%rsp) rcpps %xmm9, %xmm4 mulps %xmm4, %xmm9 movaps 0x1d5ab68(%rip), %xmm5 # 0x1eeca10 movaps %xmm5, %xmm2 subps %xmm9, %xmm2 mulps %xmm4, %xmm2 addps %xmm4, %xmm2 cmpnltps 0x1d5fe83(%rip), %xmm3 # 0x1ef1d40 andps %xmm2, %xmm3 mulps %xmm3, %xmm11 minps %xmm5, %xmm11 mulps %xmm6, %xmm3 minps %xmm5, %xmm3 movaps %xmm5, %xmm2 subps %xmm11, %xmm2 movaps %xmm5, %xmm4 subps %xmm3, %xmm4 blendvps %xmm0, %xmm2, %xmm11 movaps %xmm11, 0x160(%rsp) blendvps %xmm0, %xmm4, %xmm3 movaps %xmm3, 0x170(%rsp) movaps %xmm12, 0x190(%rsp) movaps %xmm14, 0x1a0(%rsp) movaps %xmm7, 0x1b0(%rsp) movaps 0x1d59ad8(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm10, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x191f46 movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %rbp movq 0x88(%rsp), %rsi movl (%r12,%rbp,4), %eax movq 0x1e8(%rsi), %rcx movq (%rcx,%rax,8), %r13 movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%r13) je 0x19228c movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x191f8c cmpq $0x0, 0x40(%r13) je 0x192337 movss 0x160(%rsp,%rbp,4), %xmm0 movss 0x170(%rsp,%rbp,4), %xmm1 movss 0x190(%rsp,%rbp,4), %xmm2 movss 0x1a0(%rsp,%rbp,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x50(%rdx,%rbp,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1b0(%rsp,%rbp,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x2e0(%rsp) movaps %xmm3, 0x2f0(%rsp) movaps %xmm6, 0x300(%rsp) movaps %xmm0, 0x310(%rsp) movaps %xmm1, 0x320(%rsp) movdqa %xmm5, 0x330(%rsp) movdqa %xmm4, 0x340(%rsp) leaq 0x350(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x350(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x360(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0xc0(%rsp) movss 0x180(%rsp,%rbp,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xe8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x70(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x18(%r13), %rax movq %rax, 0x98(%rsp) movq 0x8(%r10), %rax movq %rax, 0xa0(%rsp) movq %rbx, 0xa8(%rsp) leaq 0x2e0(%rsp), %rax movq %rax, 0xb0(%rsp) movl $0x4, 0xb8(%rsp) movq 0x40(%r13), %rax testq %rax, %rax movq %r9, 0x48(%rsp) movq %rdx, 0x40(%rsp) movaps %xmm10, 0x50(%rsp) je 0x19212b leaq 0x90(%rsp), %rdi movq %r11, 0x10(%rsp) callq *%rax movaps 0x50(%rsp), %xmm10 movq 0x88(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x48(%rsp), %r9 movq 0x8(%rsp), %r8 movq 0x10(%rsp), %r11 movq 0x13f8(%rsp), %r10 movdqa 0x70(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x1922df movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x19218a testb $0x2, (%rcx) jne 0x192155 testb $0x40, 0x3e(%r13) je 0x19218a leaq 0x90(%rsp), %rdi movq %r11, %r13 callq *%rax movaps 0x50(%rsp), %xmm10 movq 0x88(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x48(%rsp), %r9 movq 0x8(%rsp), %r8 movq %r13, %r11 movq 0x13f8(%rsp), %r10 movdqa 0x70(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d59873(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d59c77(%rip), %xmm1 # 0x1eebe20 je 0x1922ef movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x1922ef andl $0x0, 0x30(%rsp,%rbp,4) movaps 0x30(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x1923da movaps 0x1d59748(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm10, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x1922d3 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %rbp jmp 0x191f55 pcmpeqd 0x1d59729(%rip), %xmm1 # 0x1eeba10 pxor 0x1d59b31(%rip), %xmm1 # 0x1eebe20 ptest 0x1d5a828(%rip), %xmm1 # 0x1eecb20 jne 0x19230d movd 0xc0(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x30(%rsp,%rbp,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm10, %xmm1 cmpleps %xmm0, %xmm1 andps 0x30(%rsp), %xmm1 movaps %xmm1, 0x30(%rsp) jmp 0x192291 movss 0x160(%rsp,%rbp,4), %xmm0 movss 0x170(%rsp,%rbp,4), %xmm1 movss 0x180(%rsp,%rbp,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x190(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1a0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1b0(%rsp,%rbp,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x50(%rdx,%rbp,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movss (%rbx,%r14,4), %xmm1 movss 0x10(%rbx,%r14,4), %xmm2 movss 0x20(%rbx,%r14,4), %xmm0 movss 0x40(%rbx,%r14,4), %xmm3 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, 0x10(%rsp) movss 0x50(%rbx,%r14,4), %xmm3 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movaps %xmm3, %xmm7 movaps %xmm3, 0x50(%rsp) movaps 0x280(%rsp), %xmm15 subps %xmm1, %xmm15 movaps 0x270(%rsp), %xmm9 subps %xmm2, %xmm9 movaps 0xd0(%rsp), %xmm11 subps %xmm0, %xmm11 movaps 0x230(%rsp), %xmm12 subps %xmm1, %xmm12 movaps 0x60(%rsp), %xmm3 subps %xmm2, %xmm3 movaps %xmm3, 0x60(%rsp) movaps 0x20(%rsp), %xmm3 subps %xmm0, %xmm3 movaps %xmm3, 0x20(%rsp) movaps 0x250(%rsp), %xmm13 subps %xmm1, %xmm13 movaps 0x240(%rsp), %xmm3 subps %xmm2, %xmm3 movaps 0x260(%rsp), %xmm10 subps %xmm0, %xmm10 movaps %xmm13, %xmm5 subps %xmm15, %xmm5 movaps %xmm3, %xmm14 subps %xmm9, %xmm14 movaps %xmm10, %xmm6 subps %xmm11, %xmm6 movaps %xmm13, %xmm0 addps %xmm15, %xmm0 movaps %xmm3, %xmm1 addps %xmm9, %xmm1 movaps %xmm10, %xmm2 addps %xmm11, %xmm2 movaps %xmm5, %xmm4 mulps %xmm1, %xmm4 mulps %xmm6, %xmm1 movaps %xmm14, %xmm8 mulps %xmm2, %xmm8 subps %xmm1, %xmm8 movaps %xmm5, 0x250(%rsp) mulps %xmm5, %xmm2 movaps %xmm0, %xmm1 movaps %xmm6, 0x240(%rsp) mulps %xmm6, %xmm1 subps %xmm2, %xmm1 movss 0x60(%rbx,%r14,4), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] movaps %xmm14, 0x230(%rsp) mulps %xmm14, %xmm0 subps %xmm0, %xmm4 movaps %xmm15, %xmm0 subps %xmm12, %xmm0 movaps %xmm0, %xmm6 mulps %xmm5, %xmm4 mulps %xmm7, %xmm1 addps %xmm4, %xmm1 movaps %xmm9, %xmm7 movaps 0x60(%rsp), %xmm4 subps %xmm4, %xmm7 mulps 0x10(%rsp), %xmm8 addps %xmm1, %xmm8 movaps %xmm11, %xmm14 movaps 0x20(%rsp), %xmm2 subps %xmm2, %xmm14 movaps %xmm9, 0x270(%rsp) movaps %xmm9, %xmm0 addps %xmm4, %xmm0 movaps %xmm4, %xmm9 movaps %xmm11, 0xd0(%rsp) movaps %xmm11, %xmm1 addps %xmm2, %xmm1 movaps %xmm6, %xmm4 movaps %xmm6, 0x260(%rsp) movaps %xmm6, %xmm2 mulps %xmm0, %xmm2 mulps %xmm14, %xmm0 movaps %xmm7, %xmm6 mulps %xmm1, %xmm6 subps %xmm0, %xmm6 movaps %xmm15, 0x280(%rsp) addps %xmm12, %xmm15 mulps %xmm4, %xmm1 movaps %xmm15, %xmm4 movaps %xmm14, 0xc0(%rsp) mulps %xmm14, %xmm4 subps %xmm1, %xmm4 movaps %xmm7, 0x220(%rsp) mulps %xmm7, %xmm15 subps %xmm15, %xmm2 mulps %xmm5, %xmm2 movaps 0x50(%rsp), %xmm14 mulps %xmm14, %xmm4 addps %xmm2, %xmm4 movaps 0x10(%rsp), %xmm0 mulps %xmm0, %xmm6 addps %xmm4, %xmm6 movaps %xmm12, %xmm11 subps %xmm13, %xmm11 addps %xmm12, %xmm13 movaps %xmm0, %xmm4 movaps %xmm9, %xmm15 subps %xmm3, %xmm15 addps %xmm9, %xmm3 movaps 0x20(%rsp), %xmm0 movaps %xmm0, %xmm12 subps %xmm10, %xmm12 addps %xmm0, %xmm10 movaps %xmm11, %xmm1 mulps %xmm3, %xmm1 mulps %xmm12, %xmm3 movaps %xmm15, %xmm0 mulps %xmm10, %xmm0 subps %xmm3, %xmm0 mulps %xmm11, %xmm10 movaps %xmm13, %xmm2 mulps %xmm12, %xmm2 subps %xmm10, %xmm2 mulps %xmm15, %xmm13 subps %xmm13, %xmm1 movaps %xmm5, 0x60(%rsp) mulps %xmm5, %xmm1 mulps %xmm14, %xmm2 addps %xmm1, %xmm2 mulps %xmm4, %xmm0 addps %xmm2, %xmm0 movaps %xmm8, %xmm14 addps %xmm6, %xmm14 addps %xmm0, %xmm14 movaps %xmm8, %xmm1 minps %xmm6, %xmm1 minps %xmm0, %xmm1 movaps %xmm8, 0x1d0(%rsp) movaps %xmm8, %xmm4 movaps %xmm6, 0x1f0(%rsp) maxps %xmm6, %xmm4 movaps 0x260(%rsp), %xmm6 maxps %xmm0, %xmm4 movaps %xmm14, 0x1e0(%rsp) andps 0x1d5a034(%rip), %xmm14 # 0x1eec6c0 movaps %xmm14, %xmm0 mulps 0x1d5f6d9(%rip), %xmm0 # 0x1ef1d70 cmpleps %xmm0, %xmm4 xorps 0x1d5a02e(%rip), %xmm0 # 0x1eec6d0 cmpnltps %xmm0, %xmm1 orps %xmm1, %xmm4 movmskps %xmm4, %eax testl %eax, %eax movq 0x80(%rsp), %rsi je 0x192e41 movaps 0x220(%rsp), %xmm5 movaps %xmm5, %xmm0 movaps 0x240(%rsp), %xmm13 mulps %xmm13, %xmm0 movaps %xmm6, %xmm1 movaps %xmm11, 0x20(%rsp) movaps 0x230(%rsp), %xmm11 mulps %xmm11, %xmm1 movaps %xmm12, %xmm7 movaps %xmm12, 0x200(%rsp) movaps %xmm15, %xmm12 movaps %xmm15, 0x210(%rsp) movaps 0xc0(%rsp), %xmm15 mulps %xmm15, %xmm12 movaps 0x270(%rsp), %xmm10 movaps 0x280(%rsp), %xmm3 movaps 0x20(%rsp), %xmm9 mulps %xmm5, %xmm9 mulps %xmm15, %xmm11 subps %xmm0, %xmm11 movaps 0x250(%rsp), %xmm8 movaps %xmm8, %xmm2 mulps %xmm5, %xmm8 mulps %xmm7, %xmm5 subps %xmm12, %xmm5 movaps 0x1d59f6d(%rip), %xmm7 # 0x1eec6c0 andps %xmm7, %xmm0 andps %xmm7, %xmm12 cmpltps %xmm12, %xmm0 blendvps %xmm0, %xmm11, %xmm5 movaps 0x20(%rsp), %xmm11 movaps %xmm6, %xmm0 mulps 0x200(%rsp), %xmm0 mulps %xmm15, %xmm2 mulps %xmm15, %xmm11 mulps %xmm6, %xmm13 subps %xmm2, %xmm13 subps %xmm0, %xmm11 andps %xmm7, %xmm2 andps %xmm7, %xmm0 cmpltps %xmm0, %xmm2 movaps %xmm2, %xmm0 blendvps %xmm0, %xmm13, %xmm11 mulps 0x210(%rsp), %xmm6 subps %xmm1, %xmm8 subps %xmm9, %xmm6 andps %xmm7, %xmm1 andps %xmm7, %xmm9 cmpltps %xmm9, %xmm1 movaps 0x10(%rsp), %xmm9 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm8, %xmm6 movaps 0x60(%rsp), %xmm1 mulps %xmm6, %xmm1 movaps 0x50(%rsp), %xmm0 mulps %xmm11, %xmm0 addps %xmm1, %xmm0 mulps %xmm5, %xmm9 addps %xmm0, %xmm9 addps %xmm9, %xmm9 movaps 0xd0(%rsp), %xmm0 mulps %xmm6, %xmm0 mulps %xmm11, %xmm10 addps %xmm0, %xmm10 mulps %xmm5, %xmm3 addps %xmm10, %xmm3 rcpps %xmm9, %xmm0 movaps %xmm9, %xmm1 mulps %xmm0, %xmm1 movaps 0x1d5a1fc(%rip), %xmm7 # 0x1eeca10 subps %xmm1, %xmm7 addps %xmm3, %xmm3 mulps %xmm0, %xmm7 addps %xmm0, %xmm7 mulps %xmm3, %xmm7 movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm7, %xmm1 cmpleps %xmm0, %xmm1 movss 0x30(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] cmpleps %xmm7, %xmm0 andps %xmm0, %xmm1 andps %xmm4, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x192e41 cmpneqps 0x1d591af(%rip), %xmm9 # 0x1eeba10 andps %xmm9, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x192e41 movaps 0x1d0(%rsp), %xmm10 movaps %xmm10, 0xf0(%rsp) movaps %xmm6, %xmm8 movaps 0x1f0(%rsp), %xmm6 movaps %xmm6, 0x100(%rsp) movaps 0x1e0(%rsp), %xmm9 movaps %xmm9, 0x110(%rsp) movaps %xmm5, 0x120(%rsp) movaps %xmm11, 0x130(%rsp) movaps %xmm8, 0x140(%rsp) movaps %xmm1, 0x150(%rsp) movaps %xmm7, 0x180(%rsp) movaps 0x3f0(%rsp), %xmm0 movaps %xmm0, 0x1c0(%rsp) movq (%r10), %rdi movaps %xmm1, 0x30(%rsp) rcpps %xmm9, %xmm3 mulps %xmm3, %xmm9 movaps 0x1d5a117(%rip), %xmm4 # 0x1eeca10 movaps %xmm4, %xmm2 subps %xmm9, %xmm2 mulps %xmm3, %xmm2 addps %xmm3, %xmm2 cmpnltps 0x1d5f431(%rip), %xmm14 # 0x1ef1d40 andps %xmm2, %xmm14 mulps %xmm14, %xmm10 minps %xmm4, %xmm10 mulps %xmm6, %xmm14 minps %xmm4, %xmm14 movaps %xmm4, %xmm2 subps %xmm10, %xmm2 movaps %xmm4, %xmm3 subps %xmm14, %xmm3 blendvps %xmm0, %xmm2, %xmm10 movaps %xmm10, 0x160(%rsp) blendvps %xmm0, %xmm3, %xmm14 movaps %xmm14, 0x170(%rsp) movaps %xmm5, 0x190(%rsp) movaps %xmm11, 0x1a0(%rsp) movaps %xmm8, 0x1b0(%rsp) movaps 0x1d59080(%rip), %xmm2 # 0x1eeb9f0 movaps %xmm1, %xmm0 blendvps %xmm0, %xmm7, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm0 shufps $0x4e, %xmm3, %xmm0 # xmm0 = xmm0[2,3],xmm3[0,1] minps %xmm3, %xmm0 cmpeqps %xmm2, %xmm0 andps %xmm1, %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x19299d movaps %xmm0, %xmm1 movmskps %xmm1, %eax bsfq %rax, %r13 movl (%r12,%r13,4), %eax movq 0x1e8(%rdi), %rcx movq (%rcx,%rax,8), %rbp movl 0x90(%rbx,%r14,4), %ecx testl %ecx, 0x34(%rbp) je 0x192cec movq 0x10(%r10), %rcx cmpq $0x0, 0x10(%rcx) jne 0x1929da cmpq $0x0, 0x40(%rbp) je 0x192d97 movss 0x160(%rsp,%r13,4), %xmm0 movss 0x170(%rsp,%r13,4), %xmm1 movss 0x190(%rsp,%r13,4), %xmm2 movss 0x1a0(%rsp,%r13,4), %xmm3 movq 0x8(%r10), %rcx movd %eax, %xmm4 pshufd $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movd 0x50(%rdx,%r13,4), %xmm5 pshufd $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] movss 0x1b0(%rsp,%r13,4), %xmm6 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] movaps %xmm2, 0x2e0(%rsp) movaps %xmm3, 0x2f0(%rsp) movaps %xmm6, 0x300(%rsp) movaps %xmm0, 0x310(%rsp) movaps %xmm1, 0x320(%rsp) movdqa %xmm5, 0x330(%rsp) movdqa %xmm4, 0x340(%rsp) leaq 0x350(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqa %xmm0, 0x10(%rax) movdqa %xmm0, (%rax) movd (%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x350(%rsp) movd 0x4(%rcx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movdqa %xmm0, 0x360(%rsp) movss 0x80(%rbx,%r14,4), %xmm0 movss %xmm0, 0xd0(%rsp) movss 0x180(%rsp,%r13,4), %xmm0 movss %xmm0, 0x80(%rbx,%r14,4) movq 0xe8(%rsp), %rax movdqa (%rax), %xmm0 movdqa %xmm0, 0x70(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x18(%rbp), %rax movq %rax, 0x98(%rsp) movq 0x8(%r10), %rax movq %rax, 0xa0(%rsp) movq %rbx, 0xa8(%rsp) leaq 0x2e0(%rsp), %rax movq %rax, 0xb0(%rsp) movl $0x4, 0xb8(%rsp) movq 0x40(%rbp), %rax testq %rax, %rax movq %r9, 0x48(%rsp) movq %rdx, 0x40(%rsp) movaps %xmm7, 0x20(%rsp) movq %rdi, 0x60(%rsp) je 0x192b88 leaq 0x90(%rsp), %rdi movq %r11, 0x10(%rsp) callq *%rax movq 0x60(%rsp), %rdi movaps 0x20(%rsp), %xmm7 movq 0x40(%rsp), %rdx movq 0x48(%rsp), %r9 movq 0x80(%rsp), %rsi movq 0x8(%rsp), %r8 movq 0x10(%rsp), %r11 movq 0x13f8(%rsp), %r10 movdqa 0x70(%rsp), %xmm1 ptest %xmm1, %xmm1 je 0x192d3f movq 0x10(%r10), %rcx movq 0x10(%rcx), %rax testq %rax, %rax je 0x192bea testb $0x2, (%rcx) jne 0x192bb1 testb $0x40, 0x3e(%rbp) je 0x192bea leaq 0x90(%rsp), %rdi movq %r11, %rbp callq *%rax movq 0x60(%rsp), %rdi movaps 0x20(%rsp), %xmm7 movq 0x40(%rsp), %rdx movq 0x48(%rsp), %r9 movq 0x80(%rsp), %rsi movq 0x8(%rsp), %r8 movq %rbp, %r11 movq 0x13f8(%rsp), %r10 movdqa 0x70(%rsp), %xmm0 ptest %xmm0, %xmm0 pcmpeqd 0x1d58e13(%rip), %xmm0 # 0x1eeba10 movdqa %xmm0, %xmm1 pxor 0x1d59217(%rip), %xmm1 # 0x1eebe20 je 0x192d4f movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rcx movaps (%rcx), %xmm2 movups 0xc0(%rax), %xmm3 movups 0xd0(%rax), %xmm4 movups 0xe0(%rax), %xmm5 blendvps %xmm0, %xmm3, %xmm2 movups 0xf0(%rax), %xmm3 movups %xmm2, 0xc0(%rax) movaps 0x10(%rcx), %xmm2 blendvps %xmm0, %xmm4, %xmm2 movups %xmm2, 0xd0(%rax) movaps 0x20(%rcx), %xmm2 blendvps %xmm0, %xmm5, %xmm2 movups %xmm2, 0xe0(%rax) movaps 0x30(%rcx), %xmm2 blendvps %xmm0, %xmm3, %xmm2 movups %xmm2, 0xf0(%rax) movups 0x100(%rax), %xmm2 movaps 0x40(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x100(%rax) movups 0x110(%rax), %xmm2 movaps 0x50(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x110(%rax) movups 0x120(%rax), %xmm2 movaps 0x60(%rcx), %xmm3 blendvps %xmm0, %xmm2, %xmm3 movups %xmm3, 0x120(%rax) movaps 0x70(%rcx), %xmm2 blendvps %xmm0, 0x130(%rax), %xmm2 movaps %xmm2, 0x130(%rax) movaps 0x80(%rcx), %xmm2 blendvps %xmm0, 0x140(%rax), %xmm2 movaps %xmm2, 0x140(%rax) jmp 0x192d4f andl $0x0, 0x30(%rsp,%r13,4) movaps 0x30(%rsp), %xmm0 movmskps %xmm0, %eax testl %eax, %eax je 0x192e41 movaps 0x1d58ce7(%rip), %xmm2 # 0x1eeb9f0 blendvps %xmm0, %xmm7, %xmm2 movaps %xmm2, %xmm3 shufps $0xb1, %xmm2, %xmm3 # xmm3 = xmm3[1,0],xmm2[3,2] minps %xmm2, %xmm3 movaps %xmm3, %xmm1 shufps $0x4e, %xmm3, %xmm1 # xmm1 = xmm1[2,3],xmm3[0,1] minps %xmm3, %xmm1 cmpeqps %xmm2, %xmm1 andps %xmm0, %xmm1 movmskps %xmm1, %eax testl %eax, %eax je 0x192d33 movaps %xmm1, %xmm0 movmskps %xmm0, %eax bsfq %rax, %r13 jmp 0x1929a4 pcmpeqd 0x1d58cc9(%rip), %xmm1 # 0x1eeba10 pxor 0x1d590d1(%rip), %xmm1 # 0x1eebe20 ptest 0x1d59dc8(%rip), %xmm1 # 0x1eecb20 jne 0x192d6d movd 0xd0(%rsp), %xmm0 movd %xmm0, 0x80(%rbx,%r14,4) andl $0x0, 0x30(%rsp,%r13,4) movss 0x80(%rbx,%r14,4), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps %xmm7, %xmm1 cmpleps %xmm0, %xmm1 andps 0x30(%rsp), %xmm1 movaps %xmm1, 0x30(%rsp) jmp 0x192cf2 movss 0x160(%rsp,%r13,4), %xmm0 movss 0x170(%rsp,%r13,4), %xmm1 movss 0x180(%rsp,%r13,4), %xmm2 movss %xmm2, 0x80(%rbx,%r14,4) movss 0x190(%rsp,%r13,4), %xmm2 movss %xmm2, 0xc0(%rbx,%r14,4) movss 0x1a0(%rsp,%r13,4), %xmm2 movss %xmm2, 0xd0(%rbx,%r14,4) movss 0x1b0(%rsp,%r13,4), %xmm2 movss %xmm2, 0xe0(%rbx,%r14,4) movss %xmm0, 0xf0(%rbx,%r14,4) movss %xmm1, 0x100(%rbx,%r14,4) movl 0x50(%rdx,%r13,4), %ecx movl %ecx, 0x110(%rbx,%r14,4) movl %eax, 0x120(%rbx,%r14,4) movq 0x8(%r10), %rax movl (%rax), %eax movl %eax, 0x130(%rbx,%r14,4) movq 0x8(%r10), %rax movl 0x4(%rax), %eax movl %eax, 0x140(%rbx,%r14,4) movq 0x2b8(%rsp), %rax incq %rax cmpq %r9, %rax jne 0x191832 movss 0x80(%rbx,%r14,4), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movaps 0x3e0(%rsp), %xmm8 movaps 0x3d0(%rsp), %xmm9 movaps 0x3c0(%rsp), %xmm10 movaps 0x3b0(%rsp), %xmm11 movaps 0x3a0(%rsp), %xmm12 movaps 0x390(%rsp), %xmm13 movaps 0x380(%rsp), %xmm14 movaps 0x370(%rsp), %xmm15 movaps 0x2d0(%rsp), %xmm6 movq 0x290(%rsp), %r12 movaps 0x2c0(%rsp), %xmm7 jmp 0x191539 addq $0x13b8, %rsp # imm = 0x13B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/embree[P]embree/kernels/bvh/bvh_intersector_hybrid.cpp