	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st21nfca_hci_i2c_repack
_st21nfca_hci_i2c_repack:               ## @st21nfca_hci_i2c_repack
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %esi
	testl	%esi, %esi
	jle	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	cmpl	$1, %esi
	je	LBB0_4
## %bb.2:
	cmpl	$0, 4(%rdi)
	jne	LBB0_3
LBB0_4:
	callq	_get_frame_size
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_skb_trim
	movl	$1, %esi
	cmpl	$2, (%rbx)
	jl	LBB0_12
## %bb.7:
	movq	8(%rbx), %rax
	movq	_ST21NFCA_ESCAPE_BYTE_STUFFING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	xorl	%edx, %edx
	movl	$1, %esi
	movq	_ST21NFCA_BYTE_STUFFING_MASK@GOTPCREL(%rip), %r8
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rax,%rdi,4), %ecx
	movslq	%esi, %rsi
	movl	%ecx, (%rax,%rsi,4)
	incl	%esi
	cmpl	(%rbx), %esi
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rsi,%rdx), %edi
	movslq	%edi, %rdi
	cmpl	%r9d, (%rax,%rdi,4)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r8), %ecx
	orl	4(%rax,%rdi,4), %ecx
	movslq	%esi, %rsi
	movl	%ecx, (%rax,%rsi,4)
	leal	(%rsi,%rdx), %ecx
	addl	$2, %ecx
                                        ## kill: def $edx killed $edx killed $rdx
	incl	%edx
                                        ## kill: def $esi killed $esi killed $rsi def $rsi
	incl	%esi
	movslq	%ecx, %rdi
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_10
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_11:
	subl	%edx, %esi
LBB0_12:
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_skb_trim
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_skb_pull
	movq	8(%rbx), %rdi
	movl	(%rbx), %esi
	callq	_check_crc
	testl	%eax, %eax
	je	LBB0_13
LBB0_3:
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_13:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_skb_pull
	movl	(%rbx), %esi
	addl	$-2, %esi
	movq	%rbx, %rdi
	callq	_skb_trim
	movl	(%rbx), %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_ST21NFCA_ESCAPE_BYTE_STUFFING,8,3 ## @ST21NFCA_ESCAPE_BYTE_STUFFING
	.comm	_ST21NFCA_BYTE_STUFFING_MASK,4,2 ## @ST21NFCA_BYTE_STUFFING_MASK
	.no_dead_strip	_st21nfca_hci_i2c_repack
.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_repack
_st21nfca_hci_i2c_repack:               ; @st21nfca_hci_i2c_repack
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w1, [x0]
	cmp	w1, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #8]
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x0, #4]
	cbnz	w8, LBB0_13
LBB0_3:
	bl	_get_frame_size
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x1, x0
	mov	x0, x19
	bl	_skb_trim
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.5:
	mov	w8, #0
	ldr	x9, [x19, #8]
Lloh0:
	adrp	x10, _ST21NFCA_ESCAPE_BYTE_STUFFING@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ST21NFCA_ESCAPE_BYTE_STUFFING@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	mov	w11, #1
Lloh3:
	adrp	x12, _ST21NFCA_BYTE_STUFFING_MASK@GOTPAGE
Lloh4:
	ldr	x12, [x12, _ST21NFCA_BYTE_STUFFING_MASK@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w13, [x9, x13, lsl #2]
	str	w13, [x9, w11, sxtw #2]
	add	w11, w11, #1
	ldr	w13, [x19]
	cmp	w11, w13
	b.ge	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x14, w11
	add	x13, x14, w8, sxtw
	ldr	w15, [x9, x13, lsl #2]
	cmp	w15, w10
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w13, w13, #1
	ldr	w13, [x9, w13, sxtw #2]
	ldr	w15, [x12]
	orr	w13, w15, w13
	str	w13, [x9, x14, lsl #2]
	add	w11, w11, #1
	add	w8, w8, #1
	add	w13, w11, w8
	sxtw	x13, w13
	b	LBB0_6
LBB0_9:
	mov	w0, #0
	b	LBB0_14
LBB0_10:
	mov	w1, #1
	b	LBB0_12
LBB0_11:
	sub	w1, w11, w8
LBB0_12:
	mov	x0, x19
	bl	_skb_trim
	mov	x0, x19
	mov	w1, #1
	bl	_skb_pull
	ldr	x0, [x19, #8]
	ldr	w1, [x19]
	bl	_check_crc
	cbz	w0, LBB0_15
LBB0_13:
Lloh5:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x19
	mov	w1, #1
	bl	_skb_pull
	ldr	w8, [x19]
	sub	w1, w8, #2
	mov	x0, x19
	bl	_skb_trim
	ldr	w0, [x19]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_ST21NFCA_ESCAPE_BYTE_STUFFING,8,3 ; @ST21NFCA_ESCAPE_BYTE_STUFFING
	.comm	_ST21NFCA_BYTE_STUFFING_MASK,4,2 ; @ST21NFCA_BYTE_STUFFING_MASK
	.no_dead_strip	_st21nfca_hci_i2c_repack
.subsections_via_symbols
