	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_fg_update_cap_scalers
_ab8500_fg_update_cap_scalers:          ## @ab8500_fg_update_cap_scalers
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpl	$0, 40(%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 48(%rdi)
	movl	28(%rdi), %edx
	je	LBB0_2
## %bb.7:
	movl	%edx, 24(%rbx)
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	32(%rbx), %rax
	cmpl	$100, %edx
	jne	LBB0_3
## %bb.4:
	movl	$100, (%rax)
	movl	16(%rbx), %edi
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	callq	_max
	movl	%eax, %ecx
	movq	32(%rbx), %rax
	movl	%ecx, 4(%rax)
	movl	(%rax), %edx
	jmp	LBB0_5
LBB0_3:
	movl	%edx, (%rax)
	movl	16(%rbx), %ecx
	movl	%ecx, 4(%rax)
LBB0_5:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cap to stop scale at charge %d%%\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cap to scale at discharge %d/%d\n"

	.no_dead_strip	_ab8500_fg_update_cap_scalers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_fg_update_cap_scalers
_ab8500_fg_update_cap_scalers:          ; @ab8500_fg_update_cap_scalers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	w8, [x0, #40]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #48]
	ldr	w2, [x0, #28]
	cbz	x8, LBB0_3
; %bb.2:
	str	w2, [x19, #24]
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_dev_dbg
LBB0_3:
	ldr	x8, [x19, #32]
	cmp	w2, #100
	b.ne	LBB0_5
; %bb.4:
	mov	w9, #100
	str	w9, [x8]
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w1, [x8]
	bl	_max
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19, #32]
	str	w0, [x8, #4]
	ldr	w2, [x8]
	b	LBB0_6
LBB0_5:
	str	w2, [x8]
	ldr	w0, [x19, #16]
	str	w0, [x8, #4]
LBB0_6:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_dev_dbg
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cap to stop scale at charge %d%%\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cap to scale at discharge %d/%d\n"

	.no_dead_strip	_ab8500_fg_update_cap_scalers
.subsections_via_symbols
