#pragma once
#include <stdint.h>

typedef struct
{
    uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
    uint64_t rdi, rsi, rbp, rdx, rcx, rbx, rax;
    uint64_t interrupt, error;
    uint64_t rip, cs, rflags, rsp, ss;
} __attribute__((packed)) Registers;

typedef void (*ISRHandler)(Registers* regs);

void x86_64_ISR_Initialize(void);
void x86_64_ISR_RegisterHandler(int interrupt, ISRHandler handler);