	.file	"extr_rtc-abx80x.c_abx80x_rtc_set_autocalibration.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"autocalibration value outside permitted range\n"
	.align 8
.LC1:
	.string	"Failed to write CONFIG_KEY register\n"
	.text
	.p2align 4
	.type	abx80x_rtc_set_autocalibration, @function
abx80x_rtc_set_autocalibration:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	call	to_i2c_client@PLT
	mov	rbp, rax
	test	ebx, -513
	je	.L2
	cmp	ebx, 1024
	jne	.L16
.L2:
	mov	esi, DWORD PTR ABX8XX_REG_OSC[rip]
	mov	rdi, rbp
	call	i2c_smbus_read_byte_data@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR ABX8XX_OSC_ACAL_1024[rip]
	mov	edx, DWORD PTR ABX8XX_OSC_ACAL_512[rip]
	test	ebx, ebx
	jne	.L4
	or	eax, edx
	not	eax
	and	eax, r12d
	mov	r14d, eax
.L5:
	mov	edx, DWORD PTR ABX8XX_CFG_KEY_OSC[rip]
	mov	esi, DWORD PTR ABX8XX_REG_CFG_KEY[rip]
	mov	rdi, rbp
	call	i2c_smbus_write_byte_data@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L17
	mov	esi, DWORD PTR ABX8XX_REG_OSC[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edx, r14d
	mov	rdi, rbp
	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
	jmp	i2c_smbus_write_byte_data@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r14d, eax
	or	r14d, edx
	or	r14d, r12d
	cmp	ebx, 1024
	jne	.L5
	or	r12d, eax
	mov	eax, edx
	not	eax
	and	eax, r12d
	mov	r14d, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, r13
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	abx80x_rtc_set_autocalibration, .-abx80x_rtc_set_autocalibration
	.comm	EINVAL,4,4
	.comm	ABX8XX_REG_OSC,4,4
	.comm	ABX8XX_REG_CFG_KEY,4,4
	.comm	ABX8XX_OSC_ACAL_512,4,4
	.comm	ABX8XX_OSC_ACAL_1024,4,4
	.comm	ABX8XX_CFG_KEY_OSC,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-abx80x.c_abx80x_rtc_set_autocalibration.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"autocalibration value outside permitted range\012\000"
	.align	2
.LC1:
	.ascii	"Failed to write CONFIG_KEY register\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	abx80x_rtc_set_autocalibration, %function
abx80x_rtc_set_autocalibration:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r9, r1
	mov	r6, r0
	bl	to_i2c_client
	bic	r3, r9, #512
	cmp	r9, #1024
	cmpne	r3, #0
	bne	.L10
	ldr	r8, .L12
	mov	r5, r0
	ldr	r1, [r8]
	bl	i2c_smbus_read_byte_data
	subs	r4, r0, #0
	blt	.L1
	ldr	r2, .L12+4
	ldr	r3, .L12+8
	ldr	r0, [r2]
	ldr	r7, [r3]
	cmp	r9, #0
	orreq	r0, r0, r7
	biceq	r7, r4, r0
	beq	.L5
	cmp	r9, #1024
	orreq	r4, r0, r4
	orrne	r0, r0, r7
	biceq	r7, r4, r7
	orrne	r7, r0, r4
.L5:
	ldr	r3, .L12+12
	ldr	r2, .L12+16
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	i2c_smbus_write_byte_data
	subs	r4, r0, #0
	blt	.L11
	mov	r2, r7
	mov	r0, r5
	ldr	r1, [r8]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	i2c_smbus_write_byte_data
.L10:
	mov	r0, r6
	ldr	r1, .L12+20
	bl	dev_err
	ldr	r3, .L12+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	mov	r0, r6
	ldr	r1, .L12+28
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	.align	2
.L12:
	.word	ABX8XX_REG_OSC
	.word	ABX8XX_OSC_ACAL_1024
	.word	ABX8XX_OSC_ACAL_512
	.word	ABX8XX_REG_CFG_KEY
	.word	ABX8XX_CFG_KEY_OSC
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.size	abx80x_rtc_set_autocalibration, .-abx80x_rtc_set_autocalibration
	.comm	EINVAL,4,4
	.comm	ABX8XX_REG_OSC,4,4
	.comm	ABX8XX_REG_CFG_KEY,4,4
	.comm	ABX8XX_OSC_ACAL_512,4,4
	.comm	ABX8XX_OSC_ACAL_1024,4,4
	.comm	ABX8XX_CFG_KEY_OSC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
