	.file	"extr_spi.c_st33zp24_spi_read8_reg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	st33zp24_spi_read8_reg, @function
st33zp24_spi_read8_reg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 24[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	rdi, QWORD PTR 16[rdi]
	mov	QWORD PTR 8[rsp], 0
	mov	QWORD PTR [rsp], rax
	mov	eax, DWORD PTR LOCALITY0[rip]
	mov	QWORD PTR 16[rsp], rdi
	add	rdi, 8
	mov	DWORD PTR -8[rdi], eax
	mov	DWORD PTR -4[rdi], esi
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR TPM_DUMMY_BYTE[rip]
	add	edx, ecx
	call	memset@PLT
	mov	eax, DWORD PTR 8[rbx]
	mov	rdi, r13
	mov	rsi, rsp
	mov	edx, 1
	lea	eax, 2[r12+rax]
	mov	DWORD PTR 8[rsp], eax
	call	spi_sync_transfer@PLT
	mov	r13d, eax
	test	r12d, r12d
	jle	.L1
	test	eax, eax
	je	.L12
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rbx]
	mov	edx, r12d
	mov	rdi, rbp
	add	esi, 2
	movsx	rsi, esi
	sal	rsi, 2
	mov	r13d, DWORD PTR -4[rax+rsi]
	add	rsi, rax
	call	memcpy@PLT
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	st33zp24_spi_read8_reg, .-st33zp24_spi_read8_reg
	.comm	TPM_DUMMY_BYTE,4,4
	.comm	LOCALITY0,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_spi.c_st33zp24_spi_read8_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	st33zp24_spi_read8_reg, %function
st33zp24_spi_read8_reg:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	mov	r5, r3
	ldr	r3, .L12
	ldr	ip, .L12+4
	ldr	r3, [r3]
	mov	r7, r2
	ldr	r2, [r0]
	ldr	r0, [r0, #8]
	sub	sp, sp, #20
	ldr	ip, [ip]
	str	ip, [sp, #12]
	mov	ip,#0
	ldr	r6, [r4, #12]
	str	r0, [sp, #8]
	str	r2, [sp]
	str	r1, [r0, #4]
	str	r3, [r0]
	ldr	r2, [r4, #4]
	ldr	r3, .L12+8
	add	r2, r5, r2
	ldr	r1, [r3]
	add	r0, r0, #8
	bl	memset
	ldr	r3, [r4, #4]
	mov	r0, r6
	add	r3, r3, #2
	add	r3, r3, r5
	mov	r2, #1
	mov	r1, sp
	str	r3, [sp, #4]
	bl	spi_sync_transfer
	cmp	r5, #0
	movle	r3, #0
	movgt	r3, #1
	cmp	r0, #0
	movne	r3, #0
	cmp	r3, #0
	moveq	r6, r0
	bne	.L10
.L1:
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	ldr	r3, [r4, #4]
	ldr	ip, [r4]
	add	r3, r3, #1073741825
	add	r1, ip, r3, lsl #2
	mov	r2, r5
	mov	r0, r7
	add	r1, r1, #4
	ldr	r6, [ip, r3, lsl #2]
	bl	memcpy
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	LOCALITY0
	.word	.LC0
	.word	TPM_DUMMY_BYTE
	.size	st33zp24_spi_read8_reg, .-st33zp24_spi_read8_reg
	.comm	TPM_DUMMY_BYTE,4,4
	.comm	LOCALITY0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
