	.file	"extr_core.c_sh_pfc_map_resources.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sh_pfc_map_resources, @function
sh_pfc_map_resources:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L25:
	add	ebp, 1
.L3:
	mov	esi, DWORD PTR IORESOURCE_MEM[rip]
	mov	edx, ebp
	mov	rdi, r12
	call	platform_get_resource@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L25
	xor	r14d, r14d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	test	eax, eax
	js	.L5
	add	r14d, 1
.L2:
	mov	esi, r14d
	mov	rdi, r12
	call	platform_get_irq@PLT
	mov	ecx, eax
	add	ecx, DWORD PTR EPROBE_DEFER[rip]
	mov	r8d, eax
	jne	.L26
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	test	ebp, ebp
	jne	.L6
	mov	r8d, DWORD PTR EINVAL[rip]
	neg	r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR 16[r13]
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	edx, 12
	mov	esi, ebp
	call	devm_kcalloc@PLT
	mov	r15, rax
	test	rax, rax
	je	.L23
	mov	DWORD PTR 0[r13], ebp
	mov	QWORD PTR 24[r13], rax
	test	r14d, r14d
	jne	.L27
.L8:
	xor	edx, edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	add	edx, 1
	add	r15, 12
	cmp	ebp, edx
	je	.L28
.L11:
	mov	esi, DWORD PTR IORESOURCE_MEM[rip]
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], edx
	call	platform_get_resource@PLT
	mov	rsi, rax
	mov	eax, DWORD PTR [rax]
	mov	rdi, rsi
	mov	QWORD PTR [rsp], rsi
	mov	DWORD PTR 8[r15], eax
	call	resource_size@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	DWORD PTR 4[r15], eax
	mov	edi, DWORD PTR 16[r13]
	call	devm_ioremap_resource@PLT
	mov	DWORD PTR [r15], eax
	mov	edi, eax
	call	IS_ERR@PLT
	mov	edx, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L10
.L23:
	mov	r8d, DWORD PTR ENOMEM[rip]
	neg	r8d
	jmp	.L1
.L27:
	mov	edi, DWORD PTR 16[r13]
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	edx, 4
	mov	esi, r14d
	call	devm_kcalloc@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L23
	mov	DWORD PTR 4[r13], r14d
	mov	QWORD PTR 8[r13], rax
	jmp	.L8
.L28:
	lea	r13d, -1[r14]
	xor	ebp, ebp
	test	r14d, r14d
	je	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, ebp
	mov	rdi, r12
	call	platform_get_irq@PLT
	mov	DWORD PTR [rbx+rbp*4], eax
	mov	rax, rbp
	add	rbp, 1
	cmp	r13, rax
	jne	.L13
.L14:
	xor	r8d, r8d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	sh_pfc_map_resources, .-sh_pfc_map_resources
	.comm	IORESOURCE_MEM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	EPROBE_DEFER,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_core.c_sh_pfc_map_resources.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sh_pfc_map_resources, %function
sh_pfc_map_resources:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r8, r1
	mov	r7, #0
	ldr	r9, .L29
	str	r0, [sp, #4]
	b	.L3
.L25:
	add	r7, r7, #1
.L3:
	mov	r2, r7
	mov	r0, r8
	ldr	r1, [r9]
	bl	platform_get_resource
	subs	r6, r0, #0
	bne	.L25
	mov	r5, r6
	ldr	fp, .L29+4
	b	.L2
.L26:
	cmp	r0, #0
	blt	.L5
	add	r5, r5, #1
.L2:
	mov	r1, r5
	mov	r0, r8
	bl	platform_get_irq
	ldr	r3, [fp]
	mov	r4, r0
	cmn	r0, r3
	bne	.L26
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	cmp	r7, #0
	bne	.L6
	ldr	r3, .L29+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r0, [sp, #4]
	ldr	r4, .L29+12
	mov	r2, #12
	mov	r1, r7
	ldr	r3, [r4]
	ldr	r0, [r0, #12]
	bl	devm_kcalloc
	subs	fp, r0, #0
	beq	.L23
	ldr	r3, [sp, #4]
	cmp	r5, #0
	str	r7, [r3]
	str	fp, [r3, #16]
	bne	.L27
.L8:
	mov	r10, #0
	add	fp, fp, #12
	b	.L11
.L10:
	cmp	r7, r10
	add	fp, fp, #12
	beq	.L28
.L11:
	mov	r2, r10
	ldr	r1, [r9]
	mov	r0, r8
	bl	platform_get_resource
	ldr	r3, [r0]
	mov	r4, r0
	str	r3, [fp, #-4]
	bl	resource_size
	ldr	r3, [sp, #4]
	str	r0, [fp, #-8]
	mov	r1, r4
	ldr	r0, [r3, #12]
	bl	devm_ioremap_resource
	str	r0, [fp, #-12]
	bl	IS_ERR
	subs	r4, r0, #0
	add	r10, r10, #1
	beq	.L10
.L23:
	ldr	r3, .L29+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	cmp	r5, #0
	beq	.L1
	mov	r7, r4
.L12:
	mov	r1, r7
	mov	r0, r8
	bl	platform_get_irq
	add	r7, r7, #1
	cmp	r5, r7
	str	r0, [r6], #4
	bne	.L12
	b	.L1
.L27:
	ldr	r0, [sp, #4]
	mov	r2, #4
	mov	r1, r5
	ldr	r3, [r4]
	ldr	r0, [r0, #12]
	bl	devm_kcalloc
	subs	r6, r0, #0
	beq	.L23
	ldr	r3, [sp, #4]
	stmib	r3, {r5, r6}
	b	.L8
.L30:
	.align	2
.L29:
	.word	IORESOURCE_MEM
	.word	EPROBE_DEFER
	.word	EINVAL
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	sh_pfc_map_resources, .-sh_pfc_map_resources
	.comm	IORESOURCE_MEM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	EPROBE_DEFER,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
