// File: davmac314[P]dinit/src/../dasynq/include/dasynq/timerfd.h
// Function: void dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>::init<dasynq::v2::epoll_loop<dasynq::interrupt_channel<dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>, dasynq::null_mutex>>>(dasynq::v2::epoll_loop<dasynq::interrupt_channel<dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>, dasynq::null_mutex>>*)
void init(T *loop_mech)
    {
        timerfd_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
        if (timerfd_fd == -1) {
            throw std::system_error(errno, std::system_category());
        }
        systemtime_fd = timerfd_create(CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK);
        if (systemtime_fd == -1) {
            close (timerfd_fd);
            throw std::system_error(errno, std::system_category());
        }

        try {
            loop_mech->add_fd_watch(timerfd_fd, &timerfd_fd, IN_EVENTS);
            loop_mech->add_fd_watch(systemtime_fd, &systemtime_fd, IN_EVENTS);
            Base::init(loop_mech);
        }
        catch (...) {
            close(timerfd_fd);
            close(systemtime_fd);
            throw;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x3420
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x98(%rax)
cmpl $-0x1, 0x98(%rax)
jne 0xb79f
movl $0x20, %edi
callq 0x3110
movq %rax, -0x38(%rbp)
movq %rax, -0x40(%rbp)
callq 0x3030
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x3140
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq %rax, %rdx
callq 0x77c0
jmp 0xb76e
movq -0x40(%rbp), %rdi
movq 0xe7ff(%rip), %rsi      # 0x19f78
movq 0xe828(%rip), %rdx      # 0x19fa8
callq 0x3400
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x3190
jmp 0xb8f2
xorl %edi, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x3420
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x9c(%rax)
cmpl $-0x1, 0x9c(%rax)
jne 0xb832
movq -0x28(%rbp), %rax
movl 0x98(%rax), %edi
callq 0x3440
movl $0x20, %edi
callq 0x3110
movq %rax, -0x50(%rbp)
movq %rax, -0x58(%rbp)
callq 0x3030
movl (%rax), %eax
movl %eax, -0x44(%rbp)
callq 0x3140
movq -0x50(%rbp), %rdi
movl -0x44(%rbp), %esi
movq %rax, %rdx
callq 0x77c0
jmp 0xb801
movq -0x58(%rbp), %rdi
movq 0xe76c(%rip), %rsi      # 0x19f78
movq 0xe795(%rip), %rdx      # 0x19fa8
callq 0x3400
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x3190
jmp 0xb8f2
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movq %rax, %rdx
addq $0x98, %rdx
movl 0x98(%rax), %esi
movl $0x1, %r8d
xorl %r9d, %r9d
movl %r8d, %ecx
callq 0x7420
jmp 0xb85d
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movq %rax, %rdx
addq $0x9c, %rdx
movl 0x9c(%rax), %esi
movl $0x1, %r8d
xorl %r9d, %r9d
movl %r8d, %ecx
callq 0x7420
jmp 0xb888
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb910
jmp 0xb897
jmp 0xb8ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30d0
movq -0x28(%rbp), %rax
movl 0x98(%rax), %edi
callq 0x3440
jmp 0xb8bf
movq -0x28(%rbp), %rax
movl 0x9c(%rax), %edi
callq 0x3440
jmp 0xb8d0
callq 0x3390
jmp 0xb903
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x33e0
jmp 0xb8ea
jmp 0xb8f2
addq $0x60, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3410
movq %rax, %rdi
callq 0x52b0
nopw %cs:(%rax,%rax)
nopl (%rax)