	.file	"extr_ofwpci.c_ofw_pci_translate_resource.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ofw_pci_translate_resource, @function
ofw_pci_translate_resource:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rcx
	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	rbx, rdx
	call	device_get_softc@PLT
	movsx	rdx, DWORD PTR [rax]
	mov	rdi, QWORD PTR 8[rax]
	sal	rdx, 5
	add	rdx, rdi
	cmp	rdi, rdx
	jnb	.L2
	mov	r11d, DWORD PTR OFW_PCI_PHYS_HI_SPACEMASK[rip]
	mov	ecx, DWORD PTR SYS_RES_MEMORY[rip]
	mov	esi, -1
	mov	r10d, DWORD PTR SYS_RES_IOPORT[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	cmp	eax, 128
	mov	eax, esi
	cmovge	eax, ecx
	cmp	eax, ebp
	je	.L12
.L4:
	add	rdi, 32
	cmp	rdi, rdx
	jnb	.L2
.L3:
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	je	.L2
	mov	r8, QWORD PTR 8[rdi]
	cmp	r8, rbx
	jg	.L4
	mov	r9, QWORD PTR 16[rdi]
	add	r9, r8
	cmp	r9, rbx
	jle	.L4
	and	eax, r11d
	cmp	eax, 129
	jle	.L13
	cmp	eax, 130
	mov	eax, esi
	cmove	eax, r10d
	cmp	eax, ebp
	jne	.L4
.L12:
	mov	rax, QWORD PTR 24[rdi]
	sub	rax, r8
	add	rbx, rax
.L2:
	mov	QWORD PTR [r12], rbx
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ofw_pci_translate_resource, .-ofw_pci_translate_resource
	.comm	SYS_RES_MEMORY,4,4
	.comm	SYS_RES_IOPORT,4,4
	.comm	OFW_PCI_PHYS_HI_SPACEMASK,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_ofwpci.c_ofw_pci_translate_resource.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ofw_pci_translate_resource, %function
ofw_pci_translate_resource:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	mov	r6, r1
	mov	r7, r3
	bl	device_get_softc
	ldm	r0, {r2, ip}
	add	r2, ip, r2, lsl #4
	cmp	ip, r2
	bcs	.L2
	ldr	r3, .L14
	ldr	r0, .L14+4
	ldr	r1, .L14+8
	ldr	r3, [r3]
	ldr	r8, [r0]
	ldr	r1, [r1]
	b	.L3
.L13:
	cmp	r4, #128
	movge	lr, r1
	mvnlt	lr, #0
	cmp	lr, r6
	beq	.L12
.L4:
	add	ip, ip, #16
	cmp	ip, r2
	bcs	.L2
.L3:
	ldr	r0, [ip]
	cmp	r0, #0
	and	r4, r3, r0
	beq	.L2
	ldr	r0, [ip, #4]
	cmp	r0, r5
	bgt	.L4
	ldr	lr, [ip, #8]
	add	lr, r0, lr
	cmp	lr, r5
	ble	.L4
	cmp	r4, #129
	ble	.L13
	cmp	r4, #130
	moveq	lr, r8
	mvnne	lr, #0
	cmp	lr, r6
	bne	.L4
.L12:
	ldr	r3, [ip, #12]
	sub	r0, r3, r0
	add	r5, r5, r0
.L2:
	mov	r0, #0
	str	r5, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	OFW_PCI_PHYS_HI_SPACEMASK
	.word	SYS_RES_IOPORT
	.word	SYS_RES_MEMORY
	.size	ofw_pci_translate_resource, .-ofw_pci_translate_resource
	.comm	SYS_RES_MEMORY,4,4
	.comm	SYS_RES_IOPORT,4,4
	.comm	OFW_PCI_PHYS_HI_SPACEMASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
