	.file	"extr_gregor.c_SdnToGregorian.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	SdnToGregorian
	.type	SdnToGregorian, @function
SdnToGregorian:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r9, rdx
	test	edi, edi
	jle	.L2
	mov	r8d, DWORD PTR GREGOR_SDN_OFFSET[rip]
	mov	edx, DWORD PTR LONG_MAX[rip]
	lea	eax, 0[0+r8*4]
	sub	edx, eax
	lea	eax, 3[rdx]
	cmovns	eax, edx
	sar	eax, 2
	cmp	eax, edi
	jl	.L2
	add	edi, r8d
	lea	eax, -1[0+rdi*4]
	cdq
	idiv	DWORD PTR DAYS_PER_400_YEARS[rip]
	test	edx, edx
	lea	r8d, 3[rdx]
	mov	edi, eax
	mov	eax, edx
	cmovs	eax, r8d
	imul	edi, edi, 100
	or	eax, 3
	cdq
	idiv	DWORD PTR DAYS_PER_4_YEARS[rip]
	add	edi, eax
	test	edx, edx
	lea	eax, 3[rdx]
	cmovns	eax, edx
	sar	eax, 2
	lea	eax, 2[rax+rax*4]
	cdq
	idiv	DWORD PTR DAYS_PER_5_MONTHS[rip]
	movsx	r8, edx
	sar	edx, 31
	imul	r8, r8, 1717986919
	sar	r8, 33
	sub	r8d, edx
	add	r8d, 1
	cmp	eax, 9
	jg	.L5
	add	eax, 3
.L6:
	lea	edx, -4800[rdi]
	sub	edi, 4801
	test	edx, edx
	cmovle	edx, edi
	mov	DWORD PTR [rsi], edx
	mov	DWORD PTR [r9], eax
	mov	DWORD PTR [rcx], r8d
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	mov	DWORD PTR [rsi], 0
	mov	DWORD PTR [r9], 0
	mov	DWORD PTR [rcx], 0
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	add	edi, 1
	sub	eax, 9
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	SdnToGregorian, .-SdnToGregorian
	.comm	LONG_MAX,4,4
	.comm	GREGOR_SDN_OFFSET,4,4
	.comm	DAYS_PER_5_MONTHS,4,4
	.comm	DAYS_PER_4_YEARS,4,4
	.comm	DAYS_PER_400_YEARS,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_gregor.c_SdnToGregorian.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.global	SdnToGregorian
	.syntax unified
	.arm
	.fpu softvfp
	.type	SdnToGregorian, %function
SdnToGregorian:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r0, #0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r5, r2
	mov	r4, r3
	ble	.L2
	ldr	r2, .L10
	ldr	r3, .L10+4
	ldr	ip, [r2]
	ldr	r3, [r3]
	sub	ip, ip, r3, lsl #2
	cmp	ip, #0
	add	r2, ip, #3
	movlt	ip, r2
	cmp	r0, ip, asr #2
	bgt	.L2
	add	r0, r3, r0
	ldr	r3, .L10+8
	lsl	r0, r0, #2
	ldr	r1, [r3]
	sub	r0, r0, #1
	bl	__aeabi_idivmod
	cmp	r1, #0
	mov	r7, r0
	add	r0, r1, #3
	movlt	r1, r0
	ldr	r3, .L10+12
	orr	r0, r1, #3
	ldr	r1, [r3]
	bl	__aeabi_idivmod
	mov	ip, r1
	add	r1, r1, #3
	cmp	ip, #0
	movlt	ip, r1
	mov	r3, r0
	ldr	r2, .L10+16
	asr	ip, ip, #2
	add	ip, ip, ip, lsl #2
	add	r7, r7, r7, lsl #2
	ldr	r1, [r2]
	add	r7, r7, r7, lsl #2
	add	r0, ip, #2
	add	r7, r3, r7, lsl #2
	bl	__aeabi_idivmod
	ldr	r3, .L10+20
	cmp	r0, #9
	smull	r2, r3, r1, r3
	addgt	r7, r7, #1
	asr	r1, r1, #31
	rsb	r1, r1, r3, asr #1
	sub	r3, r7, #4800
	addle	r0, r0, #3
	subgt	r0, r0, #9
	cmp	r3, #0
	add	r1, r1, #1
	suble	r3, r3, #1
	str	r3, [r6]
	str	r0, [r5]
	str	r1, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r3, #0
	str	r3, [r6]
	str	r3, [r5]
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	LONG_MAX
	.word	GREGOR_SDN_OFFSET
	.word	DAYS_PER_400_YEARS
	.word	DAYS_PER_4_YEARS
	.word	DAYS_PER_5_MONTHS
	.word	1717986919
	.size	SdnToGregorian, .-SdnToGregorian
	.comm	LONG_MAX,4,4
	.comm	GREGOR_SDN_OFFSET,4,4
	.comm	DAYS_PER_5_MONTHS,4,4
	.comm	DAYS_PER_4_YEARS,4,4
	.comm	DAYS_PER_400_YEARS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
