	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_bci_get_property
_twl4030_bci_get_property:              ## @twl4030_bci_get_property
	.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
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	8(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_twl4030bci_state
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	(%r13), %rax
	movq	(%rax), %r8
	movq	_POWER_SUPPLY_TYPE_USB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	cmpq	%rax, %r8
	jne	LBB0_4
## %bb.2:
	movq	_TWL4030_MSTATEC_USB@GOTPCREL(%rip), %rdx
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, %r12d
	jmp	LBB0_41
LBB0_4:
	movq	_TWL4030_MSTATEC_AC@GOTPCREL(%rip), %rdx
LBB0_5:
	movl	(%rdx), %edx
	andl	%ebx, %edx
	je	LBB0_12
LBB0_6:
	addl	$-128, %r14d
	cmpl	$4, %r14d
	ja	LBB0_15
## %bb.7:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%r14,4), %rdi
	addq	%rsi, %rdi
	jmpq	*%rdi
LBB0_8:
	testl	%edx, %edx
	je	LBB0_28
## %bb.9:
	movq	%r12, %rbx
	cmpq	%rax, %r8
	jne	LBB0_36
## %bb.10:
	movq	_TWL4030_BCIVBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_twl4030bci_read_adc_val
	movq	%rax, %r12
	testl	%r12d, %r12d
	js	LBB0_41
## %bb.11:
	imull	$6843, %r12d, %eax              ## imm = 0x1ABB
	jmp	LBB0_38
LBB0_12:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_TWL4030_BCIMDEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_twl4030_bci_read
	testl	%eax, %eax
	js	LBB0_40
## %bb.13:
	movq	(%r13), %rax
	movq	(%rax), %r8
	movq	_POWER_SUPPLY_TYPE_USB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	xorl	%esi, %esi
	cmpq	%rax, %r8
	sete	%sil
	movl	$2, %edx
	subl	%esi, %edx
	andl	-48(%rbp), %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_6
## %bb.14:
	movq	_TWL4030_MSTATEC_QUICK1@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	jmp	LBB0_6
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_16:
	testl	%edx, %edx
	je	LBB0_35
## %bb.17:
	movl	%ebx, %edi
	callq	_twl4030_bci_state_to_status
	movl	%eax, (%r12)
	xorl	%r12d, %r12d
	jmp	LBB0_41
LBB0_18:
	movq	%r12, %r14
	xorl	%r12d, %r12d
	movl	$0, %ecx
	testl	%edx, %edx
	je	LBB0_20
## %bb.19:
	movl	%ebx, %edi
	callq	_twl4030_bci_state_to_status
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	setne	%cl
LBB0_20:
	movl	%ecx, (%r14)
	jmp	LBB0_41
LBB0_21:
	movq	%r12, %rbx
	movl	$-1, (%r12)
	movq	(%r13), %rax
	movq	(%rax), %rdx
	movl	8(%r15), %eax
	cmpq	(%rcx), %rdx
	jne	LBB0_30
## %bb.22:
	testl	%eax, %eax
	je	LBB0_32
## %bb.23:
	addq	$4, %r15
	jmp	LBB0_31
LBB0_24:
	testl	%edx, %edx
	je	LBB0_28
## %bb.25:
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_twl4030_charger_get_current
	testl	%eax, %eax
	js	LBB0_40
## %bb.26:
	movl	%eax, (%rbx)
	jmp	LBB0_41
LBB0_28:
	movq	_ENODATA@GOTPCREL(%rip), %rax
LBB0_29:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_41
LBB0_30:
	testl	%eax, %eax
	jne	LBB0_32
LBB0_31:
	movq	%rbx, %rcx
	movl	(%r15), %eax
	movl	%eax, (%rbx)
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jns	LBB0_41
LBB0_32:
	movq	_TWL4030_BCIIREF1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_twl4030bci_read_adc_val
	movq	%rax, %r12
	movl	%r12d, (%rbx)
	testl	%r12d, %r12d
	js	LBB0_41
## %bb.33:
	movq	_TWL4030_BCICTL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-44(%rbp), %rsi
	callq	_twl4030_bci_read
	testl	%eax, %eax
	js	LBB0_40
## %bb.34:
	movl	(%rbx), %edi
	movq	_TWL4030_CGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	-44(%rbp), %esi
	callq	_regval2ua
	jmp	LBB0_38
LBB0_40:
	movl	%eax, %r12d
	jmp	LBB0_41
LBB0_35:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	xorl	%r12d, %r12d
	jmp	LBB0_41
LBB0_36:
	movq	_TWL4030_BCIVAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_twl4030bci_read_adc_val
	movq	%rax, %r12
	testl	%r12d, %r12d
	js	LBB0_41
## %bb.37:
	imull	$9775, %r12d, %eax              ## imm = 0x262F
LBB0_38:
	movl	%eax, (%rbx)
	xorl	%r12d, %r12d
LBB0_41:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_16
	.long	L0_0_set_18
	.long	L0_0_set_21
	.long	L0_0_set_24
	.end_data_region
                                        ## -- End function
	.comm	_POWER_SUPPLY_TYPE_USB,8,3      ## @POWER_SUPPLY_TYPE_USB
	.comm	_TWL4030_MSTATEC_USB,4,2        ## @TWL4030_MSTATEC_USB
	.comm	_TWL4030_MSTATEC_AC,4,2         ## @TWL4030_MSTATEC_AC
	.comm	_TWL4030_BCIMDEN,4,2            ## @TWL4030_BCIMDEN
	.comm	_TWL4030_MSTATEC_QUICK1,4,2     ## @TWL4030_MSTATEC_QUICK1
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,8,3 ## @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_TWL4030_BCIVBUS,4,2            ## @TWL4030_BCIVBUS
	.comm	_TWL4030_BCIVAC,4,2             ## @TWL4030_BCIVAC
	.comm	_TWL4030_BCIIREF1,4,2           ## @TWL4030_BCIIREF1
	.comm	_TWL4030_BCICTL1,4,2            ## @TWL4030_BCICTL1
	.comm	_TWL4030_CGAIN,4,2              ## @TWL4030_CGAIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_twl4030_bci_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_bci_get_property
_twl4030_bci_get_property:              ; @twl4030_bci_get_property
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x23, x1
	mov	x22, x0
	ldr	w0, [x0, #8]
	bl	_dev_get_drvdata
	mov	x21, x0
	bl	_twl4030bci_state
	mov	x20, x0
	tbnz	w0, #31, LBB0_37
; %bb.1:
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh0:
	adrp	x24, _POWER_SUPPLY_TYPE_USB@GOTPAGE
Lloh1:
	ldr	x24, [x24, _POWER_SUPPLY_TYPE_USB@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh2:
	adrp	x10, _TWL4030_MSTATEC_USB@GOTPAGE
Lloh3:
	ldr	x10, [x10, _TWL4030_MSTATEC_USB@GOTPAGEOFF]
Lloh4:
	adrp	x11, _TWL4030_MSTATEC_AC@GOTPAGE
Lloh5:
	ldr	x11, [x11, _TWL4030_MSTATEC_AC@GOTPAGEOFF]
	cmp	x8, x9
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	ands	w10, w10, w20
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _TWL4030_BCIMDEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TWL4030_BCIMDEN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, sp, #12
	bl	_twl4030_bci_read
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x9, [x24]
	ldr	w10, [sp, #12]
	cmp	x8, x9
	mov	w11, #1
	cinc	w11, w11, ne
	ands	w10, w11, w10
Lloh9:
	adrp	x11, _TWL4030_MSTATEC_QUICK1@GOTPAGE
Lloh10:
	ldr	x11, [x11, _TWL4030_MSTATEC_QUICK1@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	csel	w20, w20, w11, eq
LBB0_4:
	sub	w11, w23, #128
	cmp	w11, #4
	b.hi	LBB0_11
; %bb.5:
Lloh12:
	adrp	x12, lJTI0_0@PAGE
Lloh13:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_6
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_6:
	cbz	w10, LBB0_22
; %bb.7:
	cmp	x8, x9
	b.ne	LBB0_33
; %bb.8:
Lloh14:
	adrp	x8, _TWL4030_BCIVBUS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TWL4030_BCIVBUS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_twl4030bci_read_adc_val
	mov	x20, x0
	tbnz	w20, #31, LBB0_37
; %bb.9:
	mov	w8, #6843
	b	LBB0_35
LBB0_10:
	mov	x20, x0
	b	LBB0_37
LBB0_11:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_23
LBB0_12:
	cbz	w10, LBB0_31
; %bb.13:
	mov	x0, x20
	bl	_twl4030_bci_state_to_status
	mov	w20, #0
	str	w0, [x19]
	b	LBB0_37
LBB0_14:
	cbz	w10, LBB0_32
; %bb.15:
	mov	x0, x20
	bl	_twl4030_bci_state_to_status
Lloh19:
	adrp	x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w8, ne
	b	LBB0_36
LBB0_16:
	mov	w8, #-1
	str	w8, [x19]
	ldr	x8, [x22]
	ldr	x9, [x8]
	ldr	x10, [x24]
	ldr	w8, [x21, #8]
	cmp	x9, x10
	b.ne	LBB0_24
; %bb.17:
	cbz	w8, LBB0_27
; %bb.18:
	add	x21, x21, #4
	b	LBB0_25
LBB0_19:
	cbz	w10, LBB0_22
; %bb.20:
	bl	_twl4030_charger_get_current
	mov	x20, x0
	tbnz	w0, #31, LBB0_37
; %bb.21:
	str	w20, [x19]
	mov	w20, #0
	b	LBB0_37
LBB0_22:
Lloh22:
	adrp	x8, _ENODATA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_37
LBB0_24:
	cbnz	w8, LBB0_27
LBB0_25:
	ldr	w8, [x21]
	str	w8, [x19]
	tbnz	w8, #31, LBB0_27
; %bb.26:
	mov	w20, #0
	b	LBB0_37
LBB0_27:
Lloh24:
	adrp	x8, _TWL4030_BCIIREF1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TWL4030_BCIIREF1@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_twl4030bci_read_adc_val
	str	w0, [x19]
	tbnz	w0, #31, LBB0_30
; %bb.28:
Lloh27:
	adrp	x8, _TWL4030_BCICTL1@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TWL4030_BCICTL1@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_twl4030_bci_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_30
; %bb.29:
	ldr	w0, [x19]
	ldr	w8, [sp, #8]
Lloh30:
	adrp	x9, _TWL4030_CGAIN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _TWL4030_CGAIN@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	and	w1, w9, w8
	bl	_regval2ua
	mov	w20, #0
	str	w0, [x19]
	b	LBB0_37
LBB0_30:
	mov	x20, x0
	b	LBB0_37
LBB0_31:
	mov	w20, #0
Lloh33:
	adrp	x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh34:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	w8, [x19]
	b	LBB0_37
LBB0_32:
	mov	w8, #0
	b	LBB0_36
LBB0_33:
Lloh36:
	adrp	x8, _TWL4030_BCIVAC@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TWL4030_BCIVAC@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_twl4030bci_read_adc_val
	mov	x20, x0
	tbnz	w0, #31, LBB0_37
; %bb.34:
	mov	w8, #9775
LBB0_35:
	mul	w8, w20, w8
LBB0_36:
	mov	w20, #0
	str	w8, [x19]
LBB0_37:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_14-LBB0_6)>>2
	.byte	(LBB0_16-LBB0_6)>>2
	.byte	(LBB0_19-LBB0_6)>>2
                                        ; -- End function
	.comm	_POWER_SUPPLY_TYPE_USB,8,3      ; @POWER_SUPPLY_TYPE_USB
	.comm	_TWL4030_MSTATEC_USB,4,2        ; @TWL4030_MSTATEC_USB
	.comm	_TWL4030_MSTATEC_AC,4,2         ; @TWL4030_MSTATEC_AC
	.comm	_TWL4030_BCIMDEN,4,2            ; @TWL4030_BCIMDEN
	.comm	_TWL4030_MSTATEC_QUICK1,4,2     ; @TWL4030_MSTATEC_QUICK1
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,8,3 ; @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_TWL4030_BCIVBUS,4,2            ; @TWL4030_BCIVBUS
	.comm	_TWL4030_BCIVAC,4,2             ; @TWL4030_BCIVAC
	.comm	_TWL4030_BCIIREF1,4,2           ; @TWL4030_BCIIREF1
	.comm	_TWL4030_BCICTL1,4,2            ; @TWL4030_BCICTL1
	.comm	_TWL4030_CGAIN,4,2              ; @TWL4030_CGAIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_twl4030_bci_get_property
.subsections_via_symbols
