	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq25890_chip_reset
_bq25890_chip_reset:                    ## @bq25890_chip_reset
	.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	%rdi, %r14
	movq	_F_REG_RST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$1, %edx
	callq	_bq25890_field_write
	testl	%eax, %eax
	js	LBB0_22
## %bb.1:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.2:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	xorl	%r15d, %r15d
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.3:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.4:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.5:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.6:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.7:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.8:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.9:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.10:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.11:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.12:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.13:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.14:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.15:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.16:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.17:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.18:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.19:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bq25890_field_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_32
## %bb.20:
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	cmpl	$1, %ebx
	jne	LBB0_33
## %bb.21:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_33
LBB0_22:
	movl	%eax, %r15d
	jmp	LBB0_33
LBB0_32:
	movl	%ebx, %r15d
LBB0_33:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_F_REG_RST,4,2                  ## @F_REG_RST
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_bq25890_chip_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq25890_chip_reset
_bq25890_chip_reset:                    ; @bq25890_chip_reset
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _F_REG_RST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _F_REG_RST@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #1
	bl	_bq25890_field_write
	tbnz	w0, #31, LBB0_22
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.2:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.4:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.5:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.6:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.7:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.8:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.9:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.10:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.11:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.12:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.13:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.14:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.15:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.16:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.17:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.18:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.19:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bq25890_field_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_24
; %bb.20:
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	cmp	w20, #1
	b.ne	LBB0_23
; %bb.21:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_24
LBB0_22:
	mov	x20, x0
	b	LBB0_24
LBB0_23:
	mov	w20, #0
LBB0_24:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_F_REG_RST,4,2                  ; @F_REG_RST
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_bq25890_chip_reset
.subsections_via_symbols
