	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_rtc_settime
_mv_rtc_settime:                        ## @mv_rtc_settime
	.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	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	callq	_device_get_softc
	movq	%rax, %r14
	cmpl	$500000000, (%rbx)              ## imm = 0x1DCD6500
	jl	LBB0_2
## %bb.1:
	incl	4(%rbx)
LBB0_2:
	movl	$0, (%rbx)
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_clock_ts_to_ct
	movq	-24(%rbp), %rdi
	callq	_TOBCD
	movl	%eax, %ebx
	movq	-32(%rbp), %rdi
	callq	_TOBCD
	shll	$8, %eax
	orl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_TOBCD
	shll	$16, %eax
	orl	%eax, %ebx
	movq	-48(%rbp), %rdi
	incq	%rdi
	callq	_TOBCD
	shll	$24, %eax
	orl	%eax, %ebx
	movq	_MV_RTC_TIME_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mv_rtc_reg_write
	movq	-56(%rbp), %rdi
	callq	_TOBCD
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi
	callq	_TOBCD
	shll	$8, %eax
	orl	%eax, %ebx
	movq	-72(%rbp), %rdi
	movq	_YEAR_BASE@GOTPCREL(%rip), %rax
	subq	(%rax), %rdi
	callq	_TOBCD
	shll	$16, %eax
	orl	%eax, %ebx
	movq	_MV_RTC_DATE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mv_rtc_reg_write
	xorl	%eax, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV_RTC_TIME_REG,4,2            ## @MV_RTC_TIME_REG
	.comm	_YEAR_BASE,8,3                  ## @YEAR_BASE
	.comm	_MV_RTC_DATE_REG,4,2            ## @MV_RTC_DATE_REG
	.no_dead_strip	_mv_rtc_settime
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_rtc_settime
_mv_rtc_settime:                        ; @mv_rtc_settime
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_device_get_softc
	mov	x19, x0
	ldr	w8, [x20]
	mov	w9, #25856
	movk	w9, #7629, lsl #16
	cmp	w8, w9
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
LBB0_2:
	str	wzr, [x20]
	add	x1, sp, #8
	mov	x0, x20
	bl	_clock_ts_to_ct
	ldr	x0, [sp, #56]
	bl	_TOBCD
	mov	x20, x0
	ldr	x0, [sp, #48]
	bl	_TOBCD
	orr	w20, w20, w0, lsl #8
	ldr	x0, [sp, #40]
	bl	_TOBCD
	orr	w20, w20, w0, lsl #16
	ldr	x8, [sp, #32]
	add	x0, x8, #1
	bl	_TOBCD
	orr	w2, w20, w0, lsl #24
Lloh0:
	adrp	x8, _MV_RTC_TIME_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV_RTC_TIME_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mv_rtc_reg_write
	ldr	x0, [sp, #24]
	bl	_TOBCD
	mov	x20, x0
	ldr	x0, [sp, #16]
	bl	_TOBCD
	orr	w20, w20, w0, lsl #8
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, _YEAR_BASE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _YEAR_BASE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	x0, x8, x9
	bl	_TOBCD
	orr	w2, w20, w0, lsl #16
Lloh6:
	adrp	x8, _MV_RTC_DATE_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MV_RTC_DATE_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mv_rtc_reg_write
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MV_RTC_TIME_REG,4,2            ; @MV_RTC_TIME_REG
	.comm	_YEAR_BASE,8,3                  ; @YEAR_BASE
	.comm	_MV_RTC_DATE_REG,4,2            ; @MV_RTC_DATE_REG
	.no_dead_strip	_mv_rtc_settime
.subsections_via_symbols
