Skip to content

Instantly share code, notes, and snippets.

@Smerity
Created May 17, 2020 00:31
Show Gist options
  • Save Smerity/d446a491d290775286bd4db9c97df248 to your computer and use it in GitHub Desktop.
Save Smerity/d446a491d290775286bd4db9c97df248 to your computer and use it in GitHub Desktop.
Difference between high performing and low performing autovectorization
 fn main() {
 push  rbp
 mov  rbp, rsp
 push  r15
 push  r14
 push  r12
 push  rbx
 sub  rsp, 3344
 let mut rng = rand::thread_rng();
 call  rand::rngs::thread::thread_rng
 mov  r12, rax
 lea  rdi, [rbp, -, 1192]
 mov  esi, 1088
 call  ___bzero
 lea  r14, [r12, +, 8]
 mov  r15, r12
 add  r15, 272
 xor  ebx, ebx
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_7
 jmp  LBB6_2
LBB6_5:
 return self.reseed_and_generate(results, global_fork_counter); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:173)
 mov  rdi, r15
 mov  rsi, r14
 mov  rdx, rax
 call  rand::rngs::adapter::reseeding::ReseedingCore<R,Rsdr>::reseed_and_generate
LBB6_6:
 self.index = index; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:168)
 mov  qword, ptr, [r12], 0
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 xor  eax, eax
LBB6_7:
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 mov  ecx, dword, ptr, [r12, +, 4*rax, +, 8]
 let value = value >> (float_size - precision); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:111)
 shr  ecx, 8
 i as $ty (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/utils.rs:359)
 xorps  xmm0, xmm0
 cvtsi2ss xmm0, ecx
 self.index += 1; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:182)
 inc  rax
 mov  qword, ptr, [r12], rax
 scale * $ty::cast_from_int(value) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:112)
 mulss  xmm0, dword, ptr, [rip, +, LCPI6_0]
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, xmm0
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, dword, ptr, [rip, +, LCPI6_1]
 movss  dword, ptr, [rbp, +, rbx, -, 1192], xmm0
 $self.ptr.as_ptr() as *const T == $self.end (libcore/slice/mod.rs:3179)
 add  rbx, 4
 cmp  rbx, 1088
 if is_empty!(self) { (libcore/slice/mod.rs:3303)
 je  LBB6_8
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_7
LBB6_2:
 let global_fork_counter = fork::get_fork_counter(); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:168)
 call  rand::rngs::adapter::reseeding::fork::get_fork_counter
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 mov  rcx, qword, ptr, [r12, +, 328]
 test  rcx, rcx
 jle  LBB6_5
 (self.fork_counter.wrapping_sub(global_fork_counter) as isize) < 0 (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:231)
 cmp  qword, ptr, [r12, +, 336], rax
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 js  LBB6_5
 self.bytes_until_reseed -= num_bytes as i64; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:176)
 add  rcx, -256
 mov  qword, ptr, [r12, +, 328], rcx
 refill_wide(self, drounds, out) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_chacha-0.2.2/src/guts.rs:82)
 mov  rdi, r15
 mov  esi, 10
 mov  rdx, r14
 call  rand_chacha::guts::refill_wide
 jmp  LBB6_6
LBB6_8:
 lea  rdi, [rbp, -, 2280]
 mov  esi, 1088
 call  ___bzero
 xor  ebx, ebx
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_15
 jmp  LBB6_10
LBB6_13:
 return self.reseed_and_generate(results, global_fork_counter); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:173)
 mov  rdi, r15
 mov  rsi, r14
 mov  rdx, rax
 call  rand::rngs::adapter::reseeding::ReseedingCore<R,Rsdr>::reseed_and_generate
