	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_madc_battery_probe
_twl4030_madc_battery_probe:            ## @twl4030_madc_battery_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	$0, -48(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_iio_channel_get
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.12:
	movq	(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_iio_channel_get
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	8(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_iio_channel_get
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	16(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_7:
	movl	8(%r12), %esi
	movl	12(%r12), %edi
	movq	_twl4030_cmp@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	xorl	%r15d, %r15d
	movl	$4, %edx
	xorl	%r8d, %r8d
	callq	_sort
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movl	(%r13), %ecx
	movl	$4, %edx
	xorl	%r8d, %r8d
	callq	_sort
	movq	%r12, 32(%r14)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, -48(%rbp)
	movq	_twl4030_madc_bat_desc@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_power_supply_register
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	24(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	16(%r14), %rdi
	callq	_iio_channel_release
LBB0_9:
	movq	8(%r14), %rdi
	callq	_iio_channel_release
LBB0_10:
	movq	(%r14), %rdi
	callq	_iio_channel_release
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"temp"

L_.str.1:                               ## @.str.1
	.asciz	"ichg"

L_.str.2:                               ## @.str.2
	.asciz	"vbat"

	.comm	_twl4030_cmp,4,2                ## @twl4030_cmp
	.comm	_twl4030_madc_bat_desc,4,2      ## @twl4030_madc_bat_desc
	.no_dead_strip	_twl4030_madc_battery_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_battery_probe
_twl4030_madc_battery_probe:            ; @twl4030_madc_battery_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	x21, [x0]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_iio_channel_get
	str	x0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_iio_channel_get
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_11
LBB0_6:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_iio_channel_get
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_10
LBB0_8:
	ldp	w1, w0, [x21, #8]
Lloh12:
	adrp	x22, _twl4030_cmp@GOTPAGE
Lloh13:
	ldr	x22, [x22, _twl4030_cmp@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	w2, #4
	mov	x4, #0
	bl	_sort
	ldp	w1, w0, [x21]
	ldr	w3, [x22]
	mov	w2, #4
	mov	x4, #0
	bl	_sort
	str	x21, [x19, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	str	x19, [sp, #8]
Lloh14:
	adrp	x1, _twl4030_madc_bat_desc@GOTPAGE
Lloh15:
	ldr	x1, [x1, _twl4030_madc_bat_desc@GOTPAGEOFF]
	add	x2, sp, #8
	mov	x0, x20
	bl	_power_supply_register
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.9:
	ldr	x0, [x19, #24]
	bl	_PTR_ERR
	mov	x20, x0
	ldr	x0, [x19, #16]
	bl	_iio_channel_release
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_iio_channel_release
LBB0_11:
	ldr	x0, [x19]
	bl	_iio_channel_release
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	mov	w20, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"temp"

l_.str.1:                               ; @.str.1
	.asciz	"ichg"

l_.str.2:                               ; @.str.2
	.asciz	"vbat"

	.comm	_twl4030_cmp,4,2                ; @twl4030_cmp
	.comm	_twl4030_madc_bat_desc,4,2      ; @twl4030_madc_bat_desc
	.no_dead_strip	_twl4030_madc_battery_probe
.subsections_via_symbols
