	.file	"extr_vmm_api.c_xh_vm_setup_memory.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	xh_vm_setup_memory
	.type	xh_vm_setup_memory, @function
xh_vm_setup_memory:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR XHYVE_PROT_READ[rip]
	or	eax, DWORD PTR XHYVE_PROT_WRITE[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	or	eax, DWORD PTR XHYVE_PROT_EXECUTE[rip]
	cmp	DWORD PTR VM_MMAP_NONE[rip], esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r12d, eax
	mov	rbx, rdi
	mov	edi, 1
	je	.L2
	xor	edi, edi
	cmp	DWORD PTR VM_MMAP_ALL[rip], esi
	sete	dil
.L2:
	call	assert@PLT
	mov	rax, QWORD PTR lowmem_limit[rip]
	mov	r8, rbx
	mov	DWORD PTR mmap_style[rip], ebp
	cmp	rax, rbx
	cmovbe	r8, rax
	mov	QWORD PTR lowmem[rip], r8
	jb	.L3
	mov	QWORD PTR highmem[rip], 0
	test	r8, r8
	je	.L11
.L4:
	cmp	DWORD PTR VM_MMAP_ALL[rip], ebp
	lea	rcx, lowmem_addr[rip]
	mov	edx, r12d
	mov	rsi, r8
	mov	eax, 0
	cmovne	rcx, rax
	xor	edi, edi
	call	setup_memory_segment@PLT
	test	eax, eax
	jne	.L1
	mov	rsi, QWORD PTR highmem[rip]
.L6:
	test	rsi, rsi
	je	.L11
	cmp	DWORD PTR VM_MMAP_ALL[rip], ebp
	mov	eax, 0
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edx, r12d
	lea	rcx, highmem_addr[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	movabs	rdi, 4294967296
	cmovne	rcx, rax
	jmp	setup_memory_segment@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	sub	rbx, r8
	mov	QWORD PTR highmem[rip], rbx
	mov	rsi, rbx
	test	r8, r8
	je	.L6
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	xh_vm_setup_memory, .-xh_vm_setup_memory
	.comm	mmap_style,4,4
	.comm	lowmem_limit,8,8
	.comm	lowmem_addr,8,8
	.comm	lowmem,8,8
	.comm	highmem_addr,8,8
	.comm	highmem,8,8
	.comm	XHYVE_PROT_WRITE,4,4
	.comm	XHYVE_PROT_READ,4,4
	.comm	XHYVE_PROT_EXECUTE,4,4
	.comm	VM_MMAP_NONE,4,4
	.comm	VM_MMAP_ALL,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_vmm_api.c_xh_vm_setup_memory.c"
	.text
	.align	2
	.global	xh_vm_setup_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	xh_vm_setup_memory, %function
xh_vm_setup_memory:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r1
	ldr	r3, .L18
	ldr	r1, .L18+4
	ldr	r2, .L18+8
	ldr	ip, .L18+12
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r6, [ip]
	cmp	r1, r5
	orr	r3, r3, r2
	orr	r6, r3, r6
	ldrne	r3, .L18+16
	mov	r4, r0
	ldrne	r0, [r3]
	moveq	r0, #1
	subne	r0, r0, r5
	clzne	r0, r0
	sub	sp, sp, #12
	lsrne	r0, r0, #5
	bl	assert
	ldr	r3, .L18+20
	ldr	r1, .L18+24
	ldr	r3, [r3]
	cmp	r3, r4
	movcc	r2, r3
	movcs	r2, r4
	ldr	r3, .L18+28
	str	r2, [r1]
	str	r5, [r3]
	bcc	.L3
	mov	r3, #0
	ldr	r7, .L18+32
	cmp	r2, r3
	moveq	r0, r2
	str	r3, [r7]
	bne	.L4
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	ldr	r7, .L18+32
	sub	r0, r4, r2
	cmp	r2, #0
	str	r0, [r7]
	beq	.L6
.L4:
	ldr	r3, .L18+16
	ldr	r1, .L18+36
	ldr	r3, [r3]
	mov	r0, #0
	cmp	r3, r5
	movne	r1, #0
	mov	r3, r6
	str	r1, [sp]
	mov	r1, #0
	bl	setup_memory_segment
	cmp	r0, #0
	bne	.L1
	ldr	r0, [r7]
.L6:
	cmp	r0, #0
	beq	.L1
	ldr	r3, .L18+16
	ldr	r1, .L18+40
	ldr	r2, [r3]
	mov	r3, r6
	cmp	r2, r5
	moveq	r5, r1
	movne	r5, #0
	mov	r2, r0
	mov	r1, #1
	str	r5, [sp]
	mov	r0, #0
	bl	setup_memory_segment
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L19:
	.align	2
.L18:
	.word	XHYVE_PROT_READ
	.word	VM_MMAP_NONE
	.word	XHYVE_PROT_WRITE
	.word	XHYVE_PROT_EXECUTE
	.word	VM_MMAP_ALL
	.word	lowmem_limit
	.word	lowmem
	.word	mmap_style
	.word	highmem
	.word	lowmem_addr
	.word	highmem_addr
	.size	xh_vm_setup_memory, .-xh_vm_setup_memory
	.comm	mmap_style,4,4
	.comm	lowmem_limit,4,4
	.comm	lowmem_addr,4,4
	.comm	lowmem,4,4
	.comm	highmem_addr,4,4
	.comm	highmem,4,4
	.comm	XHYVE_PROT_WRITE,4,4
	.comm	XHYVE_PROT_READ,4,4
	.comm	XHYVE_PROT_EXECUTE,4,4
	.comm	VM_MMAP_NONE,4,4
	.comm	VM_MMAP_ALL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
