	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st21nfca_hci_i2c_read
_st21nfca_hci_i2c_read:                 ## @st21nfca_hci_i2c_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ST21NFCA_HCI_LLC_MAX_PAYLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rbx
	movl	(%r12), %r15d
	movq	_len_seq@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jge	LBB0_19
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movslq	(%r12), %rcx
	movl	(%rax,%rcx,4), %r13d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leaq	4(%r12), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_wait_tab@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_i2c_master_recv
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r15), %rax
	movl	-4(%rax,%r12,4), %edi
	callq	_msleep
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	testl	%r14d, %r14d
	jle	LBB0_4
	jmp	LBB0_8
LBB0_19:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_2:
	xorl	%r14d, %r14d
LBB0_8:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	cmpl	%r13d, %r14d
	jne	LBB0_9
## %bb.10:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	cmpl	$0, (%r14)
	je	LBB0_11
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_START_OF_FRAME
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_skb_trim
	movl	$0, (%r14)
LBB0_16:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_skb_put_data
	movq	(%rbx), %rax
	movslq	8(%rbx), %rcx
	movq	-8(%rax,%rcx,8), %rax
	movq	_ST21NFCA_SOF_EOF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movl	$0, (%r14)
	movq	%rbx, %rdi
	callq	_st21nfca_hci_i2c_repack
	movl	%eax, %ebx
	jmp	LBB0_22
LBB0_9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	incl	(%r14)
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_20:
	xorl	%ebx, %ebx
LBB0_21:
	subl	(%rax), %ebx
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_START_OF_FRAME
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	cmpl	$0, (%r14)
	jne	LBB0_14
	jmp	LBB0_16
LBB0_12:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_skb_trim
	movl	$0, (%r14)
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ST21NFCA_HCI_LLC_MAX_PAYLOAD,4,2 ## @ST21NFCA_HCI_LLC_MAX_PAYLOAD
	.comm	_len_seq,8,3                    ## @len_seq
	.comm	_wait_tab,8,3                   ## @wait_tab
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ST21NFCA_SOF_EOF,8,3           ## @ST21NFCA_SOF_EOF
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_st21nfca_hci_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st21nfca_hci_i2c_read
_st21nfca_hci_i2c_read:                 ; @st21nfca_hci_i2c_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _ST21NFCA_HCI_LLC_MAX_PAYLOAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ST21NFCA_HCI_LLC_MAX_PAYLOAD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x23, [x0, #8]
	ldr	w24, [x0]
Lloh8:
	adrp	x22, _len_seq@GOTPAGE
Lloh9:
	ldr	x22, [x22, _len_seq@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w24, w0
	b.ge	LBB0_18
; %bb.1:
	ldr	x8, [x22]
	mov	x24, x19
	ldrsw	x9, [x24], #4
	ldr	w22, [x8, x9, lsl #2]
	mov	x0, x24
	bl	_mutex_lock
Lloh10:
	adrp	x26, _wait_tab@GOTPAGE
Lloh11:
	ldr	x26, [x26, _wait_tab@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x27, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	x27, w0, sxtw
	ccmp	w25, #1, #0, lt
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	bl	_i2c_master_recv
	mov	x25, x0
	tbz	w0, #31, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
	ldr	w0, [x8, x27, lsl #2]
	bl	_msleep
	b	LBB0_3
LBB0_6:
	mov	w25, #0
LBB0_7:
	mov	x0, x24
	bl	_mutex_unlock
	cmp	w25, w22
	b.ne	LBB0_13
; %bb.8:
	ldr	w8, [x19]
	cbz	w8, LBB0_15
LBB0_9:
	mov	x0, x21
	bl	_IS_START_OF_FRAME
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x20
	mov	w1, #0
	bl	_skb_trim
	str	wzr, [x19]
LBB0_11:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_skb_put_data
	ldr	x8, [x20]
	ldrsw	x9, [x20, #8]
	add	x8, x8, x9, lsl #3
	ldur	x8, [x8, #-8]
Lloh12:
	adrp	x9, _ST21NFCA_SOF_EOF@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ST21NFCA_SOF_EOF@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	str	wzr, [x19]
	mov	x0, x20
	bl	_st21nfca_hci_i2c_repack
	b	LBB0_20
LBB0_13:
	str	wzr, [x19]
Lloh15:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
	b	LBB0_19
LBB0_14:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh17:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_19
LBB0_15:
	mov	x0, x21
	bl	_IS_START_OF_FRAME
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w8, [x19]
	cbnz	w8, LBB0_9
	b	LBB0_11
LBB0_17:
	mov	x0, x20
	mov	w1, #0
	bl	_skb_trim
	str	wzr, [x19]
LBB0_18:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ST21NFCA_HCI_LLC_MAX_PAYLOAD,4,2 ; @ST21NFCA_HCI_LLC_MAX_PAYLOAD
	.comm	_len_seq,8,3                    ; @len_seq
	.comm	_wait_tab,8,3                   ; @wait_tab
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ST21NFCA_SOF_EOF,8,3           ; @ST21NFCA_SOF_EOF
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_st21nfca_hci_i2c_read
.subsections_via_symbols
