	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atrtc_gettime
_atrtc_gettime:                         ## @atrtc_gettime
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r12d
	movq	_RTC_STATUSD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin
	movq	_RTCSD_PWR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_atrtc_time_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_RTC_STATUSA@GOTPCREL(%rip), %r15
	movq	_RTCSA_TUP@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_rtcin
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.4:
	movq	_atrtc_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mtx_lock_spin
	movq	_RTC_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin_locked
	movl	%eax, -72(%rbp)
	movq	_RTC_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin_locked
	movl	%eax, -68(%rbp)
	movq	_RTC_HRS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin_locked
	movl	%eax, -64(%rbp)
	movq	_RTC_DAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin_locked
	movl	%eax, -60(%rbp)
	movq	_RTC_MONTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin_locked
	movl	%eax, -56(%rbp)
	movq	_RTC_YEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rtcin_locked
	movl	%eax, -52(%rbp)
	movq	%r15, %rdi
	callq	_mtx_unlock_spin
	movq	_atrtc_time_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	xorps	%xmm0, %xmm0
	movups	%xmm0, -48(%rbp)
	movq	_CLOCK_DBG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rbx
	movl	%r12d, %edi
	movq	%rbx, %rdx
	callq	_clock_dbgprint_bcd
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_clock_bcd_to_ts
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	callq	_device_printf
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTC_STATUSD,4,2                ## @RTC_STATUSD
	.comm	_RTCSD_PWR,4,2                  ## @RTCSD_PWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: Battery failure indication\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_atrtc_time_lock,4,2            ## @atrtc_time_lock
	.comm	_RTC_STATUSA,4,2                ## @RTC_STATUSA
	.comm	_RTCSA_TUP,4,2                  ## @RTCSA_TUP
	.comm	_atrtc_lock,4,2                 ## @atrtc_lock
	.comm	_RTC_SEC,4,2                    ## @RTC_SEC
	.comm	_RTC_MIN,4,2                    ## @RTC_MIN
	.comm	_RTC_HRS,4,2                    ## @RTC_HRS
	.comm	_RTC_DAY,4,2                    ## @RTC_DAY
	.comm	_RTC_MONTH,4,2                  ## @RTC_MONTH
	.comm	_RTC_YEAR,4,2                   ## @RTC_YEAR
	.comm	_CLOCK_DBG_READ,4,2             ## @CLOCK_DBG_READ
	.comm	_RTC_CENTURY,4,2                ## @RTC_CENTURY
	.no_dead_strip	_atrtc_gettime
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atrtc_gettime
_atrtc_gettime:                         ; @atrtc_gettime
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _RTC_STATUSD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTC_STATUSD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rtcin
Lloh3:
	adrp	x8, _RTCSD_PWR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTCSD_PWR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x0, _atrtc_time_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _atrtc_time_lock@GOTPAGEOFF]
	bl	_mtx_lock
Lloh8:
	adrp	x21, _RTC_STATUSA@GOTPAGE
Lloh9:
	ldr	x21, [x21, _RTC_STATUSA@GOTPAGEOFF]
Lloh10:
	adrp	x22, _RTCSA_TUP@GOTPAGE
Lloh11:
	ldr	x22, [x22, _RTCSA_TUP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_rtcin
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.3:
Lloh12:
	adrp	x21, _atrtc_lock@GOTPAGE
Lloh13:
	ldr	x21, [x21, _atrtc_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_mtx_lock_spin
Lloh14:
	adrp	x8, _RTC_SEC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RTC_SEC@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_rtcin_locked
	str	w0, [sp, #8]
Lloh17:
	adrp	x8, _RTC_MIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RTC_MIN@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_rtcin_locked
	str	w0, [sp, #12]
Lloh20:
	adrp	x8, _RTC_HRS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RTC_HRS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_rtcin_locked
	str	w0, [sp, #16]
Lloh23:
	adrp	x8, _RTC_DAY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RTC_DAY@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_rtcin_locked
	str	w0, [sp, #20]
Lloh26:
	adrp	x8, _RTC_MONTH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RTC_MONTH@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_rtcin_locked
	str	w0, [sp, #24]
Lloh29:
	adrp	x8, _RTC_YEAR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _RTC_YEAR@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_rtcin_locked
	str	w0, [sp, #28]
	mov	x0, x21
	bl	_mtx_unlock_spin
Lloh32:
	adrp	x0, _atrtc_time_lock@GOTPAGE
Lloh33:
	ldr	x0, [x0, _atrtc_time_lock@GOTPAGEOFF]
	bl	_mtx_unlock
	stp	xzr, xzr, [sp, #32]
Lloh34:
	adrp	x8, _CLOCK_DBG_READ@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CLOCK_DBG_READ@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_clock_dbgprint_bcd
	add	x0, sp, #8
	mov	x1, x19
	mov	w2, #0
	bl	_clock_bcd_to_ts
	b	LBB0_5
LBB0_4:
Lloh37:
	adrp	x1, l_.str@PAGE
Lloh38:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_RTC_STATUSD,4,2                ; @RTC_STATUSD
	.comm	_RTCSD_PWR,4,2                  ; @RTCSD_PWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: Battery failure indication\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_atrtc_time_lock,4,2            ; @atrtc_time_lock
	.comm	_RTC_STATUSA,4,2                ; @RTC_STATUSA
	.comm	_RTCSA_TUP,4,2                  ; @RTCSA_TUP
	.comm	_atrtc_lock,4,2                 ; @atrtc_lock
	.comm	_RTC_SEC,4,2                    ; @RTC_SEC
	.comm	_RTC_MIN,4,2                    ; @RTC_MIN
	.comm	_RTC_HRS,4,2                    ; @RTC_HRS
	.comm	_RTC_DAY,4,2                    ; @RTC_DAY
	.comm	_RTC_MONTH,4,2                  ; @RTC_MONTH
	.comm	_RTC_YEAR,4,2                   ; @RTC_YEAR
	.comm	_CLOCK_DBG_READ,4,2             ; @CLOCK_DBG_READ
	.comm	_RTC_CENTURY,4,2                ; @RTC_CENTURY
	.no_dead_strip	_atrtc_gettime
.subsections_via_symbols
