	.file	"extr_time.c_sun3x_hwclk.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sun3x_hwclk
	.type	sun3x_hwclk, @function
sun3x_hwclk:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edi
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, QWORD PTR M_CONTROL[rip]
	add	rbx, QWORD PTR SUN3X_EEPROM[rip]
	call	local_irq_save@PLT
	mov	eax, DWORD PTR [rbx]
	test	r12d, r12d
	je	.L2
	or	eax, DWORD PTR C_WRITE[rip]
	mov	rdi, QWORD PTR 48[rbp]
	mov	DWORD PTR [rbx], eax
	call	bin2bcd@PLT
	mov	rdi, QWORD PTR 40[rbp]
	mov	QWORD PTR 56[rbx], rax
	call	bin2bcd@PLT
	mov	rdi, QWORD PTR 32[rbp]
	mov	QWORD PTR 48[rbx], rax
	call	bin2bcd@PLT
	mov	rdi, QWORD PTR 24[rbp]
	mov	QWORD PTR 40[rbx], rax
	call	bin2bcd@PLT
	mov	rdi, QWORD PTR 16[rbp]
	mov	QWORD PTR 32[rbx], rax
	call	bin2bcd@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	QWORD PTR 24[rbx], rax
	call	bin2bcd@PLT
	mov	rdi, QWORD PTR 0[rbp]
	mov	QWORD PTR 16[rbx], rax
	call	bin2bcd@PLT
	xor	edi, edi
	mov	QWORD PTR 8[rbx], rax
	mov	eax, DWORD PTR C_WRITE[rip]
	mov	edx, DWORD PTR [rbx]
	not	eax
	and	eax, edx
	mov	DWORD PTR [rbx], eax
	call	local_irq_restore@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	or	eax, DWORD PTR C_READ[rip]
	mov	DWORD PTR [rbx], eax
	mov	rdi, QWORD PTR 56[rbx]
	call	bcd2bin@PLT
	mov	rdi, QWORD PTR 48[rbx]
	mov	QWORD PTR 48[rbp], rax
	call	bcd2bin@PLT
	mov	rdi, QWORD PTR 40[rbx]
	mov	QWORD PTR 40[rbp], rax
	call	bcd2bin@PLT
	mov	rdi, QWORD PTR 32[rbx]
	mov	QWORD PTR 32[rbp], rax
	call	bcd2bin@PLT
	mov	rdi, QWORD PTR 24[rbx]
	mov	QWORD PTR 24[rbp], rax
	call	bcd2bin@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	QWORD PTR 16[rbp], rax
	call	bcd2bin@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	QWORD PTR 8[rbp], rax
	call	bcd2bin@PLT
	mov	edx, DWORD PTR [rbx]
	xor	edi, edi
	mov	QWORD PTR 0[rbp], rax
	mov	eax, DWORD PTR C_READ[rip]
	not	eax
	and	eax, edx
	mov	DWORD PTR [rbx], eax
	call	local_irq_restore@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sun3x_hwclk, .-sun3x_hwclk
	.comm	SUN3X_EEPROM,8,8
	.comm	M_CONTROL,8,8
	.comm	C_WRITE,4,4
	.comm	C_READ,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_time.c_sun3x_hwclk.c"
	.text
	.align	2
	.global	sun3x_hwclk
	.syntax unified
	.arm
	.fpu softvfp
	.type	sun3x_hwclk, %function
sun3x_hwclk:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r2, .L6
	ldr	r3, .L6+4
	ldr	r7, [r2]
	ldr	r6, [r3]
	mov	r0, #0
	mov	r4, r1
	bl	local_irq_save
	cmp	r5, #0
	add	r5, r7, r6
	beq	.L2
	ldr	r8, .L6+8
	ldr	r3, [r7, r6]
	ldr	r2, [r8]
	ldr	r0, [r4, #24]
	orr	r3, r3, r2
	str	r3, [r7, r6]
	bl	bin2bcd
	mov	r3, r0
	ldr	r0, [r4, #20]
	str	r3, [r5, #28]
	bl	bin2bcd
	mov	r3, r0
	ldr	r0, [r4, #16]
	str	r3, [r5, #24]
	bl	bin2bcd
	mov	r3, r0
	ldr	r0, [r4, #12]
	str	r3, [r5, #20]
	bl	bin2bcd
	mov	r3, r0
	ldr	r0, [r4, #8]
	str	r3, [r5, #16]
	bl	bin2bcd
	mov	r3, r0
	ldr	r0, [r4, #4]
	str	r3, [r5, #12]
	bl	bin2bcd
	mov	r3, r0
	ldr	r0, [r4]
	str	r3, [r5, #8]
	bl	bin2bcd
	str	r0, [r5, #4]
	ldr	r2, [r8]
	ldr	r3, [r7, r6]
	bic	r3, r3, r2
	str	r3, [r7, r6]
.L3:
	mov	r0, #0
	bl	local_irq_restore
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r8, .L6+12
	ldr	r3, [r7, r6]
	ldr	r2, [r8]
	orr	r3, r3, r2
	str	r3, [r7, r6]
	ldr	r0, [r5, #28]
	bl	bcd2bin
	ldr	r3, [r5, #24]
	str	r0, [r4, #24]
	mov	r0, r3
	bl	bcd2bin
	ldr	r3, [r5, #20]
	str	r0, [r4, #20]
	mov	r0, r3
	bl	bcd2bin
	ldr	r3, [r5, #16]
	str	r0, [r4, #16]
	mov	r0, r3
	bl	bcd2bin
	ldr	r3, [r5, #12]
	str	r0, [r4, #12]
	mov	r0, r3
	bl	bcd2bin
	ldr	r3, [r5, #8]
	str	r0, [r4, #8]
	mov	r0, r3
	bl	bcd2bin
	ldr	r3, [r5, #4]
	str	r0, [r4, #4]
	mov	r0, r3
	bl	bcd2bin
	ldr	r2, [r8]
	ldr	r3, [r7, r6]
	str	r0, [r4]
	bic	r3, r3, r2
	str	r3, [r7, r6]
	b	.L3
.L7:
	.align	2
.L6:
	.word	SUN3X_EEPROM
	.word	M_CONTROL
	.word	C_WRITE
	.word	C_READ
	.size	sun3x_hwclk, .-sun3x_hwclk
	.comm	SUN3X_EEPROM,4,4
	.comm	M_CONTROL,4,4
	.comm	C_WRITE,4,4
	.comm	C_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
