	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_gpadc_read_raw
_sun4i_gpadc_read_raw:                  ## @sun4i_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
	cmpq	$128, %r8
	je	LBB0_6
## %bb.1:
	cmpq	$129, %r8
	je	LBB0_4
## %bb.2:
	cmpq	$130, %r8
	jne	LBB0_8
## %bb.3:
	movq	%rdx, %rsi
	callq	_sun4i_gpadc_temp_offset
	testl	%eax, %eax
	je	LBB0_12
LBB0_10:
	popq	%rbp
	retq
LBB0_4:
	movl	(%rsi), %eax
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.5:
	movl	4(%rsi), %esi
	callq	_sun4i_gpadc_adc_read
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_12
LBB0_6:
	movl	(%rsi), %eax
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jne	LBB0_11
## %bb.7:
	movl	$0, (%rdx)
	movl	$732421875, (%rcx)              ## imm = 0x2BA7DEF3
	movq	_IIO_VAL_INT_PLUS_NANO@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_9:
	movq	%rdx, %rsi
	callq	_sun4i_gpadc_temp_read
	testl	%eax, %eax
	je	LBB0_12
	jmp	LBB0_10
LBB0_11:
	movq	%rdx, %rsi
	callq	_sun4i_gpadc_temp_scale
	testl	%eax, %eax
	jne	LBB0_10
LBB0_12:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VOLTAGE,4,2                ## @IIO_VOLTAGE
	.comm	_IIO_VAL_INT_PLUS_NANO,4,2      ## @IIO_VAL_INT_PLUS_NANO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sun4i_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 sun4i_gpadc_read_raw
_sun4i_gpadc_read_raw:                  ; @sun4i_gpadc_read_raw
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cmp	x4, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	x4, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	x4, #130
	b.ne	LBB0_8
; %bb.3:
	mov	x1, x2
	bl	_sun4i_gpadc_temp_offset
	b	LBB0_11
LBB0_4:
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IIO_VOLTAGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IIO_VOLTAGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.5:
	ldr	w1, [x1, #4]
	bl	_sun4i_gpadc_adc_read
	b	LBB0_11
LBB0_6:
	ldr	w8, [x1]
Lloh3:
	adrp	x9, _IIO_VOLTAGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_VOLTAGE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.7:
	str	wzr, [x2]
	mov	w8, #57075
	movk	w8, #11175, lsl #16
	str	w8, [x3]
Lloh6:
	adrp	x8, _IIO_VAL_INT_PLUS_NANO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_NANO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x1, x2
	bl	_sun4i_gpadc_temp_read
	b	LBB0_11
LBB0_10:
	mov	x1, x2
	bl	_sun4i_gpadc_temp_scale
LBB0_11:
Lloh12:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, w8, w0, eq
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VOLTAGE,4,2                ; @IIO_VOLTAGE
	.comm	_IIO_VAL_INT_PLUS_NANO,4,2      ; @IIO_VAL_INT_PLUS_NANO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sun4i_gpadc_read_raw
.subsections_via_symbols
