	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hammer_time_xen_legacy         ## -- Begin function hammer_time_xen_legacy
	.p2align	4, 0x90
_hammer_time_xen_legacy:                ## @hammer_time_xen_legacy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %r15
	movq	_XEN_PV_DOMAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_xen_domain_type@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_VM_GUEST_XEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_vm_guest@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	testq	%r12, %r12
	jne	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_xc_printf
	movq	_SHUTDOWN_crash@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HYPERVISOR_shutdown
LBB0_3:
	movl	8(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_xc_printf
	movslq	(%rbx), %rdx
	movq	_KERNBASE@GOTPCREL(%rip), %r13
	movq	(%r13), %r9
	movq	_legacy_start_info@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	(%r14), %rax
	addq	%r9, %rax
	movq	_HYPERVISOR_shared_info@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%rdx, %rax
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	cmpq	$8, %rdx
	jb	LBB0_6
## %bb.4:
	leaq	(%r12,%r15,2), %r8
	addq	%r12, %r15
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	shrq	$3, %rax
	cmpq	$2, %rax
	movl	$1, %r10d
	cmovaeq	%rax, %r10
	xorl	%edi, %edi
	movq	_PG_V@GOTPCREL(%rip), %r14
	movq	_PG_RW@GOTPCREL(%rip), %rax
	movq	_PG_U@GOTPCREL(%rip), %rsi
	movq	_PG_PS@GOTPCREL(%rip), %r11
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rbx
	subq	%r9, %rbx
	movq	%rbx, (%r12,%rcx,8)
	orq	(%r14), %rbx
	orq	(%rax), %rbx
	orq	(%rsi), %rbx
	movq	%rbx, (%r12,%rcx,8)
	movq	%r8, %rdx
	subq	(%r13), %rdx
	movq	%rdx, (%r15,%rcx,8)
	orq	(%r14), %rdx
	orq	(%rax), %rdx
	orq	(%rsi), %rdx
	movq	%rdx, (%r15,%rcx,8)
	movl	%edi, %edx
	andl	$-2097152, %edx                 ## imm = 0xFFE00000
	movq	%rdx, (%r8,%rcx,8)
	orq	(%r14), %rdx
	orq	(%rax), %rdx
	orq	(%r11), %rdx
	orq	(%rsi), %rdx
	movq	%rdx, (%r8,%rcx,8)
	incq	%rcx
	movq	(%r13), %r9
	addq	$2097152, %rdi                  ## imm = 0x200000
	cmpq	%rcx, %r10
	jne	LBB0_5
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rax,2), %eax
	cltq
	movq	%r12, %r14
	subq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	addq	%rax, %r14
	subq	%r9, %r12
	movq	%r12, %rdi
	callq	_load_cr3
	movq	(%r13), %rbx
	addq	%r14, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	movslq	(%r15), %rsi
	addq	%rsi, %r14
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bzero_early
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_init_static_kenv
	movq	_xen_legacy_init_ops@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_init_ops@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_xen_apic_ops@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_apic_ops@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_legacy_info@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_hypervisor_info@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%edi, %edi
	movq	%r14, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hammer_time                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_XEN_PV_DOMAIN,4,2              ## @XEN_PV_DOMAIN
	.comm	_xen_domain_type,4,2            ## @xen_domain_type
	.comm	_VM_GUEST_XEN,4,2               ## @VM_GUEST_XEN
	.comm	_vm_guest,4,2                   ## @vm_guest
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: invalid start_info or xen stack, halting\n"

	.comm	_SHUTDOWN_crash,4,2             ## @SHUTDOWN_crash
