	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max44009_read_threshold
_max44009_read_threshold:               ## @max44009_read_threshold
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	callq	_iio_priv
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	_max44009_get_thr_reg
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movq	_MAX44009_THRESH_MANT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%eax, %esi
	movq	_MAX44009_THRESH_MANT_LSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	%r14d, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_MAX44009_UPPER_THR_MINIMUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_4:
	movq	_MAX44009_THRESH_EXP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movq	_MAX44009_THRESH_EXP_RSHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %edx
	addl	%esi, %edi
	movl	%edx, %ecx
	shll	%cl, %edi
	movl	%edi, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX44009_THRESH_MANT_MASK,4,2  ## @MAX44009_THRESH_MANT_MASK
	.comm	_MAX44009_THRESH_MANT_LSHIFT,4,2 ## @MAX44009_THRESH_MANT_LSHIFT
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_MAX44009_UPPER_THR_MINIMUM,8,3 ## @MAX44009_UPPER_THR_MINIMUM
	.comm	_MAX44009_THRESH_EXP_MASK,4,2   ## @MAX44009_THRESH_EXP_MASK
	.comm	_MAX44009_THRESH_EXP_RSHIFT,4,2 ## @MAX44009_THRESH_EXP_RSHIFT
	.no_dead_strip	_max44009_read_threshold
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max44009_read_threshold
_max44009_read_threshold:               ; @max44009_read_threshold
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_iio_priv
	mov	x20, x0
	mov	x0, x19
	bl	_max44009_get_thr_reg
	mov	x1, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w0, [x20]
	bl	_i2c_smbus_read_byte_data
	mov	x1, x0
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _MAX44009_THRESH_MANT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX44009_THRESH_MANT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh3:
	adrp	x9, _MAX44009_THRESH_MANT_LSHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX44009_THRESH_MANT_LSHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh6:
	adrp	x9, _IIO_EV_DIR_RISING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _MAX44009_UPPER_THR_MINIMUM@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MAX44009_UPPER_THR_MINIMUM@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w9, w19
	csel	w9, w10, wzr, eq
	add	w8, w9, w8
Lloh12:
	adrp	x9, _MAX44009_THRESH_EXP_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAX44009_THRESH_EXP_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w1
Lloh15:
	adrp	x10, _MAX44009_THRESH_EXP_RSHIFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MAX44009_THRESH_EXP_RSHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	lsr	w9, w9, w10
	lsl	w1, w8, w9
LBB0_3:
	mov	x0, x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX44009_THRESH_MANT_MASK,4,2  ; @MAX44009_THRESH_MANT_MASK
	.comm	_MAX44009_THRESH_MANT_LSHIFT,4,2 ; @MAX44009_THRESH_MANT_LSHIFT
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_MAX44009_UPPER_THR_MINIMUM,8,3 ; @MAX44009_UPPER_THR_MINIMUM
	.comm	_MAX44009_THRESH_EXP_MASK,4,2   ; @MAX44009_THRESH_EXP_MASK
	.comm	_MAX44009_THRESH_EXP_RSHIFT,4,2 ; @MAX44009_THRESH_EXP_RSHIFT
	.no_dead_strip	_max44009_read_threshold
.subsections_via_symbols
