	.file	"extr_pci.c_hl_pci_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"can't enable PCI device\n"
.LC1:
	.string	"Failed to initialize iATU\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Failed to initialize PCI BARs\n"
	.text
	.p2align 4
	.globl	hl_pci_init
	.type	hl_pci_init, @function
hl_pci_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rbp, QWORD PTR 24[rdi]
	call	hl_pci_set_dma_mask@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	cmp	QWORD PTR 16[rbx], 0
	jne	.L12
	mov	rdi, rbp
	call	pci_enable_device_mem@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L13
.L4:
	mov	rdi, rbp
	call	pci_set_master@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, rbx
	call	[QWORD PTR [rax]]
	mov	r12d, eax
	test	eax, eax
	jne	.L14
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, rbx
	call	[QWORD PTR 8[rax]]
	mov	r12d, eax
	test	eax, eax
	jne	.L15
.L1:
	mov	eax, r12d
	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
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, r12d
	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
.L12:
	.cfi_restore_state
	mov	rdi, rbx
	call	hl_pci_reset_link_through_bridge@PLT
	mov	rdi, rbp
	call	pci_enable_device_mem@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L4
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
.L6:
	mov	rdi, rbp
	call	pci_clear_master@PLT
	mov	rdi, rbp
	call	pci_disable_device@PLT
	mov	eax, r12d
	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
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	hl_pci_init, .-hl_pci_init
	.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.c_hl_pci_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"can't enable PCI device\012\000"
	.align	2
.LC1:
	.ascii	"Failed to initialize iATU\012\000"
	.align	2
.LC2:
	.ascii	"Failed to initialize PCI BARs\012\000"
	.text
	.align	2
	.global	hl_pci_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	hl_pci_init, %function
hl_pci_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r6, [r0, #12]
	bl	hl_pci_set_dma_mask
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, [r5, #8]
	cmp	r3, #0
	bne	.L15
	mov	r0, r6
	bl	pci_enable_device_mem
	subs	r4, r0, #0
	bne	.L16
.L4:
	mov	r0, r6
	bl	pci_set_master
	ldr	r3, [r5, #4]
	mov	r0, r5
	ldr	r3, [r3]
	blx	r3
	subs	r4, r0, #0
	bne	.L17
	ldr	r3, [r5, #4]
	mov	r0, r5
	ldr	r3, [r3, #4]
	blx	r3
	subs	r4, r0, #0
	bne	.L18
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r0, [r5]
	ldr	r1, .L19
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L15:
	mov	r0, r5
	bl	hl_pci_reset_link_through_bridge
	mov	r0, r6
	bl	pci_enable_device_mem
	subs	r4, r0, #0
	beq	.L4
	b	.L16
.L18:
	ldr	r0, [r5]
	ldr	r1, .L19+4
	bl	dev_err
.L6:
	mov	r0, r6
	bl	pci_clear_master
	mov	r0, r6
	bl	pci_disable_device
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L17:
	ldr	r0, [r5]
	ldr	r1, .L19+8
	bl	dev_err
	b	.L6
.L20:
	.align	2
.L19:
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	hl_pci_init, .-hl_pci_init
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
