<commit_before>diff --git a/include/xhyve/xhyve.h b/include/xhyve/xhyve.h
index 4f85664..88039c2 100644
--- a/include/xhyve/xhyve.h
+++ b/include/xhyve/xhyve.h
@@ -78,3 +78,4 @@ void vcpu_add(int fromcpu, int newcpu, uint64_t rip);
 int fbsdrun_vmexit_on_hlt(void);
 int fbsdrun_vmexit_on_pause(void);
 int fbsdrun_virtio_msix(void);
+static uint64_t (*fw_func)(void);
diff --git a/src/xhyve.c b/src/xhyve.c
index 97fd41f..2152247 100644
--- a/src/xhyve.c
+++ b/src/xhyve.c
@@ -70,8 +70,6 @@
 
 #define GUEST_NIO_PORT 0x488 /* guest upcalls via i/o port */
 
-#define MB (1024UL * 1024)
-
 typedef int (*vmexit_handler_t)(struct vm_exit *, int *vcpu);
 extern int vmexit_task_switch(struct vm_exit *, int *vcpu);
 
@@ -87,9 +85,6 @@ static int x2apic_mode = 0;	/* default is xAPIC */
 static int strictio;
 static int strictmsr = 1;
 
-static int acpi;
-
-static char *progname;
 static const int BSP = 0;
 
 static cpuset_t cpumask;
@@ -119,49 +114,6 @@ static struct mt_vmm_info {
 
 static uint64_t (*fw_func)(void);
 
-__attribute__ ((noreturn)) static void
-usage(int code)
-{
-
-        fprintf(stderr,
-                "Usage: %s [-behuwxACHPWY] [-c vcpus] [-g <gdb port>] [-l <lpc>]\n"
-		"       %*s [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] -f <fw>\n"
-		"       -A: create ACPI tables\n"
-		"       -c: # cpus (default 1)\n"
-		"       -C: include guest memory in core file\n"
-		"       -e: exit on unhandled I/O access\n"
-		"       -f: firmware\n"
-		"       -g: gdb port\n"
-		"       -h: help\n"
-		"       -H: vmexit from the guest on hlt\n"
-		"       -l: LPC device configuration\n"
-		"       -m: memory size in MB\n"
-		"       -p: pin 'vcpu' to 'hostcpu'\n"
-		"       -P: vmexit from the guest on pause\n"
-		"       -s: <slot,driver,configinfo> PCI slot config\n"
-		"       -u: RTC keeps UTC time\n"
-		"       -U: uuid\n"
-		"       -v: show build version\n"
-		"       -w: ignore unimplemented MSRs\n"
-		"       -W: force virtio to use single-vector MSI\n"
-		"       -x: local apic is in x2APIC mode\n"
-		"       -Y: disable MPtable generation\n",
-		progname, (int)strlen(progname), "");
-
-	exit(code);
-}
-
-__attribute__ ((noreturn)) static void
-show_version()
-{
-        fprintf(stderr, "%s: %s\n\n%s\n",progname, VERSION,
-		"xhyve is a port of FreeBSD's bhyve hypervisor to OS X that\n"
-		"works entirely in userspace and has no other dependencies.\n\n"
-		"Homepage: https://github.com/mist64/xhyve\n"
-		"License: BSD\n");
-		exit(0);
-}
-
 void
 xh_vm_inject_fault(int vcpu, int vector, int errcode_valid,
     uint32_t errcode)
@@ -628,324 +580,3 @@ vcpu_loop(int vcpu, uint64_t startrip)
 	}
 	fprintf(stderr, "vm_run error %d, errno %d\n", error, errno);
 }
