	.file	"extr_sh-sci.c_sci_request_irq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s:%s"
.LC1:
	.string	"Can't allocate %s IRQ\n"
	.text
	.p2align 4
	.type	sci_request_irq, @function
sci_request_irq:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR SCIx_NR_IRQS[rip]
	test	eax, eax
	jle	.L13
	mov	r12, rdi
	xor	ebx, ebx
	xor	ebp, ebp
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L2:
	mov	DWORD PTR 8[rsp], ebx
	cmp	ebp, eax
	jl	.L6
	mov	rdi, r12
	call	SCIx_IRQ_IS_MUXED@PLT
	test	rax, rax
	je	.L7
	movsx	r15, DWORD PTR SCIx_MUX_IRQ[rip]
	mov	r13d, DWORD PTR 16[r12]
	mov	rbp, r15
.L8:
	mov	rax, QWORD PTR sci_irq_desc[rip]
	mov	edi, DWORD PTR 20[r12]
	lea	r14, [rax+r15*8]
	mov	ecx, DWORD PTR [r14]
	mov	DWORD PTR 12[rsp], ecx
	call	dev_name@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	lea	rsi, .LC0[rip]
	mov	edx, eax
	mov	rax, QWORD PTR 8[r12]
	lea	r8, [rax+rbx*4]
	mov	QWORD PTR [rsp], r8
	call	kasprintf@PLT
	mov	r8, QWORD PTR [rsp]
	mov	DWORD PTR [r8], eax
	mov	rax, QWORD PTR 8[r12]
	mov	ecx, DWORD PTR [rax+rbx*4]
	test	ecx, ecx
	je	.L31
	mov	edx, DWORD PTR 24[r12]
	mov	esi, DWORD PTR 4[r14]
	mov	edi, r13d
	mov	r8, r12
	call	request_irq@PLT
	mov	edi, eax
	mov	r13d, eax
	call	unlikely@PLT
	test	rax, rax
	jne	.L32
.L6:
	lea	r9d, 1[rbp]
	cmp	DWORD PTR SCIx_NR_IRQS[rip], r9d
	jle	.L13
	xor	eax, eax
	test	r9d, r9d
	jle	.L15
.L14:
	mov	rsi, QWORD PTR [r12]
	movsx	rax, r9d
	lea	r8d, 2[rbp]
	mov	edi, DWORD PTR [rsi+rax*4]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L5:
	movsx	rcx, eax
	cmp	DWORD PTR [rsi+rcx*4], edi
	cmove	eax, r8d
	mov	edx, eax
	lea	eax, 1[rax]
	cmp	edx, ebp
	jl	.L5
.L15:
	add	rbx, 1
	mov	ebp, r9d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR [r12]
	movsx	r15, ebp
	mov	r13d, DWORD PTR [rax+r15*4]
	mov	edi, r13d
	shr	edi, 31
	call	unlikely@PLT
	test	rax, rax
	je	.L8
	lea	r9d, 1[rbp]
	cmp	r9d, DWORD PTR SCIx_NR_IRQS[rip]
	jl	.L14
.L13:
	xor	r13d, r13d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L31:
	.cfi_restore_state
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
.L11:
	mov	esi, DWORD PTR 8[rsp]
	lea	eax, -1[rsi]
	test	esi, esi
	je	.L1
	cdqe
	movsx	r14, DWORD PTR 8[rsp]
	lea	rbp, 0[0+rax*4]
	lea	eax, -1[rbx]
	sub	r14, rax
	lea	rbx, -8[0+r14*4]
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR 8[r12]
	mov	edi, DWORD PTR [rax+rbp]
	sub	rbp, 4
	call	kfree@PLT
	cmp	rbx, rbp
	jne	.L17
	jmp	.L1
.L32:
	mov	edi, DWORD PTR 20[r12]
	mov	edx, DWORD PTR [r14]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	eax, ebp
	sub	eax, 1
	js	.L11
	movsx	rdx, eax
	mov	eax, eax
	sub	r15, rax
	lea	rbp, 0[0+rdx*4]
	lea	r14, -8[0+r15*4]
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR [r12]
	mov	rsi, r12
	mov	edi, DWORD PTR [rax+rbp]
	sub	rbp, 4
	call	free_irq@PLT
	cmp	rbp, r14
	jne	.L16
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	sci_request_irq, .-sci_request_irq
	.comm	sci_irq_desc,8,8
	.comm	SCIx_NR_IRQS,4,4
	.comm	SCIx_MUX_IRQ,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_sh-sci.c_sci_request_irq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s:%s\000"
	.align	2