LBB6_14:
 self.index = index; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:168)
 mov  qword, ptr, [r12], 0
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 xor  eax, eax
LBB6_15:
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 mov  ecx, dword, ptr, [r12, +, 4*rax, +, 8]
 let value = value >> (float_size - precision); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:111)
 shr  ecx, 8
 i as $ty (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/utils.rs:359)
 xorps  xmm0, xmm0
 cvtsi2ss xmm0, ecx
 self.index += 1; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:182)
 inc  rax
 mov  qword, ptr, [r12], rax
 scale * $ty::cast_from_int(value) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:112)
 mulss  xmm0, dword, ptr, [rip, +, LCPI6_0]
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, xmm0
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, dword, ptr, [rip, +, LCPI6_1]
 movss  dword, ptr, [rbp, +, rbx, -, 2280], xmm0
 $self.ptr.as_ptr() as *const T == $self.end (libcore/slice/mod.rs:3179)
 add  rbx, 4
 cmp  rbx, 1088
 if is_empty!(self) { (libcore/slice/mod.rs:3303)
 je  LBB6_16
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_15
LBB6_10:
 let global_fork_counter = fork::get_fork_counter(); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:168)
 call  rand::rngs::adapter::reseeding::fork::get_fork_counter
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 mov  rcx, qword, ptr, [r12, +, 328]
 test  rcx, rcx
 jle  LBB6_13
 (self.fork_counter.wrapping_sub(global_fork_counter) as isize) < 0 (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:231)
 cmp  qword, ptr, [r12, +, 336], rax
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 js  LBB6_13
 self.bytes_until_reseed -= num_bytes as i64; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:176)
 add  rcx, -256
 mov  qword, ptr, [r12, +, 328], rcx
 refill_wide(self, drounds, out) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_chacha-0.2.2/src/guts.rs:82)
 mov  rdi, r15
 mov  esi, 10
 mov  rdx, r14
 call  rand_chacha::guts::refill_wide
 jmp  LBB6_14
LBB6_16:
 let mut z: [f32; L] = [Z; L];
 lea  r14, [rbp, -, 2280]
 lea  rbx, [rbp, -, 3368]
 mov  esi, 1088
 mov  rdi, rbx
 call  ___bzero
 xor  eax, eax
LBB6_17:
 xor  ecx, ecx
LBB6_18:
 mov  edx, 12
