	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tosa_bat_get_property
_tosa_bat_get_property:                 ## @tosa_bat_get_property
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r15
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	*%rax
	cmpl	$135, %ebx
	je	LBB0_4
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_18:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_4:
	addl	$-128, %ebx
	cmpl	$7, %ebx
	ja	LBB0_17
## %bb.5:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_8:
	movq	%r15, %rdi
	callq	_tosa_read_bat
	jmp	LBB0_11
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_12:
	movl	24(%r15), %eax
	jmp	LBB0_11
LBB0_9:
	movl	16(%r15), %eax
	cmpl	$-1, %eax
	jne	LBB0_11
LBB0_10:
	movl	20(%r15), %eax
	jmp	LBB0_11
LBB0_13:
	movq	%r15, %rdi
	callq	_tosa_read_temp
	jmp	LBB0_11
LBB0_7:
	movl	12(%r15), %eax
	jmp	LBB0_11
LBB0_6:
	movl	8(%r15), %eax
	jmp	LBB0_11
LBB0_14:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.16:
	movq	%r15, %rdi
	callq	*%rcx
	jmp	LBB0_11
LBB0_15:
	movl	$1, %eax
LBB0_11:
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_13
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tosa_bat_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tosa_bat_get_property
_tosa_bat_get_property:                 ; @tosa_bat_get_property
	.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
	mov	x19, x2
	mov	x21, x1
	bl	_power_supply_get_drvdata
	mov	x20, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x20
	blr	x8
	cmp	w21, #135
	b.eq	LBB0_5
; %bb.2:
	cbnz	w0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_5:
	sub	w8, w21, #128
	cmp	w8, #7
	b.hi	LBB0_8
; %bb.6:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	mov	x0, x20
	bl	_tosa_read_bat
	b	LBB0_17
LBB0_8:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
	mov	w0, #0
	ldr	w8, [x20, #24]
	b	LBB0_19
LBB0_10:
	ldr	w8, [x20, #16]
	cmn	w8, #1
	b.ne	LBB0_18
LBB0_11:
	mov	w0, #0
	ldr	w8, [x20, #20]
	b	LBB0_19
LBB0_12:
	mov	x0, x20
	bl	_tosa_read_temp
	b	LBB0_17
LBB0_13:
	mov	w0, #0
	ldr	w8, [x20, #12]
	b	LBB0_19
LBB0_14:
	mov	w0, #0
	ldr	w8, [x20, #8]
	b	LBB0_19
LBB0_15:
	ldr	x8, [x20]
	cbz	x8, LBB0_21
; %bb.16:
	mov	x0, x20
	blr	x8
LBB0_17:
	mov	x8, x0
LBB0_18:
	mov	w0, #0
LBB0_19:
	str	w8, [x19]
LBB0_20:
	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
LBB0_21:
	mov	w8, #1
	b	LBB0_18
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tosa_bat_get_property
.subsections_via_symbols
