	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_get_rtc_time               ## -- Begin function smu_get_rtc_time
	.p2align	4, 0x90
_smu_get_rtc_time:                      ## @smu_get_rtc_time
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_smu@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	_SMU_CMD_RTC_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SMU_CMD_RTC_GET_DATETIME@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-16(%rbp), %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_smu_queue_simple
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	-16(%rbp), %rdi
	callq	_smu_spinwait_simple
	movq	-16(%rbp), %rax
	movl	(%rax), %edi
	callq	_bcd2hex
	movq	%rax, 48(%rbx)
	movq	-16(%rbp), %rax
	movl	4(%rax), %edi
	callq	_bcd2hex
	movq	%rax, 40(%rbx)
	movq	-16(%rbp), %rax
	movl	8(%rax), %edi
	callq	_bcd2hex
	movq	%rax, 32(%rbx)
	movq	-16(%rbp), %rax
	movl	12(%rax), %edi
	callq	_bcd2hex
	movq	%rax, 24(%rbx)
	movq	-16(%rbp), %rax
	movl	16(%rax), %edi
	callq	_bcd2hex
	movq	%rax, 16(%rbx)
	movq	-16(%rbp), %rax
	movl	20(%rax), %edi
	callq	_bcd2hex
	decq	%rax
	movq	%rax, 8(%rbx)
	movq	-16(%rbp), %rax
	movl	24(%rax), %edi
	callq	_bcd2hex
	addq	$100, %rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_smu,8,3                        ## @smu
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SMU_CMD_RTC_COMMAND,4,2        ## @SMU_CMD_RTC_COMMAND
	.comm	_SMU_CMD_RTC_GET_DATETIME,4,2   ## @SMU_CMD_RTC_GET_DATETIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_get_rtc_time               ; -- Begin function smu_get_rtc_time
	.p2align	2
_smu_get_rtc_time:                      ; @smu_get_rtc_time
	.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
Lloh0:
	adrp	x8, _smu@GOTPAGE
Lloh1:
	ldr	x8, [x8, _smu@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	mov	w2, #56
	bl	_memset
Lloh3:
	adrp	x8, _SMU_CMD_RTC_COMMAND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMU_CMD_RTC_COMMAND@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SMU_CMD_RTC_GET_DATETIME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU_CMD_RTC_GET_DATETIME@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	add	x0, sp, #8
	mov	w2, #1
	mov	x3, #0
	mov	x4, #0
	bl	_smu_queue_simple
	cbnz	w0, LBB0_4
; %bb.2:
	add	x0, sp, #8
	bl	_smu_spinwait_simple
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
	bl	_bcd2hex
	str	x0, [x19, #48]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #4]
	bl	_bcd2hex
	str	x0, [x19, #40]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #8]
	bl	_bcd2hex
	str	x0, [x19, #32]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #12]
	bl	_bcd2hex
	str	x0, [x19, #24]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #16]
	bl	_bcd2hex
	str	x0, [x19, #16]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #20]
	bl	_bcd2hex
	sub	x8, x0, #1
	str	x8, [x19, #8]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #24]
	bl	_bcd2hex
	mov	x8, x0
	mov	w0, #0
	add	x8, x8, #100
	str	x8, [x19]
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_smu,8,3                        ; @smu
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SMU_CMD_RTC_COMMAND,4,2        ; @SMU_CMD_RTC_COMMAND
	.comm	_SMU_CMD_RTC_GET_DATETIME,4,2   ; @SMU_CMD_RTC_GET_DATETIME
.subsections_via_symbols
