	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq2415x_set_autotimer
_bq2415x_set_autotimer:                 ## @bq2415x_set_autotimer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_bq2415x_timer_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	%ebx, (%r14)
	je	LBB0_4
## %bb.1:
	movl	%ebx, (%r14)
	leaq	4(%r14), %rdi
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_BQ2415X_TIMER_TIMEOUT@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	(%rax), %esi
	callq	_schedule_delayed_work
	movq	_BQ2415X_TIMER_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bq2415x_exec_command
	movq	$0, 8(%r14)
	jmp	LBB0_4
LBB0_3:
	callq	_cancel_delayed_work_sync
LBB0_4:
	movq	_bq2415x_timer_mutex@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bq2415x_timer_mutex,4,2        ## @bq2415x_timer_mutex
	.comm	_BQ2415X_TIMER_TIMEOUT,4,2      ## @BQ2415X_TIMER_TIMEOUT
	.comm	_HZ,4,2                         ## @HZ
	.comm	_BQ2415X_TIMER_RESET,4,2        ## @BQ2415X_TIMER_RESET
	.no_dead_strip	_bq2415x_set_autotimer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq2415x_set_autotimer
_bq2415x_set_autotimer:                 ; @bq2415x_set_autotimer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _bq2415x_timer_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _bq2415x_timer_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x19]
	cmp	w8, w20
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x19
	str	w20, [x0], #4
	cbz	w20, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _BQ2415X_TIMER_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BQ2415X_TIMER_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _HZ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	mul	w1, w9, w8
	bl	_schedule_delayed_work
Lloh8:
	adrp	x8, _BQ2415X_TIMER_RESET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BQ2415X_TIMER_RESET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bq2415x_exec_command
	str	xzr, [x19, #8]
	b	LBB0_4
LBB0_3:
	bl	_cancel_delayed_work_sync
LBB0_4:
Lloh11:
	adrp	x0, _bq2415x_timer_mutex@GOTPAGE
Lloh12:
	ldr	x0, [x0, _bq2415x_timer_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_bq2415x_timer_mutex,4,2        ; @bq2415x_timer_mutex
	.comm	_BQ2415X_TIMER_TIMEOUT,4,2      ; @BQ2415X_TIMER_TIMEOUT
	.comm	_HZ,4,2                         ; @HZ
	.comm	_BQ2415X_TIMER_RESET,4,2        ; @BQ2415X_TIMER_RESET
	.no_dead_strip	_bq2415x_set_autotimer
.subsections_via_symbols
