	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tosa_read_temp
_tosa_read_temp:                        ## @tosa_read_temp
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	js	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	js	LBB0_5
## %bb.2:
	movq	_bat_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rdi
	movl	$1, %esi
	callq	_gpio_set_value
	movl	$5, %edi
	callq	_msleep
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_dev_get_drvdata
	movq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_wm97xx_read_aux_adc
	movq	%rax, %r15
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	_gpio_set_value
	movq	%r14, %rdi
	callq	_mutex_unlock
	imulq	$10000, %r15, %rax              ## imm = 0x2710
	movq	16(%rbx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_6
## %bb.3:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bat_lock,4,2                   ## @bat_lock
	.no_dead_strip	_tosa_read_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tosa_read_temp
_tosa_read_temp:                        ; @tosa_read_temp
	.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
	ldr	x8, [x0]
	tbnz	x8, #63, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	tbnz	x8, #63, LBB0_3
; %bb.2:
Lloh0:
	adrp	x20, _bat_lock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _bat_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	ldr	x0, [x19]
	mov	w1, #1
	bl	_gpio_set_value
	mov	w0, #5
	bl	_msleep
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_dev_get_drvdata
	ldr	x1, [x19, #8]
	bl	_wm97xx_read_aux_adc
	mov	x21, x0
	ldr	x0, [x19]
	mov	w1, #0
	bl	_gpio_set_value
	mov	x0, x20
	bl	_mutex_unlock
	mov	w8, #10000
	mul	x8, x21, x8
	ldr	x9, [x19, #16]
	udiv	x0, x8, x9
	b	LBB0_4
LBB0_3:
	mov	x0, #0
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_bat_lock,4,2                   ; @bat_lock
	.no_dead_strip	_tosa_read_temp
.subsections_via_symbols