.LC1:
	.ascii	"Can't allocate %s IRQ\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sci_request_irq, %function
sci_request_irq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, .L33
	sub	sp, sp, #12
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L13
	mov	r6, #0
	mov	r5, r0
	mov	r4, r6
	mov	r3, r6
	ldr	fp, .L33+4
.L2:
	cmp	r4, r3
	blt	.L6
	mov	r0, r5
	bl	SCIx_IRQ_IS_MUXED
	cmp	r0, #0
	beq	.L7
	ldr	r3, .L33+8
	ldr	r9, [r5, #8]
	ldr	r4, [r3]
.L8:
	ldr	r3, .L33+12
	ldr	r0, [r5, #12]
	ldr	r7, [r3]
	ldr	r3, .L33+16
	ldr	r10, [r3]
	bl	dev_name
	ldr	r3, [r7, r4, lsl #3]
	mov	r2, r0
	mov	r1, fp
	mov	r0, r10
	ldr	r10, [r5, #4]
	bl	kasprintf
	ldr	r3, [r5, #4]
	str	r0, [r10, r6, lsl #2]
	ldr	r3, [r3, r6, lsl #2]
	add	r7, r7, r4, lsl #3
	cmp	r3, #0
	beq	.L31
	ldr	r1, [r7, #4]
	str	r5, [sp]
	mov	r0, r9
	ldr	r2, [r5, #16]
	bl	request_irq
	mov	r9, r0
	bl	unlikely
	cmp	r0, #0
	bne	.L32
.L6:
	ldr	r3, [r8]
	add	lr, r4, #1
	cmp	r3, lr
	add	r6, r6, #1
	ble	.L13
	cmp	lr, #0
	movle	r3, #0
	ble	.L15
.L14:
	mov	r3, #0
	ldr	r1, [r5]
	add	ip, r4, #2
	ldr	r0, [r1, lr, lsl #2]
.L5:
	ldr	r2, [r1, r3, lsl #2]
	cmp	r2, r0
	moveq	r3, ip
	cmp	r3, r4
	add	r3, r3, #1
	blt	.L5
.L15:
	mov	r4, lr
	b	.L2
.L7:
	ldr	r3, [r5]
	ldr	r9, [r3, r4, lsl #2]
	lsr	r0, r9, #31
	bl	unlikely
	cmp	r0, #0
	beq	.L8
	ldr	r3, [r8]
	add	lr, r4, #1
	cmp	lr, r3
	add	r6, r6, #1
	blt	.L14
.L13:
	mov	r9, #0
.L1:
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	ldr	r3, .L33+20
	ldr	r9, [r3]
	rsb	r9, r9, #0
.L11:
	cmp	r6, #0
	sub	r6, r6, #1
	beq	.L1
.L16:
	ldr	r3, [r5, #4]
	ldr	r0, [r3, r6, lsl #2]
	sub	r6, r6, #1
	bl	kfree
	cmn	r6, #1
	bne	.L16
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	ldr	r2, [r7]
	ldr	r1, .L33+24
	ldr	r0, [r5, #12]
	bl	dev_err
	subs	r4, r4, #1
	bmi	.L11
.L12:
	ldr	r3, [r5]
	mov	r1, r5
	ldr	r0, [r3, r4, lsl #2]
	sub	r4, r4, #1
	bl	free_irq
	cmn	r4, #1
	bne	.L12
	b	.L11
.L34:
	.align	2
.L33:
	.word	SCIx_NR_IRQS
	.word	.LC0
	.word	SCIx_MUX_IRQ
	.word	sci_irq_desc
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	.LC1
	.size	sci_request_irq, .-sci_request_irq
	.comm	sci_irq_desc,4,4
	.comm	SCIx_NR_IRQS,4,4
	.comm	SCIx_MUX_IRQ,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
