	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function powerpc_maphdrs
_powerpc_maphdrs:                       ## @powerpc_maphdrs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movl	$16, (%r12)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	4(%rdi), %r8d
	xorl	%edi, %edi
	movl	$16, %esi
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, 32(%r12)
	movq	_MAP_FAILED@GOTPCREL(%rip), %r13
	cmpq	%rax, (%r13)
	je	LBB0_1
## %bb.2:
	movq	$0, 8(%r12)
	movq	%rax, 16(%r12)
	movq	%rax, %rdi
	callq	_valid_elf_header
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	movq	16(%r12), %rax
	movl	8(%rax), %edi
	callq	_be16toh
	movq	%rax, %rbx
	movq	16(%r12), %rax
	movl	4(%rax), %edi
	callq	_be16toh
	imull	%eax, %ebx
	movq	16(%r12), %rax
	movl	(%rax), %edi
	callq	_be64toh
	addl	%eax, %ebx
	movq	32(%r12), %rdi
	movl	(%r12), %esi
	callq	_munmap
	addl	8(%r12), %ebx
	movl	%ebx, (%r12)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movl	4(%r14), %r8d
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movl	%ebx, %esi
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, 32(%r12)
	cmpq	%rax, (%r13)
	je	LBB0_6
## %bb.7:
	movq	8(%r12), %rcx
	movq	%rax, %rbx
	addq	%rcx, %rbx
	movq	%rbx, 16(%r12)
	movl	(%rcx,%rax), %edi
	callq	_be64toh
	addq	%rbx, %rax
	movq	%rax, 24(%r12)
	jmp	LBB0_10
LBB0_1:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_9
LBB0_3:
	movq	32(%r12), %rdi
	callq	_dump_header_size
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	addq	32(%r12), %rax
	movq	%rax, 16(%r12)
	movq	%rax, %rdi
	callq	_valid_elf_header
	testl	%eax, %eax
	jne	LBB0_5
LBB0_8:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_9
LBB0_6:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_9:
	movq	%r14, %rdi
	callq	__kvm_err
	movl	$-1, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot map corefile"

L_.str.1:                               ## @.str.1
	.asciz	"cannot map corefile headers"

L_.str.2:                               ## @.str.2
	.asciz	"invalid corefile"

	.no_dead_strip	_powerpc_maphdrs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function powerpc_maphdrs
_powerpc_maphdrs:                       ; @powerpc_maphdrs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x22, [x0, #8]
	mov	w8, #16
Lloh0:
	adrp	x23, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PROT_READ@GOTPAGEOFF]
	str	w8, [x22]
	ldr	w2, [x23]
Lloh2:
	adrp	x24, _MAP_PRIVATE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MAP_PRIVATE@GOTPAGEOFF]
	ldr	w3, [x24]
	ldr	w4, [x0, #4]
	mov	x0, #0
	mov	w1, #16
	mov	w5, #0
	bl	_mmap
	str	x0, [x22, #32]
Lloh4:
	adrp	x25, _MAP_FAILED@GOTPAGE
Lloh5:
	ldr	x25, [x25, _MAP_FAILED@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, x0
	b.eq	LBB0_4
; %bb.1:
	stp	xzr, x0, [x22, #8]
	bl	_valid_elf_header
	cbz	w0, LBB0_5
LBB0_2:
	ldr	x8, [x22, #16]
	ldr	w0, [x8, #8]
	bl	_be16toh
	mov	x20, x0
	ldr	x8, [x22, #16]
	ldr	w0, [x8, #4]
	bl	_be16toh
	mov	x21, x0
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	bl	_be64toh
	madd	w20, w21, w20, w0
	ldr	x0, [x22, #32]
	ldr	w1, [x22]
	bl	_munmap
	ldr	w8, [x22, #8]
	add	w1, w20, w8
	str	w1, [x22]
	ldr	w2, [x23]
	ldr	w3, [x24]
	ldr	w4, [x19, #4]
	mov	x0, #0
	mov	w5, #0
	bl	_mmap
	str	x0, [x22, #32]
	ldr	x8, [x25]
	cmp	x8, x0
	b.eq	LBB0_8
; %bb.3:
	ldr	x8, [x22, #8]
	add	x19, x8, x0
	str	x19, [x22, #16]
	ldr	w0, [x19]
	bl	_be64toh
	mov	x8, x0
	mov	w0, #0
	add	x8, x8, x19
	str	x8, [x22, #24]
	b	LBB0_10
LBB0_4:
	ldr	w1, [x19]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
	ldr	x0, [x22, #32]
	bl	_dump_header_size
	str	x0, [x22, #8]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x22, #32]
	add	x0, x0, x8
	str	x0, [x22, #16]
	bl	_valid_elf_header
	cbnz	w0, LBB0_2
LBB0_7:
	ldr	w1, [x19]
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w1, [x19]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	__kvm_err
	mov	w0, #-1
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot map corefile"

l_.str.1:                               ; @.str.1
	.asciz	"cannot map corefile headers"

l_.str.2:                               ; @.str.2
	.asciz	"invalid corefile"

	.no_dead_strip	_powerpc_maphdrs
.subsections_via_symbols
