	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_bci_mode_store
_twl4030_bci_mode_store:                ## @twl4030_bci_mode_store
	.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	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	_modes@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_sysfs_match_string
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	cmpq	%r12, 8(%r15)
	je	LBB0_2
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_twl4030_charger_enable_usb
	movl	%ebx, 4(%r15)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_twl4030_charger_enable_usb
	jmp	LBB0_6
LBB0_2:
	cmpl	$2, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_twl4030_charger_enable_ac
	movl	%ebx, (%r15)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_twl4030_charger_enable_ac
LBB0_6:
	testl	%eax, %eax
	cmovnel	%eax, %r14d
	movl	%r14d, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_modes,4,2                      ## @modes
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_twl4030_bci_mode_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_bci_mode_store
_twl4030_bci_mode_store:                ; @twl4030_bci_mode_store
	.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, x3
	mov	x21, x2
	mov	x22, x0
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _modes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _modes@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_sysfs_match_string
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	x8, [x20, #8]
	cmp	x8, x22
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_twl4030_charger_enable_usb
	str	w21, [x20, #4]
	mov	x0, x20
	mov	w1, #1
	bl	_twl4030_charger_enable_usb
	b	LBB0_6
LBB0_3:
	cmp	w21, #2
	b.ne	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	mov	w1, #0
	bl	_twl4030_charger_enable_ac
	str	w21, [x20]
	mov	x0, x20
	mov	w1, #1
	bl	_twl4030_charger_enable_ac
LBB0_6:
	cmp	w0, #0
	csel	w21, w19, w0, eq
LBB0_7:
	mov	x0, x21
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_modes,4,2                      ; @modes
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_twl4030_bci_mode_store
.subsections_via_symbols
