	.file	"extr_ig4_pci.c_ig4iic_pci_detach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ig4iic_pci_detach, @function
ig4iic_pci_detach:
.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
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	device_get_softc@PLT
	cmp	QWORD PTR 32[rax], 0
	mov	rbx, rax
	jne	.L16
.L2:
	mov	rcx, QWORD PTR 24[rbx]
	mov	rdx, QWORD PTR [rbx]
	test	rcx, rcx
	je	.L4
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	mov	edi, ebp
	call	bus_release_resource@PLT
	mov	QWORD PTR 24[rbx], 0
	mov	rdx, QWORD PTR [rbx]
.L4:
	test	rdx, rdx
	jne	.L17
.L5:
	mov	rcx, QWORD PTR 16[rbx]
	xor	r12d, r12d
	test	rcx, rcx
	je	.L1
	mov	rdx, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR SYS_RES_MEMORY[rip]
	mov	edi, ebp
	call	bus_release_resource@PLT
	mov	QWORD PTR 16[rbx], 0
.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
.L16:
	.cfi_restore_state
	mov	rdi, rax
	call	ig4iic_detach@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	QWORD PTR 32[rbx], 0
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, ebp
	call	pci_release_msi@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ig4iic_pci_detach, .-ig4iic_pci_detach
	.comm	SYS_RES_MEMORY,4,4
	.comm	SYS_RES_IRQ,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_ig4_pci.c_ig4iic_pci_detach.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ig4iic_pci_detach, %function
ig4iic_pci_detach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	bl	device_get_softc
	ldr	r3, [r0, #16]
	mov	r4, r0
	cmp	r3, #0
	bne	.L18
.L2:
	ldr	r3, [r4, #12]
	ldr	r2, [r4]
	cmp	r3, #0
	beq	.L4
	ldr	r1, .L20
	mov	r0, r5
	ldr	r1, [r1]
	bl	bus_release_resource
	mov	r3, #0
	ldr	r2, [r4]
	str	r3, [r4, #12]
.L4:
	cmp	r2, #0
	bne	.L19
.L5:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L6
	ldr	r2, .L20+4
	mov	r0, r5
	ldr	r1, [r2]
	ldr	r2, [r4, #4]
	bl	bus_release_resource
	mov	r0, #0
	str	r0, [r4, #8]
	pop	{r4, r5, r6, pc}
.L6:
	mov	r0, r3
	pop	{r4, r5, r6, pc}
.L18:
	bl	ig4iic_detach
	cmp	r0, #0
	popne	{r4, r5, r6, pc}
	str	r0, [r4, #16]
	b	.L2
.L19:
	mov	r0, r5
	bl	pci_release_msi
	b	.L5
.L21:
	.align	2
.L20:
	.word	SYS_RES_IRQ
	.word	SYS_RES_MEMORY
	.size	ig4iic_pci_detach, .-ig4iic_pci_detach
	.comm	SYS_RES_MEMORY,4,4
	.comm	SYS_RES_IRQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
