	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function microread_im_transceive
_microread_im_transceive:               ## @microread_im_transceive
	.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	%r8, %r13
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_nfc_hci_get_clientdata
	movq	%rax, %r12
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movl	(%rbx), %esi
	movq	_MICROREAD_GATE_ID_P2P_INITIATOR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_1
## %bb.9:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_push
	movl	$0, (%rax)
	movl	(%rbx), %esi
	movq	_MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nfc_hci_send_event             ## TAILCALL
LBB0_1:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	$203, %r13d
	leal	-130(%rsi), %eax
	cmpl	$3, %eax
	jb	LBB0_8
## %bb.2:
	cmpl	$128, %esi
	je	LBB0_7
## %bb.3:
	cmpl	$129, %esi
	jne	LBB0_5
## %bb.4:
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_crc_ccitt
	movl	%eax, %r13d
	notl	%r13d
	movzbl	%r13b, %esi
	movq	%r15, %rdi
	callq	_skb_put_u8
	sarl	$8, %r13d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_skb_put_u8
	movl	$27, %r13d
	jmp	LBB0_8
LBB0_7:
	movl	$219, %r13d
LBB0_8:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_push
	movl	%r13d, (%rax)
	movq	_MICROREAD_CB_TYPE_READER_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r12)
	movl	(%rbx), %esi
	movq	_MICROREAD_CMD_MREAD_EXCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	movq	_microread_im_transceive_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	callq	_nfc_hci_send_cmd_async
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_pr_info
	movl	$1, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data exchange to gate 0x%x\n"

	.comm	_MICROREAD_GATE_ID_P2P_INITIATOR,4,2 ## @MICROREAD_GATE_ID_P2P_INITIATOR
	.comm	_MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF,4,2 ## @MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF
L_.str.1:                               ## @.str.1
	.asciz	"Abort im_transceive to invalid gate 0x%x\n"

	.comm	_MICROREAD_CB_TYPE_READER_ALL,4,2 ## @MICROREAD_CB_TYPE_READER_ALL
	.comm	_MICROREAD_CMD_MREAD_EXCHANGE,4,2 ## @MICROREAD_CMD_MREAD_EXCHANGE
	.comm	_microread_im_transceive_cb,4,2 ## @microread_im_transceive_cb
	.no_dead_strip	_microread_im_transceive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function microread_im_transceive
_microread_im_transceive:               ; @microread_im_transceive
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_nfc_hci_get_clientdata
	mov	x22, x0
	ldr	w1, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _MICROREAD_GATE_ID_P2P_INITIATOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MICROREAD_GATE_ID_P2P_INITIATOR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #1
	bl	_skb_push
	str	wzr, [x0]
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldp	w4, w3, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nfc_hci_send_event
LBB0_2:
	sub	w8, w1, #130
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.3:
	mov	w25, #203
	b	LBB0_8
LBB0_4:
	cmp	w1, #128
	b.eq	LBB0_7
; %bb.5:
	cmp	w1, #129
	b.ne	LBB0_9
; %bb.6:
	ldp	w2, w1, [x20]
	mov	w0, #65535
	bl	_crc_ccitt
	mvn	w25, w0
	and	w1, w25, #0xff
	mov	x0, x20
	bl	_skb_put_u8
	asr	w1, w25, #8
	mov	x0, x20
	bl	_skb_put_u8
	mov	w25, #27
	b	LBB0_8
LBB0_7:
	mov	w25, #219
LBB0_8:
	mov	x0, x20
	mov	w1, #1
	bl	_skb_push
	str	w25, [x0]
Lloh8:
	adrp	x8, _MICROREAD_CB_TYPE_READER_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MICROREAD_CB_TYPE_READER_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stp	w24, w8, [x22, #8]
	str	x23, [x22]
	ldr	w1, [x21]
Lloh11:
	adrp	x8, _MICROREAD_CMD_MREAD_EXCHANGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MICROREAD_CMD_MREAD_EXCHANGE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldp	w4, w3, [x20]
Lloh14:
	adrp	x8, _microread_im_transceive_cb@GOTPAGE
Lloh15:
	ldr	x8, [x8, _microread_im_transceive_cb@GOTPAGEOFF]
Lloh16:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x6, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nfc_hci_send_cmd_async
LBB0_9:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	mov	w0, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data exchange to gate 0x%x\n"

	.comm	_MICROREAD_GATE_ID_P2P_INITIATOR,4,2 ; @MICROREAD_GATE_ID_P2P_INITIATOR
	.comm	_MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF,4,2 ; @MICROREAD_EVT_P2P_INITIATOR_EXCHANGE_TO_RF
l_.str.1:                               ; @.str.1
	.asciz	"Abort im_transceive to invalid gate 0x%x\n"

	.comm	_MICROREAD_CB_TYPE_READER_ALL,4,2 ; @MICROREAD_CB_TYPE_READER_ALL
	.comm	_MICROREAD_CMD_MREAD_EXCHANGE,4,2 ; @MICROREAD_CMD_MREAD_EXCHANGE
	.comm	_microread_im_transceive_cb,4,2 ; @microread_im_transceive_cb
	.no_dead_strip	_microread_im_transceive
.subsections_via_symbols
