	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps3_mem_regions                ## -- Begin function ps3_mem_regions
	.p2align	4, 0x90
_ps3_mem_regions:                       ## @ps3_mem_regions
	.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	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movl	%edi, %r13d
	leaq	L_.str(%rip), %rdi
	callq	_OF_finddevice
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_ofw_mem_regions
	jmp	LBB0_3
LBB0_2:
	movq	$0, 8(%rbx)
	movl	%r13d, %edi
	callq	_ps3_real_maxaddr
	movl	%eax, (%rbx)
	movl	$1, (%r14)
	movl	$1, (%r12)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%r15)
LBB0_3:
	leaq	-48(%rbp), %rdi
	callq	_lv1_get_logical_partition_id
	movl	-48(%rbp), %r13d
	leaq	L_.str.1(%rip), %rdi
	callq	_lv1_repository_string
	leaq	L_.str.2(%rip), %rdi
	callq	_lv1_repository_string
	movslq	(%r12), %r9
	shlq	$4, %r9
	addq	%rbx, %r9
	leaq	-44(%rbp), %rcx
	movq	%rcx, (%rsp)
	movl	%r13d, %edi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_lv1_get_repository_node_value
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ecx, %ecx
	movq	%rbx, %rdx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	cltq
	shlq	$4, %rax
	subl	%esi, (%rbx,%rax)
	incq	%rcx
	movslq	(%r12), %rax
	addq	$16, %rdx
	cmpq	%rax, %rcx
	jl	LBB0_5
LBB0_6:
	cltq
	shlq	$4, %rax
	movl	(%rbx,%rax), %ecx
	leal	16777215(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	andl	$-16777216, %edx                ## imm = 0xFF000000
	movl	%edx, (%rbx,%rax)
	movslq	(%r12), %rax
	shlq	$4, %rax
	movl	(%rbx,%rax), %edi
	leaq	(%rbx,%rax), %r8
	addq	$8, %r8
	leaq	-44(%rbp), %r9
	movl	$24, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	callq	_lv1_allocate_memory
	movslq	(%r14), %rax
	shlq	$4, %rax
	movslq	(%r12), %rcx
	shlq	$4, %rcx
	movups	(%rbx,%rcx), %xmm0
	movups	%xmm0, (%r15,%rax)
	incl	(%r12)
	incl	(%r14)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"bi"

L_.str.2:                               ## @.str.2
	.asciz	"rgntotal"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps3_mem_regions                ; -- Begin function ps3_mem_regions
	.p2align	2
_ps3_mem_regions:                       ; @ps3_mem_regions
	.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, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_OF_finddevice
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_ofw_mem_regions
	b	LBB0_3
LBB0_2:
	str	xzr, [x22, #8]
	mov	x0, x23
	bl	_ps3_real_maxaddr
	str	w0, [x22]
	mov	w8, #1
	str	w8, [x19]
	str	w8, [x20]
	ldr	q0, [x22]
	str	q0, [x21]
LBB0_3:
	add	x0, sp, #12
	bl	_lv1_get_logical_partition_id
	ldr	w23, [sp, #12]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lv1_repository_string
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_lv1_repository_string
	mov	x2, x0
	ldrsw	x8, [x20]
	add	x5, x22, x8, lsl #4
	add	x6, sp, #8
	mov	x0, x23
	mov	w3, #0
	mov	w4, #0
	bl	_lv1_get_repository_node_value
	ldr	w10, [x20]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x8, #0
	mov	x9, x22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #16
	sbfiz	x10, x10, #4, #32
	ldr	w12, [x22, x10]
	sub	w11, w12, w11
	str	w11, [x22, x10]
	add	x8, x8, #1
	ldrsw	x11, [x20]
	mov	x10, x11
	cmp	x8, x11
	b.lt	LBB0_5
	b	LBB0_7
LBB0_6:
	mov	x11, x10
LBB0_7:
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sbfiz	x8, x11, #4, #32
	ldr	w9, [x22, x8]
	and	w10, w9, #0xffffff
	negs	w11, w9
	and	w11, w11, #0xffffff
	csneg	w10, w10, w11, mi
	sub	w9, w9, w10
	str	w9, [x22, x8]
	ldrsw	x8, [x20]
	add	x4, x22, x8, lsl #4
	ldr	w0, [x4], #8
	add	x5, sp, #8
	mov	w1, #24
	mov	w2, #0
	mov	w3, #4
	bl	_lv1_allocate_memory
	ldrsw	x8, [x19]
	ldrsw	x9, [x20]
	ldr	q0, [x22, x9, lsl #4]
	str	q0, [x21, x8, lsl #4]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"bi"

l_.str.2:                               ; @.str.2
	.asciz	"rgntotal"

.subsections_via_symbols