L_.str.1:                               ## @.str.1
	.asciz	"FreeBSD PVH running on %s\n"

	.comm	_KERNBASE,8,3                   ## @KERNBASE
	.comm	_legacy_start_info,8,3          ## @legacy_start_info
	.comm	_HYPERVISOR_shared_info,8,3     ## @HYPERVISOR_shared_info
	.comm	_PG_V,8,3                       ## @PG_V
	.comm	_PG_RW,8,3                      ## @PG_RW
	.comm	_PG_U,8,3                       ## @PG_U
	.comm	_PG_PS,8,3                      ## @PG_PS
	.comm	_xen_legacy_init_ops,4,2        ## @xen_legacy_init_ops
	.comm	_init_ops,4,2                   ## @init_ops
	.comm	_xen_apic_ops,4,2               ## @xen_apic_ops
	.comm	_apic_ops,4,2                   ## @apic_ops
	.comm	_legacy_info,4,2                ## @legacy_info
	.comm	_hypervisor_info,4,2            ## @hypervisor_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hammer_time_xen_legacy         ; -- Begin function hammer_time_xen_legacy
	.p2align	2
_hammer_time_xen_legacy:                ; @hammer_time_xen_legacy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldrsw	x23, [x21]
Lloh2:
	adrp	x8, _XEN_PV_DOMAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XEN_PV_DOMAIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _xen_domain_type@GOTPAGE
