	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opal_sensor_get_val
_opal_sensor_get_val:                   ## @opal_sensor_get_val
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_opal_alloc_async_token
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_SENSOR_LOCK
	movq	_OPAL_SENSOR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-44(%rbp), %rdi
	callq	_vtophys
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_opal_call
	movl	%eax, %ebx
	movq	_OPAL_ASYNC_COMPLETION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.1:
	movl	$100, %edi
	callq	_DELAY
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_bzero
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	%r12d, %edx
	callq	_opal_wait_completion
	movl	%eax, %ebx
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
LBB0_3:
	movq	%r15, %rdi
	callq	_SENSOR_UNLOCK
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
## %bb.4:
	movl	-44(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_6
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movl	%r12d, %edi
	callq	_opal_free_async_token
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPAL_SENSOR_READ,4,2           ## @OPAL_SENSOR_READ
	.comm	_OPAL_ASYNC_COMPLETION,4,2      ## @OPAL_ASYNC_COMPLETION
	.comm	_OPAL_SUCCESS,4,2               ## @OPAL_SUCCESS
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_opal_sensor_get_val
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opal_sensor_get_val
_opal_sensor_get_val:                   ; @opal_sensor_get_val
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_opal_alloc_async_token
	mov	x19, x0
	mov	x0, x21
	bl	_SENSOR_LOCK
Lloh0:
	adrp	x8, _OPAL_SENSOR_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPAL_SENSOR_READ@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	add	x0, sp, #4
	bl	_vtophys
	mov	x3, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	bl	_opal_call
	mov	x22, x0
Lloh3:
	adrp	x8, _OPAL_ASYNC_COMPLETION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPAL_ASYNC_COMPLETION@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x23, _OPAL_SUCCESS@GOTPAGE
Lloh7:
	ldr	x23, [x23, _OPAL_SUCCESS@GOTPAGEOFF]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	mov	w0, #100
	bl	_DELAY
	add	x0, sp, #8
	mov	w1, #8
	bl	_bzero
	add	x0, sp, #8
	mov	w1, #8
	mov	x2, x19
	bl	_opal_wait_completion
	mov	x22, x0
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	str	w8, [sp, #4]
LBB0_3:
	mov	x0, x21
	bl	_SENSOR_UNLOCK
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [sp, #4]
	str	w8, [x20]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
LBB0_6:
	mov	x0, x19
	bl	_opal_free_async_token
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_OPAL_SENSOR_READ,4,2           ; @OPAL_SENSOR_READ
	.comm	_OPAL_ASYNC_COMPLETION,4,2      ; @OPAL_ASYNC_COMPLETION
	.comm	_OPAL_SUCCESS,4,2               ; @OPAL_SUCCESS
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_opal_sensor_get_val
.subsections_via_symbols
