	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max1027_read_single_value
_max1027_read_single_value:             ## @max1027_read_single_value
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	callq	_iio_priv
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_iio_buffer_enabled
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_warn
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	movq	_MAX1027_SETUP_REG@GOTPCREL(%rip), %rax
	movq	_MAX1027_REF_MODE2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MAX1027_CKS_MODE2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r15)
	movl	16(%r15), %edi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_spi_write
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	_MAX1027_CONV_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r12), %edi
	callq	_MAX1027_CHAN
	orl	%ebx, %eax
	movq	_MAX1027_NOSCAN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	movq	(%r12), %rcx
	movq	_IIO_TEMP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:
	movq	_MAX1027_TEMP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
LBB0_7:
	movl	16(%r15), %edi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_spi_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	$1, %edi
	callq	_mdelay
	movl	16(%r15), %edi
	movq	8(%r15), %rsi
	movq	(%r12), %rax
	xorl	%ecx, %ecx
	movq	_IIO_TEMP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	leal	(%rcx,%rcx), %edx
	addl	$2, %edx
	callq	_spi_read
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movq	%r13, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_10:
	movl	%eax, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trigger mode already enabled"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MAX1027_SETUP_REG,4,2          ## @MAX1027_SETUP_REG
	.comm	_MAX1027_REF_MODE2,4,2          ## @MAX1027_REF_MODE2
	.comm	_MAX1027_CKS_MODE2,4,2          ## @MAX1027_CKS_MODE2
L_.str.1:                               ## @.str.1
	.asciz	"Failed to configure setup register\n"

	.comm	_MAX1027_CONV_REG,4,2           ## @MAX1027_CONV_REG
	.comm	_MAX1027_NOSCAN,4,2             ## @MAX1027_NOSCAN
	.comm	_IIO_TEMP,8,3                   ## @IIO_TEMP
	.comm	_MAX1027_TEMP,4,2               ## @MAX1027_TEMP
L_.str.2:                               ## @.str.2
	.asciz	"Failed to configure conversion register\n"

	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_max1027_read_single_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max1027_read_single_value
_max1027_read_single_value:             ; @max1027_read_single_value
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_iio_priv
	mov	x20, x0
	mov	x0, x21
	bl	_iio_buffer_enabled
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_2:
Lloh5:
	adrp	x8, _MAX1027_SETUP_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX1027_SETUP_REG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MAX1027_REF_MODE2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX1027_REF_MODE2@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _MAX1027_CKS_MODE2@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX1027_CKS_MODE2@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
	ldr	w0, [x20, #16]
	mov	x1, x20
	mov	w2, #1
	bl	_spi_write
	tbnz	w0, #31, LBB0_8
; %bb.3:
Lloh14:
	adrp	x8, _MAX1027_CONV_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX1027_CONV_REG@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
	ldr	w0, [x22, #8]
	bl	_MAX1027_CHAN
	orr	w8, w0, w23
Lloh17:
	adrp	x9, _MAX1027_NOSCAN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MAX1027_NOSCAN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
	ldr	x9, [x22]
Lloh20:
	adrp	x24, _IIO_TEMP@GOTPAGE
Lloh21:
	ldr	x24, [x24, _IIO_TEMP@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:
Lloh22:
	adrp	x9, _MAX1027_TEMP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MAX1027_TEMP@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_5:
	ldr	w0, [x20, #16]
	mov	x1, x20
	mov	w2, #1
	bl	_spi_write
	tbnz	w0, #31, LBB0_9
; %bb.6:
	mov	w0, #1
	bl	_mdelay
	ldr	w0, [x20, #16]
	ldr	x1, [x20, #8]
	ldr	x8, [x22]
	ldr	x9, [x24]
	cmp	x8, x9
	mov	w8, #2
	mov	w9, #4
	csel	w2, w9, w8, eq
	bl	_spi_read
	tbnz	w0, #31, LBB0_11
; %bb.7:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_be16_to_cpu
	str	w0, [x19]
Lloh25:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh27:
	ldr	w23, [x8]
	b	LBB0_12
LBB0_8:
	mov	x23, x0
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
	mov	x23, x0
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	mov	x0, x21
	bl	_dev_err
	b	LBB0_12
LBB0_11:
	mov	x23, x0
LBB0_12:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trigger mode already enabled"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MAX1027_SETUP_REG,4,2          ; @MAX1027_SETUP_REG
	.comm	_MAX1027_REF_MODE2,4,2          ; @MAX1027_REF_MODE2
	.comm	_MAX1027_CKS_MODE2,4,2          ; @MAX1027_CKS_MODE2
l_.str.1:                               ; @.str.1
	.asciz	"Failed to configure setup register\n"

	.comm	_MAX1027_CONV_REG,4,2           ; @MAX1027_CONV_REG
	.comm	_MAX1027_NOSCAN,4,2             ; @MAX1027_NOSCAN
	.comm	_IIO_TEMP,8,3                   ; @IIO_TEMP
	.comm	_MAX1027_TEMP,4,2               ; @MAX1027_TEMP
l_.str.2:                               ; @.str.2
	.asciz	"Failed to configure conversion register\n"

	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_max1027_read_single_value
.subsections_via_symbols
