\documentclass{article}

\usepackage[a6paper,margin=8mm,top=5mm,bottom=5mm]{geometry}
\usepackage{xcolor}
\usepackage[hidelinks]{hyperref}

\begin{document}

\pagestyle{empty}

\setlength\fboxrule{.5pt}
\setlength\fboxsep{0pt}
\renewcommand{\arraystretch}{1.2}
\setlength{\tabcolsep}{.5em}
\parindent0pt

\begin{center}
	\textbf{Clean RTS cheat sheet, x64 linux}
\end{center}

{\hfill%
\fcolorbox{black}{white}{%
	\begin{tabular}{ll}
		A0 & rcx \\
		A1 & rdx \\
		A2 & r8 \\
		\hline
		B0 & rax \\
		B1 & rbx \\
		B2 & r10 \\
		B3 & r11 \\
		B4 & r12 \\
		B5 & r13 \\
		B6 & r14 \\
		\hline
		asp & rsi \\
		bsp & rsp \\
		hp & rdi \\
		free & r15 \\
		\hline
		scratch & rbp \\
		scratch & r9 \\
	\end{tabular}%
}%
\hfill%
\fcolorbox{black}{white}{%
	\begin{tabular}{ll}
		rax & B0 \\
		rbx & B1 \\
		rcx & A0 \\
		rdx & A1 \\
		\hline
		rbp & scratch \\
		rdi & hp \\
		rsi & asp \\
		rsp & bsp \\
		\hline
		r8  & A2 \\
		r9  & scratch \\
		r10 & B2 \\
		r11 & B3 \\
		r12 & B4 \\
		r13 & B5 \\
		r14 & B6 \\
		r15 & free \\
	\end{tabular}%
}%
\hfill}

\bigskip
\centering
\fcolorbox{black}{white}{%
	\setlength{\tabcolsep}{.2em}%
	\begin{tabular}{lcccccc}
		\multicolumn{7}{c}{\textbf{Function Calls}}\\\hline
		Arguments:    & rdi & rsi & rdx & rcx & r8 & r9\\
									& hp  & asp & A1  & A0  & A2 & scr\\
		\hline
		Result:       & rax & rdx \\
									& B0  & A1 \\
		\hline
		Callee-saved: & rbx & rbp & r12 & r13 & r14 & r15 \\
									& B1  & scr & B4  & B5  & B6  & free \\
	\end{tabular}%
}

\bigskip
\scriptsize
\url{https://gitlab.science.ru.nl/cstaps/clean-rts-cheat-sheet}

\end{document}
