	.file	"extr_gpio-cadence.c_cdns_gpio_irq_set_type.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cdns_gpio_irq_set_type, @function
cdns_gpio_irq_set_type:
.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
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	irq_data_get_irq_chip_data@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	gpiochip_get_data@PLT
	mov	edi, DWORD PTR [r12]
	mov	rbx, rax
	call	BIT@PLT
	xor	esi, esi
	mov	rdi, rbp
	mov	r15d, eax
	call	spin_lock_irqsave@PLT
	mov	rdi, QWORD PTR CDNS_GPIO_IRQ_VALUE[rip]
	add	rdi, QWORD PTR [rbx]
	call	ioread32@PLT
	mov	rdi, QWORD PTR CDNS_GPIO_IRQ_TYPE[rip]
	add	rdi, QWORD PTR [rbx]
	mov	r13d, eax
	call	ioread32@PLT
	cmp	DWORD PTR IRQ_TYPE_LEVEL_HIGH[rip], r14d
	je	.L8
	cmp	DWORD PTR IRQ_TYPE_LEVEL_LOW[rip], r14d
	jne	.L4
	mov	edi, r15d
	or	eax, r15d
	not	edi
	mov	r12d, eax
	and	edi, r13d
.L3:
	mov	rsi, QWORD PTR CDNS_GPIO_IRQ_VALUE[rip]
	add	rsi, QWORD PTR [rbx]
	call	iowrite32@PLT
	mov	rsi, QWORD PTR CDNS_GPIO_IRQ_TYPE[rip]
	mov	edi, r12d
	add	rsi, QWORD PTR [rbx]
	call	iowrite32@PLT
	xor	r12d, r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L5:
	mov	rdi, rbp
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L8:
	.cfi_restore_state
	or	eax, r15d
	mov	edi, r13d
	mov	r12d, eax
	or	edi, r15d
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	cdns_gpio_irq_set_type, .-cdns_gpio_irq_set_type
	.comm	IRQ_TYPE_LEVEL_LOW,4,4
	.comm	IRQ_TYPE_LEVEL_HIGH,4,4
	.comm	EINVAL,4,4
	.comm	CDNS_GPIO_IRQ_VALUE,8,8
	.comm	CDNS_GPIO_IRQ_TYPE,8,8
	.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_gpio-cadence.c_cdns_gpio_irq_set_type.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cdns_gpio_irq_set_type, %function
cdns_gpio_irq_set_type:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r1
	mov	r5, r0
	bl	irq_data_get_irq_chip_data
	mov	r7, r0
	bl	gpiochip_get_data
	mov	r4, r0
	ldr	r0, [r5]
	bl	BIT
	ldr	r9, .L9
	mov	fp, r0
	mov	r1, #0
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r3, [r9]
	ldr	r0, [r4]
	ldr	r8, .L9+4
	add	r0, r0, r3
	bl	ioread32
	ldr	r2, [r4]
	ldr	r3, [r8]
	mov	r6, r0
	add	r0, r2, r3
	bl	ioread32
	ldr	r2, .L9+8
	mov	r3, r0
	ldr	r2, [r2]
	cmp	r2, r10
	orreq	r5, r0, fp
	orreq	r0, r6, fp
	beq	.L3
	ldr	r2, .L9+12
	ldr	r2, [r2]
	cmp	r2, r10
	biceq	r0, r6, fp
	orreq	r5, r3, fp
	bne	.L8
.L3:
	ldr	r3, [r9]
	ldr	r1, [r4]
	add	r1, r1, r3
	bl	iowrite32
	ldr	r1, [r4]
	ldr	r3, [r8]
	mov	r0, r5
	add	r1, r1, r3
	bl	iowrite32
	mov	r4, #0
.L5:
	mov	r0, r7
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	ldr	r3, .L9+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L5
.L10:
	.align	2
.L9:
	.word	CDNS_GPIO_IRQ_VALUE
	.word	CDNS_GPIO_IRQ_TYPE
	.word	IRQ_TYPE_LEVEL_HIGH
	.word	IRQ_TYPE_LEVEL_LOW
	.word	EINVAL
	.size	cdns_gpio_irq_set_type, .-cdns_gpio_irq_set_type
	.comm	IRQ_TYPE_LEVEL_LOW,4,4
	.comm	IRQ_TYPE_LEVEL_HIGH,4,4
	.comm	EINVAL,4,4
	.comm	CDNS_GPIO_IRQ_VALUE,4,4
	.comm	CDNS_GPIO_IRQ_TYPE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
