// File: /workspace/github_cpp_makefile_star2_O2/Sooryakiran[P]dotV/src/verilog.cpp
// Function: AND_N_BIT::AND_N_BIT(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>, int)
AND_N_BIT::AND_N_BIT(string name, vector<wire> input_wires, wire output_wire, int n_bits){
    this->name = name;
    this->inputs = input_wires;
    this->outputs.push_back(output_wire);
    this->transistors = AND_TRANSISTORS*n_bits;
    this->n_bits = n_bits;

    string array_def = "[" + to_string(n_bits -1) + ":0]";
    this->definition = "module AND_GATE_" + to_string(n_bits) + "_BIT(a, b, c);\n"
                       "\t input " + array_def + " a, b;\n"
                       "\t output " + array_def + " c;\n"
                       "\t assign #" + to_string(AND_DELAY) + " c = a & b;\n"
                       "endmodule";    

    this->generate =  "AND_GATE_" + to_string(this->n_bits) + "_BIT " + this->name + + " (" + this->inputs.at(0) + ", " + this->inputs.at(1) + ", " + this->outputs.at(0) + ");";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %r8d, %r12d
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0xa690
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa410
leaq 0x80(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xa810
leaq 0x98(%rbx), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0xa3e0
imull $0x6, %r12d, %eax
movl %eax, 0x60(%rbx)
movl %r12d, 0x190(%rbx)
leal -0x1(%r12), %esi
leaq -0x48(%rbp), %rdi
callq 0xa9a0
leaq 0x127d5(%rip), %rsi     # 0x1f1b3
leaq -0x168(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0xac40
leaq 0x1282c(%rip), %rdx     # 0x1f221
leaq -0x188(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0xa150
leaq -0x168(%rbp), %rdi
callq 0xa370
leaq -0x48(%rbp), %rdi
callq 0xa370
leaq -0x88(%rbp), %rdi
movl %r12d, %esi
callq 0xa9a0
leaq 0x127f2(%rip), %rsi     # 0x1f225
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xac40
leaq 0x127e9(%rip), %rdx     # 0x1f236
leaq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xa150
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0xaaf0
leaq 0x127cd(%rip), %rdx     # 0x1f24e
leaq -0x108(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xa150
leaq -0x128(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0xaaf0
leaq 0x12747(%rip), %rdx     # 0x1f1fc
leaq -0x148(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xa150
leaq -0x68(%rbp), %rdi
pushq $0x2
popq %rsi
callq 0xa9a0
leaq -0x48(%rbp), %rdi
leaq -0x148(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0xa640
leaq 0x1271c(%rip), %rdx     # 0x1f20b
leaq -0x168(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xa150
leaq 0x20(%rbx), %rdi
leaq -0x168(%rbp), %r12
movq %r12, %rsi
callq 0xa920
movq %r12, %rdi
callq 0xa370
leaq -0x48(%rbp), %rdi
callq 0xa370
leaq -0x68(%rbp), %rdi
callq 0xa370
leaq -0x148(%rbp), %rdi
callq 0xa370
leaq -0x128(%rbp), %rdi
callq 0xa370
leaq -0x108(%rbp), %rdi
callq 0xa370
leaq -0xe8(%rbp), %rdi
callq 0xa370
leaq -0xc8(%rbp), %rdi
callq 0xa370
leaq -0xa8(%rbp), %rdi
callq 0xa370
leaq -0x88(%rbp), %rdi
callq 0xa370
movl 0x190(%rbx), %esi
leaq -0x1a8(%rbp), %rdi
callq 0xa9a0
leaq 0x12693(%rip), %rsi     # 0x1f22c
leaq -0x68(%rbp), %rdi
leaq -0x1a8(%rbp), %rdx
callq 0xac40
leaq 0x12616(%rip), %rdx     # 0x1f1c6
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xa150
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0xaaf0
leaq 0x12490(%rip), %rdx     # 0x1f06d
leaq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xa150
movq %r15, %rdi
xorl %esi, %esi
callq 0xa200
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0x12459(%rip), %rdx     # 0x1f070
leaq -0x108(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xa150
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xa200
leaq -0x128(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0x1241e(%rip), %rdx     # 0x1f070
leaq -0x148(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xa150
movq %r14, %rdi
xorl %esi, %esi
callq 0xa200
leaq -0x48(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0x12a88(%rip), %rdx     # 0x1f711
leaq -0x168(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xa150
addq $0x40, %rbx
leaq -0x168(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa920
movq %r14, %rdi
callq 0xa370
leaq -0x48(%rbp), %rdi
callq 0xa370
leaq -0x148(%rbp), %rdi
callq 0xa370
leaq -0x128(%rbp), %rdi
callq 0xa370
leaq -0x108(%rbp), %rdi
callq 0xa370
leaq -0xe8(%rbp), %rdi
callq 0xa370
leaq -0xc8(%rbp), %rdi
callq 0xa370
leaq -0xa8(%rbp), %rdi
callq 0xa370
leaq -0x88(%rbp), %rdi
callq 0xa370
leaq -0x68(%rbp), %rdi
callq 0xa370
leaq -0x1a8(%rbp), %rdi
callq 0xa370
leaq -0x188(%rbp), %rdi
callq 0xa370
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0xa370
jmp 0xce4b
movq %rax, %r14
jmp 0xce57
movq %rax, %r14
jmp 0xce74
movq %rax, %r14
jmp 0xce91
movq %rax, %r14
jmp 0xce9d
movq %rax, %r14
jmp 0xcea9
movq %rax, %r14
jmp 0xceb2
jmp 0xce1e
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0xa370
jmp 0xcd9e
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0xa370
jmp 0xcdac
movq %rax, %r14
leaq -0x148(%rbp), %rdi
callq 0xa370
jmp 0xcdbd
movq %rax, %r14
leaq -0x128(%rbp), %rdi
callq 0xa370
jmp 0xcdce
movq %rax, %r14
leaq -0x108(%rbp), %rdi
callq 0xa370
leaq -0xe8(%rbp), %rdi
callq 0xa370
leaq -0xc8(%rbp), %rdi
callq 0xa370
leaq -0xa8(%rbp), %rdi
callq 0xa370
leaq -0x88(%rbp), %rdi
jmp 0xceb9
movq %rax, %r14
jmp 0xcdda
movq %rax, %r14
jmp 0xcde6
movq %rax, %r14
jmp 0xcdf2
movq %rax, %r14
jmp 0xcdfe
movq %rax, %r14
jmp 0xcebe
movq %rax, %r14
leaq -0x168(%rbp), %rdi
callq 0xa370
jmp 0xce3a
movq %rax, %r14
leaq -0x48(%rbp), %rdi
jmp 0xcec5
jmp 0xceda
movq %rax, %r14
leaq -0x148(%rbp), %rdi
callq 0xa370
leaq -0x128(%rbp), %rdi
callq 0xa370
jmp 0xce68
movq %rax, %r14
leaq -0x108(%rbp), %rdi
callq 0xa370
leaq -0xe8(%rbp), %rdi
callq 0xa370
jmp 0xce85
movq %rax, %r14
leaq -0xc8(%rbp), %rdi
callq 0xa370
leaq -0xa8(%rbp), %rdi
callq 0xa370
leaq -0x88(%rbp), %rdi
callq 0xa370
leaq -0x68(%rbp), %rdi
callq 0xa370
leaq -0x1a8(%rbp), %rdi
callq 0xa370
leaq -0x188(%rbp), %rdi
callq 0xa370
movq %rbx, %rdi
callq 0xa230
movq %r14, %rdi
callq 0xad00
movq %rax, %r14
jmp 0xceca
nop