// File: /workspace/github_cpp_makefile_star2_O2/Sooryakiran[P]dotV/src/verilog.cpp
// Function: FLIP_FLOP::FLIP_FLOP(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>>)
FLIP_FLOP::FLIP_FLOP(string name, vector<wire> input_wires, wire output_wire){
    this->name = name;
    this->inputs = input_wires;
    this->outputs.push_back(output_wire);

    this->declare("A", CHIP_INPUTS);
    this->declare("CLK", CHIP_INPUTS);
    this->declare("OUT", CHIP_OUTPUTS_REG);

    BehaviourModel flipflop({"posedge CLK"});
    flipflop.add("OUT", "#" + to_string(FLIP_FLOP_DELAY) + " A", N_BLOCK);
    flipflop.num_transistors = FLIP_FLOP_TRANSISTORS; 

    this->add_submodule(flipflop);

    this->definition = this->auto_gen("module FLIP_FLOP");
    this->generate = "FLIP_FLOP " + 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 $0x250, %rsp            # imm = 0x250
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
leaq 0xb8ad(%rip), %rsi      # 0x1f6f2
leaq -0x230(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0xac60
leaq -0x230(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa270
leaq -0x230(%rbp), %rdi
callq 0xa370
leaq 0xb871(%rip), %rsi      # 0x1f6ed
leaq -0x210(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0xac60
leaq -0x210(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa270
leaq -0x210(%rbp), %rdi
callq 0xa370
leaq 0xb8ea(%rip), %rsi      # 0x1f79d
leaq -0x1f0(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0xac60
leaq -0x1f0(%rbp), %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0xa270
leaq -0x1f0(%rbp), %rdi
callq 0xa370
leaq 0xb7fa(%rip), %rsi      # 0x1f6e5
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0xac60
leaq -0x98(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x1
popq %rdx
leaq -0x80(%rbp), %rcx
callq 0xa170
leaq -0xd0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xa8f0
leaq -0x98(%rbp), %rdi
callq 0xa550
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq 0xb85f(%rip), %rsi      # 0x1f79d
leaq -0x1d0(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0xac60
leaq -0x60(%rbp), %rdi
pushq $0x6
popq %rsi
callq 0xa9a0
leaq 0xb2a8(%rip), %rsi      # 0x1f209
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0xac40
leaq 0xb77c(%rip), %rdx      # 0x1f6f1
leaq -0x1b0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xa150
leaq -0xd0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa8b0
leaq -0x1b0(%rbp), %rdi
callq 0xa370
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq -0x60(%rbp), %rdi
callq 0xa370
leaq -0x1d0(%rbp), %rdi
callq 0xa370
leaq -0xd0(%rbp), %rsi
movl $0x12, (%rsi)
leaq -0x268(%rbp), %rdi
callq 0xa3d0
leaq 0x178(%rbx), %rdi
leaq -0x268(%rbp), %rsi
callq 0xa130
leaq -0x268(%rbp), %rdi
callq 0xaa60
leaq 0xb6ea(%rip), %rsi      # 0x1f6f4
leaq -0x190(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0xac60
leaq -0x40(%rbp), %rdi
leaq -0x190(%rbp), %rdx
movq %rbx, %rsi
callq 0xa3f0
leaq 0x20(%rbx), %rdi
leaq -0x40(%rbp), %r12
movq %r12, %rsi
callq 0xa920
movq %r12, %rdi
callq 0xa370
leaq -0x190(%rbp), %rdi
callq 0xa370
leaq 0xb6ad(%rip), %rsi      # 0x1f705
leaq -0xf0(%rbp), %rdi
movq %rbx, %rdx
callq 0xa6c0
leaq 0xafff(%rip), %rdx      # 0x1f06d
leaq -0x110(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xa150
movq %r15, %rdi
xorl %esi, %esi
callq 0xa200
leaq -0x130(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0xafc8(%rip), %rdx      # 0x1f070
leaq -0x150(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xa150
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xa200
leaq -0x170(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0xaf8d(%rip), %rdx      # 0x1f070
leaq -0x80(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xa150
movq %r14, %rdi
xorl %esi, %esi
callq 0xa200
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movq %rax, %rdx
callq 0xaaf0
leaq 0xb5fc(%rip), %rdx      # 0x1f710
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xa150
addq $0x40, %rbx
leaq -0x40(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa920
movq %r14, %rdi
callq 0xa370
leaq -0x60(%rbp), %rdi
callq 0xa370
leaq -0x80(%rbp), %rdi
callq 0xa370
leaq -0x170(%rbp), %rdi
callq 0xa370
leaq -0x150(%rbp), %rdi
callq 0xa370
leaq -0x130(%rbp), %rdi
callq 0xa370
leaq -0x110(%rbp), %rdi
callq 0xa370
leaq -0xf0(%rbp), %rdi
callq 0xa370
leaq -0xd0(%rbp), %rdi
callq 0xaa60
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0xa370
jmp 0x14290
movq %rax, %r14
jmp 0x14299
movq %rax, %r14
jmp 0x142b6
movq %rax, %r14
jmp 0x142d3
jmp 0x14234
movq %rax, %r14
leaq -0x190(%rbp), %rdi
jmp 0x142da
jmp 0x14234
movq %rax, %r14
leaq -0x268(%rbp), %rdi
callq 0xaa60
jmp 0x142df
jmp 0x14234
movq %rax, %r14
leaq -0x1b0(%rbp), %rdi
callq 0xa370
jmp 0x1420c
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0xa370
jmp 0x1421a
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0xa370
jmp 0x14228
movq %rax, %r14
leaq -0x1d0(%rbp), %rdi
jmp 0x142da
movq %rax, %r14
jmp 0x142df
movq %rax, %r14
leaq -0x98(%rbp), %rdi
callq 0xa550
jmp 0x14250
movq %rax, %r14
leaq -0x40(%rbp), %rdi
jmp 0x14284
jmp 0x142ed
movq %rax, %r14
leaq -0x1f0(%rbp), %rdi
jmp 0x14284
jmp 0x142ed
movq %rax, %r14
leaq -0x210(%rbp), %rdi
jmp 0x14284
jmp 0x142ed
movq %rax, %r14
leaq -0x230(%rbp), %rdi
callq 0xa370
jmp 0x142f0
jmp 0x142ed
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0xa370
leaq -0x170(%rbp), %rdi
callq 0xa370
jmp 0x142aa
movq %rax, %r14
leaq -0x150(%rbp), %rdi
callq 0xa370
leaq -0x130(%rbp), %rdi
callq 0xa370
jmp 0x142c7
movq %rax, %r14
leaq -0x110(%rbp), %rdi
callq 0xa370
leaq -0xf0(%rbp), %rdi
callq 0xa370
leaq -0xd0(%rbp), %rdi
callq 0xaa60
jmp 0x142f0
movq %rax, %r14
movq %rbx, %rdi
callq 0xa230
movq %r14, %rdi
callq 0xad00