	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fuel_gauge_read_15bit_word
_fuel_gauge_read_15bit_word:            ## @fuel_gauge_read_15bit_word
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	leaq	-26(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	-26(%rbp), %rdi
	callq	_get_unaligned_be16
	movl	%eax, %ebx
	movq	_FG_15BIT_WORD_VALID@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.4:
	movq	_FG_15BIT_VAL_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading reg 0x%02x err: %d\n"

	.comm	_FG_15BIT_WORD_VALID,4,2        ## @FG_15BIT_WORD_VALID
L_.str.1:                               ## @.str.1
	.asciz	"Error reg 0x%02x contents not valid\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_FG_15BIT_VAL_MASK,4,2          ## @FG_15BIT_VAL_MASK
	.no_dead_strip	_fuel_gauge_read_15bit_word
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fuel_gauge_read_15bit_word
_fuel_gauge_read_15bit_word:            ; @fuel_gauge_read_15bit_word
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	add	x2, sp, #14
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_3
; %bb.1:
	add	x0, sp, #14
	bl	_get_unaligned_be16
Lloh0:
	adrp	x8, _FG_15BIT_WORD_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FG_15BIT_WORD_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _FG_15BIT_VAL_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FG_15BIT_VAL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w21, w8, w0
	b	LBB0_5
LBB0_3:
	mov	x21, x0
	ldr	x0, [x20]
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	ldr	x0, [x20]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading reg 0x%02x err: %d\n"

	.comm	_FG_15BIT_WORD_VALID,4,2        ; @FG_15BIT_WORD_VALID
l_.str.1:                               ; @.str.1
	.asciz	"Error reg 0x%02x contents not valid\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_FG_15BIT_VAL_MASK,4,2          ; @FG_15BIT_VAL_MASK
	.no_dead_strip	_fuel_gauge_read_15bit_word
.subsections_via_symbols
