	.file	"extr_gpio-winbond.c_winbond_gpio_configure_port.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"push-pull"
.LC1:
	.string	"open drain"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"enabled GPIO%u share pins with active %s\n"
	.align 8
.LC3:
	.string	"disabling GPIO%u as %s is enabled\n"
	.section	.rodata.str1.1
.LC4:
	.string	"GPIO%u pins are %s\n"
	.text
	.p2align 4
	.type	winbond_gpio_configure_port, @function
winbond_gpio_configure_port:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	lea	rax, 0[0+rdx*8]
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	sub	rax, rdx
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdx, QWORD PTR winbond_gpio_infos[rip]
	lea	rbx, [rdx+rax*8]
	cmp	QWORD PTR 32[rbx], 0
	je	.L5
	mov	rsi, QWORD PTR 24[rbx]
	cmp	rsi, QWORD PTR WB_SIO_DEV_NONE[rip]
	jne	.L18
.L3:
	mov	edx, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR 52[rbx]
	mov	rdi, r12
	call	winbond_sio_reg_btest@PLT
	test	rax, rax
	je	.L5
	cmp	QWORD PTR 40[rbx], 0
	mov	rdx, QWORD PTR 32[rbx]
	lea	esi, 1[rbp]
	je	.L4
	lea	rdi, .LC2[rip]
	call	pr_warn@PLT
.L5:
	test	ebp, ebp
	je	.L19
	cmp	ebp, 1
	je	.L20
.L8:
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, r12
	call	winbond_sio_select_logical@PLT
	mov	edx, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR 20[rbx]
	mov	rdi, r12
	call	winbond_sio_reg_bset@PLT
	mov	r13d, DWORD PTR params[rip]
	mov	edi, ebp
	call	BIT@PLT
	test	r13d, eax
	jne	.L21
	mov	edi, ebp
	mov	r13d, DWORD PTR params[rip+4]
	call	BIT@PLT
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 12[rbx]
	mov	rdi, r12
	test	r13d, eax
	je	.L10
	call	winbond_sio_reg_bclear@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	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
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 12[rbx]
	mov	rdi, r12
	call	winbond_sio_reg_bset@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	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
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	call	winbond_sio_select_logical@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r12
	call	winbond_gpio_configure_port0_pins@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	call	winbond_sio_reg_btest@PLT
	lea	rdx, .LC0[rip]
	lea	esi, 1[rbp]
	test	rax, rax
	lea	rax, .LC1[rip]
	lea	rdi, .LC4[rip]
	cmove	rdx, rax
	call	pr_notice@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	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
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	rdi, r12
	call	winbond_gpio_configure_port1_check_i2c@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rdi, .LC3[rip]
	call	pr_warn@PLT
	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	winbond_gpio_configure_port, .-winbond_gpio_configure_port
	.comm	winbond_gpio_infos,8,8
	.comm	params,8,8
	.comm	WB_SIO_DEV_NONE,8,8
	.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_gpio-winbond.c_winbond_gpio_configure_port.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"push-pull\000"
	.align	2
.LC1:
	.ascii	"open drain\000"
	.align	2
.LC2:
	.ascii	"enabled GPIO%u share pins with active %s\012\000"
	.align	2
.LC3:
	.ascii	"disabling GPIO%u as %s is enabled\012\000"
	.align	2
.LC4:
	.ascii	"GPIO%u pins are %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	winbond_gpio_configure_port, %function
winbond_gpio_configure_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L25
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, [r3]
	add	r4, r1, r1, lsl #2
	lsl	r9, r4, #3
	add	r4, r7, r4, lsl #3
	ldr	r3, [r4, #24]
	mov	r6, r1
	cmp	r3, #0
	mov	r5, r0
	beq	.L5
	ldr	r3, .L25+4
	ldr	r1, [r4, #20]
	ldr	r3, [r3]
	cmp	r1, r3
	bne	.L21
.L3:
	mov	r0, r5
	ldr	r2, [r4, #32]
	ldr	r1, [r4, #36]
	bl	winbond_sio_reg_btest
	cmp	r0, #0
	beq	.L5
	ldr	r8, [r4, #28]
	ldr	r2, [r4, #24]
	cmp	r8, #0
	add	r1, r6, #1
	beq	.L4
	ldr	r0, .L25+8
	bl	pr_warn
.L5:
	cmp	r6, #0
	beq	.L22
	cmp	r6, #1
	beq	.L23
.L8:
	ldr	r1, [r7, r9]
	mov	r0, r5
	bl	winbond_sio_select_logical
	ldr	r7, .L25+12
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #16]
	mov	r0, r5
	bl	winbond_sio_reg_bset
	mov	r0, r6
	ldr	r8, [r7]
	bl	BIT
	tst	r8, r0
	bne	.L24
	mov	r0, r6
	ldr	r7, [r7, #4]
	bl	BIT
	tst	r7, r0
	ldr	r2, [r4, #4]
	mov	r0, r5
	ldr	r1, [r4, #8]
	beq	.L10
	mov	r8, #1
	bl	winbond_sio_reg_bclear
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	mov	r8, #1
	mov	r0, r5
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	bl	winbond_sio_reg_bset
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	bl	winbond_sio_select_logical
	b	.L3
.L22:
	mov	r0, r5
	bl	winbond_gpio_configure_port0_pins
	b	.L8
.L10:
	bl	winbond_sio_reg_btest
	mov	r8, #1
	ldr	r3, .L25+16
	cmp	r0, #0
	ldr	r2, .L25+20
	add	r1, r6, #1
	moveq	r2, r3
	ldr	r0, .L25+24
	bl	pr_notice
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	mov	r0, r5
	bl	winbond_gpio_configure_port1_check_i2c
	b	.L8
.L4:
	ldr	r0, .L25+28
	bl	pr_warn
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	.align	2
.L25:
	.word	winbond_gpio_infos
	.word	WB_SIO_DEV_NONE
	.word	.LC2
	.word	params
	.word	.LC1
	.word	.LC0
	.word	.LC4
	.word	.LC3
	.size	winbond_gpio_configure_port, .-winbond_gpio_configure_port
	.comm	winbond_gpio_infos,4,4
	.comm	params,8,4
	.comm	WB_SIO_DEV_NONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
