	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdnToGregorian                 ## -- Begin function SdnToGregorian
	.p2align	4, 0x90
_SdnToGregorian:                        ## @SdnToGregorian
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	%rdx, %r8
	xorl	%ebx, %ebx
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	_LONG_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GREGOR_SDN_OFFSET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r11d
	leal	(,%r11,4), %edx
	subl	%edx, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	movl	$0, %r10d
	movl	$0, %r9d
	cmpl	%edi, %edx
	jl	LBB0_4
## %bb.3:
	addl	%edi, %r11d
	leal	-1(,%r11,4), %eax
	movq	_DAYS_PER_400_YEARS@GOTPCREL(%rip), %rdi
	cltd
	idivl	(%rdi)
	movl	%eax, %r9d
                                        ## kill: def $edx killed $edx def $rdx
	leal	3(%rdx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	orl	$3, %eax
	movq	_DAYS_PER_4_YEARS@GOTPCREL(%rip), %rdi
	cltd
	idivl	(%rdi)
	movl	%eax, %edi
                                        ## kill: def $edx killed $edx def $rdx
	imull	$100, %r9d, %eax
	addl	%eax, %edi
	leal	3(%rdx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$2, %eax
	leal	(%rax,%rax,4), %eax
	addl	$2, %eax
	movq	_DAYS_PER_5_MONTHS@GOTPCREL(%rip), %rbx
	cltd
	idivl	(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	movslq	%edx, %rdx
	imulq	$1717986919, %rdx, %rdx         ## imm = 0x66666667
	movq	%rdx, %rbx
	sarq	$33, %rbx
	shrq	$63, %rdx
	leal	(%rbx,%rdx), %r9d
	incl	%r9d
	leal	-9(%rax), %edx
	leal	3(%rax), %r10d
	xorl	%ebx, %ebx
	cmpl	$10, %eax
	setge	%bl
	cmovgel	%edx, %r10d
	addl	%edi, %ebx
	xorl	%eax, %eax
	cmpl	$4801, %ebx                     ## imm = 0x12C1
	setl	%al
	subl	%eax, %ebx
	addl	$-4800, %ebx                    ## imm = 0xED40
	jmp	LBB0_4
LBB0_1:
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
LBB0_4:
	movl	%ebx, (%rsi)
	movl	%r10d, (%r8)
	movl	%r9d, (%rcx)
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LONG_MAX,4,2                   ## @LONG_MAX
	.comm	_GREGOR_SDN_OFFSET,4,2          ## @GREGOR_SDN_OFFSET
	.comm	_DAYS_PER_400_YEARS,4,2         ## @DAYS_PER_400_YEARS
	.comm	_DAYS_PER_4_YEARS,4,2           ## @DAYS_PER_4_YEARS
	.comm	_DAYS_PER_5_MONTHS,4,2          ## @DAYS_PER_5_MONTHS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdnToGregorian                 ; -- Begin function SdnToGregorian
	.p2align	2
_SdnToGregorian:                        ; @SdnToGregorian
	.cfi_startproc
; %bb.0:
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _LONG_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LONG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _GREGOR_SDN_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GREGOR_SDN_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w9, w9, w8, lsl #2
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	cmp	w0, w9, asr #2
	b.le	LBB0_3
LBB0_2:
	mov	w10, #0
	mov	w9, #0
	mov	w8, #0
	b	LBB0_4
LBB0_3:
	add	w8, w8, w0
	lsl	w8, w8, #2
	sub	w8, w8, #1
Lloh6:
	adrp	x9, _DAYS_PER_400_YEARS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DAYS_PER_400_YEARS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	orr	w8, w8, #0x3
	mov	w9, #100
Lloh9:
	adrp	x11, _DAYS_PER_4_YEARS@GOTPAGE
Lloh10:
	ldr	x11, [x11, _DAYS_PER_4_YEARS@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	sdiv	w12, w8, w11
	madd	w10, w10, w9, w12
	msub	w8, w12, w11, w8
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	and	w9, w8, #0xfffffffc
	add	w8, w9, w8, asr #2
	add	w8, w8, #2
Lloh12:
	adrp	x9, _DAYS_PER_5_MONTHS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DAYS_PER_5_MONTHS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	sdiv	w11, w8, w9
	msub	w8, w11, w9, w8
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	add	w8, w8, #1
	mov	w9, #-9
	mov	w12, #3
	cmp	w11, #10
	csel	w9, w12, w9, lt
	cmp	w11, #9
	add	w9, w9, w11
	cinc	w10, w10, gt
	mov	w11, #4801
	cmp	w10, w11
	mov	w11, #-4801
	cinc	w11, w11, ge
	add	w10, w11, w10
LBB0_4:
	str	w10, [x1]
	str	w9, [x2]
	str	w8, [x3]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LONG_MAX,4,2                   ; @LONG_MAX
	.comm	_GREGOR_SDN_OFFSET,4,2          ; @GREGOR_SDN_OFFSET
	.comm	_DAYS_PER_400_YEARS,4,2         ; @DAYS_PER_400_YEARS
	.comm	_DAYS_PER_4_YEARS,4,2           ; @DAYS_PER_4_YEARS
	.comm	_DAYS_PER_5_MONTHS,4,2          ; @DAYS_PER_5_MONTHS
.subsections_via_symbols
