	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applesmc_init_smcreg
_applesmc_init_smcreg:                  ## @applesmc_init_smcreg
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_INIT_TIMEOUT_MSECS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_1
## %bb.2:
	movq	_INIT_WAIT_MSECS@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_applesmc_init_smcreg_try
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	movq	(%r12), %rdi
	callq	_msleep
	addl	(%r12), %ebx
	cmpl	(%r15), %ebx
	jl	LBB0_3
	jmp	LBB0_7
LBB0_1:
                                        ## implicit-def: $r14d
LBB0_7:
	xorl	%eax, %eax
	callq	_applesmc_destroy_smcreg
	jmp	LBB0_8
LBB0_4:
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_info
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INIT_TIMEOUT_MSECS,4,2         ## @INIT_TIMEOUT_MSECS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init_smcreg() took %d ms\n"

	.comm	_INIT_WAIT_MSECS,8,3            ## @INIT_WAIT_MSECS
	.no_dead_strip	_applesmc_init_smcreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applesmc_init_smcreg
_applesmc_init_smcreg:                  ; @applesmc_init_smcreg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x21, _INIT_TIMEOUT_MSECS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _INIT_TIMEOUT_MSECS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w20, #0
Lloh2:
	adrp	x22, _INIT_WAIT_MSECS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _INIT_WAIT_MSECS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_applesmc_init_smcreg_try
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x19, x0
	ldr	x0, [x22]
	bl	_msleep
	ldr	w8, [x22]
	ldr	w9, [x21]
	add	w20, w20, w8
	cmp	w20, w9
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
                                        ; implicit-def: $w19
LBB0_5:
	bl	_applesmc_destroy_smcreg
	b	LBB0_9
LBB0_6:
	cbz	w20, LBB0_8
; %bb.7:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_info
LBB0_8:
	mov	w19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_INIT_TIMEOUT_MSECS,4,2         ; @INIT_TIMEOUT_MSECS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init_smcreg() took %d ms\n"

	.comm	_INIT_WAIT_MSECS,8,3            ; @INIT_WAIT_MSECS
	.no_dead_strip	_applesmc_init_smcreg
.subsections_via_symbols
