	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps3bus_resources_init_by_type
_ps3bus_resources_init_by_type:         ## @ps3bus_resources_init_by_type
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	leaq	8(%r9), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_resource_list_init
	leaq	-112(%rbp), %rdi
	callq	_lv1_get_logical_ppe_id
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfctrl
	movl	%eax, %edi
	callq	_fls
	movl	$32, %ecx
	subl	%eax, %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$10, %ebx
	je	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PS3_LPAR_ID_PME@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	L_.str(%rip), %rdi
	callq	_lv1_repository_string
	leaq	L_.str.1(%rip), %rdi
	callq	_lv1_repository_string
	movl	%eax, %r12d
	orl	%r15d, %r12d
	leaq	L_.str.2(%rip), %rdi
	callq	_lv1_repository_string
	orl	%ebx, %eax
	leaq	-128(%rbp), %rcx
	movq	%rcx, (%rsp)
	movl	%r13d, %edi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	leaq	-136(%rbp), %r9
	callq	_lv1_get_repository_node_value
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r14, -136(%rbp)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-128(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	callq	_lv1_construct_io_irq_outlet
	movq	-112(%rbp), %rdi
	movq	-88(%rbp), %rcx
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movq	%rcx, %rdx
	xorl	%r8d, %r8d
	callq	_lv1_connect_irq_plug_ext
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rcx
	movl	$1, %r9d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movq	%rcx, %r8
	callq	_resource_list_add
	jmp	LBB0_4
LBB0_5:
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%r12d
	cmpl	$10, %r12d
	je	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PS3_LPAR_ID_PME@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	callq	_lv1_repository_string
	leaq	L_.str.1(%rip), %rdi
	callq	_lv1_repository_string
	movl	%eax, %ebx
	orl	%r15d, %ebx
	leaq	L_.str.3(%rip), %rdi
	callq	_lv1_repository_string
	movl	%eax, %r13d
	orl	%r12d, %r13d
	leaq	L_.str.4(%rip), %rdi
	callq	_lv1_repository_string
	leaq	-144(%rbp), %rcx
	movq	%rcx, (%rsp)
	movl	%r14d, %edi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	leaq	-120(%rbp), %r9
	callq	_lv1_get_repository_node_value
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -120(%rbp)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_PS3_LPAR_ID_PME@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	callq	_lv1_repository_string
	leaq	L_.str.1(%rip), %rdi
	callq	_lv1_repository_string
	movl	%eax, %r13d
	orl	%r15d, %r13d
	leaq	L_.str.3(%rip), %rdi
	callq	_lv1_repository_string
	movl	%eax, %ebx
	orl	%r12d, %ebx
	leaq	L_.str.5(%rip), %rdi
	callq	_lv1_repository_string
	leaq	-48(%rbp), %rcx
	movq	%rcx, (%rsp)
	movl	%r14d, %edi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	leaq	-56(%rbp), %rbx
	movq	%rbx, %r9
	callq	_lv1_get_repository_node_value
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	4(%rax), %esi
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movl	$12, %r8d
	movq	%rbx, %r9
	callq	_lv1_map_device_mmio_region
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rsi
	movq	-48(%rbp), %rax
	leaq	(%rsi,%rax), %rdx
	decq	%rdx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_rman_manage_region
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rcx
	movq	-48(%rbp), %r9
	leaq	(%r9,%rcx), %r8
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_resource_list_add
	jmp	LBB0_11
LBB0_9:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	movl	4(%rdi), %edx
	movl	16(%rdi), %ecx
	movl	12(%rdi), %r8d
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %r9d
	callq	_printf
LBB0_12:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PS3_LPAR_ID_PME,4,2            ## @PS3_LPAR_ID_PME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bus"

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

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

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
L_.str.3:                               ## @.str.3
	.asciz	"reg"

L_.str.4:                               ## @.str.4
	.asciz	"type"

L_.str.5:                               ## @.str.5
	.asciz	"data"

L_.str.6:                               ## @.str.6
	.asciz	"Mapping registers failed for device %d.%d (%ld.%ld): %d\n"

	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.no_dead_strip	_ps3bus_resources_init_by_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps3bus_resources_init_by_type
_ps3bus_resources_init_by_type:         ; @ps3bus_resources_init_by_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x5, x4, [sp, #8]                ; 16-byte Folded Spill
	mov	x24, x3
	mov	x21, x2
	str	x0, [sp]                        ; 8-byte Folded Spill
	add	x0, x5, #8
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	bl	_resource_list_init
	add	x0, sp, #40
	bl	_lv1_get_logical_ppe_id
	bl	_mfctrl
	bl	_fls
	mov	w25, #0
	mov	w8, #32
	sub	w26, w8, w0
Lloh0:
	adrp	x23, _PS3_LPAR_ID_PME@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PS3_LPAR_ID_PME@GOTPAGEOFF]
Lloh2:
	adrp	x27, l_.str@PAGE
Lloh3:
	add	x27, x27, l_.str@PAGEOFF
Lloh4:
	adrp	x28, l_.str.1@PAGE
Lloh5:
	add	x28, x28, l_.str.1@PAGEOFF
Lloh6:
	adrp	x22, l_.str.2@PAGE
Lloh7:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	cmp	w25, #10
	b.eq	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x23]
	mov	x0, x27
	bl	_lv1_repository_string
	mov	x0, x28
	bl	_lv1_repository_string
	orr	w19, w0, w21
	mov	x0, x22
	bl	_lv1_repository_string
	orr	w3, w0, w25
	add	x5, sp, #88
	add	x6, sp, #80
	mov	x0, x20
	mov	x2, x19
	mov	w4, #0
	bl	_lv1_get_repository_node_value
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #88]
	cmp	x8, x24
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [sp, #80]
	add	x1, sp, #72
	bl	_lv1_construct_io_irq_outlet
	ldr	x0, [sp, #40]
	ldr	x2, [sp, #72]
	mov	x1, x26
	mov	x3, x2
	mov	w4, #0
	bl	_lv1_connect_irq_plug_ext
Lloh8:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x3, [sp, #72]
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x25
	mov	x4, x3
	mov	w5, #1
	bl	_resource_list_add
	b	LBB0_1
LBB0_5:
	mov	w24, #0
Lloh11:
	adrp	x25, l_.str@PAGE
Lloh12:
	add	x25, x25, l_.str@PAGEOFF
Lloh13:
	adrp	x26, l_.str.1@PAGE
Lloh14:
	add	x26, x26, l_.str.1@PAGEOFF
Lloh15:
	adrp	x27, l_.str.3@PAGE
Lloh16:
	add	x27, x27, l_.str.3@PAGEOFF
Lloh17:
	adrp	x28, l_.str.4@PAGE
Lloh18:
	add	x28, x28, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w24, w24, #1
	cmp	w24, #10
	b.eq	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w19, [x23]
	mov	x0, x25
	bl	_lv1_repository_string
	mov	x0, x26
	bl	_lv1_repository_string
	orr	w20, w0, w21
	mov	x0, x27
	bl	_lv1_repository_string
	orr	w22, w0, w24
	mov	x0, x28
	bl	_lv1_repository_string
	mov	x4, x0
	add	x5, sp, #64
	add	x6, sp, #32
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	bl	_lv1_get_repository_node_value
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #64]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w19, [x23]
	mov	x0, x25
	bl	_lv1_repository_string
	mov	x0, x26
	bl	_lv1_repository_string
	orr	w20, w0, w21
	mov	x0, x27
	bl	_lv1_repository_string
	orr	w22, w0, w24
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_lv1_repository_string
	mov	x4, x0
	add	x5, sp, #56
	add	x6, sp, #48
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	bl	_lv1_get_repository_node_value
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldp	w0, w1, [x8]
	ldp	x3, x2, [sp, #48]
	add	x5, sp, #56
	mov	w4, #12
	bl	_lv1_map_device_mmio_region
	cbnz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldp	x8, x1, [sp, #48]
	add	x8, x1, x8
	sub	x2, x8, #1
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_rman_manage_region
Lloh21:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldp	x5, x3, [sp, #48]
	add	x4, x5, x3
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x24
	bl	_resource_list_add
	b	LBB0_6
LBB0_11:
	mov	x5, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldp	w1, w2, [x8]
	ldp	w4, w3, [x8, #12]
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf
LBB0_12:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PS3_LPAR_ID_PME,4,2            ; @PS3_LPAR_ID_PME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bus"

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

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

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
l_.str.3:                               ; @.str.3
	.asciz	"reg"

l_.str.4:                               ; @.str.4
	.asciz	"type"

l_.str.5:                               ; @.str.5
	.asciz	"data"

l_.str.6:                               ; @.str.6
	.asciz	"Mapping registers failed for device %d.%d (%ld.%ld): %d\n"

	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.no_dead_strip	_ps3bus_resources_init_by_type
.subsections_via_symbols
