	.file	"extr_hwa742.c_enable_tearsync.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	enable_tearsync, @function
enable_tearsync:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, r8d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR HWA742_NDP_CTRL[rip]
	call	hwa742_read_reg@PLT
	mov	edi, DWORD PTR HWA742_NDP_CTRL[rip]
	or	eax, 4
	mov	esi, eax
	call	hwa742_write_reg@PLT
	cmp	QWORD PTR hwa742[rip+16], 0
	setne	dil
	test	r13d, r13d
	setne	al
	or	edi, eax
	movzx	edi, dil
	call	likely@PLT
	test	rax, rax
	jne	.L9
	mov	esi, DWORD PTR hwa742[rip]
	mov	rax, QWORD PTR hwa742[rip+8]
	mov	edi, DWORD PTR hwa742[rip+4]
	imul	esi, r12d
	mov	rcx, QWORD PTR [rax]
	cmp	esi, edi
	jl	.L7
	movsx	rax, esi
	movsx	rdx, edi
	sar	esi, 31
	imul	rax, rax, 274877907
	sar	edi, 31
	imul	rdx, rdx, 274877907
	sar	rax, 38
	sub	eax, esi
	sar	rdx, 38
	lea	esi, 1[rbp]
	imul	eax, ebx
	sub	edx, edi
	add	ebx, ebp
	imul	ebx, edx
	cmp	eax, ebx
	jl	.L7
.L6:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, 1
	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
	jmp	rcx
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	esi, esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR hwa742[rip+8]
	xor	esi, esi
	mov	edi, 1
	mov	rax, QWORD PTR [rax]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	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
	jmp	rax
	.cfi_endproc
.LFE0:
	.size	enable_tearsync, .-enable_tearsync
	.comm	hwa742,24,16
	.comm	HWA742_NDP_CTRL,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_hwa742.c_enable_tearsync.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	enable_tearsync, %function
enable_tearsync:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, .L9
	mov	r7, r0
	ldr	r0, [r8]
	mov	r6, r2
	mov	r4, r1
	ldr	r9, [sp, #32]
	bl	hwa742_read_reg
	ldr	r5, .L9+4
	orr	r1, r0, #4
	ldr	r0, [r8]
	bl	hwa742_write_reg
	ldr	r3, [r5, #12]
	orrs	r3, r9, r3
	movne	r0, #1
	moveq	r0, #0
	bl	likely
	subs	r1, r0, #0
	bne	.L8
	ldm	r5, {r3, ip}
	mul	r3, r4, r3
	ldr	r2, [r5, #8]
	cmp	r3, ip
	ldr	r2, [r2]
	blt	.L6
	ldr	lr, .L9+8
	asr	r0, r3, #31
	smull	r4, r3, lr, r3
	smull	r4, lr, ip, lr
	asr	ip, ip, #31
	rsb	r3, r0, r3, asr #6
	rsb	ip, ip, lr, asr #6
	add	r0, r6, r7
	mul	ip, r0, ip
	mul	r6, r3, r6
	cmp	r6, ip
	addge	r1, r7, #1
.L6:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	bx	r2
.L8:
	ldr	r3, [r5, #8]
	mov	r1, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r0, #1
	ldr	r3, [r3]
	bx	r3
.L10:
	.align	2
.L9:
	.word	HWA742_NDP_CTRL
	.word	hwa742
	.word	274877907
	.size	enable_tearsync, .-enable_tearsync
	.comm	hwa742,16,4
	.comm	HWA742_NDP_CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
