	.file	"extr_exynos5_pad.c_pad_pin_toggle.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pad_pin_toggle, @function
pad_pin_toggle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	sub	rsp, 56
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	device_get_softc@PLT
	mov	edx, DWORD PTR [rax]
	test	edx, edx
	jle	.L2
	mov	r12, rax
	mov	rax, QWORD PTR 8[rax]
	sub	edx, 1
	lea	rdx, 4[rax+rdx*4]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	add	rax, 4
	cmp	rax, rdx
	je	.L2
.L4:
	cmp	DWORD PTR [rax], ebp
	jne	.L15
	lea	rcx, 12[rsp]
	lea	rdx, 16[rsp]
	mov	esi, ebp
	mov	rdi, r12
	call	get_bank@PLT
	mov	r8, rax
	mov	eax, DWORD PTR EINVAL[rip]
	test	r8, r8
	jne	.L1
	mov	rdi, r12
	call	GPIO_LOCK@PLT
	mov	rax, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR 24[rsp]
	mov	rdi, r12
	lea	rdx, 4[rax]
	call	READ4@PLT
	mov	edx, DWORD PTR 12[rsp]
	bt	eax, edx
	jc	.L16
	bts	eax, edx
	mov	ecx, eax
.L7:
	mov	rax, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR 24[rsp]
	mov	rdi, r12
	lea	rdx, 4[rax]
	call	WRITE4@PLT
	mov	rdi, r12
	call	GPIO_UNLOCK@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	btr	eax, edx
	mov	ecx, eax
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pad_pin_toggle, .-pad_pin_toggle
	.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_exynos5_pad.c_pad_pin_toggle.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pad_pin_toggle, %function
pad_pin_toggle:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L17
	sub	sp, sp, #20
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	device_get_softc
	ldr	r1, [r0]
	cmp	r1, #0
	ble	.L2
	ldr	r2, [r0, #4]
	mov	r5, r0
	mov	r3, #0
	sub	r2, r2, #4
	b	.L4
.L15:
	add	r3, r3, #1
	cmp	r3, r1
	beq	.L2
.L4:
	ldr	ip, [r2, #4]!
	cmp	ip, r4
	bne	.L15
	mov	r1, r4
	mov	r3, sp
	mov	r0, r5
	add	r2, sp, #4
	bl	get_bank
	subs	r4, r0, #0
	bne	.L2
	mov	r0, r5
	bl	GPIO_LOCK
	ldr	r2, [sp, #4]
	ldr	r1, [sp, #8]
	mov	r0, r5
	add	r2, r2, #4
	bl	READ4
	ldr	r3, [sp]
	ldr	r1, [sp, #8]
	asr	r2, r0, r3
	tst	r2, #1
	mov	r2, #1
	bicne	r3, r0, r2, lsl r3
	orreq	r3, r0, r2, lsl r3
	ldr	r2, [sp, #4]
	mov	r0, r5
	add	r2, r2, #4
	bl	WRITE4
	mov	r0, r5
	bl	GPIO_UNLOCK
	b	.L1
.L2:
	ldr	r3, .L17+4
	ldr	r4, [r3]
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	EINVAL
	.size	pad_pin_toggle, .-pad_pin_toggle
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
