	.file	"extr_chvgpio.c_chvgpio_pin_get.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	chvgpio_pin_get, @function
chvgpio_pin_get:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdx
	call	device_get_softc@PLT
	mov	esi, r12d
	mov	rdi, rax
	mov	rbp, rax
	call	chvgpio_valid_pin@PLT
	test	rax, rax
	je	.L2
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	CHVGPIO_LOCK@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	chvgpio_read_pad_cfg0@PLT
	test	DWORD PTR CHVGPIO_PAD_CFG0_GPIORXSTATE[rip], eax
	mov	rdi, rbp
	mov	eax, DWORD PTR GPIO_PIN_HIGH[rip]
	cmove	eax, DWORD PTR GPIO_PIN_LOW[rip]
	mov	DWORD PTR [rbx], eax
	call	CHVGPIO_UNLOCK@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	chvgpio_pin_get, .-chvgpio_pin_get
	.comm	GPIO_PIN_LOW,4,4
	.comm	GPIO_PIN_HIGH,4,4
	.comm	EINVAL,4,4
	.comm	CHVGPIO_PAD_CFG0_GPIORXSTATE,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_chvgpio.c_chvgpio_pin_get.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	chvgpio_pin_get, %function
chvgpio_pin_get:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r7, r2
	bl	device_get_softc
	mov	r1, r5
	mov	r6, r0
	bl	chvgpio_valid_pin
	subs	r4, r0, #0
	beq	.L2
	ldr	r3, .L8
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r6
	bl	CHVGPIO_LOCK
	mov	r1, r5
	mov	r0, r6
	bl	chvgpio_read_pad_cfg0
	ldr	r3, .L8+4
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L8+8
	ldreq	r3, .L8+12
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [r7]
	bl	CHVGPIO_UNLOCK
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	EINVAL
	.word	CHVGPIO_PAD_CFG0_GPIORXSTATE
	.word	GPIO_PIN_HIGH
	.word	GPIO_PIN_LOW
	.size	chvgpio_pin_get, .-chvgpio_pin_get
	.comm	GPIO_PIN_LOW,4,4
	.comm	GPIO_PIN_HIGH,4,4
	.comm	EINVAL,4,4
	.comm	CHVGPIO_PAD_CFG0_GPIORXSTATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
