\documentclass[a4paper,twoside]{article}

\newif\ifdraft
\draftfalse

\ifdraft
	\usepackage[inner=2cm,outer=2cm,top=2cm,bottom=25mm]{geometry}
\else
	\usepackage[hmarginratio={3:2}]{geometry}
\fi
\usepackage{multicol}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[scaled]{beramono}

\usepackage[british]{babel}
\usepackage[babel=true]{csquotes}
\usepackage{enumitem}
\usepackage{amsmath}

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\definecolor{linkcolor}{rgb}{0,0.65,0}
\definecolor{citecolor}{rgb}{0.65,0,0}
\definecolor{urlcolor}{rgb}{0,0,0.65}
\usepackage[colorlinks=true,linkcolor=linkcolor,urlcolor=urlcolor,citecolor=citecolor]{hyperref}

\usepackage{cleveref}
\crefname{figure}{figure}{figures}

\usepackage[style=authoryear,backend=biber]{biblatex}
\bibliography{thesis}
\renewcommand\nameyeardelim{, }
\DefineBibliographyStrings{english}{%
	urlseen={Retrieved}
}

\usepackage{rutitlepage}
\usepackage{latexgit}

\usepackage{minted}
\definecolor{mintedbg}{rgb}{0.95,0.95,0.95}
\setminted{%
	autogobble,
	tabsize=4,
	fontsize=\scriptsize,
	style=lovelace,
	bgcolor=mintedbg
}
\BeforeBeginEnvironment{minted}{\noindent\begin{minipage}{\linewidth}}
\AfterEndEnvironment{minted}{\end{minipage}}
\setmintedinline{fontsize=\footnotesize,bgcolor={}}
\usepackage{ual}
\usepackage{clean}
\newmintinline[bash]{bash}{style=bw}

\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{positioning}

\let\oldtexttt\texttt
\def\texttt#1{\oldtexttt{\footnotesize #1}}

\newcommand*{\blankpage}{%
	\vspace*{\fill}
	{\centering\it This page intentionally left blank.\par}
	\vspace{\fill}}
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
	\blankpage\thispagestyle{empty}\newpage
		\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

\let\oldsection\section
\renewcommand{\section}{\ifdraft\else\clearpage\fi\oldsection}

\raggedcolumns
\renewcommand{\baselinestretch}{1.1} 

\title{Code generation for Thumb-2 processors}
\author{Camil Staps}
\date{\gitcommitdate[formatDate]}

\def\todo#1{\textcolor{orange}{\textsc{TODO}: \emph{#1}}}
