	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_madc_probe
_twl4030_madc_probe:                    ## @twl4030_madc_probe
	.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	%rdi, %r12
	callq	_dev_get_platdata
	movq	%rax, %rbx
	movq	(%r12), %r13
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	testq	%r13, %r13
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_38
LBB0_3:
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r14
	movq	%r12, 8(%rax)
	movq	%r12, %rdi
	callq	_dev_name
	movl	%eax, 40(%r15)
	movq	%r12, 32(%r15)
	movq	(%r12), %rax
	movq	%rax, 24(%r15)
	movq	_twl4030_madc_iio_info@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r15)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_twl4030_madc_iio_channels@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 4(%r15)
	callq	_ARRAY_SIZE
	movl	%eax, (%r15)
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	cmpl	$1, (%rbx)
	setne	%al
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_38
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_of_property_read_bool
LBB0_8:
	movl	%eax, (%r14)
	testl	%eax, %eax
	movq	_TWL4030_MADC_IMR2@GOTPCREL(%rip), %rax
	cmoveq	_TWL4030_MADC_IMR1@GOTPCREL(%rip), %rax
	movq	_TWL4030_MADC_ISR2@GOTPCREL(%rip), %rcx
	cmoveq	_TWL4030_MADC_ISR1@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	(%rcx), %eax
	movl	%eax, 20(%r14)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_twl4030_madc_set_power
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_twl4030_madc_set_current_generator
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	_TWL_MODULE_MAIN_CHARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TWL4030_BCI_BCICTL1@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_38
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_37
LBB0_15:
	movq	_TWL4030_BCI_MESBAT@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %esi
	orl	(%rax), %esi
	movl	%esi, -44(%rbp)
	movq	_TWL_MODULE_MAIN_CHARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_14
LBB0_17:
	movq	_TWL4030_MODULE_INTBR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TWL4030_REG_GPBR1@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.5(%rip), %rsi
LBB0_14:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_36:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_twl4030_madc_set_current_generator
LBB0_37:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_twl4030_madc_set_power
LBB0_38:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_TWL4030_GPBR1_MADC_HFCLK_EN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_20
LBB0_22:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	_twl4030_madc_threaded_irq_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rdx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	orl	(%rdx), %r8d
	movq	%r14, (%rsp)
	leaq	L_.str.8(%rip), %r9
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_25
## %bb.23:
	movl	%eax, %ebx
	leaq	L_.str.9(%rip), %rsi
	movq	%r12, %rdi
LBB0_24:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_36
LBB0_20:
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	movl	-44(%rbp), %esi
	orl	(%rbx), %esi
	movl	%esi, -44(%rbp)
	movq	_TWL4030_MODULE_INTBR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_14
LBB0_25:
	movq	_twl4030_madc@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	_TWL_MODULE_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TWL4030_USB_CARKIT_ANA_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_14
LBB0_27:
	movq	_TWL4030_USB_SEL_MADC_MCPC@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %esi
	orl	(%rax), %esi
	movl	%esi, -44(%rbp)
	movq	_TWL_MODULE_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.11(%rip), %rsi
	jmp	LBB0_14
LBB0_29:
	movq	8(%r14), %rdi
	leaq	L_.str.12(%rip), %rsi
	callq	_devm_regulator_get
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_36
LBB0_31:
	movl	4(%r14), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_33
## %bb.32:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str.13(%rip), %rsi
	jmp	LBB0_24
LBB0_33:
	movq	%r15, %rdi
	callq	_iio_device_register
	testl	%eax, %eax
	je	LBB0_34
## %bb.35:
	movl	%eax, %ebx
	leaq	L_.str.14(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r14), %edi
	callq	_regulator_disable
	jmp	LBB0_36
LBB0_34:
	xorl	%ebx, %ebx
	jmp	LBB0_38
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"neither platform data nor Device Tree node available\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed allocating iio device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_twl4030_madc_iio_info,4,2      ## @twl4030_madc_iio_info
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_twl4030_madc_iio_channels,4,2  ## @twl4030_madc_iio_channels
L_.str.2:                               ## @.str.2
	.asciz	"ti,system-uses-second-madc-irq"

	.comm	_TWL4030_MADC_IMR2,4,2          ## @TWL4030_MADC_IMR2
	.comm	_TWL4030_MADC_IMR1,4,2          ## @TWL4030_MADC_IMR1
	.comm	_TWL4030_MADC_ISR2,4,2          ## @TWL4030_MADC_ISR2
	.comm	_TWL4030_MADC_ISR1,4,2          ## @TWL4030_MADC_ISR1
	.comm	_TWL_MODULE_MAIN_CHARGE,4,2     ## @TWL_MODULE_MAIN_CHARGE
	.comm	_TWL4030_BCI_BCICTL1,4,2        ## @TWL4030_BCI_BCICTL1
