	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_madc_read
_twl4030_madc_read:                     ## @twl4030_madc_read
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_iio_priv
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_TWL4030_MADC_SW1@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TWL4030_MADC_SW2@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	(%r15), %rdi
	callq	_BIT
	movl	%eax, -36(%rbp)
	movl	$0, -64(%rbp)
	movq	_TWL4030_MADC_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_IIO_CHAN_INFO_PROCESSED@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	%rbx, (%rax)
	setne	%cl
	movl	%ecx, -60(%rbp)
	movq	_IIO_CHAN_INFO_AVERAGE_RAW@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	%rbx, (%rax)
	sete	%cl
	movl	%ecx, -56(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_twl4030_madc_conversion
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rax
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWL4030_MADC_SW2,4,2           ## @TWL4030_MADC_SW2
	.comm	_TWL4030_MADC_SW1,4,2           ## @TWL4030_MADC_SW1
	.comm	_TWL4030_MADC_WAIT,4,2          ## @TWL4030_MADC_WAIT
	.comm	_IIO_CHAN_INFO_PROCESSED,8,3    ## @IIO_CHAN_INFO_PROCESSED
	.comm	_IIO_CHAN_INFO_AVERAGE_RAW,8,3  ## @IIO_CHAN_INFO_AVERAGE_RAW
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_twl4030_madc_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_madc_read
_twl4030_madc_read:                     ; @twl4030_madc_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x4
	mov	x19, x2
	mov	x20, x1
	bl	_iio_priv
Lloh0:
	adrp	x8, _TWL4030_MADC_SW2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TWL4030_MADC_SW2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _TWL4030_MADC_SW1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TWL4030_MADC_SW1@GOTPAGEOFF]
	ldr	x10, [x0]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #40]
	ldr	x0, [x20]
	bl	_BIT
Lloh4:
	adrp	x8, _IIO_CHAN_INFO_PROCESSED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IIO_CHAN_INFO_PROCESSED@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x8, x21
Lloh7:
	adrp	x8, _IIO_CHAN_INFO_AVERAGE_RAW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IIO_CHAN_INFO_AVERAGE_RAW@GOTPAGEOFF]
	cset	w9, ne
Lloh9:
	ldr	x8, [x8]
	cmp	x8, x21
	str	w0, [sp, #36]
Lloh10:
	adrp	x8, _TWL4030_MADC_WAIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TWL4030_MADC_WAIT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	stp	wzr, w9, [sp, #8]
	cset	w9, eq
	str	w8, [sp, #32]
	str	w9, [sp, #16]
	add	x0, sp, #8
	bl	_twl4030_madc_conversion
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [sp, #24]
	ldr	x9, [x20]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19]
Lloh13:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_2:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL4030_MADC_SW2,4,2           ; @TWL4030_MADC_SW2
	.comm	_TWL4030_MADC_SW1,4,2           ; @TWL4030_MADC_SW1
	.comm	_TWL4030_MADC_WAIT,4,2          ; @TWL4030_MADC_WAIT
	.comm	_IIO_CHAN_INFO_PROCESSED,8,3    ; @IIO_CHAN_INFO_PROCESSED
	.comm	_IIO_CHAN_INFO_AVERAGE_RAW,8,3  ; @IIO_CHAN_INFO_AVERAGE_RAW
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_twl4030_madc_read
.subsections_via_symbols
