	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_pfc_map_resources
_sh_pfc_map_resources:                  ## @sh_pfc_map_resources
	.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, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	$-1, %ebx
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, %r15
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %eax
	addl	%r15d, %eax
	je	LBB0_21
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	js	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_platform_get_irq
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.9:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	16(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	%ebx, %esi
	movl	$12, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r15, %rcx
	movl	%ebx, (%r13)
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 24(%r13)
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.13:
	movl	16(%r13), %edi
	movl	(%rcx), %ecx
	movl	%r12d, %esi
	movl	$4, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.14:
	movl	%r12d, 4(%r13)
	movq	%rax, %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r13)
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_12:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_15:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	addq	$8, %r13
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_platform_get_resource
	movq	%rax, %r13
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r13, %rdi
	callq	_resource_size
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, -4(%rcx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %edi
	movq	%r13, %rsi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	callq	_devm_ioremap_resource
	movl	%eax, -8(%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	incl	%r15d
	addq	$12, %r13
	cmpl	%r15d, %ebx
	jne	LBB0_16
## %bb.18:
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.19:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_platform_get_irq
	movl	%eax, (%r13)
	addq	$4, %r13
	incl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_20
	jmp	LBB0_21
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_21:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sh_pfc_map_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_pfc_map_resources
_sh_pfc_map_resources:                  ; @sh_pfc_map_resources
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w21, #-1
Lloh0:
	adrp	x26, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IORESOURCE_MEM@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x21
	bl	_platform_get_resource
	cbnz	x0, LBB0_1
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
Lloh2:
	adrp	x23, _EPROBE_DEFER@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EPROBE_DEFER@GOTPAGEOFF]
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_21
; %bb.3:
	mov	w22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	tbnz	w0, #31, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	mov	x0, x19
	mov	x1, x22
	bl	_platform_get_irq
	ldr	w8, [x23]
	cmn	w0, w8
	b.ne	LBB0_4
	b	LBB0_21
LBB0_6:
	cbz	w21, LBB0_11
; %bb.7:
	ldr	w0, [x20, #16]
Lloh4:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x1, x21
	mov	w2, #12
	bl	_devm_kcalloc
	cbz	x0, LBB0_19
; %bb.8:
	mov	x25, x0
	str	w21, [x20]
	str	x0, [x20, #24]
	cbz	w22, LBB0_12
; %bb.9:
	ldr	w0, [x20, #16]
	ldr	w3, [x23]
	mov	x1, x22
	mov	w2, #4
	bl	_devm_kcalloc
	cbz	x0, LBB0_19
; %bb.10:
	mov	x23, x0
	str	w22, [x20, #4]
	str	x0, [x20, #8]
	b	LBB0_13
LBB0_11:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_20
LBB0_12:
	mov	x23, #0
LBB0_13:
	mov	w24, #0
	add	x27, x25, #8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x24
	bl	_platform_get_resource
	mov	x25, x0
	ldr	w8, [x0]
	str	w8, [x27]
	bl	_resource_size
	stur	w0, [x27, #-4]
	ldr	w0, [x20, #16]
	mov	x1, x25
	bl	_devm_ioremap_resource
	stur	w0, [x27, #-8]
	bl	_IS_ERR
	cbnz	x0, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	w24, w24, #1
	add	x27, x27, #12
	cmp	w21, w24
	b.ne	LBB0_14
; %bb.16:
	cbz	w22, LBB0_22
; %bb.17:
	mov	w20, #0
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_platform_get_irq
	mov	x8, x0
	mov	w0, #0
	str	w8, [x23], #4
	add	w20, w20, #1
	cmp	w22, w20
	b.ne	LBB0_18
	b	LBB0_21
LBB0_19:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	w0, #0
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sh_pfc_map_resources
.subsections_via_symbols
