// File: /workspace/github_cpp_makefile_star2_O1/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, 0x45fd(%rip)      # 0x81b8
cmpl $0x0, 0x4(%rbx)
jle 0x3c22
xorl %r12d, %r12d
movq %rsp, %r15
cmpl $0x0, 0x20(%rbx)
jle 0x3c19
xorl %ebp, %ebp
cmpl $0x0, 0x1c(%rbx)
jle 0x3c12
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)
incq %r13
cmpl 0x1c(%rbx), %r13d
jl 0x3bd8
incl %ebp
cmpl 0x20(%rbx), %ebp
jl 0x3bcf
incl %r12d
cmpl 0x4(%rbx), %r12d
jl 0x3bc7
cmpl $0x0, 0x4(%rbx)
jle 0x3c59
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 0x3c2e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c7b
movq %rax, %r14
jmp 0x3c8c
movq %rax, %r14
jmp 0x3c9a
movq %rax, %r14
jmp 0x3ca8
jmp 0x3c7b
movq %rax, %r14
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x3c8c
callq 0x2230
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x3c9a
callq 0x2230
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x3ca8
callq 0x2230
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3cb6
callq 0x2230
movq %r14, %rdi
callq 0x22f0