	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq24735_config_charger
_bq24735_config_charger:                ## @bq24735_config_charger
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rbx
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rbx)
	jne	LBB0_11
## %bb.1:
	movq	%rdi, %r12
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.2:
	movq	_BQ24735_CHARGE_CURRENT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	(%r12), %rdi
	movq	_BQ24735_CHARGE_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bq24735_write_word
	testl	%eax, %eax
	js	LBB0_3
LBB0_4:
	movl	4(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_7
## %bb.5:
	movq	_BQ24735_CHARGE_VOLTAGE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	(%r12), %rdi
	movq	_BQ24735_CHARGE_VOLTAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bq24735_write_word
	testl	%eax, %eax
	js	LBB0_6
LBB0_7:
	movl	8(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_11
## %bb.8:
	movq	_BQ24735_INPUT_CURRENT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	(%r12), %rdi
	movq	_BQ24735_INPUT_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bq24735_write_word
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:
	movl	%eax, %r15d
	movq	(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %r15d
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %r15d
	movq	(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movl	%r15d, %edx
	callq	_dev_err
	movl	%r15d, %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BQ24735_CHARGE_CURRENT_MASK,4,2 ## @BQ24735_CHARGE_CURRENT_MASK
	.comm	_BQ24735_CHARGE_CURRENT,4,2     ## @BQ24735_CHARGE_CURRENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write charger current : %d\n"

	.comm	_BQ24735_CHARGE_VOLTAGE_MASK,4,2 ## @BQ24735_CHARGE_VOLTAGE_MASK
	.comm	_BQ24735_CHARGE_VOLTAGE,4,2     ## @BQ24735_CHARGE_VOLTAGE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write charger voltage : %d\n"

	.comm	_BQ24735_INPUT_CURRENT_MASK,4,2 ## @BQ24735_INPUT_CURRENT_MASK
	.comm	_BQ24735_INPUT_CURRENT,4,2      ## @BQ24735_INPUT_CURRENT
L_.str.2:                               ## @.str.2
	.asciz	"Failed to write input current : %d\n"

	.no_dead_strip	_bq24735_config_charger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq24735_config_charger
_bq24735_config_charger:                ; @bq24735_config_charger
	.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
	ldr	x21, [x0, #8]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w20, #0
	b	LBB0_12
LBB0_2:
	mov	x19, x0
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.3:
Lloh0:
	adrp	x9, _BQ24735_CHARGE_CURRENT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BQ24735_CHARGE_CURRENT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w2, w9, w8
	ldr	x0, [x19]
Lloh3:
	adrp	x8, _BQ24735_CHARGE_CURRENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BQ24735_CHARGE_CURRENT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_bq24735_write_word
	tbnz	w0, #31, LBB0_9
LBB0_4:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_6
; %bb.5:
Lloh6:
	adrp	x9, _BQ24735_CHARGE_VOLTAGE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BQ24735_CHARGE_VOLTAGE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w2, w9, w8
	ldr	x0, [x19]
Lloh9:
	adrp	x8, _BQ24735_CHARGE_VOLTAGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BQ24735_CHARGE_VOLTAGE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_bq24735_write_word
	tbnz	w0, #31, LBB0_10
LBB0_6:
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_1
; %bb.7:
Lloh12:
	adrp	x9, _BQ24735_INPUT_CURRENT_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BQ24735_INPUT_CURRENT_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w2, w9, w8
	ldr	x0, [x19]
Lloh15:
	adrp	x8, _BQ24735_INPUT_CURRENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BQ24735_INPUT_CURRENT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_bq24735_write_word
	tbz	w0, #31, LBB0_1
; %bb.8:
	mov	x20, x0
	ldr	x0, [x19]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x20, x0
	ldr	x0, [x19]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x20, x0
	ldr	x0, [x19]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	mov	x2, x20
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_BQ24735_CHARGE_CURRENT_MASK,4,2 ; @BQ24735_CHARGE_CURRENT_MASK
	.comm	_BQ24735_CHARGE_CURRENT,4,2     ; @BQ24735_CHARGE_CURRENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write charger current : %d\n"

	.comm	_BQ24735_CHARGE_VOLTAGE_MASK,4,2 ; @BQ24735_CHARGE_VOLTAGE_MASK
	.comm	_BQ24735_CHARGE_VOLTAGE,4,2     ; @BQ24735_CHARGE_VOLTAGE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write charger voltage : %d\n"

	.comm	_BQ24735_INPUT_CURRENT_MASK,4,2 ; @BQ24735_INPUT_CURRENT_MASK
	.comm	_BQ24735_INPUT_CURRENT,4,2      ; @BQ24735_INPUT_CURRENT
l_.str.2:                               ; @.str.2
	.asciz	"Failed to write input current : %d\n"

	.no_dead_strip	_bq24735_config_charger
.subsections_via_symbols
