	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st95hf_error_handling
_st95hf_error_handling:                 ## @st95hf_error_handling
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %r9
	movq	(%rsi), %rsi
	movl	(%rsi), %eax
	movq	_ST95HF_ERR_MASK@GOTPCREL(%rip), %rdi
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_ST95HF_TIMEOUT_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.2:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_3:
	movq	8(%r9), %rdi
	movl	(%r9), %r8d
	xorl	%eax, %eax
	leal	-128(%r8), %ecx
	cmpl	$2, %ecx
	jae	LBB0_4
## %bb.7:
	movslq	%edx, %rcx
	movl	-4(%rsi,%rcx,4), %ecx
	movq	_ST95HF_NFCB_CRC_ERR_MASK@GOTPCREL(%rip), %rdx
LBB0_8:
	movzbl	(%rdx), %edx
	testl	%edx, %ecx
	je	LBB0_12
## %bb.9:
	movzbl	%cl, %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbp
	retq
LBB0_4:
	cmpl	$130, %r8d
	jne	LBB0_12
## %bb.5:
	movl	4(%r9), %r8d
	movq	_TRFLAG_NFCA_STD_FRAME_CRC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r8d
	jne	LBB0_12
## %bb.6:
	movslq	%edx, %rcx
	movl	-12(%rsi,%rcx,4), %ecx
	movq	_ST95HF_NFCA_CRC_ERR_MASK@GOTPCREL(%rip), %rdx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ST95HF_ERR_MASK,4,2            ## @ST95HF_ERR_MASK
	.comm	_ST95HF_TIMEOUT_ERROR,4,2       ## @ST95HF_TIMEOUT_ERROR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_TRFLAG_NFCA_STD_FRAME_CRC,4,2  ## @TRFLAG_NFCA_STD_FRAME_CRC
	.comm	_ST95HF_NFCA_CRC_ERR_MASK,1,0   ## @ST95HF_NFCA_CRC_ERR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CRC error, byte received = 0x%x\n"

	.comm	_ST95HF_NFCB_CRC_ERR_MASK,1,0   ## @ST95HF_NFCB_CRC_ERR_MASK
	.no_dead_strip	_st95hf_error_handling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st95hf_error_handling
_st95hf_error_handling:                 ; @st95hf_error_handling
	.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
	ldr	x9, [x1]
	ldr	w10, [x9]
Lloh0:
	adrp	x11, _ST95HF_ERR_MASK@GOTPAGE
Lloh1:
	ldr	x11, [x11, _ST95HF_ERR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _ST95HF_TIMEOUT_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ST95HF_TIMEOUT_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	adrp	x11, _EIO@GOTPAGE
Lloh9:
	ldr	x11, [x11, _EIO@GOTPAGEOFF]
	cmp	w10, w8
	csel	x8, x9, x11, eq
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x8, x0
	ldr	x0, [x0, #8]
	ldr	w10, [x8]
	sub	w11, w10, #128
	cmp	w11, #2
	b.hs	LBB0_7
; %bb.4:
	add	x8, x9, w2, sxtw #2
	ldur	w8, [x8, #-4]
Lloh10:
	adrp	x9, _ST95HF_NFCB_CRC_ERR_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ST95HF_NFCB_CRC_ERR_MASK@GOTPAGEOFF]
LBB0_5:
	ldrb	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_10
; %bb.6:
	and	w2, w8, #0xff
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	cmp	w10, #130
	b.ne	LBB0_10
; %bb.8:
	ldr	w8, [x8, #4]
Lloh16:
	adrp	x10, _TRFLAG_NFCA_STD_FRAME_CRC@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TRFLAG_NFCA_STD_FRAME_CRC@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ne	LBB0_10
; %bb.9:
	add	x8, x9, w2, sxtw #2
	ldur	w8, [x8, #-12]
Lloh19:
	adrp	x9, _ST95HF_NFCA_CRC_ERR_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ST95HF_NFCA_CRC_ERR_MASK@GOTPAGEOFF]
	b	LBB0_5
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ST95HF_ERR_MASK,4,2            ; @ST95HF_ERR_MASK
	.comm	_ST95HF_TIMEOUT_ERROR,4,2       ; @ST95HF_TIMEOUT_ERROR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_TRFLAG_NFCA_STD_FRAME_CRC,4,2  ; @TRFLAG_NFCA_STD_FRAME_CRC
	.comm	_ST95HF_NFCA_CRC_ERR_MASK,1,0   ; @ST95HF_NFCA_CRC_ERR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CRC error, byte received = 0x%x\n"

	.comm	_ST95HF_NFCB_CRC_ERR_MASK,1,0   ; @ST95HF_NFCB_CRC_ERR_MASK
	.no_dead_strip	_st95hf_error_handling
.subsections_via_symbols
