	.file	"extr_3w-9xxx.c_twa_aen_sync_time.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	twa_aen_sync_time, @function
twa_aen_sync_time:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	edx, 72
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movsx	rbp, esi
	xor	esi, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 24[rdi]
	mov	rbx, QWORD PTR [rax+rbp*8]
	mov	rdi, rbx
	call	memset@PLT
	mov	esi, DWORD PTR TW_OP_SET_PARAM[rip]
	mov	edi, 2
	call	TW_OPSGL_IN@PLT
	mov	DWORD PTR 32[rbx], ebp
	mov	r14, QWORD PTR 56[rbx]
	mov	DWORD PTR 64[rbx], eax
	mov	rax, QWORD PTR 16[r12]
	mov	edi, DWORD PTR [rax+rbp*4]
	call	TW_CPU_TO_SGL@PLT
	mov	edi, DWORD PTR TW_SECTOR_SIZE[rip]
	mov	DWORD PTR 8[r14], eax
	mov	r14, QWORD PTR 56[rbx]
	call	cpu_to_le32@PLT
	mov	edi, 1
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR TW_COMMAND_SIZE[rip]
	lea	r14, 4[rsp]
	mov	DWORD PTR 48[rbx], eax
	call	cpu_to_le16@PLT
	mov	edx, DWORD PTR TW_SECTOR_SIZE[rip]
	xor	esi, esi
	mov	QWORD PTR 40[rbx], rax
	mov	rax, QWORD PTR 8[r12]
	mov	rbx, QWORD PTR [rax+rbp*8]
	mov	rdi, rbx
	call	memset@PLT
	mov	edi, DWORD PTR TW_TIMEKEEP_TABLE[rip]
	or	edi, 32768
	call	cpu_to_le16@PLT
	mov	edi, 3
	mov	QWORD PTR 24[rbx], rax
	call	cpu_to_le16@PLT
	mov	edi, 4
	mov	QWORD PTR 16[rbx], rax
	call	cpu_to_le16@PLT
	mov	QWORD PTR 8[rbx], rax
	xor	eax, eax
	call	ktime_get_real_seconds@PLT
	imul	edx, DWORD PTR sys_tz[rip], 60
	mov	esi, 604800
	movsx	rdx, edx
	sub	rax, rdx
	mov	rdx, r14
	lea	rdi, -259200[rax]
	call	div_u64_rem@PLT
	movsx	rax, DWORD PTR 4[rsp]
	mov	rdi, rax
	imul	rax, rax, 1861606989
	mov	edx, edi
	sar	edx, 31
	sar	rax, 50
	sub	eax, edx
	imul	eax, eax, 604800
	sub	edi, eax
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR [rbx]
	mov	edx, 4
	mov	rsi, r14
	mov	DWORD PTR 4[rsp], eax
	call	memcpy@PLT
	mov	rax, QWORD PTR [r12]
	mov	edx, 1
	mov	esi, ebp
	mov	rdi, r12
	mov	QWORD PTR [rax+rbp*8], 0
	call	twa_post_command_packet@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L5
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	twa_aen_sync_time, .-twa_aen_sync_time
	.comm	sys_tz,4,4
	.comm	TW_TIMEKEEP_TABLE,4,4
	.comm	TW_SECTOR_SIZE,4,4
	.comm	TW_OP_SET_PARAM,4,4
	.comm	TW_COMMAND_SIZE,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_3w-9xxx.c_twa_aen_sync_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	twa_aen_sync_time, %function
twa_aen_sync_time:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r0, #12]
	sub	sp, sp, #8
	ldr	r6, [r3, r1, lsl #2]
	ldr	r3, .L6
	mov	r4, r1
	mov	r2, #36
	mov	r5, r0
	mov	r1, #0
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	memset
	ldr	r3, .L6+4
	mov	r0, #2
	ldr	r1, [r3]
	bl	TW_OPSGL_IN
	ldr	r3, [r5, #8]
	str	r0, [r6, #32]
	str	r4, [r6, #16]
	ldr	r0, [r3, r4, lsl #2]
	ldr	r8, [r6, #28]
	bl	TW_CPU_TO_SGL
	ldr	r7, .L6+8
	str	r0, [r8, #4]
	ldr	r0, [r7]
	ldr	r8, [r6, #28]
	bl	cpu_to_le32
	ldr	r3, .L6+12
	str	r0, [r8]
	ldr	r3, [r3]
	mov	r0, #1
	str	r3, [r6, #24]
	bl	cpu_to_le16
	ldr	r3, [r5, #4]
	str	r0, [r6, #20]
	ldr	r6, [r3, r4, lsl #2]
	mov	r1, #0
	ldr	r2, [r7]
	mov	r0, r6
	bl	memset
	ldr	r3, .L6+16
	ldr	r0, [r3]
	orr	r0, r0, #32768
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, #3
	str	r3, [r6, #12]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, #4
	str	r3, [r6, #8]
	bl	cpu_to_le16
	str	r0, [r6, #4]
	bl	ktime_get_real_seconds
	ldr	r3, .L6+20
	ldr	r1, .L6+24
	ldr	r3, [r3]
	mov	r2, sp
	sub	r3, r3, r3, lsl #4
	add	r0, r0, r3, lsl #2
	sub	r0, r0, #259072
	sub	r0, r0, #128
	bl	div_u64_rem
	ldr	r0, [sp]
	ldr	r2, .L6+28
	asr	r3, r0, #31
	smull	r1, r2, r0, r2
	rsb	r3, r3, r2, asr #18
	add	r3, r3, r3, lsl #2
	rsb	r3, r3, r3, lsl #4
	rsb	r3, r3, r3, lsl #6
	sub	r0, r0, r3, lsl #7
	bl	cpu_to_le32
	mov	r3, r0
	mov	r1, sp
	mov	r2, #4
	ldr	r0, [r6]
	str	r3, [sp]
	bl	memcpy
	mov	r2, #0
	ldr	r3, [r5]
	mov	r0, r5
	str	r2, [r3, r4, lsl #2]
	mov	r1, r4
	mov	r2, #1
	bl	twa_post_command_packet
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	TW_OP_SET_PARAM
	.word	TW_SECTOR_SIZE
	.word	TW_COMMAND_SIZE
	.word	TW_TIMEKEEP_TABLE
	.word	sys_tz
	.word	604800
	.word	1861606989
	.size	twa_aen_sync_time, .-twa_aen_sync_time
	.comm	sys_tz,4,4
	.comm	TW_TIMEKEEP_TABLE,4,4
	.comm	TW_SECTOR_SIZE,4,4
	.comm	TW_OP_SET_PARAM,4,4
	.comm	TW_COMMAND_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
