	.file	"extr_cgx.c_cgx_lmac_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cgx_fwi_%d_%d"
	.text
	.p2align 4
	.type	cgx_lmac_init, @function
cgx_lmac_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	esi, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edx, DWORD PTR CGXX_CMRX_RX_LMACS[rip]
	call	cgx_read@PLT
	mov	edx, DWORD PTR MAX_LMAC_PER_CGX[rip]
	and	eax, 7
	mov	DWORD PTR [r12], eax
	cmp	eax, edx
	jle	.L2
	mov	DWORD PTR [r12], edx
	mov	eax, edx
.L2:
	xor	ebp, ebp
	lea	r13, .LC0[rip]
	test	eax, eax
	jg	.L3
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 1
	mov	esi, 16
	call	kcalloc@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	rdi, rax
	test	rax, rax
	je	.L12
	mov	edx, DWORD PTR 4[r12]
	mov	ecx, ebp
	mov	rsi, r13
	call	sprintf@PLT
	mov	DWORD PTR [rbx], ebp
	lea	rdi, 24[rbx]
	mov	QWORD PTR 32[rbx], r12
	call	init_waitqueue_head@PLT
	lea	rdi, 20[rbx]
	call	mutex_init@PLT
	lea	rdi, 16[rbx]
	call	spin_lock_init@PLT
	mov	edi, DWORD PTR 16[r12]
	mov	r15, QWORD PTR 8[rbx]
	lea	rsi, 0[rbp+rbp*8]
	mov	r14d, DWORD PTR cgx_fwi_event_handler[rip]
	add	rsi, QWORD PTR CGX_LMAC_FWI[rip]
	call	pci_irq_vector@PLT
	xor	edx, edx
	mov	r8, rbx
	mov	rcx, r15
	mov	edi, eax
	mov	esi, r14d
	call	request_irq@PLT
	test	eax, eax
	jne	.L1
	mov	ecx, DWORD PTR FW_CGX_INT[rip]
	mov	edx, DWORD PTR CGXX_CMRX_INT_ENA_W1S[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR [rbx]
	call	cgx_write@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	QWORD PTR [rax+rbp*8], rbx
	add	rbp, 1
	cmp	DWORD PTR [r12], ebp
	jle	.L7
.L3:
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 40
	mov	edi, 1
	call	kcalloc@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L4
.L12:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L7:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, r12
	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
	jmp	cgx_lmac_verify_fwi_version@PLT
	.cfi_endproc
.LFE0:
	.size	cgx_lmac_init, .-cgx_lmac_init
	.comm	cgx_fwi_event_handler,4,4
	.comm	MAX_LMAC_PER_CGX,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FW_CGX_INT,4,4
	.comm	ENOMEM,4,4
	.comm	CGX_LMAC_FWI,8,8
	.comm	CGXX_CMRX_RX_LMACS,4,4
	.comm	CGXX_CMRX_INT_ENA_W1S,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_cgx.c_cgx_lmac_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cgx_fwi_%d_%d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cgx_lmac_init, %function
cgx_lmac_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L14
	mov	r1, #0
	ldr	r2, [r3]
	sub	sp, sp, #12
	mov	r6, r0
	bl	cgx_read
	ldr	r3, .L14+4
	and	r0, r0, #7
	ldr	r3, [r3]
	str	r0, [r6]
	cmp	r0, r3
	movgt	r0, r3
	strgt	r3, [r6]
	cmp	r0, #0
	ble	.L7
	mov	r5, #0
	ldr	r7, .L14+8
	ldr	r10, .L14+12
	ldr	r9, .L14+16
	ldr	r8, .L14+20
	ldr	fp, .L14+24
	b	.L3
.L4:
	mov	r1, #16
	mov	r0, #1
	ldr	r2, [r7]
	bl	kcalloc
	cmp	r0, #0
	str	r0, [r4, #4]
	beq	.L12
	ldr	r2, [r6, #4]
	mov	r3, r5
	mov	r1, r10
	bl	sprintf
	str	r5, [r4]
	str	r6, [r4, #20]
	add	r0, r4, #16
	bl	init_waitqueue_head
	add	r0, r4, #12
	bl	mutex_init
	add	r0, r4, #8
	bl	spin_lock_init
	ldr	r3, [r9]
	add	r1, r5, r5, lsl #3
	add	r1, r1, r3
	ldr	r0, [r6, #12]
	bl	pci_irq_vector
	ldr	r3, [r4, #4]
	mov	r2, #0
	ldr	r1, [r8]
	str	r4, [sp]
	bl	request_irq
	cmp	r0, #0
	bne	.L1
	ldr	r2, .L14+28
	ldr	r3, [fp]
	ldr	r2, [r2]
	mov	r0, r6
	ldr	r1, [r4]
	bl	cgx_write
	ldr	r2, [r6, #8]
	ldr	r3, [r6]
	str	r4, [r2, r5, lsl #2]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L7
.L3:
	mov	r1, #24
	mov	r0, #1
	ldr	r2, [r7]
	bl	kcalloc
	subs	r4, r0, #0
	bne	.L4
.L12:
	ldr	r3, .L14+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	cgx_lmac_verify_fwi_version
.L15:
	.align	2
.L14:
	.word	CGXX_CMRX_RX_LMACS
	.word	MAX_LMAC_PER_CGX
	.word	GFP_KERNEL
	.word	.LC0
	.word	CGX_LMAC_FWI
	.word	cgx_fwi_event_handler
	.word	FW_CGX_INT
	.word	CGXX_CMRX_INT_ENA_W1S
	.word	ENOMEM
	.size	cgx_lmac_init, .-cgx_lmac_init
	.comm	cgx_fwi_event_handler,4,4
	.comm	MAX_LMAC_PER_CGX,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FW_CGX_INT,4,4
	.comm	ENOMEM,4,4
	.comm	CGX_LMAC_FWI,4,4
	.comm	CGXX_CMRX_RX_LMACS,4,4
	.comm	CGXX_CMRX_INT_ENA_W1S,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
