	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdnToJulian                    ## -- Begin function SdnToJulian
	.p2align	4, 0x90
_SdnToJulian:                           ## @SdnToJulian
	.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
                                        ## kill: def $edi killed $edi def $rdi
	xorl	%r9d, %r9d
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	_LONG_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_JULIAN_SDN_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	shll	$2, %r10d
	subl	%r10d, %edx
	leal	1(%rdx), %eax
	addl	$4, %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	cmpl	%edi, %edx
	jl	LBB0_1
## %bb.3:
	movq	_LONG_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	cmpl	%edi, %edx
	jg	LBB0_1
## %bb.4:
	leal	(%r10,%rdi,4), %eax
	decl	%eax
	movq	_DAYS_PER_4_YEARS@GOTPCREL(%rip), %rdi
	cltd
	idivl	(%rdi)
                                        ## kill: def $edx killed $edx def $rdx
	movl	%eax, %r10d
	cltq
	movq	_INT_MAX@GOTPCREL(%rip), %rdi
	cmpq	%rax, (%rdi)
	jl	LBB0_1
## %bb.5:
	movq	_INT_MIN@GOTPCREL(%rip), %rbx
	movl	$0, %edi
	movl	$0, %r11d
	cmpq	%rax, (%rbx)
	jg	LBB0_7
## %bb.6:
	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), %rdi
	cltd
	idivl	(%rdi)
                                        ## kill: def $eax killed $eax def $rax
	movslq	%edx, %rdx
	imulq	$1717986919, %rdx, %rdx         ## imm = 0x66666667
	movq	%rdx, %rdi
	sarq	$33, %rdi
	shrq	$63, %rdx
	leal	(%rdi,%rdx), %r11d
	incl	%r11d
	leal	-9(%rax), %edx
	leal	3(%rax), %edi
	xorl	%ebx, %ebx
	cmpl	$10, %eax
	setge	%bl
	cmovgel	%edx, %edi
	addl	%ebx, %r10d
	xorl	%eax, %eax
	cmpl	$4801, %r10d                    ## imm = 0x12C1
	setl	%al
	subl	%eax, %r10d
	addl	$-4800, %r10d                   ## imm = 0xED40
	movl	%r10d, %r9d
	jmp	LBB0_7
LBB0_1:
	xorl	%edi, %edi
	xorl	%r11d, %r11d
LBB0_7:
	movl	%r9d, (%rsi)
	movl	%edi, (%r8)
	movl	%r11d, (%rcx)
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LONG_MAX,4,2                   ## @LONG_MAX
	.comm	_JULIAN_SDN_OFFSET,4,2          ## @JULIAN_SDN_OFFSET
	.comm	_LONG_MIN,4,2                   ## @LONG_MIN
	.comm	_DAYS_PER_4_YEARS,4,2           ## @DAYS_PER_4_YEARS
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_INT_MIN,8,3                    ## @INT_MIN
	.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	_SdnToJulian                    ; -- Begin function SdnToJulian
	.p2align	2
_SdnToJulian:                           ; @SdnToJulian
	.cfi_startproc
; %bb.0:
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _LONG_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LONG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _JULIAN_SDN_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JULIAN_SDN_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w8, w8, #2
	sub	w9, w9, w8
	add	w10, w9, #1
	add	w11, w9, #4
	cmp	w10, #0
	csinc	w9, w11, w9, lt
	cmp	w0, w9, asr #2
	b.gt	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, _LONG_MIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LONG_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	cmp	w0, w9, asr #2
	b.lt	LBB0_4
; %bb.3:
	add	w8, w8, w0, lsl #2
Lloh9:
	adrp	x10, _DAYS_PER_4_YEARS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DAYS_PER_4_YEARS@GOTPAGEOFF]
	sub	w9, w8, #1
Lloh11:
	ldr	w10, [x10]
	sdiv	w8, w9, w10
	sxtw	x11, w8
Lloh12:
	adrp	x12, _INT_MAX@GOTPAGE
Lloh13:
	ldr	x12, [x12, _INT_MAX@GOTPAGEOFF]
Lloh14:
	ldr	x12, [x12]
Lloh15:
	adrp	x13, _INT_MIN@GOTPAGE
Lloh16:
	ldr	x13, [x13, _INT_MIN@GOTPAGEOFF]
Lloh17:
	ldr	x13, [x13]
	cmp	x12, x11
	ccmp	x13, x11, #0, ge
	b.le	LBB0_6
LBB0_4:
	mov	w8, #0
	mov	w10, #0
	mov	w9, #0
LBB0_5:
	str	w8, [x1]
	str	w10, [x2]
	str	w9, [x3]
	ret
LBB0_6:
	msub	w9, w8, w10, w9
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	and	w10, w9, #0xfffffffc
	add	w9, w10, w9, asr #2
	add	w9, w9, #2
Lloh18:
	adrp	x10, _DAYS_PER_5_MONTHS@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DAYS_PER_5_MONTHS@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #33
	add	w9, w9, w10
	add	w9, w9, #1
	mov	w10, #-9
	mov	w12, #3
	cmp	w11, #10
	csel	w10, w12, w10, lt
	cmp	w11, #9
	add	w10, w10, w11
	cinc	w8, w8, gt
	mov	w11, #4801
	cmp	w8, w11
	mov	w11, #-4801
	cinc	w11, w11, ge
	add	w8, w11, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_LONG_MAX,4,2                   ; @LONG_MAX
	.comm	_JULIAN_SDN_OFFSET,4,2          ; @JULIAN_SDN_OFFSET
	.comm	_LONG_MIN,4,2                   ; @LONG_MIN
	.comm	_DAYS_PER_4_YEARS,4,2           ; @DAYS_PER_4_YEARS
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_INT_MIN,8,3                    ; @INT_MIN
	.comm	_DAYS_PER_5_MONTHS,4,2          ; @DAYS_PER_5_MONTHS
.subsections_via_symbols