L_.str.3:                               ## @.str.3
	.asciz	"unable to read reg BCI CTL1 0x%X\n"

	.comm	_TWL4030_BCI_MESBAT,4,2         ## @TWL4030_BCI_MESBAT
L_.str.4:                               ## @.str.4
	.asciz	"unable to write reg BCI Ctl1 0x%X\n"

	.comm	_TWL4030_MODULE_INTBR,4,2       ## @TWL4030_MODULE_INTBR
	.comm	_TWL4030_REG_GPBR1,4,2          ## @TWL4030_REG_GPBR1
L_.str.5:                               ## @.str.5
	.asciz	"unable to read reg GPBR1 0x%X\n"

	.comm	_TWL4030_GPBR1_MADC_HFCLK_EN,4,2 ## @TWL4030_GPBR1_MADC_HFCLK_EN
L_.str.6:                               ## @.str.6
	.asciz	"clk disabled, enabling\n"

L_.str.7:                               ## @.str.7
	.asciz	"unable to write reg GPBR1 0x%X\n"

	.comm	_twl4030_madc_threaded_irq_handler,4,2 ## @twl4030_madc_threaded_irq_handler
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.8:                               ## @.str.8
	.asciz	"twl4030_madc"

L_.str.9:                               ## @.str.9
	.asciz	"could not request irq\n"

	.comm	_twl4030_madc,8,3               ## @twl4030_madc
	.comm	_TWL_MODULE_USB,4,2             ## @TWL_MODULE_USB
	.comm	_TWL4030_USB_CARKIT_ANA_CTRL,4,2 ## @TWL4030_USB_CARKIT_ANA_CTRL
L_.str.10:                              ## @.str.10
	.asciz	"unable to read reg CARKIT_ANA_CTRL  0x%X\n"

	.comm	_TWL4030_USB_SEL_MADC_MCPC,4,2  ## @TWL4030_USB_SEL_MADC_MCPC
L_.str.11:                              ## @.str.11
	.asciz	"unable to write reg CARKIT_ANA_CTRL 0x%X\n"

L_.str.12:                              ## @.str.12
	.asciz	"vusb3v1"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.13:                              ## @.str.13
	.asciz	"could not enable 3v1 bias regulator\n"

L_.str.14:                              ## @.str.14
	.asciz	"could not register iio device\n"

	.no_dead_strip	_twl4030_madc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_madc_probe
_twl4030_madc_probe:                    ; @twl4030_madc_probe
	.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	x20, x0
	bl	_dev_get_platdata
	mov	x23, x0
	ldr	x22, [x20]
	cbnz	x0, LBB0_3
