	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pn544_hci_i2c_read
_pn544_hci_i2c_read:                    ## @pn544_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, %r12
	movq	%rdi, %rbx
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PN544_HCI_I2C_LLC_MAX_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	decl	%r13d
	leaq	(,%r13,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	leaq	-52(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_i2c_master_recv
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.2:
	movl	-52(%rbp), %edi
	movq	_PN544_HCI_I2C_LLC_MIN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cmpl	%eax, %edi
	jl	LBB0_4
## %bb.3:
	cmpl	(%r15), %edi
	jge	LBB0_4
## %bb.5:
	incl	%edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_alloc_skb
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	-52(%rbp), %esi
	movq	%rax, %rdi
	callq	_skb_put_u8
	movq	(%r12), %rdi
	movl	-52(%rbp), %esi
	callq	_skb_put
	movl	-52(%rbp), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_i2c_master_recv
	movq	(%r12), %rsi
	cmpl	-52(%rbp), %eax
	jne	LBB0_8
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	callq	_I2C_DUMP_SKB
	movq	(%r12), %rax
	movl	8(%rax), %edi
	movq	(%rax), %rsi
	callq	_check_crc
	movq	(%r12), %rdi
	testl	%eax, %eax
	je	LBB0_18
## %bb.11:
	callq	_kfree_skb
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_nfc_err
LBB0_9:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_nfc_err
LBB0_12:
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
	shll	$2, %r13d
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_i2c_master_recv
	testl	%eax, %eax
	jns	LBB0_15
## %bb.14:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	negl	%ebx
	movl	$3000, %edi                     ## imm = 0xBB8
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
LBB0_16:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.17:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rsi, %rdi
	callq	_kfree_skb
	jmp	LBB0_9
LBB0_18:
	movl	$1, %esi
	callq	_skb_pull
	movq	(%r12), %rdi
	movq	(%rdi), %rsi
	addq	$-2, %rsi
	callq	_skb_trim
	movl	$3000, %edi                     ## imm = 0xBB8
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PN544_HCI_I2C_LLC_MAX_SIZE,4,2 ## @PN544_HCI_I2C_LLC_MAX_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot read len byte\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_PN544_HCI_I2C_LLC_MIN_SIZE,4,2 ## @PN544_HCI_I2C_LLC_MIN_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"invalid len byte\n"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"i2c frame read"

	.no_dead_strip	_pn544_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 pn544_hci_i2c_read
_pn544_hci_i2c_read:                    ; @pn544_hci_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	x21, x1
	mov	x22, sp
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, _PN544_HCI_I2C_LLC_MAX_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PN544_HCI_I2C_LLC_MAX_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	sub	w23, w8, #1
	lsl	x8, x23, #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	x19, x9, x8
	mov	sp, x19
	ldr	x20, [x0]
	sub	x1, x29, #60
	mov	x0, x20
	mov	w2, #1
	bl	_i2c_master_recv
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.1:
Lloh7:
	adrp	x9, _PN544_HCI_I2C_LLC_MIN_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PN544_HCI_I2C_LLC_MIN_SIZE@GOTPAGEOFF]
	ldur	w8, [x29, #-60]
Lloh9:
	ldr	w9, [x9]
	sub	w9, w9, #1
	ldr	w10, [x24]
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.lt	LBB0_6
; %bb.2:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_nfc_err
LBB0_3:
Lloh12:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nfc_err
LBB0_5:
Lloh16:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_6:
	add	w0, w8, #1
Lloh19:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_alloc_skb
	str	x0, [x21]
	cbz	x0, LBB0_10
; %bb.7:
	ldur	w1, [x29, #-60]
	bl	_skb_put_u8
	ldr	x0, [x21]
	ldur	w1, [x29, #-60]
	bl	_skb_put
	mov	x1, x0
	ldur	w2, [x29, #-60]
	mov	x0, x20
	bl	_i2c_master_recv
	ldur	w8, [x29, #-60]
	ldr	x1, [x21]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.8:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_I2C_DUMP_SKB
	ldr	x8, [x21]
	ldr	w0, [x8, #8]
	ldr	x1, [x8]
	bl	_check_crc
	mov	x8, x0
	ldr	x0, [x21]
	cbz	w8, LBB0_15
; %bb.9:
	bl	_kfree_skb
	b	LBB0_3
LBB0_10:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w21, [x8]
	lsl	w2, w23, #2
	mov	x0, x20
	mov	x1, x19
	bl	_i2c_master_recv
Lloh26:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w8, w8, w21, lt
	neg	w19, w8
	mov	w0, #3000
	mov	w1, #6000
	bl	_usleep_range
LBB0_12:
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x19
	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_14:
	mov	x0, x1
	bl	_kfree_skb
	b	LBB0_5
LBB0_15:
	mov	w1, #1
	bl	_skb_pull
	ldr	x0, [x21]
	ldr	x8, [x0]
	sub	x1, x8, #2
	bl	_skb_trim
	mov	w0, #3000
	mov	w1, #6000
	bl	_usleep_range
	mov	w19, #0
	b	LBB0_12
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_PN544_HCI_I2C_LLC_MAX_SIZE,4,2 ; @PN544_HCI_I2C_LLC_MAX_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot read len byte\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_PN544_HCI_I2C_LLC_MIN_SIZE,4,2 ; @PN544_HCI_I2C_LLC_MIN_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"invalid len byte\n"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"i2c frame read"

	.no_dead_strip	_pn544_hci_i2c_read
.subsections_via_symbols
