	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvmc_recv_msg
_ibmvmc_recv_msg:                       ## @ibmvmc_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r15d
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	(%rdi), %r14d
	movq	(%rsi), %rdi
	callq	_be64_to_cpu
	movl	%eax, %r15d
	movq	8(%rbx), %rdi
	callq	_be64_to_cpu
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%rbx), %r14
	movq	8(%rbx), %r15
	movl	20(%rbx), %edi
	callq	_be16_to_cpu
	movq	%rax, %r12
	movl	16(%rbx), %edi
	callq	_be32_to_cpu
	movq	_ibmvmc@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r15
	jbe	LBB0_3
## %bb.2:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_VMC_MSG_INVALID_HMC_INDEX@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	cmpq	8(%rcx), %r12
	jae	LBB0_6
## %bb.4:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_hmcs@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	(%r15,%r15,2), %r14
	shlq	$4, %r14
	leaq	(%rbx,%r14), %rdi
	addq	$32, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	(%rbx,%r14), %rdx
	movq	_ibmhmc_state_free@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_8
## %bb.5:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_6:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_VMC_MSG_INVALID_BUFFER_ID@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r12, %r8
	callq	_ibmvmc_send_add_buffer_resp
	jmp	LBB0_14
LBB0_8:
	movq	40(%rbx,%r14), %rax
	leaq	(%r12,%r12,4), %rsi
	movq	(%rax,%rsi,8), %rdx
	movq	8(%rax,%rsi,8), %rcx
	testq	%rdx, %rdx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.9:
	movq	_VMC_BUF_OWNER_ALPHA@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rcx
	je	LBB0_12
## %bb.10:
	leaq	(%rax,%rsi,8), %rcx
	addq	$8, %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %ecx
	movq	%rsi, %r14
	movl	8(%r13), %esi
	movl	32(%rax,%r14,8), %r8d
	movl	36(%rax,%r14,8), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	callq	_h_copy_rdma
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edi
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rbx,%rax), %r8d
	leaq	L_.str.5(%rip), %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, 16(%rax,%r14,8)
	movq	$0, 24(%rax,%r14,8)
	movq	_VMC_BUF_OWNER_ALPHA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	je	LBB0_16
## %bb.11:
	movl	(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_12:
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
LBB0_14:
	movl	$-1, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%rsi,%rdi), %rax
	addq	$8, %rax
	movq	16(%rsi,%rdi), %rcx
	movq	(%rax), %rdx
	movq	%r12, (%rcx,%rdx,8)
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	_ibmvmc_max_buf_pool_size@GOTPCREL(%rip), %rdx
	xorl	%r15d, %r15d
	cmpq	(%rdx), %rcx
	movl	$0, %edx
	cmovneq	%rcx, %rdx
	movq	%rdx, (%rax)
	cmpq	24(%rsi,%rdi), %rdx
	jne	LBB0_18
## %bb.17:
	movl	(%r13), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_18:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	_ibmvmc_read_wait@GOTPCREL(%rip), %rdi
	callq	_wake_up_interruptible
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Recv_msg: msg from HV 0x%016llx 0x%016llx\n"

	.comm	_ibmvmc,16,3                    ## @ibmvmc
L_.str.1:                               ## @.str.1
	.asciz	"Recv_msg: invalid hmc_index = 0x%x\n"

	.comm	_VMC_MSG_INVALID_HMC_INDEX,4,2  ## @VMC_MSG_INVALID_HMC_INDEX
L_.str.2:                               ## @.str.2
	.asciz	"Recv_msg: invalid buffer_id = 0x%x\n"

	.comm	_VMC_MSG_INVALID_BUFFER_ID,4,2  ## @VMC_MSG_INVALID_BUFFER_ID
	.comm	_hmcs,8,3                       ## @hmcs
	.comm	_ibmhmc_state_free,8,3          ## @ibmhmc_state_free
L_.str.3:                               ## @.str.3
	.asciz	"Recv_msg: invalid hmc state = 0x%x\n"

	.comm	_VMC_BUF_OWNER_ALPHA,8,3        ## @VMC_BUF_OWNER_ALPHA
L_.str.4:                               ## @.str.4
	.asciz	"Recv_msg: not valid, or not HV.  0x%x 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"Recv_msg: msg_len = 0x%x, buffer_id = 0x%x, queue_head = 0x%x, hmc_idx = 0x%x\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failure in recv_msg: h_copy_rdma = 0x%x\n"

	.comm	_ibmvmc_max_buf_pool_size,8,3   ## @ibmvmc_max_buf_pool_size
L_.str.7:                               ## @.str.7
	.asciz	"outbound buffer queue wrapped.\n"

	.comm	_ibmvmc_read_wait,4,2           ## @ibmvmc_read_wait
	.no_dead_strip	_ibmvmc_recv_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvmc_recv_msg
