// File: davmac314[P]dinit/src/includes/service.h
// Function: service_record::service_record(service_set*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, service_type_t, std::__cxx11::list<prelim_dep, std::allocator<prelim_dep>> const&)
service_record(service_set *set, const string &name, service_type_t record_type_p,
            const std::list<prelim_dep> &deplist_p)
        : service_record(set, name)
    {
        services = set;
        service_name = name;
        this->record_type = record_type_p;

        try {
            for (auto & pdep : deplist_p) {
                auto b = depends_on.emplace(depends_on.end(), this, pdep.to, pdep.dep_type);
                try {
                    pdep.to->dependents.push_back(&(*b));
                }
                catch (...) {
                    // we'll roll back one now and re-throw:
                    depends_on.pop_back();
                    throw;
                }
            }
        }
        catch (...) {
            for (auto & dep : depends_on) {
                dep.get_to()->dependents.pop_back();
            }
            throw;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x33620
movq -0xa8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, 0x148(%rdi)
movq -0x18(%rbp), %rsi
addq $0x8, %rdi
callq 0xa050
jmp 0x2fe27
movq -0xa8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3cc00
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3cc30
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3cc60
testb $0x1, %al
jne 0x2fe6c
jmp 0x30028
leaq -0x48(%rbp), %rdi
callq 0x3cc90
movq -0xa8(%rbp), %rdi
movq %rax, -0x58(%rbp)
addq $0x118, %rdi            # imm = 0x118
movq %rdi, -0xb8(%rbp)
callq 0x30270
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x304b0
movq -0xa8(%rbp), %rax
movq -0xb8(%rbp), %rdi
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rcx
movq %rcx, %r8
addq $0x8, %r8
movq -0x68(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x3ccc0
movq %rax, -0xb0(%rbp)
jmp 0x2fed7
movq -0xb0(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq (%rax), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0xc0(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x302d0
movq -0xc0(%rbp), %rdi
movq %rax, -0x80(%rbp)
leaq -0x80(%rbp), %rsi
callq 0x302f0
jmp 0x2ff15
jmp 0x30018
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3004f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x2ff80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa240
movq -0xa8(%rbp), %rdi
addq $0x118, %rdi            # imm = 0x118
callq 0x3cd40
callq 0xaaf0
jmp 0x3006c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xac30
jmp 0x2ff7e
jmp 0x2ff80
movq -0x30(%rbp), %rdi
callq 0xa240
movq -0xa8(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x30240
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x30270
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x302a0
testb $0x1, %al
jne 0x2ffdc
jmp 0x3002a
leaq -0x90(%rbp), %rdi
callq 0x302d0
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x3cda0
movq %rax, %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x30350
leaq -0x90(%rbp), %rdi
callq 0x30330
jmp 0x2ffc3
jmp 0x3001a
leaq -0x48(%rbp), %rdi
callq 0x3cd80
jmp 0x2fe56
jmp 0x30046
callq 0xaaf0
jmp 0x3006c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xac30
jmp 0x30044
jmp 0x3004f
addq $0xc0, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x3cdc0
movq -0x30(%rbp), %rdi
callq 0xacc0
movq %rax, %rdi
callq 0xfa30
nopl (%rax)