	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_fg_battok_init_hw_register
_ab8500_fg_battok_init_hw_register:     ## @ab8500_fg_battok_init_hw_register
	.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	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %r13d
	movl	4(%rax), %ebx
	movl	%r13d, %esi
	callq	_ab8500_fg_battok_calc
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_ab8500_fg_battok_calc
	movl	%eax, %r15d
	movq	_BATT_OK_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BATT_OK_INCREMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	imull	%r14d, %eax
	addl	%edx, %eax
	cmpl	%r13d, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%eax, %ecx
	movl	%r14d, %r8d
	callq	_dev_warn
	movq	_BATT_OK_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BATT_OK_INCREMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_2:
	imull	%r15d, %ecx
	addl	%edx, %ecx
	cmpl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r15d, %r8d
	callq	_dev_warn
LBB0_4:
	movl	%r15d, %ebx
	shll	$4, %ebx
	orl	%r14d, %ebx
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	_AB8500_SYS_CTRL2_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AB8500_BATT_OK_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_abx500_set_register_interruptible ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BATT_OK_MIN,4,2                ## @BATT_OK_MIN
	.comm	_BATT_OK_INCREMENT,4,2          ## @BATT_OK_INCREMENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid voltage step:%d, using %d %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"using: %x %d %d\n"

	.comm	_AB8500_SYS_CTRL2_BLOCK,4,2     ## @AB8500_SYS_CTRL2_BLOCK
	.comm	_AB8500_BATT_OK_REG,4,2         ## @AB8500_BATT_OK_REG
	.no_dead_strip	_ab8500_fg_battok_init_hw_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_fg_battok_init_hw_register
_ab8500_fg_battok_init_hw_register:     ; @ab8500_fg_battok_init_hw_register
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldp	w23, w22, [x8]
	mov	x1, x23
	bl	_ab8500_fg_battok_calc
	mov	x20, x0
	mov	x0, x19
	mov	x1, x22
	bl	_ab8500_fg_battok_calc
	mov	x21, x0
Lloh0:
	adrp	x24, _BATT_OK_MIN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BATT_OK_MIN@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x25, _BATT_OK_INCREMENT@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BATT_OK_INCREMENT@GOTPAGEOFF]
	ldr	w9, [x25]
	madd	w3, w9, w20, w8
	cmp	w3, w23
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x4, x20
	bl	_dev_warn
	ldr	w8, [x24]
	ldr	w9, [x25]
LBB0_2:
	madd	w3, w9, w21, w8
	cmp	w3, w22
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x4, x21
	bl	_dev_warn
LBB0_4:
	orr	w22, w20, w21, lsl #4
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	mov	x3, x20
	mov	x4, x21
	bl	_dev_dbg
	ldr	w0, [x19]
Lloh10:
	adrp	x8, _AB8500_SYS_CTRL2_BLOCK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AB8500_SYS_CTRL2_BLOCK@GOTPAGEOFF]
Lloh12:
	adrp	x9, _AB8500_BATT_OK_REG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AB8500_BATT_OK_REG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	ldr	w2, [x9]
	mov	x3, 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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_abx500_set_register_interruptible
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BATT_OK_MIN,4,2                ; @BATT_OK_MIN
	.comm	_BATT_OK_INCREMENT,4,2          ; @BATT_OK_INCREMENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid voltage step:%d, using %d %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"using: %x %d %d\n"

	.comm	_AB8500_SYS_CTRL2_BLOCK,4,2     ; @AB8500_SYS_CTRL2_BLOCK
	.comm	_AB8500_BATT_OK_REG,4,2         ; @AB8500_BATT_OK_REG
	.no_dead_strip	_ab8500_fg_battok_init_hw_register
.subsections_via_symbols