_ibmvmc_recv_msg:                       ; @ibmvmc_recv_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x1, LBB0_13
; %bb.1:
	mov	x23, x1
	mov	x19, x0
	ldr	w20, [x0]
	ldr	x0, [x1]
	bl	_be64_to_cpu
	mov	x21, x0
	ldr	x0, [x23, #8]
	bl	_be64_to_cpu
	mov	x3, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldp	x20, x21, [x23]
	ldr	w0, [x23, #20]
	bl	_be16_to_cpu
	mov	x22, x0
	ldr	w0, [x23, #16]
	bl	_be32_to_cpu
Lloh2:
	adrp	x8, _ibmvmc@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ibmvmc@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	x21, x9
	b.ls	LBB0_3
; %bb.2:
	ldr	w0, [x19]
	str	x21, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _VMC_MSG_INVALID_HMC_INDEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VMC_MSG_INVALID_HMC_INDEX@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	x8, [x8, #8]
	cmp	x22, x8
	b.hs	LBB0_6
; %bb.4:
	mov	x23, x0
Lloh8:
	adrp	x8, _hmcs@GOTPAGE
Lloh9:
	ldr	x8, [x8, _hmcs@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x8]
	mov	w8, #48
	madd	x24, x21, x8, x25
	add	x20, x24, #32
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x24]
Lloh11:
	adrp	x9, _ibmhmc_state_free@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ibmhmc_state_free@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	ldr	w0, [x19]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_6:
	ldr	w0, [x19]
	str	x22, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _VMC_MSG_INVALID_BUFFER_ID@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VMC_MSG_INVALID_BUFFER_ID@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	bl	_ibmvmc_send_add_buffer_resp
	b	LBB0_13
LBB0_8:
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x8, [x8, #40]
	mov	w9, #40
	mul	x9, x22, x9
	add	x26, x8, x9
	ldr	x9, [x8, x9]
	ldr	x10, [x26, #8]!
Lloh20:
	adrp	x11, _VMC_BUF_OWNER_ALPHA@GOTPAGE
Lloh21:
	ldr	x11, [x11, _VMC_BUF_OWNER_ALPHA@GOTPAGEOFF]
Lloh22:
	ldr	x11, [x11]
	cmp	x9, #0
	ccmp	x10, x11, #4, ne
	b.ne	LBB0_10
; %bb.9:
	ldr	w0, [x19]
	stp	x9, x10, [sp]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	w9, #40
	madd	x27, x22, x9, x8
	ldp	w3, w1, [x19, #4]
	ldp	w4, w2, [x27, #32]
	mov	x0, x23
	bl	_h_copy_rdma
	mov	x24, x0
	ldr	w0, [x19]
	mov	w8, #48
	madd	x28, x21, x8, x25
	ldr	x8, [x28, #8]!
	stp	x8, x21, [sp]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	bl	_dev_dbg
	stp	x23, xzr, [x27, #16]
Lloh27:
	adrp	x8, _VMC_BUF_OWNER_ALPHA@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VMC_BUF_OWNER_ALPHA@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x8, [x26]
	cbz	w24, LBB0_15
; %bb.11:
	ldr	w0, [x19]
	str	x24, [sp]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_12:
	bl	_dev_err
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_13:
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x9, [x8, #16]
	ldr	x10, [x28]
	str	x22, [x9, x10, lsl #3]
	ldr	x9, [x28]
	add	x10, x9, #1
	str	x10, [x28]
Lloh32:
	adrp	x11, _ibmvmc_max_buf_pool_size@GOTPAGE
Lloh33:
	ldr	x11, [x11, _ibmvmc_max_buf_pool_size@GOTPAGEOFF]
Lloh34:
	ldr	x11, [x11]
	cmp	x10, x11
	csinc	x9, xzr, x9, eq
	str	x9, [x28]
	ldr	x8, [x8, #24]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	ldr	w0, [x19]
Lloh35:
	adrp	x1, l_.str.7@PAGE
Lloh36:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
LBB0_17:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh37:
	adrp	x0, _ibmvmc_read_wait@GOTPAGE
Lloh38:
	ldr	x0, [x0, _ibmvmc_read_wait@GOTPAGEOFF]
	bl	_wake_up_interruptible
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Recv_msg: msg from HV 0x%016llx 0x%016llx\n"

	.comm	_ibmvmc,16,3                    ; @ibmvmc
l_.str.1:                               ; @.str.1
	.asciz	"Recv_msg: invalid hmc_index = 0x%x\n"

	.comm	_VMC_MSG_INVALID_HMC_INDEX,4,2  ; @VMC_MSG_INVALID_HMC_INDEX
l_.str.2:                               ; @.str.2
	.asciz	"Recv_msg: invalid buffer_id = 0x%x\n"

	.comm	_VMC_MSG_INVALID_BUFFER_ID,4,2  ; @VMC_MSG_INVALID_BUFFER_ID
	.comm	_hmcs,8,3                       ; @hmcs
	.comm	_ibmhmc_state_free,8,3          ; @ibmhmc_state_free
l_.str.3:                               ; @.str.3
	.asciz	"Recv_msg: invalid hmc state = 0x%x\n"

	.comm	_VMC_BUF_OWNER_ALPHA,8,3        ; @VMC_BUF_OWNER_ALPHA
l_.str.4:                               ; @.str.4
	.asciz	"Recv_msg: not valid, or not HV.  0x%x 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"Recv_msg: msg_len = 0x%x, buffer_id = 0x%x, queue_head = 0x%x, hmc_idx = 0x%x\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failure in recv_msg: h_copy_rdma = 0x%x\n"

	.comm	_ibmvmc_max_buf_pool_size,8,3   ; @ibmvmc_max_buf_pool_size
l_.str.7:                               ; @.str.7
	.asciz	"outbound buffer queue wrapped.\n"

	.comm	_ibmvmc_read_wait,4,2           ; @ibmvmc_read_wait
	.no_dead_strip	_ibmvmc_recv_msg
.subsections_via_symbols