LBB6_19:
 *c = a * b;
 movups  xmm0, xmmword, ptr, [rbp, +, 4*rdx, -, 1240]
 movups  xmm1, xmmword, ptr, [rbp, +, 4*rdx, -, 1224]
 movups  xmm2, xmmword, ptr, [rbp, +, 4*rdx, -, 1208]
 movups  xmm3, xmmword, ptr, [rbp, +, 4*rdx, -, 1192]
 movups  xmm4, xmmword, ptr, [rbp, +, 4*rdx, -, 2328]
 fn mul(self, other: $t) -> $t { self * other } (libcore/ops/arith.rs:316)
 mulps  xmm4, xmm0
 *c = a * b;
 movups  xmm0, xmmword, ptr, [rbp, +, 4*rdx, -, 2312]
 fn mul(self, other: $t) -> $t { self * other } (libcore/ops/arith.rs:316)
 mulps  xmm0, xmm1
 *c = a * b;
 movups  xmm1, xmmword, ptr, [rbp, +, 4*rdx, -, 2296]
 fn mul(self, other: $t) -> $t { self * other } (libcore/ops/arith.rs:316)
 mulps  xmm1, xmm2
 *c = a * b;
 movups  xmm2, xmmword, ptr, [rbp, +, 4*rdx, -, 2280]
 fn mul(self, other: $t) -> $t { self * other } (libcore/ops/arith.rs:316)
 mulps  xmm2, xmm3
 *c = a * b;
 movups  xmmword, ptr, [rbp, +, 4*rdx, -, 3416], xmm4
 movups  xmmword, ptr, [rbp, +, 4*rdx, -, 3400], xmm0
 movups  xmmword, ptr, [rbp, +, 4*rdx, -, 3384], xmm1
 movups  xmmword, ptr, [rbp, +, 4*rdx, -, 3368], xmm2
 self.index += 1; (libcore/iter/adapters/zip.rs:178)
 add  rdx, 16
 cmp  rdx, 284
 jne  LBB6_19
 intrinsics::wrapping_add(self, rhs) (libcore/num/mod.rs:3268)
 inc  ecx
 fn lt(&self, other: &$t) -> bool { (*self) < (*other) } (libcore/cmp.rs:1136)
 cmp  ecx, 100
 if self.start < self.end { (libcore/iter/range.rs:212)
 jne  LBB6_18
 intrinsics::wrapping_add(self, rhs) (libcore/num/mod.rs:3268)
 inc  eax
 fn lt(&self, other: &$t) -> bool { (*self) < (*other) } (libcore/cmp.rs:1136)
 cmp  eax, 1000000
 if self.start < self.end { (libcore/iter/range.rs:212)
 jne  LBB6_17
 let mut total = Z;
 mov  dword, ptr, [rbp, -, 36], 0
 xorps  xmm0, xmm0
LBB6_23:
 total += *el;
 addss  xmm0, dword, ptr, [rbx]
 addss  xmm0, dword, ptr, [rbx, +, 4]
 addss  xmm0, dword, ptr, [rbx, +, 8]
 addss  xmm0, dword, ptr, [rbx, +, 12]
 addss  xmm0, dword, ptr, [rbx, +, 16]
 addss  xmm0, dword, ptr, [rbx, +, 20]
 addss  xmm0, dword, ptr, [rbx, +, 24]
 addss  xmm0, dword, ptr, [rbx, +, 28]
 $self.ptr.as_ptr() as *const T == $self.end (libcore/slice/mod.rs:3179)
 add  rbx, 32
 cmp  r14, rbx
 if is_empty!(self) { (libcore/slice/mod.rs:3303)
 jne  LBB6_23
 total += *el;
 movss  dword, ptr, [rbp, -, 36], xmm0
 lea  rax, [rbp, -, 36]
 println!("{}", total);
 mov  qword, ptr, [rbp, -, 56], rax
 mov  rax, qword, ptr, [rip, +, __ZN4core3fmt5float52_$LT$impl$u20$core..fmt..Display$u20$for$u20$f32$GT$3fmt17hd3d5d52912365278E@GOTPCREL]
 mov  qword, ptr, [rbp, -, 48], rax
 Arguments { pieces, fmt: None, args } (libcore/fmt/mod.rs:328)
 lea  rax, [rip, +, l___unnamed_3]
 mov  qword, ptr, [rbp, -, 104], rax
 mov  qword, ptr, [rbp, -, 96], 2
 mov  qword, ptr, [rbp, -, 88], 0
 lea  rax, [rbp, -, 56]
 mov  qword, ptr, [rbp, -, 72], rax
 mov  qword, ptr, [rbp, -, 64], 1
 lea  rdi, [rbp, -, 104]
 println!("{}", total);
 call  std::io::stdio::_print
 }
 add  rsp, 3344
 pop  rbx
 pop  r12
 pop  r14
 pop  r15
 pop  rbp
 ret
 fn main() {
 push  rbp
 mov  rbp, rsp
 push  r15
 push  r14
 push  r12
 push  rbx
 sub  rsp, 3344
 let mut rng = rand::thread_rng();
 call  rand::rngs::thread::thread_rng
 mov  r12, rax
 lea  rdi, [rbp, -, 1200]
 mov  esi, 1084
 call  ___bzero
 lea  r14, [r12, +, 8]
 mov  r15, r12
 add  r15, 272
 xor  ebx, ebx
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_7
 jmp  LBB6_2
LBB6_5:
 return self.reseed_and_generate(results, global_fork_counter); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:173)
 mov  rdi, r15
 mov  rsi, r14
 mov  rdx, rax
 call  rand::rngs::adapter::reseeding::ReseedingCore<R,Rsdr>::reseed_and_generate
LBB6_6:
 self.index = index; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:168)
 mov  qword, ptr, [r12], 0
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 xor  eax, eax
LBB6_7:
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 mov  ecx, dword, ptr, [r12, +, 4*rax, +, 8]
 let value = value >> (float_size - precision); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:111)
 shr  ecx, 8
 i as $ty (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/utils.rs:359)
 xorps  xmm0, xmm0
 cvtsi2ss xmm0, ecx
 self.index += 1; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:182)
 inc  rax
 mov  qword, ptr, [r12], rax
 scale * $ty::cast_from_int(value) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:112)
 mulss  xmm0, dword, ptr, [rip, +, LCPI6_0]
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, xmm0
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, dword, ptr, [rip, +, LCPI6_1]
 movss  dword, ptr, [rbp, +, rbx, -, 1200], xmm0
 $self.ptr.as_ptr() as *const T == $self.end (libcore/slice/mod.rs:3179)
 add  rbx, 4
 cmp  rbx, 1084
 if is_empty!(self) { (libcore/slice/mod.rs:3303)
 je  LBB6_8
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_7
LBB6_2:
 let global_fork_counter = fork::get_fork_counter(); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:168)
 call  rand::rngs::adapter::reseeding::fork::get_fork_counter
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 mov  rcx, qword, ptr, [r12, +, 328]
 test  rcx, rcx
 jle  LBB6_5
 (self.fork_counter.wrapping_sub(global_fork_counter) as isize) < 0 (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:231)
 cmp  qword, ptr, [r12, +, 336], rax
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 js  LBB6_5
 self.bytes_until_reseed -= num_bytes as i64; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:176)
 add  rcx, -256
 mov  qword, ptr, [r12, +, 328], rcx
 refill_wide(self, drounds, out) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_chacha-0.2.2/src/guts.rs:82)
 mov  rdi, r15
 mov  esi, 10
 mov  rdx, r14
 call  rand_chacha::guts::refill_wide
 jmp  LBB6_6
