	.file	"extr_ofw_machdep.c_parse_numa_ofw_memory.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/"
.LC1:
	.string	"#address-cells"
.LC2:
	.string	"#size-cells"
.LC3:
	.string	"Physical memory map not found"
	.text
	.p2align 4
	.type	parse_numa_ofw_memory, @function
parse_numa_ofw_memory:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15d, edi
	push	r14
	.cfi_offset 14, -32
	mov	r14, rsi
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR PHYS_AVAIL_SZ[rip]
	mov	rsi, rsp
	lea	r13d, 0[0+rax*4]
	movsx	rax, r13d
	sal	rax, 2
	mov	rdx, rax
	and	rdx, -4096
	sub	rsi, rdx
	mov	rdx, rsi
	cmp	rsp, rdx
	je	.L3
.L22:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L22
.L3:
	and	eax, 4095
	sub	rsp, rax
	test	rax, rax
	jne	.L23
.L4:
	lea	rdi, .LC0[rip]
	mov	r12, rsp
	call	OF_finddevice@PLT
	lea	rdx, -64[rbp]
	mov	ecx, 4
	lea	rsi, .LC1[rip]
	mov	edi, eax
	mov	DWORD PTR -68[rbp], eax
	call	OF_getencprop@PLT
	mov	edi, DWORD PTR -68[rbp]
	cmp	eax, 3
	jle	.L24
.L5:
	lea	rdx, -60[rbp]
	mov	ecx, 4
	lea	rsi, .LC2[rip]
	call	OF_getencprop@PLT
	cmp	eax, 3
	jg	.L6
	mov	DWORD PTR -60[rbp], 1
.L6:
	cmp	r15d, -1
	je	.L25
	lea	ecx, 0[0+r13*4]
	mov	rdx, r12
	mov	rsi, r14
	mov	edi, r15d
	call	OF_getencprop@PLT
	movsx	r13, eax
	shr	r13, 2
	test	eax, eax
	jg	.L10
	lea	rdi, .LC3[rip]
	call	panic@PLT
.L10:
	test	r13, r13
	je	.L15
	mov	r10d, DWORD PTR -64[rbp]
	mov	r9d, DWORD PTR -60[rbp]
	mov	eax, 1
	xor	edx, edx
	xor	ecx, ecx
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rcx, [r12+rcx*4]
	lea	esi, 1[rdx]
	mov	edi, DWORD PTR [rcx]
	mov	DWORD PTR -8[rbx+rax*8], edi
	mov	edi, DWORD PTR 4[rcx]
	cmp	r10d, 2
	jne	.L11
	mov	DWORD PTR -8[rbx+rax*8], edi
	mov	edi, DWORD PTR 8[rcx]
	lea	esi, 2[rdx]
.L11:
	mov	DWORD PTR -4[rbx+rax*8], edi
	lea	edx, 1[rsi]
	cmp	r9d, 2
	jne	.L12
	movsx	rdx, edx
	mov	edx, DWORD PTR [r12+rdx*4]
	mov	DWORD PTR -4[rbx+rax*8], edx
	lea	edx, 2[rsi]
.L12:
	movsx	rcx, edx
	mov	r8d, eax
	add	rax, 1
	cmp	rcx, r13
	jb	.L13
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	lea	rsp, -40[rbp]
	mov	eax, r8d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	DWORD PTR -64[rbp], 1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rdi, .LC3[rip]
	call	panic@PLT
	xor	r8d, r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	or	QWORD PTR -8[rsp+rax], 0
	jmp	.L4
.L15:
	xor	r8d, r8d
	jmp	.L1
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	parse_numa_ofw_memory, .-parse_numa_ofw_memory
	.comm	PHYS_AVAIL_SZ,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_ofw_machdep.c_parse_numa_ofw_memory.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/\000"
	.align	2
.LC1:
	.ascii	"#address-cells\000"
	.align	2
.LC2:
	.ascii	"#size-cells\000"
	.align	2
.LC3:
	.ascii	"Physical memory map not found\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_numa_ofw_memory, %function
parse_numa_ofw_memory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	mov	ip, sp
	ldr	r3, .L19
	mov	r5, r2
	ldr	r3, [r3]
	ldr	r2, .L19+4
	sub	ip, ip, r3, lsl #4
	mov	sp, ip
	mov	r6, r0
	ldr	r0, .L19+8
	mov	r9, r1
	ldr	r2, [r2]
	str	r2, [fp, #-32]
	mov	r2,#0
	lsl	r8, r3, #4
	bl	OF_finddevice
	mov	r3, #4
	ldr	r1, .L19+12
	sub	r2, fp, #40
	mov	r7, r0
	bl	OF_getencprop
	cmp	r0, #3
	movle	r3, #1
	mov	r0, r7
	strle	r3, [fp, #-40]
	ldr	r1, .L19+16
	mov	r3, #4
	sub	r2, fp, #36
	bl	OF_getencprop
	cmp	r0, #3
	movle	r3, #1
	strle	r3, [fp, #-36]
	cmn	r6, #1
	mov	r4, sp
	beq	.L16
	mov	r0, r6
	mov	r3, r8
	mov	r1, r9
	mov	r2, r4
	bl	OF_getencprop
	subs	r6, r0, #0
	lsrgt	r6, r6, #2
	ble	.L17
.L7:
	cmp	r6, #0
	beq	.L12
	mov	r0, #0
	mov	r3, r0
	ldr	r9, [fp, #-40]
	ldr	r8, [fp, #-36]
	add	r7, r5, #4
.L10:
	add	lr, r4, r3, lsl #2
	ldr	r2, [r4, r3, lsl #2]
	cmp	r9, #2
	ldr	ip, [lr, #4]
	add	r1, r3, #1
	addeq	r1, r3, #2
	str	r2, [r5, r0, lsl #3]
	add	r3, r1, #1
	streq	ip, [r5, r0, lsl #3]
	ldreq	ip, [lr, #8]
	cmp	r8, #2
	ldreq	r2, [r4, r3, lsl #2]
	addeq	r3, r1, #2
	str	ip, [r7, r0, lsl #3]
	streq	r2, [r7, r0, lsl #3]
	cmp	r3, r6
	add	r0, r0, #1
	bcc	.L10
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L17:
	ldr	r0, .L19+20
	lsr	r6, r6, #2
	bl	panic
	b	.L7
.L16:
	ldr	r0, .L19+20
	bl	panic
	mov	r0, #0
	b	.L1
.L12:
	mov	r0, r6
	b	.L1
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	PHYS_AVAIL_SZ
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	parse_numa_ofw_memory, .-parse_numa_ofw_memory
	.comm	PHYS_AVAIL_SZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
