// File: /workspace/github_cpp_makefile_star2_O3/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::weightm(std::istream&)
explicit weightm(std::istream &is)
    : features{get<int>(is)},
      clauses{get<int>(is)},
      p{get<double>(is)},
      gamma{get<double>(is)},
      threshold{get<int>(is)},
      states{get<int>(is)},
      literals{(2 * features - 1) / word_bits + 1},
      actmask{~((bool) (2 * features % word_bits) * ~((word) 0) << 2 * features % word_bits)},
      state{clauses, literals, states},
      lmask{literals},
      clause{clauses},
      weight{clauses} {
        mcg_state = get<uint64_t>(is);
        for (int c = 0; c < clauses; ++c)
            for (int l = 0; l < literals; ++l)
                for (int b = 0; b < states; ++b)
                    state(c, l, b) = get<word>(is);
        for (int c = 0; c < clauses; ++c)
            weight(c) = get<double>(is);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movl $0x4, %edx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x2220
movl (%r15), %eax
movl %eax, (%rbx)
movq %rsp, %r15
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movl (%r15), %eax
movl %eax, 0x4(%rbx)
movq %rsp, %r15
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movsd (%r15), %xmm0
movsd %xmm0, 0x8(%rbx)
movq %rsp, %r15
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movsd (%r15), %xmm0
movsd %xmm0, 0x10(%rbx)
movq %rsp, %r15
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movl (%r15), %eax
movl %eax, 0x18(%rbx)
movq %rsp, %r15
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movl (%r15), %eax
movl %eax, 0x1c(%rbx)
movl (%rbx), %ecx
movl 0x4(%rbx), %ebp
leal -0x1(%rcx,%rcx), %edx
leal 0x1e(,%rcx,2), %r15d
leal 0x1f(,%rcx,2), %esi
addl %ecx, %ecx
testl %edx, %edx
cmovnsl %edx, %r15d
sarl $0x5, %r15d
leal 0x1(%r15), %r12d
movl %r12d, 0x20(%rbx)
testl %ecx, %ecx
cmovnsl %ecx, %esi
andl $-0x20, %esi
subl %esi, %ecx
xorl %edx, %edx
movl %ecx, %esi
negl %esi
sbbl %edx, %edx
shll %cl, %edx
notl %edx
movl %edx, 0x24(%rbx)
movl %ebp, 0x28(%rbx)
movl %r12d, 0x2c(%rbx)
movl %eax, 0x30(%rbx)
imull %ebp, %eax
imull %r12d, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x2030
movq %rax, 0x38(%rbx)
movl %r12d, 0x40(%rbx)
movslq %r15d, %rax
leaq 0x4(,%rax,4), %rdi
callq 0x2030
movslq %ebp, %r15
movq %rax, 0x48(%rbx)
movl %ebp, 0x50(%rbx)
leaq (,%r15,4), %rdi
callq 0x2030
movq %rax, 0x58(%rbx)
movl %ebp, 0x60(%rbx)
shlq $0x3, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x68(%rbx)
movq %rsp, %rsi
movl $0x8, %edx
movq %r14, %rdi
callq 0x2220
movq (%rsp), %rax
movq %rax, 0x459d(%rip)      # 0x81b0
movl 0x4(%rbx), %ecx
testl %ecx, %ecx
jle 0x3cbc
movl 0x20(%rbx), %eax
xorl %r12d, %r12d
movq %rsp, %r15
testl %eax, %eax
jle 0x3c7f
movl 0x1c(%rbx), %ecx
xorl %ebp, %ebp
testl %ecx, %ecx
jle 0x3c76
xorl %r13d, %r13d
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movl (%rsp), %eax
movq 0x38(%rbx), %rcx
movslq 0x30(%rbx), %rdx
movl 0x2c(%rbx), %esi
imull %r12d, %esi
addl %ebp, %esi
movslq %esi, %rsi
imulq %rdx, %rsi
addq %r13, %rsi
movl %eax, (%rcx,%rsi,4)
movl 0x1c(%rbx), %ecx
incq %r13
cmpl %ecx, %r13d
jl 0x3c37
movl 0x20(%rbx), %eax
incl %ebp
cmpl %eax, %ebp
jl 0x3c30
movl 0x4(%rbx), %ecx
incl %r12d
cmpl %ecx, %r12d
jl 0x3c27
testl %ecx, %ecx
jle 0x3cbc
xorl %r12d, %r12d
movq %rsp, %r15
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movsd (%rsp), %xmm0
movq 0x68(%rbx), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x4(%rbx), %rax
cmpq %rax, %r12
jl 0x3c91
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3cde
movq %rax, %r14
jmp 0x3cef
movq %rax, %r14
jmp 0x3cfd
movq %rax, %r14
jmp 0x3d0b
jmp 0x3cde
movq %rax, %r14
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x3cef
callq 0x2230
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x3cfd
callq 0x2230
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x3d0b
callq 0x2230
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3d19
callq 0x2230
movq %r14, %rdi
callq 0x22e0
nop