	.file	"extr_adm6996.c_adm6996_read_gpio_reg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adm6996_read_gpio_reg, @function
adm6996_read_gpio_reg:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	movabs	rax, 1095216660735
	mov	QWORD PTR 16[rsp], rax
	mov	QWORD PTR 24[rsp], rax
	mov	eax, esi
	shr	eax, 6
	and	eax, 1
	or	eax, 96
	mov	DWORD PTR 32[rsp], eax
	lea	eax, 0[0+rsi*4]
	xor	esi, esi
	and	eax, 255
	mov	DWORD PTR 36[rsp], eax
	call	gpio_direction_output@PLT
	mov	edi, DWORD PTR [rbx]
	xor	esi, esi
	call	gpio_direction_output@PLT
	mov	edi, DWORD PTR 8[rbx]
	xor	esi, esi
	call	gpio_direction_output@PLT
	lea	rdx, 16[rsp]
	xor	esi, esi
	mov	rdi, rbx
	mov	ecx, 46
	call	adm6996_gpio_write@PLT
	mov	edi, DWORD PTR 8[rbx]
	call	gpio_direction_input@PLT
	mov	esi, 2
	mov	rdi, rbx
	call	adm6996_gpio_adclk@PLT
	mov	rdx, rsp
	mov	ecx, 32
	xor	esi, esi
	mov	rdi, rbx
	call	adm6996_gpio_read@PLT
	mov	esi, 2
	mov	rdi, rbx
	call	adm6996_gpio_adclk@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	gpio_direction_input@PLT
	mov	edi, DWORD PTR [rbx]
	call	gpio_direction_input@PLT
	and	ebp, 1
	je	.L2
	mov	eax, DWORD PTR [rsp]
	sal	eax, 8
	or	eax, DWORD PTR 4[rsp]
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L7
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR 8[rsp]
	sal	eax, 8
	or	eax, DWORD PTR 12[rsp]
	jmp	.L1
.L7:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	adm6996_read_gpio_reg, .-adm6996_read_gpio_reg
	.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_adm6996.c_adm6996_read_gpio_reg.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adm6996_read_gpio_reg, %function
adm6996_read_gpio_reg:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #255
	push	{r4, r5, r6, lr}
	mov	r4, r0
	lsr	r3, r1, #6
	ldr	lr, .L8
	lsl	ip, r1, #2
	and	r3, r3, #1
	sub	sp, sp, #48
	and	ip, ip, r2
	orr	r3, r3, #96
	mov	r5, r1
	ldr	r0, [r0, #4]
	mov	r1, #0
	ldr	lr, [lr]
	str	lr, [sp, #44]
	mov	lr,#0
	str	ip, [sp, #40]
	str	r3, [sp, #36]
	str	r2, [sp, #20]
	str	r2, [sp, #24]
	str	r2, [sp, #28]
	str	r2, [sp, #32]
	bl	gpio_direction_output
	mov	r1, #0
	ldr	r0, [r4]
	bl	gpio_direction_output
	mov	r1, #0
	ldr	r0, [r4, #8]
	bl	gpio_direction_output
	mov	r3, #46
	add	r2, sp, #20
	mov	r1, #0
	mov	r0, r4
	bl	adm6996_gpio_write
	ldr	r0, [r4, #8]
	bl	gpio_direction_input
	mov	r1, #2
	mov	r0, r4
	bl	adm6996_gpio_adclk
	mov	r3, #32
	add	r2, sp, #4
	mov	r1, #0
	mov	r0, r4
	bl	adm6996_gpio_read
	mov	r1, #2
	mov	r0, r4
	bl	adm6996_gpio_adclk
	ldr	r0, [r4, #4]
	bl	gpio_direction_input
	ldr	r0, [r4]
	bl	gpio_direction_input
	tst	r5, #1
	ldrne	r3, [sp, #4]
	ldreq	r3, [sp, #12]
	ldrne	r0, [sp, #8]
	ldreq	r0, [sp, #16]
	orr	r0, r0, r3, lsl #8
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, pc}
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	.LC0
	.size	adm6996_read_gpio_reg, .-adm6996_read_gpio_reg
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
