	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ntpcal_rd_to_date              ## -- Begin function ntpcal_rd_to_date
	.p2align	4, 0x90
_ntpcal_rd_to_date:                     ## @ntpcal_rd_to_date
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ecx
	movq	_DAYSPERWEEK@GOTPCREL(%rip), %rsi
	movl	%ecx, %eax
	cltd
	idivl	(%rsi)
	movq	%rdi, %r14
	movl	%edx, (%rdi)
	movl	(%rsi), %eax
	cmpl	%eax, %edx
	jl	LBB0_2
## %bb.1:
	addl	%edx, %eax
	movl	%eax, (%r14)
LBB0_2:
	decl	%ecx
	leaq	-20(%rbp), %rsi
	movl	%ecx, %edi
	callq	_ntpcal_split_eradays
	movl	%eax, %ebx
	movq	%rdx, %rdi
	incl	%ebx
	xorl	%eax, %eax
	cmpl	$65536, %ebx                    ## imm = 0x10000
	cmovbl	%ebx, %eax
	movq	%rax, 32(%r14)
	leaq	1(%rdx), %rax
	movq	%rax, 24(%r14)
	movl	-20(%rbp), %esi
	callq	_ntpcal_split_yeardays
	cltq
	incq	%rax
	incq	%rdx
	movq	%rax, 16(%r14)
	movq	%rdx, 8(%r14)
	movl	$-1, %eax
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jae	LBB0_4
## %bb.3:
	movl	-20(%rbp), %eax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DAYSPERWEEK,4,2                ## @DAYSPERWEEK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ntpcal_rd_to_date              ; -- Begin function ntpcal_rd_to_date
	.p2align	2
_ntpcal_rd_to_date:                     ; @ntpcal_rd_to_date
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x9, _DAYSPERWEEK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DAYSPERWEEK@GOTPAGEOFF]
	ldr	w8, [x9]
	sdiv	w10, w1, w8
	msub	w8, w10, w8, w1
	str	w8, [x0]
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_2
; %bb.1:
	add	w8, w9, w8
	str	w8, [x19]
LBB0_2:
	sub	w0, w1, #1
	add	x1, sp, #12
	bl	_ntpcal_split_eradays
	mov	x8, x1
	add	w20, w0, #1
	cmp	w20, #16, lsl #12               ; =65536
	csinc	w9, wzr, w0, hs
	add	x10, x1, #1
	stp	x10, x9, [x19, #24]
	ldr	w1, [sp, #12]
	mov	x0, x8
	bl	_ntpcal_split_yeardays
	cmp	w20, #16, lsl #12               ; =65536
	sxtw	x8, w0
	add	x8, x8, #1
	add	x9, x1, #1
	stp	x9, x8, [x19, #8]
	ldr	w8, [sp, #12]
	csinv	w0, w8, wzr, lo
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DAYSPERWEEK,4,2                ; @DAYSPERWEEK
.subsections_via_symbols
