	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sendmessage                    ## -- Begin function sendmessage
	.p2align	4, 0x90
_sendmessage:                           ## @sendmessage
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %r12d
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r15d
	movl	%edi, %ebx
	callq	_IS_VALID_CARD
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%r12d, -84(%rbp)                ## 4-byte Spill
	movq	_sc_adapter@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %r12
	movq	(%rax,%r12,8), %rax
	movq	48(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:
	movq	_CMPID@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	jne	LBB0_6
## %bb.4:
	movl	16(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_6:
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.7:
	movq	_CEPID@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_9
## %bb.8:
	movl	16(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
LBB0_5:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_ESRCH@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_9:
	movl	%r14d, %ebx
	movl	16(%rbp), %r14d
	movq	_MSG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	$4, -80(%rbp)
	movl	%r13d, -76(%rbp)
	movl	-88(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -72(%rbp)
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -68(%rbp)
	movl	%ebx, -64(%rbp)
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.10:
	movq	24(%rbp), %rsi
	movq	_MSG_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r14d, %eax
	cmovbl	%eax, %r14d
	leaq	-48(%rbp), %rdi
	movl	%r14d, %edx
	callq	_memcpy
	addl	$8, %r14d
	movl	%r14d, -80(%rbp)
LBB0_11:
	movl	%r15d, -60(%rbp)
	movq	_sc_adapter@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movl	40(%rax), %ecx
	leal	1(%rcx), %edx
	leal	255(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	movl	%edx, 40(%rax)
	andl	$-256, %esi
	subl	%esi, %ecx
	movl	%ecx, -56(%rbp)
	movq	24(%rax), %rax
	movq	_FIFO_STATUS@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_inb
	movq	_WF_NOT_FULL@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	jne	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	24(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_inb
	testl	%eax, (%rbx)
	je	LBB0_12
LBB0_14:
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rdi
	addq	$20, %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movl	(%rax), %edi
	sarl	$14, %edi
	orl	$128, %edi
	movq	24(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx,%rax,4), %esi
	callq	_outb
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	32(%rax), %r14
	movq	(%r14), %rdi
	shlq	$2, %rdi
	addq	8(%r14), %rdi
	movq	_MSG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rsi
	callq	_memcpy_toio
	movq	(%r14), %rax
	incq	%rax
	movq	_MAX_MESSAGES@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_15
## %bb.16:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_17
LBB0_15:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_17:
	movq	%rdx, (%r14)
	movl	-56(%rbp), %edi
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	24(%rax), %rax
	movq	_FIFO_WRITE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_outb
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rdi
	addq	$20, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movl	16(%rax), %esi
	movl	-56(%rbp), %edx
	movl	-60(%rbp), %ecx
	movl	-52(%rbp), %r8d
	movl	-80(%rbp), %r9d
	movl	-76(%rbp), %r10d
	movl	-72(%rbp), %r11d
	movl	-68(%rbp), %r15d
	movl	-64(%rbp), %ebx
	leaq	L_.str.3(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r15
	pushq	%r11
	pushq	%r10
	callq	_pr_debug
	addq	$32, %rsp
LBB0_18:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid param: %d is not a valid card id\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_sc_adapter,8,3                 ## @sc_adapter
	.comm	_CMPID,4,2                      ## @CMPID
L_.str.1:                               ## @.str.1
	.asciz	"%s: Attempt to send CM message with engine up\n"

	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_CEPID,4,2                      ## @CEPID
L_.str.2:                               ## @.str.2
	.asciz	"%s: Attempt to send CE message with engine down\n"

	.comm	_MSG_LEN,4,2                    ## @MSG_LEN
	.comm	_MSG_DATA_LEN,4,2               ## @MSG_DATA_LEN
	.comm	_FIFO_STATUS,8,3                ## @FIFO_STATUS
	.comm	_WF_NOT_FULL,4,2                ## @WF_NOT_FULL
	.comm	_MAX_MESSAGES,4,2               ## @MAX_MESSAGES
	.comm	_FIFO_WRITE,8,3                 ## @FIFO_WRITE
L_.str.3:                               ## @.str.3
	.asciz	"%s: Sent Message seq:%d pid:%d time:%d cnt:%d (type,class,code):(%d,%d,%d) link:%d\n "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sendmessage                    ; -- Begin function sendmessage
	.p2align	2
_sendmessage:                           ; @sendmessage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x19, x1
	mov	x26, x0
	bl	_IS_VALID_CARD
	cbz	w0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x27, _sc_adapter@GOTPAGE
Lloh1:
	ldr	x27, [x27, _sc_adapter@GOTPAGEOFF]
	ldr	x8, [x27]
	ldr	x8, [x8, w26, sxtw #3]
	ldr	x9, [x8, #48]
Lloh2:
	adrp	x10, _CMPID@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CMPID@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	x9, #0
	ccmp	w10, w19, #0, ne
	b.eq	LBB0_9
; %bb.2:
Lloh5:
	adrp	x10, _CEPID@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CEPID@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	x9, #0
	ccmp	w10, w19, #0, eq
	b.eq	LBB0_10
; %bb.3:
	sxtw	x28, w26
Lloh8:
	adrp	x8, _MSG_LEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_LEN@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x26, sp, #72
	add	x0, sp, #72
	mov	w1, #0
	bl	_memset
	mov	w8, #4
	stp	w8, w25, [sp, #72]
	stp	w24, w23, [sp, #80]
	str	w22, [sp, #88]
	cbz	w21, LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _MSG_DATA_LEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_DATA_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w21
	csel	w21, w8, w21, lo
	add	x0, x26, #32
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	add	w8, w21, #8
	str	w8, [sp, #72]
LBB0_5:
	str	w19, [sp, #92]
	ldr	x8, [x27]
	ldr	x8, [x8, x28, lsl #3]
	ldr	w9, [x8, #40]
	add	w10, w9, #1
	str	w10, [x8, #40]
	and	w10, w9, #0xff
	negs	w9, w9
	and	w9, w9, #0xff
	csneg	w9, w10, w9, mi
	str	w9, [sp, #96]
	ldr	x8, [x8, #24]
Lloh14:
	adrp	x19, _FIFO_STATUS@GOTPAGE
Lloh15:
	ldr	x19, [x19, _FIFO_STATUS@GOTPAGEOFF]
	ldr	x9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	bl	_inb
Lloh16:
	adrp	x20, _WF_NOT_FULL@GOTPAGE
Lloh17:
	ldr	x20, [x20, _WF_NOT_FULL@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	x8, [x27]
	ldr	x8, [x8, x28, lsl #3]
	ldr	x8, [x8, #24]
	ldr	x9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	bl	_inb
	b	LBB0_6
LBB0_8:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x26
	bl	_pr_debug
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
	ldr	w1, [x8, #16]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
	ldr	w1, [x8, #16]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_pr_debug
Lloh26:
	adrp	x8, _ESRCH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_14:
	ldr	x8, [x27]
	lsl	x19, x28, #3
	ldr	x8, [x8, x19]
	add	x0, x8, #20
	bl	_spin_lock_irqsave
	ldr	x8, [x27]
	ldr	x8, [x8, x19]
	ldr	w9, [x8]
	asr	w9, w9, #14
	orr	w0, w9, #0x80
	ldr	x9, [x8, #24]
	ldr	x8, [x8, #8]
	ldr	w1, [x9, x8, lsl #2]
	bl	_outb
	ldr	x8, [x27]
	ldr	x8, [x8, x19]
	ldr	x20, [x8, #32]
	ldp	x9, x8, [x20]
	add	x0, x8, x9, lsl #2
Lloh28:
	adrp	x8, _MSG_LEN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSG_LEN@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	add	x1, sp, #72
	bl	_memcpy_toio
	ldr	x8, [x20]
	add	x8, x8, #1
Lloh31:
	adrp	x9, _MAX_MESSAGES@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MAX_MESSAGES@GOTPAGEOFF]
Lloh33:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x20]
	ldr	w0, [sp, #96]
	ldr	x8, [x27]
	ldr	x8, [x8, x19]
	ldr	x8, [x8, #24]
Lloh34:
	adrp	x9, _FIFO_WRITE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _FIFO_WRITE@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	bl	_outb
	ldr	x8, [x27]
	ldr	x8, [x8, x19]
	add	x0, x8, #20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x27]
	ldr	x8, [x8, x19]
	ldr	w1, [x8, #16]
	ldp	w8, w9, [sp, #96]
	ldp	w10, w11, [sp, #72]
	ldp	w12, w13, [sp, #80]
	ldp	w15, w14, [sp, #88]
	stp	x13, x15, [sp, #48]
	stp	x11, x12, [sp, #32]
	stp	x9, x10, [sp, #16]
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
	stp	x8, x14, [sp]
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid param: %d is not a valid card id\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_sc_adapter,8,3                 ; @sc_adapter
	.comm	_CMPID,4,2                      ; @CMPID
l_.str.1:                               ; @.str.1
	.asciz	"%s: Attempt to send CM message with engine up\n"

	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_CEPID,4,2                      ; @CEPID
l_.str.2:                               ; @.str.2
	.asciz	"%s: Attempt to send CE message with engine down\n"

	.comm	_MSG_LEN,4,2                    ; @MSG_LEN
	.comm	_MSG_DATA_LEN,4,2               ; @MSG_DATA_LEN
	.comm	_FIFO_STATUS,8,3                ; @FIFO_STATUS
	.comm	_WF_NOT_FULL,4,2                ; @WF_NOT_FULL
	.comm	_MAX_MESSAGES,4,2               ; @MAX_MESSAGES
	.comm	_FIFO_WRITE,8,3                 ; @FIFO_WRITE
l_.str.3:                               ; @.str.3
	.asciz	"%s: Sent Message seq:%d pid:%d time:%d cnt:%d (type,class,code):(%d,%d,%d) link:%d\n "

.subsections_via_symbols
