	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_get_status_safe
_fan_get_status_safe:                   ## @fan_get_status_safe
	.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	%rdi, %r14
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_killable
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	leaq	-20(%rbp), %rdi
	callq	_fan_get_status
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	movl	%eax, %ebx
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_5
LBB0_3:
	movl	-20(%rbp), %edi
	callq	_fan_update_desired_level
	movq	_fan_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movl	-20(%rbp), %eax
	movl	%eax, (%r14)
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fan_mutex,4,2                  ## @fan_mutex
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.no_dead_strip	_fan_get_status_safe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_get_status_safe
_fan_get_status_safe:                   ; @fan_get_status_safe
	.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, x0
Lloh0:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_lock_killable
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_2:
	add	x0, sp, #12
	bl	_fan_get_status
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh5:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh6:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_6
LBB0_4:
	ldr	w0, [sp, #12]
	bl	_fan_update_desired_level
Lloh7:
	adrp	x0, _fan_mutex@GOTPAGE
Lloh8:
	ldr	x0, [x0, _fan_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w20, #0
	cbz	x19, LBB0_6
; %bb.5:
	ldr	w8, [sp, #12]
	str	w8, [x19]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_fan_mutex,4,2                  ; @fan_mutex
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.no_dead_strip	_fan_get_status_safe
.subsections_via_symbols
