	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ican3_old_send_msg
_ican3_old_send_msg:                    ## @ican3_old_send_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, %r12
	movq	_QUEUE_OLD_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ican3_set_page
	movq	_MSYNC_PEER@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_ioread8
	movl	%eax, %ebx
	movq	_MSYNC_LOCL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_ioread8
	movl	%eax, %r15d
	xorl	%eax, %ebx
	movq	_MSYNC_WB_MASK@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	notl	%ecx
	testl	%ecx, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_2:
	movq	_MSYNC_WB0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MSYNC_WB1@GOTPCREL(%rip), %rcx
	movl	%eax, %r13d
	testl	%ebx, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rcx), %r13d
LBB0_4:
	cmpl	%eax, %r13d
	jne	LBB0_5
## %bb.6:
	movq	_QUEUE_OLD_WB0@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_QUEUE_OLD_WB1@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ican3_set_page
	movq	(%r12), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy_toio
	xorl	%r13d, %r15d
	xorl	%r14d, %r14d
	movl	$0, %ebx
	movq	_MSYNC_WB1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_9
## %bb.8:
	movq	_MSYNC_WBLW@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	orl	%r15d, %ebx
	movq	_QUEUE_OLD_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ican3_set_page
	movq	_MSYNC_LOCL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%ebx, %edi
	callq	_iowrite8
LBB0_10:
	movl	%r14d, %eax
	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_WB_MASK,4,2              ## @MSYNC_WB_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no mbox for writing\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MSYNC_WB0,4,2                  ## @MSYNC_WB0
	.comm	_MSYNC_WB1,4,2                  ## @MSYNC_WB1
	.comm	_QUEUE_OLD_WB0,4,2              ## @QUEUE_OLD_WB0
	.comm	_QUEUE_OLD_WB1,4,2              ## @QUEUE_OLD_WB1
	.comm	_MSYNC_WBLW,4,2                 ## @MSYNC_WBLW
	.no_dead_strip	_ican3_old_send_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_send_msg
_ican3_old_send_msg:                    ; @ican3_old_send_msg
	.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	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_WB_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MSYNC_WB_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x21, x0
Lloh15:
	adrp	x9, _MSYNC_WB0@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MSYNC_WB0@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x22, _MSYNC_WB1@GOTPAGE
Lloh19:
	ldr	x22, [x22, _MSYNC_WB1@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w9, w8
Lloh20:
	adrp	x8, _QUEUE_OLD_WB0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _QUEUE_OLD_WB0@GOTPAGEOFF]
	csel	w25, w9, w10, eq
Lloh22:
	adrp	x10, _QUEUE_OLD_WB1@GOTPAGE
Lloh23:
	ldr	x10, [x10, _QUEUE_OLD_WB1@GOTPAGEOFF]
	cmp	w25, w9
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ican3_set_page
	ldr	x0, [x19]
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy_toio
	eor	w8, w25, w21
Lloh24:
	adrp	x9, _MSYNC_WBLW@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MSYNC_WBLW@GOTPAGEOFF]
	ldr	w10, [x22]
Lloh26:
	ldr	w9, [x9]
	cmp	w25, w10
	csel	w9, w9, wzr, eq
	orr	w20, w9, w8
	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_3:
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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_WB_MASK,4,2              ; @MSYNC_WB_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no mbox for writing\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MSYNC_WB0,4,2                  ; @MSYNC_WB0
	.comm	_MSYNC_WB1,4,2                  ; @MSYNC_WB1
	.comm	_QUEUE_OLD_WB0,4,2              ; @QUEUE_OLD_WB0
	.comm	_QUEUE_OLD_WB1,4,2              ; @QUEUE_OLD_WB1
	.comm	_MSYNC_WBLW,4,2                 ; @MSYNC_WBLW
	.no_dead_strip	_ican3_old_send_msg
.subsections_via_symbols
