	.file	"extr_chipc_gpio.c_chipc_gpio_pin_getflags.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	chipc_gpio_pin_getflags, @function
chipc_gpio_pin_getflags:
.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	edi, r12d
	mov	rbp, rax
	call	CC_GPIO_VALID_PIN@PLT
	test	eax, eax
	jne	.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	CC_GPIO_LOCK@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	chipc_gpio_pin_get_mode@PLT
	cmp	eax, 129
	je	.L4
	cmp	eax, 130
	je	.L5
	cmp	eax, 128
	je	.L19
.L7:
	mov	rdi, rbp
	call	CC_GPIO_UNLOCK@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	eax, DWORD PTR GPIO_PIN_OUTPUT[rip]
	mov	rdi, rbp
	mov	DWORD PTR [rbx], eax
	mov	esi, DWORD PTR NO_DCTIMER[rip]
	call	CC_GPIO_QUIRK@PLT
	test	eax, eax
	jne	.L7
	mov	edx, DWORD PTR GPIOTIMEROUTMASK[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	CC_GPIO_RDFLAG@PLT
	test	eax, eax
	je	.L7
	mov	eax, DWORD PTR GPIO_PIN_PULSATE[rip]
	or	DWORD PTR [rbx], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	mov	eax, DWORD PTR GPIO_PIN_TRISTATE[rip]
	or	eax, DWORD PTR GPIO_PIN_OUTPUT[rip]
	mov	DWORD PTR [rbx], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR GPIO_PIN_INPUT[rip]
	mov	rdi, rbp
	mov	DWORD PTR [rbx], eax
	mov	esi, DWORD PTR NO_PULLUPDOWN[rip]
	call	CC_GPIO_QUIRK@PLT
	test	eax, eax
	jne	.L7
	mov	edx, DWORD PTR GPIOPU[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	CC_GPIO_RDFLAG@PLT
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR GPIO_PIN_PULLUP[rip]
	or	DWORD PTR [rbx], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR GPIOPD[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	CC_GPIO_RDFLAG@PLT
	test	eax, eax
	je	.L7
	mov	eax, DWORD PTR GPIO_PIN_PULLDOWN[rip]
	or	DWORD PTR [rbx], eax
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	chipc_gpio_pin_getflags, .-chipc_gpio_pin_getflags
	.comm	NO_PULLUPDOWN,4,4
	.comm	NO_DCTIMER,4,4
	.comm	GPIO_PIN_TRISTATE,4,4
	.comm	GPIO_PIN_PULSATE,4,4
	.comm	GPIO_PIN_PULLUP,4,4
	.comm	GPIO_PIN_PULLDOWN,4,4
	.comm	GPIO_PIN_OUTPUT,4,4
	.comm	GPIO_PIN_INPUT,4,4
	.comm	GPIOTIMEROUTMASK,4,4
	.comm	GPIOPU,4,4
	.comm	GPIOPD,4,4
	.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_chipc_gpio.c_chipc_gpio_pin_getflags.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	chipc_gpio_pin_getflags, %function
chipc_gpio_pin_getflags:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r6, r2
	bl	device_get_softc
	mov	r4, r0
	mov	r0, r5
	bl	CC_GPIO_VALID_PIN
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L20
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	CC_GPIO_LOCK
	mov	r1, r5
	mov	r0, r4
	bl	chipc_gpio_pin_get_mode
	cmp	r0, #129
	beq	.L4
	cmp	r0, #130
	beq	.L5
	cmp	r0, #128
	beq	.L19
.L7:
	mov	r0, r4
	bl	CC_GPIO_UNLOCK
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L4:
	ldr	r2, .L20+4
	ldr	r3, .L20+8
	ldr	r2, [r2]
	mov	r0, r4
	str	r2, [r6]
	ldr	r1, [r3]
	bl	CC_GPIO_QUIRK
	cmp	r0, #0
	bne	.L7
	ldr	r3, .L20+12
	mov	r1, r5
	mov	r0, r4
	ldr	r2, [r3]
	bl	CC_GPIO_RDFLAG
	cmp	r0, #0
	beq	.L7
	ldr	r2, .L20+16
	ldr	r3, [r6]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r6]
	b	.L7
.L19:
	ldr	r3, .L20+20
	ldr	r2, .L20+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r6]
	b	.L7
.L5:
	ldr	r2, .L20+24
	ldr	r3, .L20+28
	ldr	r2, [r2]
	mov	r0, r4
	str	r2, [r6]
	ldr	r1, [r3]
	bl	CC_GPIO_QUIRK
	cmp	r0, #0
	bne	.L7
	ldr	r3, .L20+32
	mov	r1, r5
	mov	r0, r4
	ldr	r2, [r3]
	bl	CC_GPIO_RDFLAG
	cmp	r0, #0
	beq	.L9
	ldr	r2, .L20+36
	ldr	r3, [r6]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r6]
	b	.L7
.L9:
	ldr	r3, .L20+40
	mov	r1, r5
	mov	r0, r4
	ldr	r2, [r3]
	bl	CC_GPIO_RDFLAG
	cmp	r0, #0
	beq	.L7
	ldr	r2, .L20+44
	ldr	r3, [r6]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r6]
	b	.L7
.L21:
	.align	2
.L20:
	.word	EINVAL
	.word	GPIO_PIN_OUTPUT
	.word	NO_DCTIMER
	.word	GPIOTIMEROUTMASK
	.word	GPIO_PIN_PULSATE
	.word	GPIO_PIN_TRISTATE
	.word	GPIO_PIN_INPUT
	.word	NO_PULLUPDOWN
	.word	GPIOPU
	.word	GPIO_PIN_PULLUP
	.word	GPIOPD
	.word	GPIO_PIN_PULLDOWN
	.size	chipc_gpio_pin_getflags, .-chipc_gpio_pin_getflags
	.comm	NO_PULLUPDOWN,4,4
	.comm	NO_DCTIMER,4,4
	.comm	GPIO_PIN_TRISTATE,4,4
	.comm	GPIO_PIN_PULSATE,4,4
	.comm	GPIO_PIN_PULLUP,4,4
	.comm	GPIO_PIN_PULLDOWN,4,4
	.comm	GPIO_PIN_OUTPUT,4,4
	.comm	GPIO_PIN_INPUT,4,4
	.comm	GPIOTIMEROUTMASK,4,4
	.comm	GPIOPU,4,4
	.comm	GPIOPD,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
