	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_hwmon_rd
_xgene_hwmon_rd:                        ## @xgene_hwmon_rd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	24(%rbx), %r13
	movq	%r13, %rdi
	callq	_init_completion
	movl	$1, (%rbx)
	movl	28(%rbx), %edi
	movq	%r12, %rsi
	callq	_mbox_send_message
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_MBOX_OP_TIMEOUTMS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	16(%rbx), %edi
	callq	_MSG_TYPE
	movq	_MSG_TYPE_ERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_1:
	movl	20(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_3:
	movl	20(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movl	16(%rbx), %eax
	movl	%eax, (%r12)
	movl	12(%rbx), %eax
	movl	%eax, 4(%r12)
	movl	8(%rbx), %eax
	movl	%eax, 8(%r12)
LBB0_7:
	movl	$0, (%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mailbox send error %d\n"

	.comm	_MBOX_OP_TIMEOUTMS,4,2          ## @MBOX_OP_TIMEOUTMS
L_.str.1:                               ## @.str.1
	.asciz	"Mailbox operation timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MSG_TYPE_ERR,8,3               ## @MSG_TYPE_ERR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_xgene_hwmon_rd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_hwmon_rd
_xgene_hwmon_rd:                        ; @xgene_hwmon_rd
	.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	x22, x1
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	add	x23, x20, #24
	mov	x0, x23
	bl	_init_completion
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x20, #28]
	mov	x1, x22
	bl	_mbox_send_message
	mov	x21, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _MBOX_OP_TIMEOUTMS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBOX_OP_TIMEOUTMS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x23
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x20, #16]
	bl	_MSG_TYPE
Lloh3:
	adrp	x8, _MSG_TYPE_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_TYPE_ERR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	w0, [x20, #20]
	str	x21, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_5:
	ldr	w0, [x20, #20]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	ldr	w8, [x20, #16]
	str	w8, [x22]
	ldr	w8, [x20, #12]
	str	w8, [x22, #4]
	ldr	w8, [x20, #8]
	str	w8, [x22, #8]
LBB0_8:
	str	wzr, [x20]
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mailbox send error %d\n"

	.comm	_MBOX_OP_TIMEOUTMS,4,2          ; @MBOX_OP_TIMEOUTMS
l_.str.1:                               ; @.str.1
	.asciz	"Mailbox operation timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MSG_TYPE_ERR,8,3               ; @MSG_TYPE_ERR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_xgene_hwmon_rd
.subsections_via_symbols