-
-static int
-num_vcpus_allowed(void)
-{
-	return (VM_MAXCPU);
-}
-
-static int
-expand_number(const char *buf, uint64_t *num)
-{
-	char *endptr;
-	uintmax_t umaxval;
-	uint64_t number;
-	unsigned shift;<commit_msg>Fixes SIGILL. Closes #1<commit_after>diff --git a/include/xhyve/xhyve.h b/include/xhyve/xhyve.h
index 4f85664..a4c1bc4 100644
--- a/include/xhyve/xhyve.h
+++ b/include/xhyve/xhyve.h
@@ -78,3 +78,4 @@ void vcpu_add(int fromcpu, int newcpu, uint64_t rip);
 int fbsdrun_vmexit_on_hlt(void);
 int fbsdrun_vmexit_on_pause(void);
 int fbsdrun_virtio_msix(void);
+extern uint64_t (*fw_func)(void);
diff --git a/src/xhyve.c b/src/xhyve.c
index 97fd41f..60707d0 100644
--- a/src/xhyve.c
+++ b/src/xhyve.c
@@ -70,8 +70,6 @@
 
 #define GUEST_NIO_PORT 0x488 /* guest upcalls via i/o port */
 
-#define MB (1024UL * 1024)
-
 typedef int (*vmexit_handler_t)(struct vm_exit *, int *vcpu);
 extern int vmexit_task_switch(struct vm_exit *, int *vcpu);
 
@@ -87,9 +85,6 @@ static int x2apic_mode = 0;	/* default is xAPIC */
 static int strictio;
 static int strictmsr = 1;
 
-static int acpi;
-
-static char *progname;
 static const int BSP = 0;
 
 static cpuset_t cpumask;
@@ -117,50 +112,7 @@ static struct mt_vmm_info {
 } mt_vmm_info[VM_MAXCPU];
 #pragma clang diagnostic pop
 
-static uint64_t (*fw_func)(void);
-
-__attribute__ ((noreturn)) static void
-usage(int code)
-{
-
-        fprintf(stderr,
-                "Usage: %s [-behuwxACHPWY] [-c vcpus] [-g <gdb port>] [-l <lpc>]\n"
-		"       %*s [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] -f <fw>\n"
-		"       -A: create ACPI tables\n"
-		"       -c: # cpus (default 1)\n"
-		"       -C: include guest memory in core file\n"
-		"       -e: exit on unhandled I/O access\n"
-		"       -f: firmware\n"
-		"       -g: gdb port\n"
-		"       -h: help\n"
-		"       -H: vmexit from the guest on hlt\n"
-		"       -l: LPC device configuration\n"
-		"       -m: memory size in MB\n"
-		"       -p: pin 'vcpu' to 'hostcpu'\n"
-		"       -P: vmexit from the guest on pause\n"
-		"       -s: <slot,driver,configinfo> PCI slot config\n"
-		"       -u: RTC keeps UTC time\n"
-		"       -U: uuid\n"
-		"       -v: show build version\n"
-		"       -w: ignore unimplemented MSRs\n"
-		"       -W: force virtio to use single-vector MSI\n"
-		"       -x: local apic is in x2APIC mode\n"
-		"       -Y: disable MPtable generation\n",
-		progname, (int)strlen(progname), "");
-
-	exit(code);
-}
-
-__attribute__ ((noreturn)) static void
-show_version()
-{
-        fprintf(stderr, "%s: %s\n\n%s\n",progname, VERSION,
-		"xhyve is a port of FreeBSD's bhyve hypervisor to OS X that\n"
-		"works entirely in userspace and has no other dependencies.\n\n"
-		"Homepage: https://github.com/mist64/xhyve\n"
-		"License: BSD\n");
-		exit(0);
-}
+uint64_t (*fw_func)(void);
 
 void
 xh_vm_inject_fault(int vcpu, int vector, int errcode_valid,
@@ -628,324 +580,3 @@ vcpu_loop(int vcpu, uint64_t startrip)
 	}
 	fprintf(stderr, "vm_run error %d, errno %d\n", error, errno);
 }
-
-static int
-num_vcpus_allowed(void)
-{
-	return (VM_MAXCPU);
-}
-
-static int
-expand_number(const char *buf, uint64_t *num)
-{
-	char *endptr;
-	uintmax_t umaxval;
-	uint64_t number;
-	unsigned shift;
{'fraction_non_alphanumeric': 0.1684672518568535, 'fraction_numerical': 0.03561782579338285, 'mean_word_length': 2.666460396039604, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4755389', 'n_tokens_mistral': 2731, 'n_tokens_neox': 2552, 'n_words': 613}