	.file	"extr_mtk_gpio_v1.c_mtk_gpio_pin_set_invert.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mtk_gpio_pin_set_invert, @function
mtk_gpio_pin_set_invert:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ecx, r12d
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, 1
	sal	ebx, cl
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR GPIO_PIOPOL[rip]
	call	MTK_READ_4@PLT
	mov	esi, DWORD PTR GPIO_PIOPOL[rip]
	mov	rdi, r13
	mov	edx, eax
	mov	eax, ebx
	not	ebx
	and	ebx, edx
	or	eax, edx
	test	ebp, ebp
	cmove	eax, ebx
	mov	edx, eax
	call	MTK_WRITE_4@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	edx, DWORD PTR GPIO_PIN_INVIN[rip]
	or	edx, DWORD PTR GPIO_PIN_INVOUT[rip]
	lea	rax, [rax+r12*4]
	not	edx
	and	edx, DWORD PTR [rax]
	or	edx, ebp
	mov	DWORD PTR [rax], edx
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mtk_gpio_pin_set_invert, .-mtk_gpio_pin_set_invert
	.comm	GPIO_PIOPOL,4,4
	.comm	GPIO_PIN_INVOUT,4,4
	.comm	GPIO_PIN_INVIN,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_mtk_gpio_v1.c_mtk_gpio_pin_set_invert.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_gpio_pin_set_invert, %function
mtk_gpio_pin_set_invert:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r8, .L6
	mov	r5, r2
	mov	r4, r1
	mov	r7, #1
	ldr	r1, [r8]
	mov	r6, r0
	bl	MTK_READ_4
	lsl	r7, r7, r4
	cmp	r5, #0
	orrne	r2, r7, r0
	biceq	r2, r0, r7
	ldr	r1, [r8]
	mov	r0, r6
	bl	MTK_WRITE_4
	ldr	r3, .L6+4
	ldr	r2, .L6+8
	ldr	r1, [r6]
	ldr	r0, [r3]
	ldr	r2, [r2]
	ldr	r3, [r1, r4, lsl #2]
	orr	r2, r2, r0
	bic	r3, r3, r2
	orr	r2, r3, r5
	mov	r0, #0
	str	r2, [r1, r4, lsl #2]
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	.align	2
.L6:
	.word	GPIO_PIOPOL
	.word	GPIO_PIN_INVOUT
	.word	GPIO_PIN_INVIN
	.size	mtk_gpio_pin_set_invert, .-mtk_gpio_pin_set_invert
	.comm	GPIO_PIOPOL,4,4
	.comm	GPIO_PIN_INVOUT,4,4
	.comm	GPIO_PIN_INVIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
