	.file	"extr_gpio-adp5588.c_adp5588_gpio_direction_output.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adp5588_gpio_direction_output, @function
adp5588_gpio_direction_output:
.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
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	gpiochip_get_data@PLT
	mov	edi, r13d
	mov	r12, rax
	call	ADP5588_BANK@PLT
	mov	edi, r13d
	lea	r13, 16[r12]
	mov	ebp, eax
	call	ADP5588_BIT@PLT
	mov	rdi, r13
	mov	ebx, eax
	call	mutex_lock@PLT
	mov	rdx, QWORD PTR [r12]
	lea	rax, 0[0+rbp*4]
	add	rdx, rax
	add	rax, QWORD PTR 8[r12]
	or	DWORD PTR [rdx], ebx
	test	r14d, r14d
	je	.L2
	or	ebx, DWORD PTR [rax]
	mov	DWORD PTR [rax], ebx
	mov	edx, ebx
.L3:
	mov	rsi, QWORD PTR GPIO_DAT_OUT1[rip]
	mov	edi, DWORD PTR 20[r12]
	add	rsi, rbp
	call	adp5588_gpio_write@PLT
	mov	rsi, QWORD PTR GPIO_DIR1[rip]
	mov	edi, DWORD PTR 20[r12]
	mov	ebx, eax
	mov	rax, QWORD PTR [r12]
	add	rsi, rbp
	mov	edx, DWORD PTR [rax+rbp*4]
	call	adp5588_gpio_write@PLT
	mov	rdi, r13
	or	ebx, eax
	call	mutex_unlock@PLT
	mov	eax, ebx
	pop	rbx
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	not	ebx
	and	ebx, DWORD PTR [rax]
	mov	DWORD PTR [rax], ebx
	mov	edx, ebx
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	adp5588_gpio_direction_output, .-adp5588_gpio_direction_output
	.comm	GPIO_DIR1,8,8
	.comm	GPIO_DAT_OUT1,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-adp5588.c_adp5588_gpio_direction_output.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adp5588_gpio_direction_output, %function
adp5588_gpio_direction_output:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r8, r2
	bl	gpiochip_get_data
	mov	r5, r0
	mov	r0, r6
	bl	ADP5588_BANK
	mov	r4, r0
	mov	r0, r6
	bl	ADP5588_BIT
	mov	r6, r0
	add	r7, r5, #8
	mov	r0, r7
	bl	mutex_lock
	ldr	r2, [r5]
	cmp	r8, #0
	ldr	r3, [r2, r4, lsl #2]
	orr	r3, r3, r6
	str	r3, [r2, r4, lsl #2]
	ldr	r3, [r5, #4]
	ldr	r2, [r3, r4, lsl #2]
	orrne	r2, r6, r2
	biceq	r2, r2, r6
	str	r2, [r3, r4, lsl #2]
	ldr	r3, .L6
	ldr	r0, [r5, #12]
	ldr	r1, [r3]
	add	r1, r4, r1
	bl	adp5588_gpio_write
	mov	r3, r0
	ldr	r1, .L6+4
	ldr	r2, [r5]
	ldr	r1, [r1]
	ldr	r2, [r2, r4, lsl #2]
	add	r1, r4, r1
	ldr	r0, [r5, #12]
	mov	r4, r3
	bl	adp5588_gpio_write
	mov	r3, r0
	mov	r0, r7
	orr	r4, r4, r3
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	.align	2
.L6:
	.word	GPIO_DAT_OUT1
	.word	GPIO_DIR1
	.size	adp5588_gpio_direction_output, .-adp5588_gpio_direction_output
	.comm	GPIO_DIR1,4,4
	.comm	GPIO_DAT_OUT1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
