	.file	"extr_ata-jmicron.c_ata_jmicron_chipinit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ata_jmicron_chipinit, @function
ata_jmicron_chipinit:
.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	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	device_get_softc@PLT
	mov	esi, DWORD PTR ata_generic_intr[rip]
	mov	rdi, rbp
	mov	rbx, rax
	call	ata_setup_interrupt@PLT
	mov	r12d, DWORD PTR ENXIO[rip]
	test	rax, rax
	je	.L10
	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
.L10:
	.cfi_restore_state
	mov	edx, 1
	mov	esi, 223
	mov	rdi, rbp
	call	pci_read_config@PLT
	and	eax, 64
	mov	r12d, eax
	je	.L4
	mov	rax, QWORD PTR ata_jmicron_ch_attach[rip]
	xor	r12d, r12d
	mov	QWORD PTR 40[rbx], rax
	mov	rax, QWORD PTR ata_pci_ch_detach[rip]
	mov	QWORD PTR 32[rbx], rax
	mov	rax, QWORD PTR ata_generic_reset[rip]
	mov	QWORD PTR 24[rbx], rax
	mov	rax, QWORD PTR ata_jmicron_setmode[rip]
	mov	QWORD PTR 16[rbx], rax
	mov	rax, QWORD PTR [rbx]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 8[rbx], eax
	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
.L4:
	.cfi_restore_state
	mov	ecx, 4
	mov	edx, -2134859471
	mov	esi, 64
	mov	rdi, rbp
	call	pci_write_config@PLT
	mov	ecx, 4
	mov	edx, 18874368
	mov	rdi, rbp
	mov	esi, 128
	call	pci_write_config@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	QWORD PTR 8[rax], 0
	jne	.L11
.L5:
	mov	rdx, QWORD PTR ata_jmicron_ch_attach[rip]
	mov	eax, DWORD PTR [rax]
	mov	QWORD PTR 40[rbx], rdx
	mov	rdx, QWORD PTR ata_pci_ch_detach[rip]
	mov	DWORD PTR 8[rbx], eax
	mov	eax, r12d
	mov	QWORD PTR 32[rbx], rdx
	mov	rdx, QWORD PTR ata_generic_reset[rip]
	mov	QWORD PTR 24[rbx], rdx
	mov	rdx, QWORD PTR ata_jmicron_setmode[rip]
	mov	QWORD PTR 16[rbx], rdx
	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
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	mov	edx, -1
	xor	esi, esi
	call	device_add_child@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L8
	mov	rsi, -1
	call	device_set_ivars@PLT
	mov	rdi, rbp
	call	bus_generic_attach@PLT
.L8:
	mov	rax, QWORD PTR [rbx]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ata_jmicron_chipinit, .-ata_jmicron_chipinit
	.comm	ata_pci_ch_detach,8,8
	.comm	ata_jmicron_setmode,8,8
	.comm	ata_jmicron_ch_attach,8,8
	.comm	ata_generic_reset,8,8
	.comm	ata_generic_intr,4,4
	.comm	ENXIO,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_ata-jmicron.c_ata_jmicron_chipinit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_jmicron_chipinit, %function
ata_jmicron_chipinit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	bl	device_get_softc
	ldr	r3, .L14
	mov	r4, r0
	ldr	r1, [r3]
	mov	r0, r5
	bl	ata_setup_interrupt
	subs	r6, r0, #0
	beq	.L2
	ldr	r3, .L14+4
	ldr	r6, [r3]
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r2, #1
	mov	r1, #223
	mov	r0, r5
	bl	pci_read_config
	ands	r7, r0, #64
	beq	.L4
	ldr	r3, [r4]
	ldr	ip, .L14+8
	ldr	r0, .L14+12
	ldr	r1, .L14+16
	ldr	r2, .L14+20
	ldr	r3, [r3]
	ldr	r0, [r0]
	ldr	ip, [ip]
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r0, [r4, #16]
	str	ip, [r4, #20]
	mov	r0, r6
	str	r1, [r4, #12]
	str	r2, [r4, #8]
	str	r3, [r4, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r3, #4
	mov	r1, #64
	ldr	r2, .L14+24
	mov	r0, r5
	bl	pci_write_config
	mov	r3, #4
	mov	r2, #18874368
	mov	r1, #128
	mov	r0, r5
	bl	pci_write_config
	ldr	r3, [r4]
	ldr	r2, [r3, #4]
	cmp	r2, #0
	bne	.L13
.L5:
	mov	r6, #0
	ldr	lr, .L14+20
	ldr	r0, .L14+8
	ldr	r1, .L14+12
	ldr	r2, .L14+16
	ldr	ip, [r3]
	ldr	r0, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r3, [lr]
	str	r0, [r4, #20]
	str	ip, [r4, #4]
	mov	r0, r6
	str	r1, [r4, #16]
	str	r2, [r4, #12]
	str	r3, [r4, #8]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r1, r7
	mvn	r2, #0
	mov	r0, r5
	bl	device_add_child
	cmp	r0, #0
	beq	.L11
	mvn	r1, #0
	bl	device_set_ivars
	mov	r0, r5
	bl	bus_generic_attach
.L11:
	ldr	r3, [r4]
	b	.L5
.L15:
	.align	2
.L14:
	.word	ata_generic_intr
	.word	ENXIO
	.word	ata_jmicron_ch_attach
	.word	ata_pci_ch_detach
	.word	ata_generic_reset
	.word	ata_jmicron_setmode
	.word	-2134859471
	.size	ata_jmicron_chipinit, .-ata_jmicron_chipinit
	.comm	ata_pci_ch_detach,4,4
	.comm	ata_jmicron_setmode,4,4
	.comm	ata_jmicron_ch_attach,4,4
	.comm	ata_generic_reset,4,4
	.comm	ata_generic_intr,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
