	.file	"extr_rtc-s35390a.c_s35390a_disable_test_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	s35390a_disable_test_mode, @function
s35390a_disable_test_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	ecx, 1
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR S35390A_CMD_STATUS2[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r12, 7[rsp]
	mov	rdx, r12
	call	s35390a_get_reg@PLT
	test	rax, rax
	js	.L9
	movzx	ecx, BYTE PTR 7[rsp]
	movzx	edx, BYTE PTR S35390A_FLAG_TEST[rip]
	xor	eax, eax
	test	cl, dl
	jne	.L10
.L1:
	mov	rsi, QWORD PTR 8[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	not	edx
	mov	esi, DWORD PTR S35390A_CMD_STATUS2[rip]
	mov	rdi, rbp
	and	edx, ecx
	mov	ecx, 1
	mov	BYTE PTR 7[rsp], dl
	mov	rdx, r12
	call	s35390a_set_reg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	s35390a_disable_test_mode, .-s35390a_disable_test_mode
	.comm	S35390A_FLAG_TEST,1,1
	.comm	S35390A_CMD_STATUS2,4,4
	.comm	EIO,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-s35390a.c_s35390a_disable_test_mode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	s35390a_disable_test_mode, %function
s35390a_disable_test_mode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r5, .L11
	sub	sp, sp, #12
	ldr	ip, .L11+4
	mov	r2, sp
	mov	r3, #1
	ldr	r1, [r5]
	ldr	ip, [ip]
	str	ip, [sp, #4]
	mov	ip,#0
	mov	r4, r0
	bl	s35390a_get_reg
	cmp	r0, #0
	blt	.L8
	ldr	r2, .L11+8
	ldrb	r3, [sp]	@ zero_extendqisi2
	ldrb	ip, [r2]	@ zero_extendqisi2
	ands	r0, r3, ip
	bne	.L9
.L1:
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L9:
	bic	ip, r3, ip
	mov	r2, sp
	mov	r0, r4
	mov	r3, #1
	ldr	r1, [r5]
	strb	ip, [sp]
	bl	s35390a_set_reg
	b	.L1
.L8:
	ldr	r3, .L11+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	S35390A_CMD_STATUS2
	.word	.LC0
	.word	S35390A_FLAG_TEST
	.word	EIO
	.size	s35390a_disable_test_mode, .-s35390a_disable_test_mode
	.comm	S35390A_FLAG_TEST,1,1
	.comm	S35390A_CMD_STATUS2,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
