	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq2415x_update_reported_mode
_bq2415x_update_reported_mode:          ## @bq2415x_update_reported_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	cmpl	$500, %esi                      ## imm = 0x1F4
	jge	LBB0_4
## %bb.3:
	movq	_BQ2415X_MODE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_BQ2415X_MODE_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	cmpl	$1800, %esi                     ## imm = 0x708
	jae	LBB0_5
## %bb.6:
	movq	_BQ2415X_MODE_HOST_CHARGER@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_BQ2415X_MODE_DEDICATED_CHARGER@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ecx
	xorl	%eax, %eax
	cmpl	%ecx, (%rdi)
	je	LBB0_9
## %bb.8:
	movl	%ecx, (%rdi)
	movl	$1, %eax
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BQ2415X_MODE_OFF,4,2           ## @BQ2415X_MODE_OFF
	.comm	_BQ2415X_MODE_NONE,4,2          ## @BQ2415X_MODE_NONE
	.comm	_BQ2415X_MODE_HOST_CHARGER,4,2  ## @BQ2415X_MODE_HOST_CHARGER
	.comm	_BQ2415X_MODE_DEDICATED_CHARGER,4,2 ## @BQ2415X_MODE_DEDICATED_CHARGER
	.no_dead_strip	_bq2415x_update_reported_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq2415x_update_reported_mode
_bq2415x_update_reported_mode:          ; @bq2415x_update_reported_mode
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _BQ2415X_MODE_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BQ2415X_MODE_OFF@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BQ2415X_MODE_NONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BQ2415X_MODE_NONE@GOTPAGEOFF]
Lloh4:
	adrp	x10, _BQ2415X_MODE_DEDICATED_CHARGER@GOTPAGE
Lloh5:
	ldr	x10, [x10, _BQ2415X_MODE_DEDICATED_CHARGER@GOTPAGEOFF]
Lloh6:
	adrp	x11, _BQ2415X_MODE_HOST_CHARGER@GOTPAGE
Lloh7:
	ldr	x11, [x11, _BQ2415X_MODE_HOST_CHARGER@GOTPAGEOFF]
	cmp	w1, #1800
	csel	x10, x11, x10, lo
	cmp	w1, #500
	csel	x9, x9, x10, lt
	cmp	w1, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	ldr	w9, [x0]
	cmp	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	ret
LBB0_2:
	str	w8, [x0]
	mov	w0, #1
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BQ2415X_MODE_OFF,4,2           ; @BQ2415X_MODE_OFF
	.comm	_BQ2415X_MODE_NONE,4,2          ; @BQ2415X_MODE_NONE
	.comm	_BQ2415X_MODE_HOST_CHARGER,4,2  ; @BQ2415X_MODE_HOST_CHARGER
	.comm	_BQ2415X_MODE_DEDICATED_CHARGER,4,2 ; @BQ2415X_MODE_DEDICATED_CHARGER
	.no_dead_strip	_bq2415x_update_reported_mode
.subsections_via_symbols
