	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq24190_get_config
_bq24190_get_config:                    ## @bq24190_get_config
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	$0, -24(%rbp)
	movq	16(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-12(%rbp), %rdx
	callq	_device_property_read_u32
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movslq	-12(%rbp), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movl	%ecx, -12(%rbp)
	movq	_BQ24190_REG_POC_SYS_MIN_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jl	LBB0_4
## %bb.2:
	movq	_BQ24190_REG_POC_SYS_MIN_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jg	LBB0_4
## %bb.3:
	movl	%ecx, (%rbx)
	jmp	LBB0_5
LBB0_4:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_5:
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.6:
	movl	24(%rbx), %edi
	leaq	-24(%rbp), %rsi
	callq	_power_supply_get_battery_info
	testl	%eax, %eax
	jne	LBB0_15
## %bb.7:
	movslq	-24(%rbp), %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	movl	%edx, -12(%rbp)
	movq	_BQ24190_REG_PCTCC_IPRECHG_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_10
## %bb.8:
	movq	_BQ24190_REG_PCTCC_IPRECHG_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jg	LBB0_10
## %bb.9:
	movl	%edx, 4(%rbx)
	jmp	LBB0_11
LBB0_10:
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_11:
	movslq	-20(%rbp), %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	movl	%edx, -12(%rbp)
	movq	_BQ24190_REG_PCTCC_ITERM_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_14
## %bb.12:
	movq	_BQ24190_REG_PCTCC_ITERM_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jg	LBB0_14
## %bb.13:
	movl	%edx, 8(%rbx)
	jmp	LBB0_15
LBB0_14:
	movq	16(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_15:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ti,system-minimum-microvolt"

	.comm	_BQ24190_REG_POC_SYS_MIN_MIN,4,2 ## @BQ24190_REG_POC_SYS_MIN_MIN
	.comm	_BQ24190_REG_POC_SYS_MIN_MAX,4,2 ## @BQ24190_REG_POC_SYS_MIN_MAX
L_.str.1:                               ## @.str.1
	.asciz	"invalid value for %s: %u\n"

	.comm	_BQ24190_REG_PCTCC_IPRECHG_MIN,4,2 ## @BQ24190_REG_PCTCC_IPRECHG_MIN
	.comm	_BQ24190_REG_PCTCC_IPRECHG_MAX,4,2 ## @BQ24190_REG_PCTCC_IPRECHG_MAX
L_.str.2:                               ## @.str.2
	.asciz	"invalid value for battery:precharge-current-microamp: %d\n"

	.comm	_BQ24190_REG_PCTCC_ITERM_MIN,4,2 ## @BQ24190_REG_PCTCC_ITERM_MIN
	.comm	_BQ24190_REG_PCTCC_ITERM_MAX,4,2 ## @BQ24190_REG_PCTCC_ITERM_MAX
L_.str.3:                               ## @.str.3
	.asciz	"invalid value for battery:charge-term-current-microamp: %d\n"

	.no_dead_strip	_bq24190_get_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq24190_get_config
_bq24190_get_config:                    ; @bq24190_get_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	str	xzr, [sp, #24]
	ldr	x0, [x0, #16]
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
	add	x2, sp, #20
	mov	x1, x20
	bl	_device_property_read_u32
	cbnz	x0, LBB0_4
; %bb.1:
	ldrsw	x8, [sp, #20]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
Lloh2:
	adrp	x10, _BQ24190_REG_POC_SYS_MIN_MIN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _BQ24190_REG_POC_SYS_MIN_MIN@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	add	w8, w8, w9
	cmp	w8, w10
	str	w8, [sp, #20]
Lloh5:
	adrp	x9, _BQ24190_REG_POC_SYS_MIN_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BQ24190_REG_POC_SYS_MIN_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ccmp	w8, w9, #0, ge
	b.le	LBB0_3
; %bb.2:
	ldr	x0, [x19, #16]
	stp	x20, x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	b	LBB0_4
LBB0_3:
	str	w8, [x19]
LBB0_4:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.5:
	ldr	w0, [x19, #24]
	add	x1, sp, #24
	bl	_power_supply_get_battery_info
	cbnz	w0, LBB0_12
; %bb.6:
	ldrsw	x8, [sp, #24]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
Lloh10:
	adrp	x10, _BQ24190_REG_PCTCC_IPRECHG_MIN@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BQ24190_REG_PCTCC_IPRECHG_MIN@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	add	w8, w8, w9
	cmp	w8, w10
	str	w8, [sp, #20]
Lloh13:
	adrp	x9, _BQ24190_REG_PCTCC_IPRECHG_MAX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BQ24190_REG_PCTCC_IPRECHG_MAX@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	ccmp	w8, w9, #0, ge
	b.le	LBB0_8
; %bb.7:
	ldr	x0, [x19, #16]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	b	LBB0_9
LBB0_8:
	str	w8, [x19, #4]
LBB0_9:
	ldrsw	x8, [sp, #28]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
Lloh18:
	adrp	x10, _BQ24190_REG_PCTCC_ITERM_MIN@GOTPAGE
Lloh19:
	ldr	x10, [x10, _BQ24190_REG_PCTCC_ITERM_MIN@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	add	w8, w8, w9
	cmp	w8, w10
	str	w8, [sp, #20]
Lloh21:
	adrp	x9, _BQ24190_REG_PCTCC_ITERM_MAX@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BQ24190_REG_PCTCC_ITERM_MAX@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	ccmp	w8, w9, #0, ge
	b.le	LBB0_11
; %bb.10:
	ldr	x0, [x19, #16]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
	b	LBB0_12
LBB0_11:
	str	w8, [x19, #8]
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ti,system-minimum-microvolt"

	.comm	_BQ24190_REG_POC_SYS_MIN_MIN,4,2 ; @BQ24190_REG_POC_SYS_MIN_MIN
	.comm	_BQ24190_REG_POC_SYS_MIN_MAX,4,2 ; @BQ24190_REG_POC_SYS_MIN_MAX
l_.str.1:                               ; @.str.1
	.asciz	"invalid value for %s: %u\n"

	.comm	_BQ24190_REG_PCTCC_IPRECHG_MIN,4,2 ; @BQ24190_REG_PCTCC_IPRECHG_MIN
	.comm	_BQ24190_REG_PCTCC_IPRECHG_MAX,4,2 ; @BQ24190_REG_PCTCC_IPRECHG_MAX
l_.str.2:                               ; @.str.2
	.asciz	"invalid value for battery:precharge-current-microamp: %d\n"

	.comm	_BQ24190_REG_PCTCC_ITERM_MIN,4,2 ; @BQ24190_REG_PCTCC_ITERM_MIN
	.comm	_BQ24190_REG_PCTCC_ITERM_MAX,4,2 ; @BQ24190_REG_PCTCC_ITERM_MAX
l_.str.3:                               ; @.str.3
	.asciz	"invalid value for battery:charge-term-current-microamp: %d\n"

	.no_dead_strip	_bq24190_get_config
.subsections_via_symbols
