	.file	"extr_pci_emul.c_pci_emul_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s-pci-%d"
	.text
	.p2align 4
	.type	pci_emul_init, @function
pci_emul_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movsx	r14, esi
	mov	esi, 80
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movsx	r13, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	edi, 1
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	calloc@PLT
	xor	esi, esi
	mov	rbp, rax
	mov	QWORD PTR 72[rax], r14
	movsx	rax, r15d
	mov	QWORD PTR 56[rbp], r13
	lea	rdi, 48[rbp]
	mov	QWORD PTR 64[rbp], rax
	call	pthread_mutex_init@PLT
	mov	eax, DWORD PTR IDLE[rip]
	mov	rcx, QWORD PTR [rbx]
	mov	QWORD PTR 40[rbp], 0
	mov	esi, DWORD PTR PI_NAMESZ[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbp], rbx
	mov	r8d, r15d
	mov	DWORD PTR 32[rbp], eax
	lea	rdx, .LC0[rip]
	mov	QWORD PTR 24[rbp], 0
	mov	QWORD PTR 16[rbp], 0
	call	snprintf@PLT
	mov	esi, DWORD PTR PCIR_INTLINE[rip]
	mov	edx, 255
	mov	rdi, rbp
	call	pci_set_cfgdata8@PLT
	mov	esi, DWORD PTR PCIR_INTPIN[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	pci_set_cfgdata8@PLT
	mov	esi, DWORD PTR PCIR_COMMAND[rip]
	mov	edx, DWORD PTR PCIM_CMD_PORTEN[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR PCIM_CMD_MEMEN[rip]
	or	edx, DWORD PTR PCIM_CMD_BUSMASTEREN[rip]
	call	pci_set_cfgdata8@PLT
	mov	esi, DWORD PTR 8[r12]
	mov	rdi, rbp
	call	[QWORD PTR 8[rbx]]
	mov	r13d, eax
	test	eax, eax
	jne	.L2
	mov	QWORD PTR [r12], rbp
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	free@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	pci_emul_init, .-pci_emul_init
	.comm	PI_NAMESZ,4,4
	.comm	PCIR_INTPIN,4,4
	.comm	PCIR_INTLINE,4,4
	.comm	PCIR_COMMAND,4,4
	.comm	PCIM_CMD_PORTEN,4,4
	.comm	PCIM_CMD_MEMEN,4,4
	.comm	PCIM_CMD_BUSMASTEREN,4,4
	.comm	IDLE,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_pci_emul.c_pci_emul_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s-pci-%d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci_emul_init, %function
pci_emul_init:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	sub	sp, sp, #8
	mov	r10, r1
	mov	r0, #1
	mov	r1, #40
	mov	r7, r2
	mov	r9, r3
	ldr	r8, [sp, #40]
	bl	calloc
	mov	r6, #0
	mov	r4, r0
	mov	r1, r6
	add	r0, r0, #24
	str	r10, [r4, #36]
	str	r7, [r4, #32]
	str	r9, [r4, #28]
	bl	pthread_mutex_init
	ldr	r3, .L7
	ldr	r2, .L7+4
	ldr	ip, [r3]
	str	r7, [sp]
	ldr	r3, [r5]
	ldr	r1, [r2]
	ldr	r0, [r4]
	ldr	r2, .L7+8
	str	ip, [r4, #16]
	str	r5, [r4, #4]
	str	r6, [r4, #20]
	str	r6, [r4, #12]
	str	r6, [r4, #8]
	bl	snprintf
	ldr	r3, .L7+12
	mov	r2, #255
	ldr	r1, [r3]
	mov	r0, r4
	bl	pci_set_cfgdata8
	ldr	r3, .L7+16
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	bl	pci_set_cfgdata8
	ldr	r1, .L7+20
	ldr	r3, .L7+24
	ldr	r2, .L7+28
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L7+32
	orr	r3, r3, r0
	orr	r2, r3, r2
	ldr	r1, [r1]
	mov	r0, r4
	bl	pci_set_cfgdata8
	ldr	r3, [r5, #4]
	mov	r0, r4
	ldr	r1, [r8, #4]
	blx	r3
	subs	r5, r0, #0
	streq	r4, [r8]
	bne	.L6
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	mov	r0, r4
	bl	free
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	.align	2
.L7:
	.word	IDLE
	.word	PI_NAMESZ
	.word	.LC0
	.word	PCIR_INTLINE
	.word	PCIR_INTPIN
	.word	PCIM_CMD_MEMEN
	.word	PCIM_CMD_PORTEN
	.word	PCIM_CMD_BUSMASTEREN
	.word	PCIR_COMMAND
	.size	pci_emul_init, .-pci_emul_init
	.comm	PI_NAMESZ,4,4
	.comm	PCIR_INTPIN,4,4
	.comm	PCIR_INTLINE,4,4
	.comm	PCIR_COMMAND,4,4
	.comm	PCIM_CMD_PORTEN,4,4
	.comm	PCIM_CMD_MEMEN,4,4
	.comm	PCIM_CMD_BUSMASTEREN,4,4
	.comm	IDLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