LBB6_8:
 lea  rdi, [rbp, -, 2288]
 mov  esi, 1084
 call  ___bzero
 xor  ebx, ebx
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_15
 jmp  LBB6_10
LBB6_13:
 return self.reseed_and_generate(results, global_fork_counter); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:173)
 mov  rdi, r15
 mov  rsi, r14
 mov  rdx, rax
 call  rand::rngs::adapter::reseeding::ReseedingCore<R,Rsdr>::reseed_and_generate
LBB6_14:
 self.index = index; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:168)
 mov  qword, ptr, [r12], 0
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 xor  eax, eax
LBB6_15:
 let value = self.results.as_ref()[self.index]; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:181)
 mov  ecx, dword, ptr, [r12, +, 4*rax, +, 8]
 let value = value >> (float_size - precision); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:111)
 shr  ecx, 8
 i as $ty (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/utils.rs:359)
 xorps  xmm0, xmm0
 cvtsi2ss xmm0, ecx
 self.index += 1; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:182)
 inc  rax
 mov  qword, ptr, [r12], rax
 scale * $ty::cast_from_int(value) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/distributions/float.rs:112)
 mulss  xmm0, dword, ptr, [rip, +, LCPI6_0]
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, xmm0
 *el = (ONE + ONE) * rng.gen::<f32>() - ONE;
 addss  xmm0, dword, ptr, [rip, +, LCPI6_1]
 movss  dword, ptr, [rbp, +, rbx, -, 2288], xmm0
 $self.ptr.as_ptr() as *const T == $self.end (libcore/slice/mod.rs:3179)
 add  rbx, 4
 cmp  rbx, 1084
 if is_empty!(self) { (libcore/slice/mod.rs:3303)
 je  LBB6_16
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 mov  rax, qword, ptr, [r12]
 cmp  rax, 64
 if self.index >= self.results.as_ref().len() { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.5.1/src/block.rs:177)
 jb  LBB6_15
LBB6_10:
 let global_fork_counter = fork::get_fork_counter(); (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:168)
 call  rand::rngs::adapter::reseeding::fork::get_fork_counter
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 mov  rcx, qword, ptr, [r12, +, 328]
 test  rcx, rcx
 jle  LBB6_13
 (self.fork_counter.wrapping_sub(global_fork_counter) as isize) < 0 (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:231)
 cmp  qword, ptr, [r12, +, 336], rax
 if self.bytes_until_reseed <= 0 || self.is_forked(global_fork_counter) { (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:169)
 js  LBB6_13
 self.bytes_until_reseed -= num_bytes as i64; (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/rngs/adapter/reseeding.rs:176)
 add  rcx, -256
 mov  qword, ptr, [r12, +, 328], rcx
 refill_wide(self, drounds, out) (/Users/smerity/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_chacha-0.2.2/src/guts.rs:82)
 mov  rdi, r15
 mov  esi, 10
 mov  rdx, r14
 call  rand_chacha::guts::refill_wide
 jmp  LBB6_14
LBB6_16:
 let mut z: [f32; L] = [Z; L];
 lea  r14, [rbp, -, 2292]
 lea  rbx, [rbp, -, 3376]
 mov  esi, 1084
 mov  rdi, rbx
 call  ___bzero
 movaps  xmm0, xmmword, ptr, [rbp, -, 1200]
 movaps  xmm1, xmmword, ptr, [rbp, -, 1184]
 movaps  xmm2, xmmword, ptr, [rbp, -, 1168]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2288]
 movaps  xmm3, xmmword, ptr, [rbp, -, 1152]
 mulps  xmm1, xmmword, ptr, [rbp, -, 2272]
 movaps  xmmword, ptr, [rbp, -, 3376], xmm0
 mulps  xmm2, xmmword, ptr, [rbp, -, 2256]
 mulps  xmm3, xmmword, ptr, [rbp, -, 2240]
 movaps  xmmword, ptr, [rbp, -, 3360], xmm1
 movaps  xmmword, ptr, [rbp, -, 3344], xmm2
 movaps  xmm0, xmmword, ptr, [rbp, -, 1136]
 movaps  xmm1, xmmword, ptr, [rbp, -, 1120]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2224]
 mulps  xmm1, xmmword, ptr, [rbp, -, 2208]
 movaps  xmmword, ptr, [rbp, -, 3328], xmm3
 movaps  xmmword, ptr, [rbp, -, 3312], xmm0
 movaps  xmmword, ptr, [rbp, -, 3296], xmm1
 movaps  xmm0, xmmword, ptr, [rbp, -, 1104]
 movaps  xmm1, xmmword, ptr, [rbp, -, 1088]
 movaps  xmm2, xmmword, ptr, [rbp, -, 1072]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2192]
 movaps  xmm3, xmmword, ptr, [rbp, -, 1056]
 mulps  xmm1, xmmword, ptr, [rbp, -, 2176]
 movaps  xmmword, ptr, [rbp, -, 3280], xmm0
 mulps  xmm2, xmmword, ptr, [rbp, -, 2160]
 mulps  xmm3, xmmword, ptr, [rbp, -, 2144]
 movaps  xmmword, ptr, [rbp, -, 3264], xmm1
 movaps  xmmword, ptr, [rbp, -, 3248], xmm2
 movaps  xmm0, xmmword, ptr, [rbp, -, 1040]
 movaps  xmm1, xmmword, ptr, [rbp, -, 1024]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2128]
 mulps  xmm1, xmmword, ptr, [rbp, -, 2112]
 movaps  xmmword, ptr, [rbp, -, 3232], xmm3
 movaps  xmmword, ptr, [rbp, -, 3216], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 1008]
 movaps  xmm2, xmmword, ptr, [rbp, -, 992]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2096]
 mulps  xmm2, xmmword, ptr, [rbp, -, 2080]
 movaps  xmmword, ptr, [rbp, -, 3200], xmm1
 movaps  xmmword, ptr, [rbp, -, 3184], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 976]
 movaps  xmm1, xmmword, ptr, [rbp, -, 960]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2064]
 mulps  xmm1, xmmword, ptr, [rbp, -, 2048]
 movaps  xmmword, ptr, [rbp, -, 3168], xmm2
 movaps  xmmword, ptr, [rbp, -, 3152], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 944]
 movaps  xmm2, xmmword, ptr, [rbp, -, 928]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2032]
 mulps  xmm2, xmmword, ptr, [rbp, -, 2016]
 movaps  xmmword, ptr, [rbp, -, 3136], xmm1
 movaps  xmmword, ptr, [rbp, -, 3120], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 912]
 movaps  xmm1, xmmword, ptr, [rbp, -, 896]
 mulps  xmm0, xmmword, ptr, [rbp, -, 2000]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1984]
 movaps  xmmword, ptr, [rbp, -, 3104], xmm2
 movaps  xmmword, ptr, [rbp, -, 3088], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 880]
 movaps  xmm2, xmmword, ptr, [rbp, -, 864]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1968]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1952]
 movaps  xmmword, ptr, [rbp, -, 3072], xmm1
 movaps  xmmword, ptr, [rbp, -, 3056], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 848]
 movaps  xmm1, xmmword, ptr, [rbp, -, 832]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1936]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1920]
 movaps  xmmword, ptr, [rbp, -, 3040], xmm2
 movaps  xmmword, ptr, [rbp, -, 3024], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 816]
 movaps  xmm2, xmmword, ptr, [rbp, -, 800]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1904]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1888]
 movaps  xmmword, ptr, [rbp, -, 3008], xmm1
 movaps  xmmword, ptr, [rbp, -, 2992], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 784]
 movaps  xmm1, xmmword, ptr, [rbp, -, 768]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1872]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1856]
 movaps  xmmword, ptr, [rbp, -, 2976], xmm2
 movaps  xmmword, ptr, [rbp, -, 2960], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 752]
 movaps  xmm2, xmmword, ptr, [rbp, -, 736]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1840]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1824]
 movaps  xmmword, ptr, [rbp, -, 2944], xmm1
 movaps  xmmword, ptr, [rbp, -, 2928], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 720]
 movaps  xmm1, xmmword, ptr, [rbp, -, 704]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1808]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1792]
 movaps  xmmword, ptr, [rbp, -, 2912], xmm2
 movaps  xmmword, ptr, [rbp, -, 2896], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 688]
 movaps  xmm2, xmmword, ptr, [rbp, -, 672]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1776]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1760]
 movaps  xmmword, ptr, [rbp, -, 2880], xmm1
 movaps  xmmword, ptr, [rbp, -, 2864], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 656]
 movaps  xmm1, xmmword, ptr, [rbp, -, 640]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1744]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1728]
 movaps  xmmword, ptr, [rbp, -, 2848], xmm2
 movaps  xmmword, ptr, [rbp, -, 2832], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 624]
 movaps  xmm2, xmmword, ptr, [rbp, -, 608]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1712]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1696]
 movaps  xmmword, ptr, [rbp, -, 2816], xmm1
 movaps  xmmword, ptr, [rbp, -, 2800], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 592]
 movaps  xmm1, xmmword, ptr, [rbp, -, 576]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1680]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1664]
 movaps  xmmword, ptr, [rbp, -, 2784], xmm2
 movaps  xmmword, ptr, [rbp, -, 2768], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 560]
 movaps  xmm2, xmmword, ptr, [rbp, -, 544]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1648]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1632]
 movaps  xmmword, ptr, [rbp, -, 2752], xmm1
 movaps  xmmword, ptr, [rbp, -, 2736], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 528]
 movaps  xmm1, xmmword, ptr, [rbp, -, 512]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1616]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1600]
 movaps  xmmword, ptr, [rbp, -, 2720], xmm2
 movaps  xmmword, ptr, [rbp, -, 2704], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 496]
 movaps  xmm2, xmmword, ptr, [rbp, -, 480]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1584]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1568]
 movaps  xmmword, ptr, [rbp, -, 2688], xmm1
 movaps  xmmword, ptr, [rbp, -, 2672], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 464]
 movaps  xmm1, xmmword, ptr, [rbp, -, 448]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1552]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1536]
 movaps  xmmword, ptr, [rbp, -, 2656], xmm2
 movaps  xmmword, ptr, [rbp, -, 2640], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 432]
 movaps  xmm2, xmmword, ptr, [rbp, -, 416]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1520]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1504]
 movaps  xmmword, ptr, [rbp, -, 2624], xmm1
 movaps  xmmword, ptr, [rbp, -, 2608], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 400]
 movaps  xmm1, xmmword, ptr, [rbp, -, 384]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1488]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1472]
 movaps  xmmword, ptr, [rbp, -, 2592], xmm2
 movaps  xmmword, ptr, [rbp, -, 2576], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 368]
 movaps  xmm2, xmmword, ptr, [rbp, -, 352]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1456]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1440]
 movaps  xmmword, ptr, [rbp, -, 2560], xmm1
 movaps  xmmword, ptr, [rbp, -, 2544], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 336]
 movaps  xmm1, xmmword, ptr, [rbp, -, 320]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1424]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1408]
 movaps  xmmword, ptr, [rbp, -, 2528], xmm2
 movaps  xmmword, ptr, [rbp, -, 2512], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 304]
 movaps  xmm2, xmmword, ptr, [rbp, -, 288]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1392]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1376]
 movaps  xmmword, ptr, [rbp, -, 2496], xmm1
 movaps  xmmword, ptr, [rbp, -, 2480], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 272]
 movaps  xmm1, xmmword, ptr, [rbp, -, 256]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1360]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1344]
 movaps  xmmword, ptr, [rbp, -, 2464], xmm2
 movaps  xmmword, ptr, [rbp, -, 2448], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 240]
 movaps  xmm2, xmmword, ptr, [rbp, -, 224]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1328]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1312]
 movaps  xmmword, ptr, [rbp, -, 2432], xmm1
 movaps  xmmword, ptr, [rbp, -, 2416], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 208]
 movaps  xmm1, xmmword, ptr, [rbp, -, 192]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1296]
 mulps  xmm1, xmmword, ptr, [rbp, -, 1280]
 movaps  xmmword, ptr, [rbp, -, 2400], xmm2
 movaps  xmmword, ptr, [rbp, -, 2384], xmm0
 movaps  xmm0, xmmword, ptr, [rbp, -, 176]
 movaps  xmm2, xmmword, ptr, [rbp, -, 160]
 mulps  xmm0, xmmword, ptr, [rbp, -, 1264]
 mulps  xmm2, xmmword, ptr, [rbp, -, 1248]
 movaps  xmmword, ptr, [rbp, -, 2368], xmm1
 movaps  xmmword, ptr, [rbp, -, 2352], xmm0
 movaps  xmmword, ptr, [rbp, -, 2336], xmm2
 movss  xmm0, dword, ptr, [rbp, -, 144]
 mulss  xmm0, dword, ptr, [rbp, -, 1232]
 movss  dword, ptr, [rbp, -, 2320], xmm0
 movss  xmm0, dword, ptr, [rbp, -, 140]
 mulss  xmm0, dword, ptr, [rbp, -, 1228]
 movss  dword, ptr, [rbp, -, 2316], xmm0
 movss  xmm0, dword, ptr, [rbp, -, 136]
 mulss  xmm0, dword, ptr, [rbp, -, 1224]
 movss  dword, ptr, [rbp, -, 2312], xmm0
 movss  xmm0, dword, ptr, [rbp, -, 132]
 mulss  xmm0, dword, ptr, [rbp, -, 1220]
 movss  dword, ptr, [rbp, -, 2308], xmm0
 movss  xmm0, dword, ptr, [rbp, -, 128]
 mulss  xmm0, dword, ptr, [rbp, -, 1216]
 movss  dword, ptr, [rbp, -, 2304], xmm0
 movss  xmm0, dword, ptr, [rbp, -, 124]
 mulss  xmm0, dword, ptr, [rbp, -, 1212]
 movss  dword, ptr, [rbp, -, 2300], xmm0
 movss  xmm0, dword, ptr, [rbp, -, 120]
 mulss  xmm0, dword, ptr, [rbp, -, 1208]
 movss  dword, ptr, [rbp, -, 2296], xmm0
 xor  eax, eax
