	.file	"extr_gpio-zx.c_zx_direction_output.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	zx_direction_output, @function
zx_direction_output:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	gpiochip_get_data@PLT
	cmp	DWORD PTR [rbx], r12d
	ja	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xor	esi, esi
	mov	rbp, rax
	mov	rdi, rax
	call	raw_spin_lock_irqsave@PLT
	mov	rdi, QWORD PTR ZX_GPIO_DIR[rip]
	add	rdi, QWORD PTR 8[rbp]
	call	readw_relaxed@PLT
	mov	edi, r12d
	mov	ebx, eax
	call	BIT@PLT
	mov	rsi, QWORD PTR ZX_GPIO_DIR[rip]
	add	rsi, QWORD PTR 8[rbp]
	or	ebx, eax
	mov	edi, ebx
	call	writew_relaxed@PLT
	test	r13d, r13d
	je	.L4
	mov	r13, QWORD PTR ZX_GPIO_DO1[rip]
.L7:
	mov	edi, r12d
	add	r13, QWORD PTR 8[rbp]
	call	BIT@PLT
	mov	rsi, r13
	mov	edi, eax
	call	writew_relaxed@PLT
	mov	rdi, rbp
	xor	esi, esi
	call	raw_spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r13, QWORD PTR ZX_GPIO_DO0[rip]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	zx_direction_output, .-zx_direction_output
	.comm	ZX_GPIO_DO1,8,8
	.comm	ZX_GPIO_DO0,8,8
	.comm	ZX_GPIO_DIR,8,8
	.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_gpio-zx.c_zx_direction_output.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	zx_direction_output, %function
zx_direction_output:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r4, r1
	mov	r7, r2
	bl	gpiochip_get_data
	ldr	r3, [r6]
	cmp	r3, r4
	bhi	.L2
	ldr	r3, .L8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r5, r0
	ldr	r8, .L8+4
	mov	r1, #0
	bl	raw_spin_lock_irqsave
	ldr	r3, [r8]
	ldr	r0, [r5, #4]
	add	r0, r0, r3
	bl	readw_relaxed
	mov	r6, r0
	mov	r0, r4
	bl	BIT
	ldr	r3, [r8]
	ldr	r1, [r5, #4]
	orr	r0, r6, r0
	add	r1, r1, r3
	bl	writew_relaxed
	cmp	r7, #0
	mov	r0, r4
	beq	.L4
	bl	BIT
	ldr	r3, .L8+8
	ldr	r1, [r5, #4]
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	writew_relaxed
.L5:
	mov	r0, r5
	mov	r1, #0
	bl	raw_spin_unlock_irqrestore
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	bl	BIT
	ldr	r3, .L8+12
	ldr	r1, [r5, #4]
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	writew_relaxed
	b	.L5
.L9:
	.align	2
.L8:
	.word	EINVAL
	.word	ZX_GPIO_DIR
	.word	ZX_GPIO_DO1
	.word	ZX_GPIO_DO0
	.size	zx_direction_output, .-zx_direction_output
	.comm	ZX_GPIO_DO1,4,4
	.comm	ZX_GPIO_DO0,4,4
	.comm	ZX_GPIO_DIR,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
