	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl6030_gpadc_read_raw
_twl6030_gpadc_read_raw:                ## @twl6030_gpadc_read_raw
	.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	%r8, %r13
	movq	%rdx, %r14
	movq	%rsi, %r12
	callq	_iio_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	16(%r15), %rax
	movl	(%r12), %edi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_14
LBB0_2:
	movq	%r15, %rbx
	addq	$4, %rbx
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_interruptible_timeout
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	js	LBB0_6
## %bb.7:
	cmpq	$129, %r13
	je	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	cmpq	$128, %r13
	jne	LBB0_14
## %bb.9:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_twl6030_gpadc_get_raw
	testl	%eax, %eax
	je	LBB0_13
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_EINTR@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_twl6030_gpadc_get_processed
	testl	%eax, %eax
	jne	LBB0_11
LBB0_13:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to start conversion\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_twl6030_gpadc_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl6030_gpadc_read_raw
_twl6030_gpadc_read_raw:                ; @twl6030_gpadc_read_raw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x4
	mov	x20, x2
	mov	x21, x1
	bl	_iio_priv
	mov	x19, x0
	bl	_mutex_lock
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w0, [x21]
	blr	x8
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_2:
	add	x23, x19, #4
	mov	w0, #5000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x23
	bl	_wait_for_completion_interruptible_timeout
	cbz	x0, LBB0_7
; %bb.3:
	tbnz	x0, #63, LBB0_8
; %bb.4:
	cmp	x22, #129
	b.eq	LBB0_10
; %bb.5:
	cmp	x22, #128
	b.ne	LBB0_12
; %bb.6:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_twl6030_gpadc_get_raw
	b	LBB0_11
LBB0_7:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x8, _EINTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_13
LBB0_10:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_twl6030_gpadc_get_processed
LBB0_11:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _IIO_VAL_INT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IIO_VAL_INT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w0, #0
	csneg	w23, w9, w8, eq
	b	LBB0_13
LBB0_12:
	mov	w23, #0
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to start conversion\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_twl6030_gpadc_read_raw
.subsections_via_symbols
