	.file	"extr_rtc_m41t81.c_m41t81_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	m41t81_read, @function
m41t81_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR R_SMB_STATUS[rip]
	call	SMB_CSR@PLT
	mov	edi, eax
	call	__raw_readq@PLT
	test	DWORD PTR M_SMB_BUSY[rip], eax
	jne	.L2
	mov	edi, DWORD PTR R_SMB_CMD[rip]
	call	SMB_CSR@PLT
	movzx	edi, bl
	mov	esi, eax
	call	__raw_writeq@PLT
	mov	edi, DWORD PTR R_SMB_START[rip]
	call	SMB_CSR@PLT
	mov	edi, DWORD PTR M41T81_CCR_ADDRESS[rip]
	mov	ebp, eax
	call	V_SMB_ADDR@PLT
	or	eax, DWORD PTR V_SMB_TT_WR1BYTE[rip]
	mov	esi, ebp
	mov	edi, eax
	call	__raw_writeq@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR R_SMB_STATUS[rip]
	call	SMB_CSR@PLT
	mov	edi, eax
	call	__raw_readq@PLT
	test	DWORD PTR M_SMB_BUSY[rip], eax
	jne	.L3
	mov	edi, DWORD PTR R_SMB_START[rip]
	call	SMB_CSR@PLT
	mov	edi, DWORD PTR M41T81_CCR_ADDRESS[rip]
	mov	ebp, eax
	call	V_SMB_ADDR@PLT
	or	eax, DWORD PTR V_SMB_TT_RD1BYTE[rip]
	mov	esi, ebp
	mov	edi, eax
	call	__raw_writeq@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR R_SMB_STATUS[rip]
	call	SMB_CSR@PLT
	mov	edi, eax
	call	__raw_readq@PLT
	test	DWORD PTR M_SMB_BUSY[rip], eax
	jne	.L4
	mov	edi, DWORD PTR R_SMB_STATUS[rip]
	call	SMB_CSR@PLT
	mov	edi, eax
	call	__raw_readq@PLT
	test	DWORD PTR M_SMB_ERROR[rip], eax
	jne	.L12
	mov	edi, DWORD PTR R_SMB_DATA[rip]
	call	SMB_CSR@PLT
	mov	edi, eax
	call	__raw_readq@PLT
	movzx	eax, al
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR R_SMB_STATUS[rip]
	call	SMB_CSR@PLT
	mov	edi, DWORD PTR M_SMB_ERROR[rip]
	mov	esi, eax
	call	__raw_writeq@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	m41t81_read, .-m41t81_read
	.comm	V_SMB_TT_WR1BYTE,4,4
	.comm	V_SMB_TT_RD1BYTE,4,4
	.comm	R_SMB_STATUS,4,4
	.comm	R_SMB_START,4,4
	.comm	R_SMB_DATA,4,4
	.comm	R_SMB_CMD,4,4
	.comm	M_SMB_ERROR,4,4
	.comm	M_SMB_BUSY,4,4
	.comm	M41T81_CCR_ADDRESS,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_rtc_m41t81.c_m41t81_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	m41t81_read, %function
m41t81_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r4, .L13
	ldr	r5, .L13+4
.L2:
	ldr	r0, [r4]
	bl	SMB_CSR
	bl	__raw_readq
	ldr	r3, [r5]
	tst	r0, r3
	bne	.L2
	ldr	r3, .L13+8
	ldr	r8, .L13+12
	ldr	r0, [r3]
	bl	SMB_CSR
	mov	r1, r0
	and	r0, r6, #255
	bl	__raw_writeq
	ldr	r0, [r8]
	bl	V_SMB_ADDR
	mov	r6, r0
	ldr	r3, .L13+16
	ldr	r7, .L13+20
	ldr	r3, [r3]
	ldr	r0, [r7]
	orr	r6, r6, r3
	bl	SMB_CSR
	mov	r1, r0
	mov	r0, r6
	bl	__raw_writeq
.L3:
	ldr	r0, [r4]
	bl	SMB_CSR
	bl	__raw_readq
	ldr	r3, [r5]
	tst	r0, r3
	bne	.L3
	ldr	r0, [r8]
	bl	V_SMB_ADDR
	mov	r6, r0
	ldr	r3, .L13+24
	ldr	r0, [r7]
	ldr	r3, [r3]
	orr	r6, r6, r3
	bl	SMB_CSR
	mov	r1, r0
	mov	r0, r6
	bl	__raw_writeq
.L4:
	ldr	r0, [r4]
	bl	SMB_CSR
	bl	__raw_readq
	ldr	r3, [r5]
	tst	r0, r3
	bne	.L4
	ldr	r0, [r4]
	bl	SMB_CSR
	bl	__raw_readq
	ldr	r3, .L13+28
	ldr	r5, [r3]
	tst	r0, r5
	bne	.L12
	ldr	r3, .L13+32
	ldr	r0, [r3]
	bl	SMB_CSR
	bl	__raw_readq
	and	r0, r0, #255
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r0, [r4]
	bl	SMB_CSR
	mov	r1, r0
	mov	r0, r5
	bl	__raw_writeq
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	.align	2
.L13:
	.word	R_SMB_STATUS
	.word	M_SMB_BUSY
	.word	R_SMB_CMD
	.word	M41T81_CCR_ADDRESS
	.word	V_SMB_TT_WR1BYTE
	.word	R_SMB_START
	.word	V_SMB_TT_RD1BYTE
	.word	M_SMB_ERROR
	.word	R_SMB_DATA
	.size	m41t81_read, .-m41t81_read
	.comm	V_SMB_TT_WR1BYTE,4,4
	.comm	V_SMB_TT_RD1BYTE,4,4
	.comm	R_SMB_STATUS,4,4
	.comm	R_SMB_START,4,4
	.comm	R_SMB_DATA,4,4
	.comm	R_SMB_CMD,4,4
	.comm	M_SMB_ERROR,4,4
	.comm	M_SMB_BUSY,4,4
	.comm	M41T81_CCR_ADDRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
