	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipmi_thread_busy_wait
_ipmi_thread_busy_wait:                 ## @ipmi_thread_busy_wait
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	(%rsi), %rax
	movq	_num_max_busy_us@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_6
## %bb.1:
	movq	_kipmid_max_busy_us@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %r14d
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.2:
	movq	_SI_SM_CALL_WITH_DELAY@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_ipmi_si_is_busy
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	callq	_getnstimeofday
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_timespec_compare
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_ipmi_si_set_not_busy
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_ipmi_si_set_not_busy
LBB0_7:
	movl	$1, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	callq	_getnstimeofday
	movq	_NSEC_PER_USEC@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_timespec_add_ns
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_num_max_busy_us,8,3            ## @num_max_busy_us
	.comm	_kipmid_max_busy_us,8,3         ## @kipmid_max_busy_us
	.comm	_SI_SM_CALL_WITH_DELAY,4,2      ## @SI_SM_CALL_WITH_DELAY
	.comm	_NSEC_PER_USEC,4,2              ## @NSEC_PER_USEC
	.no_dead_strip	_ipmi_thread_busy_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipmi_thread_busy_wait
_ipmi_thread_busy_wait:                 ; @ipmi_thread_busy_wait
	.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
	mov	x19, x2
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _num_max_busy_us@GOTPAGE
Lloh1:
	ldr	x9, [x9, _num_max_busy_us@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _kipmid_max_busy_us@GOTPAGE
Lloh4:
	ldr	x9, [x9, _kipmid_max_busy_us@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w20, [x9, x8, lsl #2]
Lloh6:
	adrp	x8, _SI_SM_CALL_WITH_DELAY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SI_SM_CALL_WITH_DELAY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w20, #0
	ccmp	w8, w0, #0, ne
	b.eq	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_ipmi_si_set_not_busy
LBB0_3:
	mov	w0, #1
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
LBB0_5:
	mov	x0, x19
	bl	_ipmi_si_is_busy
	cbz	w0, LBB0_8
; %bb.6:
	add	x0, sp, #8
	bl	_getnstimeofday
	add	x0, sp, #8
	mov	x1, x19
	bl	_timespec_compare
	cmp	x0, #0
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.7:
	mov	x0, x19
	bl	_ipmi_si_set_not_busy
	mov	w0, #0
	b	LBB0_4
LBB0_8:
	mov	x0, x19
	bl	_getnstimeofday
Lloh9:
	adrp	x8, _NSEC_PER_USEC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NSEC_PER_USEC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mul	w1, w8, w20
	mov	x0, x19
	bl	_timespec_add_ns
	b	LBB0_3
	.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	_num_max_busy_us,8,3            ; @num_max_busy_us
	.comm	_kipmid_max_busy_us,8,3         ; @kipmid_max_busy_us
	.comm	_SI_SM_CALL_WITH_DELAY,4,2      ; @SI_SM_CALL_WITH_DELAY
	.comm	_NSEC_PER_USEC,4,2              ; @NSEC_PER_USEC
	.no_dead_strip	_ipmi_thread_busy_wait
.subsections_via_symbols
