	.file	"extr_axp209.c_axp2xx_gpio_pin_set.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	axp2xx_gpio_pin_set, @function
axp2xx_gpio_pin_set:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	device_get_softc@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	cmp	QWORD PTR [rax], rbx
	ja	.L18
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rbp, rax
	mov	rdi, rax
	call	AXP_LOCK@PLT
	mov	rax, QWORD PTR 8[rbp]
	lea	rdx, 4[rsp]
	mov	edi, r12d
	mov	ecx, 1
	mov	esi, DWORD PTR [rax+rbx*4]
	call	axp2xx_read@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L4
	mov	edx, DWORD PTR 4[rsp]
	mov	ecx, DWORD PTR AXP2XX_GPIO_FUNC_MASK[rip]
	mov	r13d, DWORD PTR EIO[rip]
	mov	eax, edx
	and	eax, ecx
	add	eax, -128
	cmp	eax, 1
	jbe	.L20
.L7:
	test	r13d, r13d
	jne	.L4
.L8:
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, r12d
	mov	esi, DWORD PTR [rax+rbx*4]
	call	axp2xx_write@PLT
	mov	r13d, eax
.L4:
	mov	rdi, rbp
	call	AXP_UNLOCK@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	cmp	rbx, 2
	jne	.L6
	mov	r13d, DWORD PTR EINVAL[rip]
	cmp	r14d, 1
	je	.L7
.L6:
	not	ecx
	and	edx, ecx
	or	edx, r14d
	mov	DWORD PTR 4[rsp], edx
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	axp2xx_gpio_pin_set, .-axp2xx_gpio_pin_set
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.comm	AXP2XX_GPIO_FUNC_MASK,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_axp209.c_axp2xx_gpio_pin_set.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	axp2xx_gpio_pin_set, %function
axp2xx_gpio_pin_set:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L14
	sub	sp, sp, #8
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r7, r2
	mov	r8, r0
	bl	device_get_softc
	ldr	r3, [r0]
	cmp	r3, r6
	bhi	.L2
	ldr	r3, .L14+4
	ldr	r5, [r3]
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r4, r0
	bl	AXP_LOCK
	ldr	r2, [r4, #4]
	mov	r3, #1
	ldr	r1, [r2, r6, lsl #2]
	mov	r0, r8
	mov	r2, sp
	bl	axp2xx_read
	subs	r5, r0, #0
	bne	.L4
	ldr	r3, .L14+8
	ldr	r2, [sp]
	ldr	r1, [r3]
	and	r3, r2, r1
	sub	r3, r3, #128
	cmp	r3, #1
	bls	.L13
	ldr	r3, .L14+12
	ldr	r5, [r3]
.L7:
	cmp	r5, #0
	bne	.L4
.L8:
	ldr	r3, [r4, #4]
	mov	r0, r8
	ldr	r1, [r3, r6, lsl #2]
	bl	axp2xx_write
	mov	r5, r0
.L4:
	mov	r0, r4
	bl	AXP_UNLOCK
	b	.L1
.L13:
	cmp	r6, #2
	cmpeq	r7, #1
	ldreq	r3, .L14+4
	ldreq	r5, [r3]
	beq	.L7
.L6:
	bic	r2, r2, r1
	orr	r2, r2, r7
	str	r2, [sp]
	b	.L8
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	EINVAL
	.word	AXP2XX_GPIO_FUNC_MASK
	.word	EIO
	.size	axp2xx_gpio_pin_set, .-axp2xx_gpio_pin_set
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.comm	AXP2XX_GPIO_FUNC_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
