	.file	"extr_rtc-max6900.c_max6900_i2c_read_time.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	max6900_i2c_read_time, @function
max6900_i2c_read_time:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX6900_REG_LEN[rip]
	mov	rcx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L12:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L12
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L13
	mov	r12, rsp
	mov	rsi, r12
	call	max6900_i2c_read_regs@PLT
	test	eax, eax
	js	.L1
.L15:
	mov	rax, QWORD PTR MAX6900_REG_SC[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR MAX6900_REG_MN[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	mov	DWORD PTR 4[rbx], eax
	mov	rax, QWORD PTR MAX6900_REG_HR[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	and	edi, 63
	call	bcd2bin@PLT
	mov	DWORD PTR 8[rbx], eax
	mov	rax, QWORD PTR MAX6900_REG_DT[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	mov	DWORD PTR 12[rbx], eax
	mov	rax, QWORD PTR MAX6900_REG_MO[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	sub	eax, 1
	mov	DWORD PTR 16[rbx], eax
	mov	rax, QWORD PTR MAX6900_REG_YR[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	mov	r13d, eax
	mov	rax, QWORD PTR MAX6900_REG_CENTURY[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	imul	eax, eax, 100
	lea	eax, -1900[r13+rax]
	mov	DWORD PTR 20[rbx], eax
	mov	rax, QWORD PTR MAX6900_REG_DW[rip]
	mov	edi, DWORD PTR [r12+rax*4]
	call	bcd2bin@PLT
	mov	DWORD PTR 24[rbx], eax
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR -40[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L14
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	mov	r12, rsp
	mov	rsi, r12
	call	max6900_i2c_read_regs@PLT
	test	eax, eax
	jns	.L15
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	max6900_i2c_read_time, .-max6900_i2c_read_time
	.comm	MAX6900_REG_YR,8,8
	.comm	MAX6900_REG_SC,8,8
	.comm	MAX6900_REG_MO,8,8
	.comm	MAX6900_REG_MN,8,8
	.comm	MAX6900_REG_LEN,4,4
	.comm	MAX6900_REG_HR,8,8
	.comm	MAX6900_REG_DW,8,8
	.comm	MAX6900_REG_DT,8,8
	.comm	MAX6900_REG_CENTURY,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_rtc-max6900.c_max6900_i2c_read_time.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	max6900_i2c_read_time, %function
max6900_i2c_read_time:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #12
	ldr	r3, .L7
	mov	r4, r1
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r5, sp
	ldr	r3, .L7+4
	mov	r1, r5
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bl	max6900_i2c_read_regs
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L7+8
	ldr	r3, [r3]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	ldr	r3, .L7+12
	str	r0, [r4]
	ldr	r3, [r3]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	ldr	r3, .L7+16
	str	r0, [r4, #4]
	ldr	r3, [r3]
	ldr	r0, [r5, r3, lsl #2]
	and	r0, r0, #63
	bl	bcd2bin
	ldr	r3, .L7+20
	str	r0, [r4, #8]
	ldr	r3, [r3]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	ldr	r3, .L7+24
	str	r0, [r4, #12]
	ldr	r3, [r3]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	ldr	r3, .L7+28
	sub	r0, r0, #1
	ldr	r3, [r3]
	str	r0, [r4, #16]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	ldr	r3, .L7+32
	mov	r6, r0
	ldr	r3, [r3]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	add	r0, r0, r0, lsl #2
	ldr	r3, .L7+36
	add	r0, r0, r0, lsl #2
	add	r0, r6, r0, lsl #2
	ldr	r3, [r3]
	sub	r0, r0, #1888
	sub	r0, r0, #12
	str	r0, [r4, #20]
	ldr	r0, [r5, r3, lsl #2]
	bl	bcd2bin
	mov	r3, r0
	mov	r0, #0
	str	r3, [r4, #24]
.L1:
	ldr	r3, .L7+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L6
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L6:
	bl	__stack_chk_fail
.L8:
	.align	2
.L7:
	.word	MAX6900_REG_LEN
	.word	.LC0
	.word	MAX6900_REG_SC
	.word	MAX6900_REG_MN
	.word	MAX6900_REG_HR
	.word	MAX6900_REG_DT
	.word	MAX6900_REG_MO
	.word	MAX6900_REG_YR
	.word	MAX6900_REG_CENTURY
	.word	MAX6900_REG_DW
	.size	max6900_i2c_read_time, .-max6900_i2c_read_time
	.comm	MAX6900_REG_YR,4,4
	.comm	MAX6900_REG_SC,4,4
	.comm	MAX6900_REG_MO,4,4
	.comm	MAX6900_REG_MN,4,4
	.comm	MAX6900_REG_LEN,4,4
	.comm	MAX6900_REG_HR,4,4
	.comm	MAX6900_REG_DW,4,4
	.comm	MAX6900_REG_DT,4,4
	.comm	MAX6900_REG_CENTURY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
