	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_rtc_attach
_mv_rtc_attach:                         ## @mv_rtc_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_device_get_unit
	movl	%ebx, %edi
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 8(%rax)
	movq	_RTC_RES_US@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_clock_register
	movl	%ebx, %edi
	callq	_device_get_nameunit
	movq	_MTX_SPIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_res_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movl	%ebx, %edi
	callq	_bus_alloc_resources
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	%r14, %rdi
	callq	_mtx_destroy
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	callq	_mv_rtc_configure_bus
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTC_RES_US,4,2                 ## @RTC_RES_US
	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
	.comm	_res_spec,4,2                   ## @res_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_mv_rtc_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_rtc_attach
_mv_rtc_attach:                         ; @mv_rtc_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_device_get_unit
	mov	x0, x19
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #8]
Lloh0:
	adrp	x8, _RTC_RES_US@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTC_RES_US@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_clock_register
	mov	x0, x19
	bl	_device_get_nameunit
	mov	x1, x0
Lloh3:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x2, #0
	bl	_mtx_init
Lloh6:
	adrp	x8, _res_spec@GOTPAGE
Lloh7:
	ldr	x8, [x8, _res_spec@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	w0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	mov	x0, x20
	bl	_mtx_destroy
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_mv_rtc_configure_bus
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RTC_RES_US,4,2                 ; @RTC_RES_US
	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
	.comm	_res_spec,4,2                   ; @res_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_mv_rtc_attach
.subsections_via_symbols
