	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_nci_i2c_read
_st_nci_i2c_read:                       ## @st_nci_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ST_NCI_I2C_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%rbx), %r13
	movq	_ST_NCI_I2C_MIN_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpl	(%r14), %eax
	je	LBB0_5
	jmp	LBB0_3
LBB0_1:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_i2c_master_recv
	cmpl	(%r14), %eax
	jne	LBB0_3
LBB0_5:
	movq	%r12, %rbx
	movl	8(%r15), %edi
	callq	_be16_to_cpu
	movl	%eax, %r12d
	movq	_ST_NCI_I2C_MAX_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_nfc_err
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	movl	(%r14), %edi
	addl	%r12d, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_alloc_skb
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	(%r14), %esi
	movq	%rax, %rdi
	callq	_skb_reserve
	movq	(%rbx), %rdi
	movl	(%r14), %esi
	callq	_skb_put
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	movl	(%r14), %edx
	movq	%r15, %rsi
	callq	_memcpy
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.10:
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_i2c_master_recv
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	cmpl	%r12d, %eax
	jne	LBB0_11
## %bb.12:
	movl	%r12d, %esi
	callq	_skb_put
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	(%r14), %rdi
	addq	(%rax), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	jmp	LBB0_13
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_11:
	callq	_kfree_skb
LBB0_3:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_NCI_I2C_MAX_SIZE,4,2        ## @ST_NCI_I2C_MAX_SIZE
	.comm	_ST_NCI_I2C_MIN_SIZE,4,2        ## @ST_NCI_I2C_MIN_SIZE
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid frame len\n"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_st_nci_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_nci_i2c_read
_st_nci_i2c_read:                       ; @st_nci_i2c_read
	.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
	sub	sp, sp, #16
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x24, _ST_NCI_I2C_MAX_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ST_NCI_I2C_MAX_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x21, [x0]
Lloh7:
	adrp	x23, _ST_NCI_I2C_MIN_SIZE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _ST_NCI_I2C_MIN_SIZE@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x20
	bl	_i2c_master_recv
	tbz	w0, #31, LBB0_2
; %bb.1:
	mov	w0, #1000
	mov	w1, #4000
	bl	_usleep_range
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x20
	bl	_i2c_master_recv
LBB0_2:
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.3:
	ldr	w0, [x20, #8]
	bl	_be16_to_cpu
	ldr	w8, [x24]
	cmp	w0, w8
	b.le	LBB0_5
; %bb.4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nfc_err
Lloh11:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
	mov	x22, x0
	ldr	w8, [x23]
	add	w0, w8, w0
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_alloc_skb
	str	x0, [x19]
	cbz	x0, LBB0_10
; %bb.6:
	ldr	w1, [x23]
	bl	_skb_reserve
	ldr	x0, [x19]
	ldr	w1, [x23]
	bl	_skb_put
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldr	w2, [x23]
	mov	x1, x20
	bl	_memcpy
	cbz	w22, LBB0_9
; %bb.7:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_i2c_master_recv
	mov	x8, x0
	ldr	x0, [x19]
	cmp	w8, w22
	b.ne	LBB0_11
; %bb.8:
	mov	x1, x22
	bl	_skb_put
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldrsw	x9, [x23]
	add	x0, x8, x9
	mov	x1, x20
	mov	x2, x22
	bl	_memcpy
LBB0_9:
	mov	w0, #0
	b	LBB0_14
LBB0_10:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	bl	_kfree_skb
LBB0_12:
Lloh18:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #48
	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
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_NCI_I2C_MAX_SIZE,4,2        ; @ST_NCI_I2C_MAX_SIZE
	.comm	_ST_NCI_I2C_MIN_SIZE,4,2        ; @ST_NCI_I2C_MIN_SIZE
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid frame len\n"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_st_nci_i2c_read
.subsections_via_symbols