Lloh6:
	ldr	x9, [x9, _xen_domain_type@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
Lloh8:
	adrp	x8, _VM_GUEST_XEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_GUEST_XEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _vm_guest@GOTPAGE
Lloh12:
	ldr	x9, [x9, _vm_guest@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	cbz	x0, LBB0_2
; %bb.1:
	cbnz	x19, LBB0_3
LBB0_2:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_xc_printf
Lloh16:
	adrp	x8, _SHUTDOWN_crash@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SHUTDOWN_crash@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_HYPERVISOR_shutdown
LBB0_3:
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_xc_printf
	ldrsw	x8, [x21]
Lloh21:
	adrp	x22, _KERNBASE@GOTPAGE
Lloh22:
	ldr	x22, [x22, _KERNBASE@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh23:
	adrp	x10, _legacy_start_info@GOTPAGE
Lloh24:
	ldr	x10, [x10, _legacy_start_info@GOTPAGEOFF]
Lloh25:
	str	x20, [x10]
	ldr	x10, [x20]
	add	x10, x10, x9
Lloh26:
	adrp	x11, _HYPERVISOR_shared_info@GOTPAGE
Lloh27:
	ldr	x11, [x11, _HYPERVISOR_shared_info@GOTPAGEOFF]
Lloh28:
	str	x10, [x11]
	cmp	w8, #8
	b.hs	LBB0_5
; %bb.4:
	mov	x3, x9
	b	LBB0_7
LBB0_5:
	mov	x10, #0
	add	x11, x23, x19
	add	x12, x19, x23, lsl #1
	lsr	x13, x8, #3
	cmp	x13, #1
	csinc	x13, x13, xzr, hi
Lloh29:
	adrp	x14, _PG_V@GOTPAGE
Lloh30:
	ldr	x14, [x14, _PG_V@GOTPAGEOFF]
Lloh31:
	adrp	x15, _PG_RW@GOTPAGE
Lloh32:
	ldr	x15, [x15, _PG_RW@GOTPAGEOFF]
Lloh33:
	adrp	x16, _PG_U@GOTPAGE
Lloh34:
	ldr	x16, [x16, _PG_U@GOTPAGEOFF]
Lloh35:
	adrp	x17, _PG_PS@GOTPAGE
Lloh36:
	ldr	x17, [x17, _PG_PS@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x11
	mov	x2, x12
	mov	x3, x9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	x3, x11, x3
	str	x3, [x0]
	ldr	x4, [x14]
	ldr	x5, [x15]
	ldr	x6, [x16]
	orr	x3, x4, x3
	orr	x3, x3, x5
	orr	x3, x3, x6
	str	x3, [x0], #8
	ldr	x3, [x22]
	sub	x3, x12, x3
	str	x3, [x1]
	ldr	x4, [x14]
	ldr	x5, [x15]
	ldr	x6, [x16]
	orr	x3, x4, x3
	orr	x3, x3, x5
	orr	x3, x3, x6
	str	x3, [x1], #8
	and	x3, x10, #0xffe00000
	str	x3, [x2]
	ldr	x4, [x14]
	ldr	x5, [x15]
	ldr	x6, [x17]
	ldr	x7, [x16]
	orr	x3, x4, x3
	orr	x3, x3, x5
	orr	x3, x3, x6
	orr	x3, x3, x7
	str	x3, [x2], #8
	ldr	x3, [x22]
	add	x10, x10, #512, lsl #12         ; =2097152
	subs	x13, x13, #1
	b.ne	LBB0_6
LBB0_7:
	add	w8, w8, w8, lsl #1
	sub	x9, x19, x9
	add	x20, x9, w8, sxtw
	sub	x0, x19, x3
	bl	_load_cr3
	ldr	x8, [x22]
	add	x19, x8, x20
	ldrsw	x1, [x21]
	add	x20, x20, x1
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_bzero_early
	ldr	w1, [x21]
	mov	x0, x19
	bl	_init_static_kenv
Lloh37:
	adrp	x8, _xen_legacy_init_ops@GOTPAGE
Lloh38:
	ldr	x8, [x8, _xen_legacy_init_ops@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	adrp	x9, _init_ops@GOTPAGE
Lloh41:
	ldr	x9, [x9, _init_ops@GOTPAGEOFF]
Lloh42:
	str	w8, [x9]
Lloh43:
	adrp	x8, _xen_apic_ops@GOTPAGE
Lloh44:
	ldr	x8, [x8, _xen_apic_ops@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	adrp	x9, _apic_ops@GOTPAGE
Lloh47:
	ldr	x9, [x9, _apic_ops@GOTPAGEOFF]
Lloh48:
	str	w8, [x9]
Lloh49:
	adrp	x8, _legacy_info@GOTPAGE
Lloh50:
	ldr	x8, [x8, _legacy_info@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
Lloh52:
	adrp	x9, _hypervisor_info@GOTPAGE
Lloh53:
	ldr	x9, [x9, _hypervisor_info@GOTPAGEOFF]
Lloh54:
	str	w8, [x9]
	mov	w0, #0
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_hammer_time
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotStr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_XEN_PV_DOMAIN,4,2              ; @XEN_PV_DOMAIN
	.comm	_xen_domain_type,4,2            ; @xen_domain_type
	.comm	_VM_GUEST_XEN,4,2               ; @VM_GUEST_XEN
	.comm	_vm_guest,4,2                   ; @vm_guest
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: invalid start_info or xen stack, halting\n"

	.comm	_SHUTDOWN_crash,4,2             ; @SHUTDOWN_crash
l_.str.1:                               ; @.str.1
	.asciz	"FreeBSD PVH running on %s\n"

	.comm	_KERNBASE,8,3                   ; @KERNBASE
	.comm	_legacy_start_info,8,3          ; @legacy_start_info
	.comm	_HYPERVISOR_shared_info,8,3     ; @HYPERVISOR_shared_info
	.comm	_PG_V,8,3                       ; @PG_V
	.comm	_PG_RW,8,3                      ; @PG_RW
	.comm	_PG_U,8,3                       ; @PG_U
	.comm	_PG_PS,8,3                      ; @PG_PS
	.comm	_xen_legacy_init_ops,4,2        ; @xen_legacy_init_ops
	.comm	_init_ops,4,2                   ; @init_ops
	.comm	_xen_apic_ops,4,2               ; @xen_apic_ops
	.comm	_apic_ops,4,2                   ; @apic_ops
	.comm	_legacy_info,4,2                ; @legacy_info
	.comm	_hypervisor_info,4,2            ; @hypervisor_info
.subsections_via_symbols
