	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ppc64_elf_exec                 ## -- Begin function ppc64_elf_exec
	.p2align	4, 0x90
_ppc64_elf_exec:                        ## @ppc64_elf_exec
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_MODINFOMD_ELFHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_file_findmetadata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_archsw@GOTPCREL(%rip), %rcx
	movq	_LOAD_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	*(%rcx)
	leaq	L_.str(%rip), %rdi
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	_elf64_relocation_offset@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_szkerneltramp@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_malloc
	movq	%rax, %r12
	movl	(%r14), %edx
	movq	_kerneltramp@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_memcpy
	movl	(%rbx), %eax
	andl	$3, %eax
	cmpl	$2, %eax
	jne	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	jmp	LBB0_6
LBB0_1:
	movq	_EFTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_2
LBB0_5:
	movl	(%r13), %edi
	addl	4(%rbx), %edi
	leaq	-44(%rbp), %rsi
	movl	$8, %edx
	movq	_archsw@GOTPCREL(%rip), %rax
	callq	*24(%rax)
	movl	-44(%rbp), %edi
	callq	_be64toh
	movl	%eax, %edi
LBB0_6:
	movl	%edi, -44(%rbp)
	addl	(%r13), %edi
	callq	_htobe32
	movq	%rax, 24(%r12)
	xorl	%edi, %edi
	callq	_htobe32
	movq	%rax, 48(%r12)
	xorl	%edi, %edi
	callq	_htobe32
	movq	%rax, 40(%r12)
	movl	(%r15), %edi
	leaq	-60(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_md_load64
	testl	%eax, %eax
	je	LBB0_7
LBB0_2:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	-56(%rbp), %edi
	callq	_htobe32
	movq	%rax, 16(%r12)
	movl	-60(%rbp), %edi
	callq	_htobe32
	movq	%rax, 8(%r12)
	movl	$-77787059, %edi                ## imm = 0xFB5D104D
	callq	_htobe32
	movq	%rax, 32(%r12)
	movl	-44(%rbp), %ebx
	movq	24(%r12), %rdi
	callq	_be32toh
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	16(%r12), %rdi
	callq	_be32toh
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	callq	_be32toh
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf
	xorl	%eax, %eax
	callq	_dev_cleanup
	movq	_szkerneltramp@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	movq	_archsw@GOTPCREL(%rip), %rbx
	callq	*16(%rbx)
	movq	%r12, %rdi
	callq	_free
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
	movq	8(%rbx), %rcx
LBB0_9:
	leaq	-52(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	callq	*%rcx
	movl	-52(%rbp), %esi
	movq	-72(%rbp), %rdx
	movl	%r14d, %edi
	callq	_kexec_load
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_panic
LBB0_11:
	movl	$-18751827, %edi                ## imm = 0xFEE1DEAD
	movl	$672274793, %esi                ## imm = 0x28121969
	movl	$1163412803, %edx               ## imm = 0x45584543
	xorl	%ecx, %ecx
	callq	_host_reboot
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_panic
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_MODINFOMD_ELFHDR,4,2           ## @MODINFOMD_ELFHDR
	.comm	_EFTYPE,4,2                     ## @EFTYPE
	.comm	_archsw,32,3                    ## @archsw
	.comm	_LOAD_RAW,4,2                   ## @LOAD_RAW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Load address at %#jx\n"

L_.str.1:                               ## @.str.1
	.asciz	"Relocation offset is %#jx\n"

	.comm	_elf64_relocation_offset,4,2    ## @elf64_relocation_offset
	.comm	_szkerneltramp,4,2              ## @szkerneltramp
	.comm	_kerneltramp,4,2                ## @kerneltramp
L_.str.2:                               ## @.str.2
	.asciz	"Kernel entry at %#jx (%#x) ...\n"

L_.str.3:                               ## @.str.3
	.asciz	"DTB at %#x, mdp at %#x\n"

L_.str.4:                               ## @.str.4
	.asciz	"architecture did not provide kexec segment mapping"

L_.str.5:                               ## @.str.5
	.asciz	"kexec_load returned error: %d"

L_.str.6:                               ## @.str.6
	.asciz	"reboot returned error: %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ppc64_elf_exec                 ; -- Begin function ppc64_elf_exec
	.p2align	2
_ppc64_elf_exec:                        ; @ppc64_elf_exec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
Lloh0:
	adrp	x8, _MODINFOMD_ELFHDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODINFOMD_ELFHDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_file_findmetadata
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x23, _archsw@GOTPAGE
Lloh4:
	ldr	x23, [x23, _archsw@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh5:
	adrp	x9, _LOAD_RAW@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LOAD_RAW@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
	mov	x1, #0
	mov	w2, #0
	blr	x8
	mov	x19, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_printf
Lloh10:
	adrp	x25, _elf64_relocation_offset@GOTPAGE
Lloh11:
	ldr	x25, [x25, _elf64_relocation_offset@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
Lloh14:
	adrp	x24, _szkerneltramp@GOTPAGE
Lloh15:
	ldr	x24, [x24, _szkerneltramp@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_malloc
	mov	x20, x0
	ldr	w2, [x24]
Lloh16:
	adrp	x1, _kerneltramp@GOTPAGE
Lloh17:
	ldr	x1, [x1, _kerneltramp@GOTPAGEOFF]
	bl	_memcpy
	ldr	w8, [x22]
	and	w8, w8, #0x3
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x22, #4]
	b	LBB0_5
LBB0_3:
Lloh18:
	adrp	x8, _EFTYPE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EFTYPE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x23, #24]
	ldr	w9, [x22, #4]
	ldr	w10, [x25]
	add	w0, w10, w9
	add	x1, sp, #20
	mov	w2, #8
	blr	x8
	ldr	w0, [sp, #20]
	bl	_be64toh
LBB0_5:
	str	w0, [sp, #20]
	ldr	w8, [x25]
	add	w0, w8, w0
	bl	_htobe32
	str	x0, [x20, #24]
	mov	w0, #0
	bl	_htobe32
	str	x0, [x20, #48]
	mov	w0, #0
	bl	_htobe32
	str	x0, [x20, #40]
	ldr	w0, [x21]
	add	x1, sp, #28
	add	x2, sp, #24
	bl	_md_load64
	cbz	w0, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	ldr	w0, [sp, #24]
	bl	_htobe32
	str	x0, [x20, #16]
	ldr	w0, [sp, #28]
	bl	_htobe32
	str	x0, [x20, #8]
	mov	w0, #4173
	movk	w0, #64349, lsl #16
	bl	_htobe32
	str	x0, [x20, #32]
	ldr	w21, [sp, #20]
	ldr	x0, [x20, #24]
	bl	_be32toh
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_printf
	ldr	x0, [x20, #16]
	bl	_be32toh
	mov	x21, x0
	ldr	x0, [x20, #8]
	bl	_be32toh
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_printf
	bl	_dev_cleanup
	ldr	x8, [x23, #16]
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	mov	x0, x20
	bl	_free
	ldr	x8, [x23, #8]
	cbnz	x8, LBB0_9
; %bb.8:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_panic
	ldr	x8, [x23, #8]
LBB0_9:
	add	x0, sp, #16
	add	x1, sp, #8
	blr	x8
	ldr	w1, [sp, #16]
	ldr	x2, [sp, #8]
	mov	x0, x19
	bl	_kexec_load
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_11
; %bb.10:
	str	x0, [sp]
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_panic
LBB0_11:
	mov	w0, #57005
	movk	w0, #65249, lsl #16
	mov	w1, #6505
	movk	w1, #10258, lsl #16
	mov	w2, #17731
	movk	w2, #17752, lsl #16
	mov	x3, #0
	bl	_host_reboot
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_13
; %bb.12:
	str	x0, [sp]
Lloh29:
	adrp	x0, l_.str.6@PAGE
Lloh30:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_panic
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MODINFOMD_ELFHDR,4,2           ; @MODINFOMD_ELFHDR
	.comm	_EFTYPE,4,2                     ; @EFTYPE
	.comm	_archsw,32,3                    ; @archsw
	.comm	_LOAD_RAW,4,2                   ; @LOAD_RAW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Load address at %#jx\n"

l_.str.1:                               ; @.str.1
	.asciz	"Relocation offset is %#jx\n"

	.comm	_elf64_relocation_offset,4,2    ; @elf64_relocation_offset
	.comm	_szkerneltramp,4,2              ; @szkerneltramp
	.comm	_kerneltramp,4,2                ; @kerneltramp
l_.str.2:                               ; @.str.2
	.asciz	"Kernel entry at %#jx (%#x) ...\n"

l_.str.3:                               ; @.str.3
	.asciz	"DTB at %#x, mdp at %#x\n"

l_.str.4:                               ; @.str.4
	.asciz	"architecture did not provide kexec segment mapping"

l_.str.5:                               ; @.str.5
	.asciz	"kexec_load returned error: %d"

l_.str.6:                               ; @.str.6
	.asciz	"reboot returned error: %d"

.subsections_via_symbols