LBB6_17:
 mov  ecx, 100
LBB6_18:
 fn lt(&self, other: &$t) -> bool { (*self) < (*other) } (libcore/cmp.rs:1136)
 dec  ecx
 if self.start < self.end { (libcore/iter/range.rs:212)
 jne  LBB6_18
 intrinsics::wrapping_add(self, rhs) (libcore/num/mod.rs:3268)
 inc  eax
 fn lt(&self, other: &$t) -> bool { (*self) < (*other) } (libcore/cmp.rs:1136)
 cmp  eax, 1000000
 if self.start < self.end { (libcore/iter/range.rs:212)
 jne  LBB6_17
 let mut total = Z;
 mov  dword, ptr, [rbp, -, 36], 0
 xorps  xmm0, xmm0
LBB6_21:
 total += *el;
 addss  xmm0, dword, ptr, [rbx]
 addss  xmm0, dword, ptr, [rbx, +, 4]
 addss  xmm0, dword, ptr, [rbx, +, 8]
 addss  xmm0, dword, ptr, [rbx, +, 12]
 addss  xmm0, dword, ptr, [rbx, +, 16]
 addss  xmm0, dword, ptr, [rbx, +, 20]
 addss  xmm0, dword, ptr, [rbx, +, 24]
 $self.ptr.as_ptr() as *const T == $self.end (libcore/slice/mod.rs:3179)
 add  rbx, 28
 cmp  r14, rbx
 if is_empty!(self) { (libcore/slice/mod.rs:3303)
 je  LBB6_23
 total += *el;
 addss  xmm0, dword, ptr, [rbx]
 add  rbx, 4
 jmp  LBB6_21
LBB6_23:
 movss  dword, ptr, [rbp, -, 36], xmm0
 lea  rax, [rbp, -, 36]
 println!("{}", total);
 mov  qword, ptr, [rbp, -, 56], rax
 mov  rax, qword, ptr, [rip, +, __ZN4core3fmt5float52_$LT$impl$u20$core..fmt..Display$u20$for$u20$f32$GT$3fmt17hd3d5d52912365278E@GOTPCREL]
 mov  qword, ptr, [rbp, -, 48], rax
 Arguments { pieces, fmt: None, args } (libcore/fmt/mod.rs:328)
 lea  rax, [rip, +, l___unnamed_3]
 mov  qword, ptr, [rbp, -, 104], rax
 mov  qword, ptr, [rbp, -, 96], 2
 mov  qword, ptr, [rbp, -, 88], 0
 lea  rax, [rbp, -, 56]
 mov  qword, ptr, [rbp, -, 72], rax
 mov  qword, ptr, [rbp, -, 64], 1
 lea  rdi, [rbp, -, 104]
 println!("{}", total);
 call  std::io::stdio::_print
 }
 add  rsp, 3344
 pop  rbx
 pop  r12
 pop  r14
 pop  r15
 pop  rbp
 ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment