	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ican3_old_recv_msg
_ican3_old_recv_msg:                    ## @ican3_old_recv_msg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	_QUEUE_OLD_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ican3_set_page
	movq	_MSYNC_PEER@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_ioread8
	movl	%eax, %ebx
	movq	_MSYNC_LOCL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_ioread8
	movl	%eax, %r15d
	xorl	%eax, %ebx
	movq	_MSYNC_RB_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %ecx
	andl	%eax, %ecx
	je	LBB0_1
## %bb.2:
	cmpl	%eax, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_MSYNC_RBLW@GOTPCREL(%rip), %rcx
	movq	_MSYNC_RB0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r12d
	testl	%ebx, (%rcx)
	je	LBB0_5
	jmp	LBB0_6
LBB0_1:
	movl	8(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_dbg
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_4:
	movq	_MSYNC_RB0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r12d
	testl	%ebx, %eax
	jne	LBB0_6
LBB0_5:
	movq	_MSYNC_RB1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_6:
	cmpl	%eax, %r12d
	jne	LBB0_7
## %bb.8:
	movq	_QUEUE_OLD_RB0@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_QUEUE_OLD_RB1@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ican3_set_page
	movq	(%r13), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy_fromio
	xorl	%r15d, %r12d
	movq	_QUEUE_OLD_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ican3_set_page
	movq	_MSYNC_LOCL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	%r12d, %edi
	callq	_iowrite8
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QUEUE_OLD_CONTROL,4,2          ## @QUEUE_OLD_CONTROL
	.comm	_MSYNC_PEER,8,3                 ## @MSYNC_PEER
	.comm	_MSYNC_LOCL,8,3                 ## @MSYNC_LOCL
	.comm	_MSYNC_RB_MASK,4,2              ## @MSYNC_RB_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no mbox for reading\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MSYNC_RBLW,4,2                 ## @MSYNC_RBLW
	.comm	_MSYNC_RB0,4,2                  ## @MSYNC_RB0
	.comm	_MSYNC_RB1,4,2                  ## @MSYNC_RB1
	.comm	_QUEUE_OLD_RB0,4,2              ## @QUEUE_OLD_RB0
	.comm	_QUEUE_OLD_RB1,4,2              ## @QUEUE_OLD_RB1
	.no_dead_strip	_ican3_old_recv_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ican3_old_recv_msg
_ican3_old_recv_msg:                    ; @ican3_old_recv_msg
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _QUEUE_OLD_CONTROL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _QUEUE_OLD_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_ican3_set_page
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _MSYNC_PEER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MSYNC_PEER@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread8
	mov	x22, x0
	ldr	x8, [x19]
Lloh5:
	adrp	x24, _MSYNC_LOCL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MSYNC_LOCL@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_ioread8
	eor	w8, w0, w22
Lloh7:
	adrp	x9, _MSYNC_RB_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MSYNC_RB_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ands	w10, w8, w9
	b.eq	LBB0_3
; %bb.1:
	mov	x21, x0
	cmp	w10, w9
	b.ne	LBB0_4
; %bb.2:
Lloh10:
	adrp	x9, _MSYNC_RBLW@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MSYNC_RBLW@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x9]
Lloh13:
	adrp	x9, _MSYNC_RB0@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MSYNC_RB0@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x11, _MSYNC_RB1@GOTPAGE
Lloh17:
	ldr	x11, [x11, _MSYNC_RB1@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w22, w11, w9, eq
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19, #8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_dbg
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
Lloh24:
	adrp	x9, _MSYNC_RB0@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MSYNC_RB0@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _MSYNC_RB1@GOTPAGE
Lloh28:
	ldr	x10, [x10, _MSYNC_RB1@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w22, w10, w9, eq
LBB0_5:
Lloh30:
	adrp	x8, _QUEUE_OLD_RB0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _QUEUE_OLD_RB0@GOTPAGEOFF]
Lloh32:
	adrp	x10, _QUEUE_OLD_RB1@GOTPAGE
Lloh33:
	ldr	x10, [x10, _QUEUE_OLD_RB1@GOTPAGEOFF]
	cmp	w22, w9
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ican3_set_page
	ldr	x1, [x19]
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy_fromio
	eor	w20, w22, w21
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ican3_set_page
	ldr	x8, [x19]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x20
	bl	_iowrite8
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_QUEUE_OLD_CONTROL,4,2          ; @QUEUE_OLD_CONTROL
	.comm	_MSYNC_PEER,8,3                 ; @MSYNC_PEER
	.comm	_MSYNC_LOCL,8,3                 ; @MSYNC_LOCL
	.comm	_MSYNC_RB_MASK,4,2              ; @MSYNC_RB_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no mbox for reading\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MSYNC_RBLW,4,2                 ; @MSYNC_RBLW
	.comm	_MSYNC_RB0,4,2                  ; @MSYNC_RB0
	.comm	_MSYNC_RB1,4,2                  ; @MSYNC_RB1
	.comm	_QUEUE_OLD_RB0,4,2              ; @QUEUE_OLD_RB0
	.comm	_QUEUE_OLD_RB1,4,2              ; @QUEUE_OLD_RB1
	.no_dead_strip	_ican3_old_recv_msg
.subsections_via_symbols
