	.file	"extr_rtc-st-lpc.c_st_rtc_probe.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"st,lpc-mode"
.LC1:
	.string	"An LPC mode must be provided\n"
.LC2:
	.string	"IRQ missing or invalid\n"
.LC3:
	.string	"Failed to request irq %i\n"
.LC4:
	.string	"Unable to request clock\n"
.LC5:
	.string	"Unable to fetch clock rate\n"
	.text
	.p2align 4
	.type	st_rtc_probe, @function
st_rtc_probe:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdx, rsp
	mov	rdi, r12
	call	of_property_read_u32@PLT
	lea	rsi, .LC1[rip]
	test	eax, eax
	jne	.L17
	mov	rax, QWORD PTR ST_LPC_MODE_RTC[rip]
	cmp	QWORD PTR [rsp], rax
	je	.L4
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.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
.L4:
	.cfi_restore_state
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 40
	mov	rdi, rbp
	call	devm_kzalloc@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L20
	mov	rdi, rbp
	call	devm_rtc_allocate_device@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	rdi, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L21
	lea	rdi, 32[rbx]
	call	spin_lock_init@PLT
	mov	esi, DWORD PTR IORESOURCE_MEM[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	platform_get_resource@PLT
	mov	rdi, rbp
	mov	rsi, rax
	call	devm_ioremap_resource@PLT
	mov	QWORD PTR 24[rbx], rax
	mov	rdi, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L22
	xor	esi, esi
	mov	rdi, r12
	call	irq_of_parse_and_map@PLT
	mov	DWORD PTR 20[rbx], eax
	mov	esi, eax
	test	eax, eax
	je	.L23
	mov	r8d, DWORD PTR 8[rbp]
	mov	edx, DWORD PTR st_rtc_handler[rip]
	mov	r9, rbx
	xor	ecx, ecx
	mov	rdi, rbp
	call	devm_request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L24
	mov	edi, DWORD PTR 20[rbx]
	call	enable_irq_wake@PLT
	mov	edi, DWORD PTR 20[rbx]
	call	disable_irq@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	clk_get@PLT
	mov	QWORD PTR [rbx], rax
	mov	rdi, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L25
	mov	rdi, QWORD PTR [rbx]
	call	clk_prepare_enable@PLT
	mov	rdi, QWORD PTR [rbx]
	call	clk_get_rate@PLT
	mov	DWORD PTR 16[rbx], eax
	test	eax, eax
	je	.L26
	mov	esi, 1
	mov	rdi, rbp
	call	device_set_wakeup_capable@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	platform_set_drvdata@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR U64_MAX[rip]
	lea	rcx, st_rtc_ops[rip]
	mov	esi, DWORD PTR 16[rbx]
	mov	QWORD PTR 8[rax], rcx
	mov	DWORD PTR [rax], edi
	call	do_div@PLT
	mov	rdi, QWORD PTR 8[rbx]
	call	rtc_register_device@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	rdi, QWORD PTR [rbx]
	call	clk_disable_unprepare@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, .LC2[rip]
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, rbp
	xor	eax, eax
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, QWORD PTR 8[rbx]
	call	PTR_ERR@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edx, DWORD PTR 20[rbx]
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, QWORD PTR 24[rbx]
	call	PTR_ERR@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_err@PLT
	mov	rdi, QWORD PTR [rbx]
	call	PTR_ERR@PLT
	mov	r12d, eax
	jmp	.L1
.L26:
	lea	rsi, .LC5[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	st_rtc_probe, .-st_rtc_probe
	.comm	st_rtc_ops,4,4
	.comm	st_rtc_handler,4,4
	.comm	U64_MAX,4,4
	.comm	ST_LPC_MODE_RTC,8,8
	.comm	IORESOURCE_MEM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,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-st-lpc.c_st_rtc_probe.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"st,lpc-mode\000"
	.align	2
.LC1:
	.ascii	"An LPC mode must be provided\012\000"
	.align	2
.LC2:
	.ascii	"IRQ missing or invalid\012\000"
	.align	2
.LC3:
	.ascii	"Failed to request irq %i\012\000"
	.align	2
.LC4:
	.ascii	"Unable to request clock\012\000"
	.align	2
.LC5:
	.ascii	"Unable to fetch clock rate\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	st_rtc_probe, %function
st_rtc_probe:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r5, [r0]
	sub	sp, sp, #20
	ldr	r3, .L27
	mov	r4, r0
	ldr	r1, .L27+4
	mov	r0, r5
	add	r2, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	of_property_read_u32
	cmp	r0, #0
	bne	.L18
	ldr	r3, .L27+8
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L4
	ldr	r3, .L27+12
	ldr	r0, [r3]
	rsb	r5, r0, #0
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L4:
	ldr	r3, .L27+16
	mov	r1, #24
	mov	r0, r4
	ldr	r2, [r3]
	bl	devm_kzalloc
	subs	r6, r0, #0
	beq	.L20
	mov	r0, r4
	bl	devm_rtc_allocate_device
	str	r0, [r6, #4]
	bl	IS_ERR
	subs	r7, r0, #0
	bne	.L21
	add	r0, r6, #20
	bl	spin_lock_init
	ldr	r3, .L27+20
	mov	r2, r7
	ldr	r1, [r3]
	mov	r0, r4
	bl	platform_get_resource
	mov	r1, r0
	mov	r0, r4
	bl	devm_ioremap_resource
	str	r0, [r6, #16]
	bl	IS_ERR
	subs	r7, r0, #0
	bne	.L22
	mov	r1, r7
	mov	r0, r5
	bl	irq_of_parse_and_map
	cmp	r0, #0
	mov	r1, r0
	str	r0, [r6, #12]
	beq	.L23
	ldr	r0, [r4, #4]
	ldr	r2, .L27+24
	str	r6, [sp, #4]
	ldr	r2, [r2]
	mov	r3, r7
	str	r0, [sp]
	mov	r0, r4
	bl	devm_request_irq
	subs	r5, r0, #0
	bne	.L24
	ldr	r0, [r6, #12]
	bl	enable_irq_wake
	ldr	r0, [r6, #12]
	bl	disable_irq
	mov	r1, r5
	mov	r0, r4
	bl	clk_get
	str	r0, [r6]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L25
	ldr	r0, [r6]
	bl	clk_prepare_enable
	ldr	r0, [r6]
	bl	clk_get_rate
	cmp	r0, #0
	str	r0, [r6, #8]
	beq	.L26
	mov	r1, #1
	mov	r0, r4
	bl	device_set_wakeup_capable
	mov	r1, r6
	mov	r0, r4
	bl	platform_set_drvdata
	ldr	r2, .L27+28
	ldr	r3, [r6, #4]
	ldr	r0, [r2]
	ldr	r2, .L27+32
	ldr	r1, [r6, #8]
	stm	r3, {r0, r2}
	bl	do_div
	ldr	r0, [r6, #4]
	bl	rtc_register_device
	subs	r5, r0, #0
	beq	.L1
	ldr	r0, [r6]
	bl	clk_disable_unprepare
	b	.L1
.L18:
	mov	r0, r4
	ldr	r1, .L27+36
	bl	dev_err
	ldr	r3, .L27+40
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L20:
	ldr	r3, .L27+44
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L21:
	ldr	r0, [r6, #4]
	bl	PTR_ERR
	mov	r5, r0
	b	.L1
.L24:
	mov	r0, r4
	ldr	r2, [r6, #12]
	ldr	r1, .L27+48
	bl	dev_err
	b	.L1
.L22:
	ldr	r0, [r6, #16]
	bl	PTR_ERR
	mov	r5, r0
	b	.L1
.L23:
	mov	r0, r4
	ldr	r1, .L27+52
	bl	dev_err
	ldr	r3, .L27+40
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L1
.L25:
	ldr	r1, .L27+56
	mov	r0, r4
	bl	dev_err
	ldr	r0, [r6]
	bl	PTR_ERR
	mov	r5, r0
	b	.L1
.L26:
	mov	r0, r4
	ldr	r1, .L27+60
	bl	dev_err
	ldr	r3, .L27+40
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L1
.L19:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC6
	.word	.LC0
	.word	ST_LPC_MODE_RTC
	.word	ENODEV
	.word	GFP_KERNEL
	.word	IORESOURCE_MEM
	.word	st_rtc_handler
	.word	U64_MAX
	.word	st_rtc_ops
	.word	.LC1
	.word	EINVAL
	.word	ENOMEM
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.word	.LC5
	.size	st_rtc_probe, .-st_rtc_probe
	.comm	st_rtc_ops,4,4
	.comm	st_rtc_handler,4,4
	.comm	U64_MAX,4,4
	.comm	ST_LPC_MODE_RTC,4,4
	.comm	IORESOURCE_MEM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
