	.file	"extr_vmwgfx_msg.c_vmw_recv_msg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to get reply size for host message.\n"
	.align 8
.LC1:
	.string	"Cannot allocate memory for host message reply.\n"
	.text
	.p2align 4
	.type	vmw_recv_msg, @function
vmw_recv_msg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR RETRIES[rip]
	mov	QWORD PTR [rdx], 0
	mov	QWORD PTR [rsp], rsi
	mov	QWORD PTR 8[rsp], rdx
	mov	QWORD PTR [rsi], 0
	test	eax, eax
	jle	.L2
	mov	rbx, rdi
	xor	r15d, r15d
.L9:
	mov	rdx, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 8[rbx]
	xor	r14d, r14d
	xor	esi, esi
	mov	r8d, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR VMW_PORT_CMD_RECVSIZE[rip]
	push	rcx
	.cfi_def_cfa_offset 88
	mov	r9d, DWORD PTR VMW_HYPERVISOR_MAGIC[rip]
	push	rdx
	.cfi_def_cfa_offset 96
	sal	r8d, 16
	push	0
	.cfi_def_cfa_offset 104
	push	r14
	.cfi_def_cfa_offset 112
	push	r12
	.cfi_def_cfa_offset 120
	push	0
	.cfi_def_cfa_offset 128
	call	VMW_PORT@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rdi, r14
	call	HIGH_WORD@PLT
	test	DWORD PTR MESSAGE_STATUS_SUCCESS[rip], eax
	je	.L16
	xor	r14d, r14d
	mov	rdi, r14
	call	HIGH_WORD@PLT
	and	eax, DWORD PTR MESSAGE_STATUS_DORECV[rip]
	je	.L1
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	lea	rdi, 1[r12]
	call	kzalloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L17
	xor	r14d, r14d
	mov	rdi, r14
	call	HIGH_WORD@PLT
	xor	ecx, ecx
	test	DWORD PTR MESSAGE_STATUS_HB[rip], eax
	mov	rdi, rbx
	setne	cl
	mov	rdx, r12
	mov	rsi, r13
	call	vmw_port_hb_in@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	HIGH_WORD@PLT
	test	DWORD PTR MESSAGE_STATUS_SUCCESS[rip], eax
	jne	.L6
	mov	rdi, r13
	call	kfree@PLT
	mov	rdi, rbp
	call	HIGH_WORD@PLT
	test	DWORD PTR MESSAGE_STATUS_CPT[rip], eax
	jne	.L7
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	BYTE PTR 0[r13+r12], 0
	mov	rdx, QWORD PTR [rbx]
	xor	r14d, r14d
	mov	rcx, QWORD PTR 8[rbx]
	mov	r8d, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR VMW_PORT_CMD_RECVSTATUS[rip]
	mov	r9d, DWORD PTR VMW_HYPERVISOR_MAGIC[rip]
	push	rcx
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR MESSAGE_STATUS_SUCCESS[rip]
	sal	r8d, 16
	push	rdx
	.cfi_def_cfa_offset 96
	push	0
	.cfi_def_cfa_offset 104
	push	r14
	.cfi_def_cfa_offset 112
	push	rbp
	.cfi_def_cfa_offset 120
	push	0
	.cfi_def_cfa_offset 128
	call	VMW_PORT@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rdi, r14
	call	HIGH_WORD@PLT
	test	DWORD PTR MESSAGE_STATUS_SUCCESS[rip], eax
	jne	.L8
	mov	rdi, r13
	call	kfree@PLT
	mov	rdi, r14
	call	HIGH_WORD@PLT
	test	DWORD PTR MESSAGE_STATUS_CPT[rip], eax
	je	.L2
.L7:
	add	r15d, 1
	cmp	DWORD PTR RETRIES[rip], r15d
	jle	.L2
	mov	r12, rbp
	jmp	.L9
.L8:
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], r12
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR [rax], r13
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC0[rip]
	call	DRM_ERROR@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rdi, .LC1[rip]
	call	DRM_ERROR@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	vmw_recv_msg, .-vmw_recv_msg
	.comm	VMW_PORT_CMD_RECVSTATUS,4,4
	.comm	VMW_PORT_CMD_RECVSIZE,4,4
	.comm	VMW_HYPERVISOR_MAGIC,4,4
	.comm	RETRIES,4,4
	.comm	MESSAGE_STATUS_SUCCESS,4,4
	.comm	MESSAGE_STATUS_HB,4,4
	.comm	MESSAGE_STATUS_DORECV,4,4
	.comm	MESSAGE_STATUS_CPT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vmwgfx_msg.c_vmw_recv_msg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to get reply size for host message.\012\000"
	.align	2
.LC1:
	.ascii	"Cannot allocate memory for host message reply.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vmw_recv_msg, %function
