	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max31856_thermocouple_read
_max31856_thermocouple_read:            ## @max31856_thermocouple_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	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	(%rsi), %eax
	cmpl	$129, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_16
## %bb.2:
	movq	_MAX31856_LTCBH_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3, %ecx
	callq	_max31856_read
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movl	-36(%rbp), %ecx
	movl	-32(%rbp), %eax
	movl	%ecx, %edx
	shll	$16, %edx
	shll	$8, %eax
	orl	%edx, %eax
	orl	-28(%rbp), %eax
	sarl	$5, %eax
	movl	%eax, (%r14)
	testb	$-128, %cl
	je	LBB0_9
## %bb.4:
	addl	$-524288, %eax                  ## imm = 0xFFF80000
	jmp	LBB0_8
LBB0_5:
	movq	_MAX31856_CJTO_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3, %ecx
	callq	_max31856_read
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movl	-32(%rbp), %ecx
	movl	%ecx, %eax
	shll	$8, %eax
	orl	-28(%rbp), %eax
	sarl	$2, %eax
	addl	-36(%rbp), %eax
	movl	%eax, (%r14)
	testb	$-128, %cl
	je	LBB0_9
## %bb.7:
	addl	$-16384, %eax                   ## imm = 0xC000
LBB0_8:
	movl	%eax, (%r14)
LBB0_9:
	movq	_MAX31856_SR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_max31856_read
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	_MAX31856_FAULT_OVUV@GOTPCREL(%rip), %rax
	movq	_MAX31856_FAULT_OPEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, -36(%rbp)
	je	LBB0_11
## %bb.12:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_17
## %bb.15:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX31856_LTCBH_REG,4,2         ## @MAX31856_LTCBH_REG
	.comm	_MAX31856_CJTO_REG,4,2          ## @MAX31856_CJTO_REG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX31856_SR_REG,4,2            ## @MAX31856_SR_REG
	.comm	_MAX31856_FAULT_OVUV,4,2        ## @MAX31856_FAULT_OVUV
	.comm	_MAX31856_FAULT_OPEN,4,2        ## @MAX31856_FAULT_OPEN
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_max31856_thermocouple_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max31856_thermocouple_read
_max31856_thermocouple_read:            ; @max31856_thermocouple_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w8, [x1]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.2:
Lloh3:
	adrp	x8, _MAX31856_LTCBH_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX31856_LTCBH_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #3
	bl	_max31856_read
	cbnz	w0, LBB0_14
; %bb.3:
	ldp	w9, w8, [sp, #12]
	lsl	w8, w8, #8
	orr	w8, w8, w9, lsl #16
	ldr	w10, [sp, #20]
	orr	w8, w8, w10
	asr	w8, w8, #5
	str	w8, [x20]
	tbz	w9, #7, LBB0_9
; %bb.4:
	sub	w8, w8, #128, lsl #12           ; =524288
	b	LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _MAX31856_CJTO_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX31856_CJTO_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #3
	bl	_max31856_read
	cbnz	w0, LBB0_14
; %bb.6:
	ldp	w8, w9, [sp, #12]
	ldr	w10, [sp, #20]
	orr	w10, w10, w9, lsl #8
	add	w8, w8, w10, asr #2
	str	w8, [x20]
	tbz	w9, #7, LBB0_9
; %bb.7:
	sub	w8, w8, #4, lsl #12             ; =16384
LBB0_8:
	str	w8, [x20]
LBB0_9:
Lloh9:
	adrp	x8, _MAX31856_SR_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX31856_SR_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_max31856_read
	cbnz	w0, LBB0_14
; %bb.10:
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _MAX31856_FAULT_OVUV@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAX31856_FAULT_OVUV@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _MAX31856_FAULT_OPEN@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MAX31856_FAULT_OPEN@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_16
; %bb.11:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldr	x8, [sp, #24]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_16:
	mov	w0, #0
	b	LBB0_14
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX31856_LTCBH_REG,4,2         ; @MAX31856_LTCBH_REG
	.comm	_MAX31856_CJTO_REG,4,2          ; @MAX31856_CJTO_REG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX31856_SR_REG,4,2            ; @MAX31856_SR_REG
	.comm	_MAX31856_FAULT_OVUV,4,2        ; @MAX31856_FAULT_OVUV
	.comm	_MAX31856_FAULT_OPEN,4,2        ; @MAX31856_FAULT_OPEN
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_max31856_thermocouple_read
.subsections_via_symbols
