// File: /workspace/github_cpp_makefile_star2_O2/Sooryakiran[P]dotV/src/verilog.cpp
// Function: NAND::NAND(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>>)
NAND::NAND(string name, vector<wire> input_wires, wire output_wire){
    this->name = name;
    this->inputs = input_wires;
    this->outputs.push_back(output_wire);
    this->transistors = NAND_TRANSISTORS;
    this->definition = "module NAND_GATE(a, b, c);\n"
                    "\t input a, b;\n"
                    "\t output c;\n"
                    "\t assign #" + to_string(NAND_DELAY) + "  c = ~(a & b);\n"
                    "endmodule";

    this->generate = "NAND_GATE " + 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 %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %r12
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 %r12, %rsi
callq 0xa3e0
movl $0x4, 0x60(%rbx)
leaq -0x40(%rbp), %rdi
pushq $0x1
popq %rsi
callq 0xa9a0
leaq 0x113ad(%rip), %rsi     # 0x1f335
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0xac40
leaq 0x113d9(%rip), %rdx     # 0x1f375
leaq -0x120(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xa150
leaq 0x20(%rbx), %rdi
leaq -0x120(%rbp), %r12
movq %r12, %rsi
callq 0xa920
movq %r12, %rdi
callq 0xa370
leaq -0x60(%rbp), %rdi
callq 0xa370
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq 0x113af(%rip), %rsi     # 0x1f38f
leaq -0x80(%rbp), %rdi
movq %rbx, %rdx
callq 0xa6c0
leaq 0x1107a(%rip), %rdx     # 0x1f06d
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xa150
movq %r15, %rdi
xorl %esi, %esi
callq 0xa200
leaq -0xc0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0x11046(%rip), %rdx     # 0x1f070
leaq -0xe0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xa150
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xa200
leaq -0x100(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0x1100b(%rip), %rdx     # 0x1f070
leaq -0x40(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xa150
movq %r14, %rdi
xorl %esi, %esi
callq 0xa200
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0x1167b(%rip), %rdx     # 0x1f711
leaq -0x120(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xa150
addq $0x40, %rbx
leaq -0x120(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa920
movq %r14, %rdi
callq 0xa370
leaq -0x60(%rbp), %rdi
callq 0xa370
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq -0x100(%rbp), %rdi
callq 0xa370
leaq -0xe0(%rbp), %rdi
callq 0xa370
leaq -0xc0(%rbp), %rdi
callq 0xa370
leaq -0xa0(%rbp), %rdi
callq 0xa370
leaq -0x80(%rbp), %rdi
callq 0xa370
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0xa370
jmp 0xe15a
movq %rax, %r14
jmp 0xe163
movq %rax, %r14
jmp 0xe180
movq %rax, %r14
jmp 0xe19d
jmp 0xe1a8
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0xa370
jmp 0xe14f
movq %rax, %r14
leaq -0x40(%rbp), %rdi
jmp 0xe1a1
jmp 0xe1a8
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq -0x100(%rbp), %rdi
callq 0xa370
jmp 0xe174
movq %rax, %r14
leaq -0xe0(%rbp), %rdi
callq 0xa370
leaq -0xc0(%rbp), %rdi
callq 0xa370
jmp 0xe191
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
callq 0xa370
leaq -0x80(%rbp), %rdi
callq 0xa370
jmp 0xe1ab
movq %rax, %r14
movq %rbx, %rdi
callq 0xa230
movq %r14, %rdi
callq 0xad00
nop