vmw_recv_msg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, #0
	ldr	r3, .L21
	sub	sp, sp, #44
	ldr	r3, [r3]
	str	r2, [sp, #36]
	cmp	r3, r6
	str	r6, [r2]
	str	r1, [sp, #32]
	str	r6, [r1]
	ble	.L2
	mov	r4, r0
	ldr	fp, .L21+4
	ldr	r10, .L21+8
.L9:
	mov	lr, #0
	ldm	r4, {r2, r3}
	mov	r7, lr
	ldr	r1, [r4, #8]
	ldr	r0, .L21+12
	lsl	r1, r1, #16
	str	r1, [sp]
	ldr	r1, [fp]
	str	r3, [sp, #28]
	str	lr, [sp, #20]
	str	lr, [sp, #16]
	str	lr, [sp, #8]
	str	r2, [sp, #24]
	str	r1, [sp, #4]
	str	r9, [sp, #12]
	mov	r1, lr
	ldr	r0, [r0]
	bl	VMW_PORT
	mov	r0, r7
	bl	HIGH_WORD
	ldr	r3, [r10]
	add	r6, r6, #1
	tst	r0, r3
	beq	.L19
	mov	r0, #0
	bl	HIGH_WORD
	mov	r3, r0
	ldr	r2, .L21+16
	add	r0, r9, #1
	ldr	r2, [r2]
	ands	r3, r3, r2
	beq	.L1
	ldr	r3, .L21+20
	ldr	r1, [r3]
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L20
	mov	r0, #0
	bl	HIGH_WORD
	ldr	r3, .L21+24
	mov	r2, r9
	ldr	r3, [r3]
	mov	r1, r5
	tst	r0, r3
	movne	r3, #1
	moveq	r3, #0
	mov	r0, r4
	bl	vmw_port_hb_in
	mov	r8, r0
	bl	HIGH_WORD
	ldr	r3, [r10]
	tst	r0, r3
	bne	.L6
	mov	r0, r5
	bl	kfree
	mov	r0, r8
.L17:
	bl	HIGH_WORD
	ldr	r3, .L21+28
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L2
	ldr	r3, .L21
	ldr	r3, [r3]
	cmp	r3, r6
	movgt	r9, r8
	bgt	.L9
.L2:
	ldr	r3, .L21+32
	ldr	r3, [r3]
	rsb	r3, r3, #0
.L1:
	mov	r0, r3
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	lr, #0
	mov	r3, #0
	mov	r7, lr
	strb	r3, [r5, r9]
	ldr	r1, [r4, #8]
	ldr	r0, [fp]
	ldm	r4, {r2, r3}
	lsl	r1, r1, #16
	str	r0, [sp, #4]
	ldr	r0, .L21+36
	str	r3, [sp, #28]
	str	r1, [sp]
	str	r2, [sp, #24]
	str	r8, [sp, #12]
	ldr	r0, [r0]
	ldr	r1, [r10]
	str	lr, [sp, #20]
	str	lr, [sp, #16]
	str	lr, [sp, #8]
	bl	VMW_PORT
	mov	r0, r7
	bl	HIGH_WORD
	ldr	r3, [r10]
	tst	r0, r3
	bne	.L8
	mov	r0, r5
	bl	kfree
	mov	r0, r7
	b	.L17
.L8:
	ldr	r2, [sp, #36]
	mov	r3, #0
	str	r9, [r2]
	ldr	r2, [sp, #32]
	str	r5, [r2]
	b	.L1
.L19:
	ldr	r0, .L21+40
	bl	DRM_ERROR
	ldr	r3, .L21+32
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L20:
	ldr	r0, .L21+44
	bl	DRM_ERROR
	ldr	r3, .L21+48
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L22:
	.align	2
.L21:
	.word	RETRIES
	.word	VMW_HYPERVISOR_MAGIC
	.word	MESSAGE_STATUS_SUCCESS
	.word	VMW_PORT_CMD_RECVSIZE
	.word	MESSAGE_STATUS_DORECV
	.word	GFP_KERNEL
	.word	MESSAGE_STATUS_HB
	.word	MESSAGE_STATUS_CPT
	.word	EINVAL
	.word	VMW_PORT_CMD_RECVSTATUS
	.word	.LC0
	.word	.LC1
	.word	ENOMEM
	.size	vmw_recv_msg, .-vmw_recv_msg
	.comm	VMW_PORT_CMD_RECVSTATUS,4,4
	.comm	VMW_PORT_CMD_RECVSIZE,4,4
	.comm	VMW_HYPERVISOR_MAGIC,4,4
	.comm	RETRIES,4,4
	.comm	MESSAGE_STATUS_SUCCESS,4,4
	.comm	MESSAGE_STATUS_HB,4,4
	.comm	MESSAGE_STATUS_DORECV,4,4
	.comm	MESSAGE_STATUS_CPT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
