	.file	"extr_pci-bridge-emul.c_pci_bridge_emul_conf_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pci_bridge_emul_conf_write
	.type	pci_bridge_emul_conf_write, @function
pci_bridge_emul_conf_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	and	r13d, -4
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, ecx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 40[rdi], 0
	jne	.L20
	cmp	DWORD PTR PCI_BRIDGE_CONF_END[rip], r13d
	jle	.L11
	and	esi, 3
	lea	ebp, 0[0+rsi*8]
	cmp	edx, 4
	je	.L13
.L23:
	cmp	edx, 2
	je	.L21
	mov	eax, DWORD PTR PCIBIOS_BAD_REGISTER_NUMBER[rip]
	cmp	edx, 1
	jne	.L1
	mov	r14d, 255
	mov	ecx, ebp
	sal	r14d, cl
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L21:
	mov	r14d, 65535
	mov	ecx, ebp
	sal	r14d, cl
.L6:
	lea	rcx, 4[rsp]
	mov	edx, 4
	mov	esi, r13d
	mov	rdi, r12
	call	pci_bridge_emul_conf_read@PLT
	cmp	DWORD PTR PCIBIOS_SUCCESSFUL[rip], eax
	jne	.L1
	cmp	QWORD PTR 40[r12], 0
	mov	rax, QWORD PTR 16[r12]
	je	.L9
	mov	edx, DWORD PTR PCI_CAP_PCIE_START[rip]
	cmp	edx, r13d
	jg	.L9
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR 24[r12]
	sub	r13d, edx
	lea	rsi, 32[r12]
.L10:
	test	r13d, r13d
	lea	edx, 3[r13]
	mov	r9d, DWORD PTR 4[rsp]
	cmovns	edx, r13d
	sar	edx, 2
	movsx	rdx, edx
	lea	r8, [rcx+rdx*8]
	mov	ecx, ebp
	sal	ebx, cl
	mov	ecx, r9d
	xor	ecx, ebx
	and	ebx, r14d
	and	ecx, r14d
	and	ecx, DWORD PTR [r8]
	mov	edi, ecx
	mov	ecx, DWORD PTR 4[r8]
	xor	edi, r9d
	and	ecx, ebx
	not	ecx
	and	ecx, edi
	mov	DWORD PTR [rsi+rdx*4], ecx
	test	rax, rax
	je	.L11
	mov	r8d, r14d
	mov	edx, r9d
	mov	esi, r13d
	mov	rdi, r12
	call	rax
.L11:
	mov	eax, DWORD PTR PCIBIOS_SUCCESSFUL[rip]
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	cmp	DWORD PTR PCI_CAP_PCIE_END[rip], r13d
	jle	.L11
	and	esi, 3
	lea	ebp, 0[0+rsi*8]
	cmp	edx, 4
	jne	.L23
.L13:
	mov	r14d, -1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR 8[rax]
	mov	rcx, QWORD PTR [r12]
	lea	rsi, 8[r12]
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pci_bridge_emul_conf_write, .-pci_bridge_emul_conf_write
	.comm	PCI_CAP_PCIE_START,4,4
	.comm	PCI_CAP_PCIE_END,4,4
	.comm	PCI_BRIDGE_CONF_END,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_BAD_REGISTER_NUMBER,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-bridge-emul.c_pci_bridge_emul_conf_write.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pci_bridge_emul_conf_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci_bridge_emul_conf_write, %function
pci_bridge_emul_conf_write:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r1
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, [r0, #20]
	mov	r6, r3
	ldr	r3, .L25
	sub	sp, sp, #16
	cmp	r1, #0
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bic	r7, ip, #3
	bne	.L22
	ldr	r3, .L25+4
	ldr	r3, [r3]
	cmp	r3, r7
	ble	.L5
.L3:
	and	ip, ip, #3
	cmp	r2, #4
	lsl	r4, ip, #3
	beq	.L13
	cmp	r2, #2
	beq	.L23
	cmp	r2, #1
	bne	.L8
	mov	r8, #255
	lsl	r8, r8, r4
	b	.L6
.L22:
	ldr	r3, .L25+8
	ldr	r3, [r3]
	cmp	r3, r7
	bgt	.L3
.L5:
	ldr	r3, .L25+12
	ldr	r0, [r3]
.L1:
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	ldr	r8, .L25+16
	lsl	r8, r8, r4
.L6:
	add	r3, sp, #8
	mov	r2, #4
	mov	r1, r7
	mov	r0, r5
	bl	pci_bridge_emul_conf_read
	ldr	r9, .L25+12
	ldr	r3, [r9]
	cmp	r3, r0
	bne	.L1
	ldr	r2, [r5, #20]
	ldr	r3, [r5, #8]
	cmp	r2, #0
	beq	.L9
	ldr	r2, .L25+20
	ldr	r2, [r2]
	cmp	r2, r7
	bgt	.L9
	ldr	r10, [r3]
	ldr	r3, [r5, #12]
	sub	r7, r7, r2
	add	r1, r5, #16
.L10:
	cmp	r7, #0
	add	r0, r7, #3
	movge	r0, r7
	ldr	r2, [sp, #8]
	lsl	ip, r6, r4
	asr	r0, r0, #2
	ldr	lr, [r3, r0, lsl #3]
	add	r4, r3, r0, lsl #3
	eor	r3, r2, ip
	ldr	r4, [r4, #4]
	and	r3, r3, r8
	and	ip, ip, r8
	and	r3, r3, lr
	and	ip, ip, r4
	eor	r3, r3, r2
	bic	r3, r3, ip
	cmp	r10, #0
	str	r3, [r1, r0, lsl #2]
	beq	.L11
	mov	r1, r7
	mov	r0, r5
	str	r8, [sp]
	blx	r10
.L11:
	ldr	r0, [r9]
	b	.L1
.L8:
	ldr	r3, .L25+24
	ldr	r0, [r3]
	b	.L1
.L9:
	mov	r1, r5
	ldr	r10, [r3, #4]
	ldr	r3, [r1], #4
	b	.L10
.L13:
	mvn	r8, #0
	b	.L6
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC0
	.word	PCI_BRIDGE_CONF_END
	.word	PCI_CAP_PCIE_END
	.word	PCIBIOS_SUCCESSFUL
	.word	65535
	.word	PCI_CAP_PCIE_START
	.word	PCIBIOS_BAD_REGISTER_NUMBER
	.size	pci_bridge_emul_conf_write, .-pci_bridge_emul_conf_write
	.comm	PCI_CAP_PCIE_START,4,4
	.comm	PCI_CAP_PCIE_END,4,4
	.comm	PCI_BRIDGE_CONF_END,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_BAD_REGISTER_NUMBER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