; %bb.1:
	cbnz	x22, LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	mov	x0, x20
	mov	w1, #32
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x21, x0
	bl	_iio_priv
	mov	x19, x0
	str	x20, [x0, #8]
	mov	x0, x20
	bl	_dev_name
	str	w0, [x21, #40]
	str	x20, [x21, #32]
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _twl4030_madc_iio_info@GOTPAGE
Lloh5:
	ldr	x9, [x9, _twl4030_madc_iio_info@GOTPAGEOFF]
	stp	x9, x8, [x21, #16]
Lloh6:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _twl4030_madc_iio_channels@GOTPAGE
Lloh10:
	ldr	x9, [x9, _twl4030_madc_iio_channels@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x9]
	stp	w0, w8, [x21, #4]
	bl	_ARRAY_SIZE
	str	w0, [x21]
	cbz	x23, LBB0_8
; %bb.5:
	ldr	w8, [x23]
	cmp	w8, #1
	cset	w0, ne
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_32
LBB0_8:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_of_property_read_bool
LBB0_9:
Lloh18:
	adrp	x8, _TWL4030_MADC_IMR2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TWL4030_MADC_IMR2@GOTPAGEOFF]
Lloh20:
	adrp	x9, _TWL4030_MADC_IMR1@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TWL4030_MADC_IMR1@GOTPAGEOFF]
	str	w0, [x19]
	cmp	w0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _TWL4030_MADC_ISR2@GOTPAGE
Lloh23:
	ldr	x9, [x9, _TWL4030_MADC_ISR2@GOTPAGEOFF]
	str	w8, [x19, #24]
Lloh24:
	adrp	x8, _TWL4030_MADC_ISR1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TWL4030_MADC_ISR1@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	x0, x19
	mov	w1, #1
	bl	_twl4030_madc_set_power
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_twl4030_madc_set_current_generator
	tbnz	w0, #31, LBB0_14
; %bb.11:
Lloh26:
	adrp	x24, _TWL_MODULE_MAIN_CHARGE@GOTPAGE
Lloh27:
	ldr	x24, [x24, _TWL_MODULE_MAIN_CHARGE@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh28:
	adrp	x23, _TWL4030_BCI_BCICTL1@GOTPAGE
Lloh29:
	ldr	x23, [x23, _TWL4030_BCI_BCICTL1@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	cbz	w0, LBB0_15
; %bb.12:
	mov	x22, x0
	ldr	w8, [x23]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_28
LBB0_13:
	mov	x22, x0
	b	LBB0_32
LBB0_14:
	mov	x22, x0
	b	LBB0_31
LBB0_15:
Lloh32:
	adrp	x8, _TWL4030_BCI_MESBAT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TWL4030_BCI_MESBAT@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w1, w9, w8
	str	w1, [sp, #12]
	ldr	w0, [x24]
	ldr	w2, [x23]
	bl	_twl_i2c_write_u8
	cbz	w0, LBB0_17
; %bb.16:
	mov	x22, x0
	ldr	w8, [x23]
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str.4@PAGE
Lloh36:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_28
LBB0_17:
Lloh37:
	adrp	x24, _TWL4030_MODULE_INTBR@GOTPAGE
Lloh38:
	ldr	x24, [x24, _TWL4030_MODULE_INTBR@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh39:
	adrp	x23, _TWL4030_REG_GPBR1@GOTPAGE
Lloh40:
	ldr	x23, [x23, _TWL4030_REG_GPBR1@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	cbz	w0, LBB0_19
; %bb.18:
	mov	x22, x0
	ldr	w8, [x23]
	str	x8, [sp]
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_28
LBB0_19:
	ldr	w8, [sp, #12]
Lloh43:
	adrp	x22, _TWL4030_GPBR1_MADC_HFCLK_EN@GOTPAGE
Lloh44:
	ldr	x22, [x22, _TWL4030_GPBR1_MADC_HFCLK_EN@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_22
LBB0_20:
	mov	x0, x20
	mov	x1, x21
	bl	_platform_set_drvdata
	add	x0, x19, #16
	bl	_mutex_init
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	mov	x1, x0
Lloh45:
	adrp	x8, _twl4030_madc_threaded_irq_handler@GOTPAGE
Lloh46:
	ldr	x8, [x8, _twl4030_madc_threaded_irq_handler@GOTPAGEOFF]
Lloh47:
	adrp	x9, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh48:
	ldr	x9, [x9, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh49:
	ldr	w3, [x8]
Lloh50:
	ldr	w8, [x9]
Lloh51:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh52:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	orr	w4, w9, w8
Lloh54:
	adrp	x5, l_.str.8@PAGE
Lloh55:
	add	x5, x5, l_.str.8@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	mov	x6, x19
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_24
; %bb.21:
	mov	x22, x0
Lloh56:
	adrp	x1, l_.str.9@PAGE
Lloh57:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_28
LBB0_22:
Lloh58:
	adrp	x1, l_.str.6@PAGE
Lloh59:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	orr	w1, w9, w8
	str	w1, [sp, #12]
	ldr	w0, [x24]
	ldr	w2, [x23]
	bl	_twl_i2c_write_u8
	cbz	w0, LBB0_20
; %bb.23:
	mov	x22, x0
	ldr	w8, [x23]
	str	x8, [sp]
Lloh60:
	adrp	x1, l_.str.7@PAGE
Lloh61:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_28
LBB0_24:
Lloh62:
	adrp	x8, _twl4030_madc@GOTPAGE
Lloh63:
	ldr	x8, [x8, _twl4030_madc@GOTPAGEOFF]
Lloh64:
	str	x19, [x8]
Lloh65:
	adrp	x24, _TWL_MODULE_USB@GOTPAGE
Lloh66:
	ldr	x24, [x24, _TWL_MODULE_USB@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh67:
	adrp	x23, _TWL4030_USB_CARKIT_ANA_CTRL@GOTPAGE
Lloh68:
	ldr	x23, [x23, _TWL4030_USB_CARKIT_ANA_CTRL@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	cbz	w0, LBB0_26
; %bb.25:
	mov	x22, x0
	ldr	w8, [x23]
	str	x8, [sp]
Lloh69:
	adrp	x1, l_.str.10@PAGE
Lloh70:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_28
LBB0_26:
Lloh71:
	adrp	x8, _TWL4030_USB_SEL_MADC_MCPC@GOTPAGE
Lloh72:
	ldr	x8, [x8, _TWL4030_USB_SEL_MADC_MCPC@GOTPAGEOFF]
Lloh73:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w1, w9, w8
	str	w1, [sp, #12]
	ldr	w0, [x24]
	ldr	w2, [x23]
	bl	_twl_i2c_write_u8
	cbz	w0, LBB0_33
; %bb.27:
	mov	x22, x0
	ldr	w8, [x23]
	str	x8, [sp]
Lloh74:
	adrp	x1, l_.str.11@PAGE
Lloh75:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_28:
	mov	x0, x20
LBB0_29:
	bl	_dev_err
LBB0_30:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_twl4030_madc_set_current_generator
LBB0_31:
	mov	x0, x19
	mov	w1, #0
	bl	_twl4030_madc_set_power
LBB0_32:
	mov	x0, x22
	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
LBB0_33:
	ldr	x0, [x19, #8]
Lloh76:
	adrp	x1, l_.str.12@PAGE
Lloh77:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_devm_regulator_get
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_35
; %bb.34:
Lloh78:
	adrp	x8, _ENODEV@GOTPAGE
Lloh79:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh80:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_30
LBB0_35:
	ldr	w0, [x19, #4]
	bl	_regulator_enable
	cbz	w0, LBB0_37
; %bb.36:
	mov	x22, x0
	ldr	x0, [x19, #8]
Lloh81:
	adrp	x1, l_.str.13@PAGE
Lloh82:
	add	x1, x1, l_.str.13@PAGEOFF
	b	LBB0_29
LBB0_37:
	mov	x0, x21
	bl	_iio_device_register
	mov	x22, x0
	cbz	w0, LBB0_32
; %bb.38:
Lloh83:
	adrp	x1, l_.str.14@PAGE
Lloh84:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #4]
	bl	_regulator_disable
	b	LBB0_30
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh49
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGotStr	Lloh62, Lloh63, Lloh64
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpAdd	Lloh83, Lloh84
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"neither platform data nor Device Tree node available\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed allocating iio device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_twl4030_madc_iio_info,4,2      ; @twl4030_madc_iio_info
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_twl4030_madc_iio_channels,4,2  ; @twl4030_madc_iio_channels
l_.str.2:                               ; @.str.2
	.asciz	"ti,system-uses-second-madc-irq"

	.comm	_TWL4030_MADC_IMR2,4,2          ; @TWL4030_MADC_IMR2
	.comm	_TWL4030_MADC_IMR1,4,2          ; @TWL4030_MADC_IMR1
	.comm	_TWL4030_MADC_ISR2,4,2          ; @TWL4030_MADC_ISR2
	.comm	_TWL4030_MADC_ISR1,4,2          ; @TWL4030_MADC_ISR1
	.comm	_TWL_MODULE_MAIN_CHARGE,4,2     ; @TWL_MODULE_MAIN_CHARGE
	.comm	_TWL4030_BCI_BCICTL1,4,2        ; @TWL4030_BCI_BCICTL1
l_.str.3:                               ; @.str.3
	.asciz	"unable to read reg BCI CTL1 0x%X\n"

	.comm	_TWL4030_BCI_MESBAT,4,2         ; @TWL4030_BCI_MESBAT
l_.str.4:                               ; @.str.4
	.asciz	"unable to write reg BCI Ctl1 0x%X\n"

	.comm	_TWL4030_MODULE_INTBR,4,2       ; @TWL4030_MODULE_INTBR
	.comm	_TWL4030_REG_GPBR1,4,2          ; @TWL4030_REG_GPBR1
l_.str.5:                               ; @.str.5
	.asciz	"unable to read reg GPBR1 0x%X\n"

	.comm	_TWL4030_GPBR1_MADC_HFCLK_EN,4,2 ; @TWL4030_GPBR1_MADC_HFCLK_EN
l_.str.6:                               ; @.str.6
	.asciz	"clk disabled, enabling\n"

l_.str.7:                               ; @.str.7
	.asciz	"unable to write reg GPBR1 0x%X\n"

	.comm	_twl4030_madc_threaded_irq_handler,4,2 ; @twl4030_madc_threaded_irq_handler
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.8:                               ; @.str.8
	.asciz	"twl4030_madc"

l_.str.9:                               ; @.str.9
	.asciz	"could not request irq\n"

	.comm	_twl4030_madc,8,3               ; @twl4030_madc
	.comm	_TWL_MODULE_USB,4,2             ; @TWL_MODULE_USB
	.comm	_TWL4030_USB_CARKIT_ANA_CTRL,4,2 ; @TWL4030_USB_CARKIT_ANA_CTRL
l_.str.10:                              ; @.str.10
	.asciz	"unable to read reg CARKIT_ANA_CTRL  0x%X\n"

	.comm	_TWL4030_USB_SEL_MADC_MCPC,4,2  ; @TWL4030_USB_SEL_MADC_MCPC
l_.str.11:                              ; @.str.11
	.asciz	"unable to write reg CARKIT_ANA_CTRL 0x%X\n"

l_.str.12:                              ; @.str.12
	.asciz	"vusb3v1"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.13:                              ; @.str.13
	.asciz	"could not enable 3v1 bias regulator\n"

l_.str.14:                              ; @.str.14
	.asciz	"could not register iio device\n"

	.no_dead_strip	_twl4030_madc_probe
.subsections_via_symbols
