	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_charger_enable
_try_charger_enable:                    ## @try_charger_enable
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r13d, %r13d
	cmpl	%esi, (%rdi)
	je	LBB0_24
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	32(%rdi), %r15
	testl	%esi, %esi
	je	LBB0_10
## %bb.2:
	cmpq	$0, 24(%r14)
	je	LBB0_4
## %bb.3:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_24
LBB0_10:
	movq	$0, 16(%r14)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	callq	_ktime_to_ms
	movq	%rax, 8(%r14)
	cmpl	$0, (%r15)
	jle	LBB0_23
## %bb.11:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jge	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	cmpq	$0, 8(%rax,%r12)
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	4(%rax,%r12), %edi
	callq	_regulator_disable
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	4(%r14), %edi
	movq	8(%r15), %rax
	movl	(%rax,%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_15
LBB0_4:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	callq	_ktime_to_ms
	movq	%rax, 16(%r14)
	movq	$0, 8(%r14)
	cmpl	$0, (%r15)
	jle	LBB0_23
## %bb.5:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movslq	(%r15), %rax
	addq	$16, %r12
	cmpq	%rax, %r14
	jge	LBB0_22
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	cmpq	$0, 8(%rax,%r12)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%rax,%r12), %edi
	callq	_regulator_enable
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	8(%r15), %rax
	movl	(%rax,%r12), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_9
LBB0_16:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_21
## %bb.17:
	xorl	%ebx, %ebx
	leaq	L_.str.2(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%r14
	movslq	(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jge	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	4(%rax,%rbx), %edi
	callq	_regulator_is_enabled
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	8(%r15), %rax
	movl	4(%rax,%rbx), %edi
	callq	_regulator_force_disable
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %edx
	movq	%r12, %rsi
	callq	_dev_warn
	jmp	LBB0_20
LBB0_21:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_22:
	testl	%r13d, %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_24
LBB0_23:
	movl	%ebx, (%r14)
	xorl	%r13d, %r13d
LBB0_24:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot enable %s regulator\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot disable %s regulator\n"

L_.str.2:                               ## @.str.2
	.asciz	"Disable regulator(%s) forcibly\n"

	.no_dead_strip	_try_charger_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_charger_enable
_try_charger_enable:                    ; @try_charger_enable
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_24
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #32]
	cbz	w1, LBB0_5
; %bb.3:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_11
; %bb.4:
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_24
LBB0_5:
	str	xzr, [x20, #16]
	bl	_ktime_get
	bl	_ktime_to_ms
	str	x0, [x20, #8]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.6:
	mov	x24, #0
	mov	x25, #0
	mov	w21, #0
Lloh3:
	adrp	x22, l_.str.1@PAGE
Lloh4:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x24, x24, #16
	cmp	x25, x8
	b.ge	LBB0_17
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	add	x8, x8, x24
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x8, #4]
	bl	_regulator_disable
	mov	x21, x0
	tbz	w0, #31, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, #4]
	ldr	x8, [x23, #8]
	ldr	w2, [x8, x24]
	mov	x1, x22
	bl	_dev_warn
	b	LBB0_7
LBB0_11:
	bl	_ktime_get
	bl	_ktime_to_ms
	stp	xzr, x0, [x20, #8]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.12:
	mov	x24, #0
	mov	x25, #0
	mov	w21, #0
Lloh5:
	adrp	x22, l_.str@PAGE
Lloh6:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x24, x24, #16
	cmp	x25, x8
	b.ge	LBB0_22
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	add	x8, x8, x24
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x8, #4]
	bl	_regulator_enable
	mov	x21, x0
	tbz	w0, #31, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x20, #4]
	ldr	x8, [x23, #8]
	ldr	w2, [x8, x24]
	mov	x1, x22
	bl	_dev_warn
	b	LBB0_13
LBB0_17:
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.18:
	mov	x24, #0
	mov	x25, #0
Lloh7:
	adrp	x22, l_.str.2@PAGE
Lloh8:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x24, x24, #16
	cmp	x25, x8
	b.ge	LBB0_22
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	add	x8, x8, x24
	ldr	w0, [x8, #4]
	bl	_regulator_is_enabled
	cbz	x0, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x23, #8]
	add	x8, x8, x24
	ldr	w0, [x8, #4]
	bl	_regulator_force_disable
	ldr	w0, [x20, #4]
	ldr	x8, [x23, #8]
	ldr	w2, [x8, x24]
	mov	x1, x22
	bl	_dev_warn
	b	LBB0_19
LBB0_22:
	cbnz	w21, LBB0_24
LBB0_23:
	mov	w21, #0
	str	w19, [x20]
LBB0_24:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot enable %s regulator\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot disable %s regulator\n"

l_.str.2:                               ; @.str.2
	.asciz	"Disable regulator(%s) forcibly\n"

	.no_dead_strip	_try_charger_enable
.subsections_via_symbols
