	.file	"extr_qla_os.c_qla2x00_set_exlogins_buffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"EXLOGIN count: %d.\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Failed to get exlogin status.\n"
	.align 8
.LC2:
	.string	"EXLOGIN: max_logins=%d, portdb=0x%x, total=%d.\n"
	.section	.rodata.str1.1
.LC3:
	.string	"EXLOGIN: requested size=0x%x\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"Failed to allocate memory for exlogin_buf_dma.\n"
	.align 8
.LC5:
	.string	"Setup extended login buffer  ****FAILED****.\n"
	.text
	.p2align 4
	.globl	qla2x00_set_exlogins_buffer
	.type	qla2x00_set_exlogins_buffer, @function
qla2x00_set_exlogins_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR ql2xexlogins[rip], 0
	jne	.L2
.L12:
	mov	r12d, DWORD PTR QLA_SUCCESS[rip]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r13, QWORD PTR [rdi]
	mov	rbp, rdi
	mov	rdi, r13
	call	IS_EXLOGIN_OFFLD_CAPABLE@PLT
	test	eax, eax
	je	.L12
	mov	edi, DWORD PTR ql_log_info[rip]
	mov	edx, 53281
	mov	rsi, rbp
	xor	eax, eax
	mov	r8, QWORD PTR ql2xexlogins[rip]
	lea	rcx, .LC0[rip]
	call	ql_log@PLT
	lea	rdx, 16[rsp]
	lea	rsi, 8[rsp]
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], 0
	call	qla_get_exlogin_status@PLT
	cmp	DWORD PTR QLA_SUCCESS[rip], eax
	mov	r12d, eax
	jne	.L15
	mov	r12, QWORD PTR 16[rsp]
	cmp	QWORD PTR ql2xexlogins[rip], r12
	cmovle	r12, QWORD PTR ql2xexlogins[rip]
	imul	r12, QWORD PTR 8[rsp]
	cmp	QWORD PTR 0[r13], r12
	je	.L6
	mov	rdi, r13
	call	qla2x00_free_exlogin_buffer@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	QWORD PTR 0[r13], r12
	mov	rsi, rbp
	push	r12
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR ql_log_info[rip]
	mov	edx, 53284
	xor	eax, eax
	mov	r9, QWORD PTR 24[rsp]
	mov	r8, QWORD PTR 32[rsp]
	lea	rcx, .LC2[rip]
	call	ql_log@PLT
	mov	r8, QWORD PTR 0[r13]
	mov	edx, 53285
	xor	eax, eax
	mov	edi, DWORD PTR ql_log_info[rip]
	lea	rcx, .LC3[rip]
	mov	rsi, rbp
	call	ql_log@PLT
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, QWORD PTR 16[r13]
	lea	rdx, 8[r13]
	mov	rsi, QWORD PTR 0[r13]
	call	dma_alloc_coherent@PLT
	mov	DWORD PTR 24[r13], eax
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	test	eax, eax
	je	.L16
.L6:
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, rbp
	call	qla_set_exlogin_mem_cfg@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edi, DWORD PTR ql_log_fatal[rip]
	mov	edx, 53299
	mov	rsi, rbp
	xor	eax, eax
	lea	rcx, .LC5[rip]
	call	ql_log@PLT
	mov	rdi, r13
	call	qla2x00_free_exlogin_buffer@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rsi, QWORD PTR 16[r13]
	mov	edi, DWORD PTR ql_log_fatal[rip]
	mov	edx, 53289
	lea	rcx, .LC1[rip]
	call	ql_log_pci@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rsi, QWORD PTR 16[r13]
	mov	edi, DWORD PTR ql_log_fatal[rip]
	mov	edx, 53290
	lea	rcx, .LC4[rip]
	call	ql_log_pci@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	qla2x00_set_exlogins_buffer, .-qla2x00_set_exlogins_buffer
	.comm	ql_log_info,4,4
	.comm	ql_log_fatal,4,4
	.comm	ql2xexlogins,8,8
	.comm	QLA_SUCCESS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_qla_os.c_qla2x00_set_exlogins_buffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"EXLOGIN count: %d.\012\000"
	.align	2
.LC1:
	.ascii	"Failed to get exlogin status.\012\000"
	.align	2
.LC2:
	.ascii	"EXLOGIN: max_logins=%d, portdb=0x%x, total=%d.\012\000"
	.align	2
.LC3:
	.ascii	"EXLOGIN: requested size=0x%x\012\000"
	.align	2
.LC4:
	.ascii	"Failed to allocate memory for exlogin_buf_dma.\012\000"
	.align	2
.LC5:
	.ascii	"Setup extended login buffer  ****FAILED****.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	qla2x00_set_exlogins_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	qla2x00_set_exlogins_buffer, %function
qla2x00_set_exlogins_buffer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L17
	ldr	r2, .L17+4
	ldr	r3, [r6]
	sub	sp, sp, #32
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	bne	.L2
.L12:
	ldr	r3, .L17+8
	ldr	r5, [r3]
.L1:
	ldr	r3, .L17+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r5
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r7, [r0]
	mov	r4, r0
	mov	r0, r7
	bl	IS_EXLOGIN_OFFLD_CAPABLE
	cmp	r0, #0
	beq	.L12
	ldr	r3, [r6]
	ldr	r8, .L17+12
	mov	r1, r4
	ldr	r2, .L17+16
	str	r3, [sp]
	ldr	r0, [r8]
	ldr	r3, .L17+20
	bl	ql_log
	mov	r3, #0
	mov	r0, r4
	add	r2, sp, #24
	add	r1, sp, #20
	str	r3, [sp, #24]
	bl	qla_get_exlogin_status
	ldr	r3, .L17+8
	mov	r5, r0
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L15
	ldr	r3, [r6]
	ldr	r5, [sp, #24]
	ldr	r2, [sp, #20]
	cmp	r3, r5
	movge	r3, r5
	mul	r5, r2, r3
	ldr	r3, [r7]
	cmp	r3, r5
	beq	.L6
	mov	r0, r7
	bl	qla2x00_free_exlogin_buffer
	ldr	r1, [sp, #20]
	ldr	r2, [sp, #24]
	ldr	r3, .L17+24
	str	r5, [r7]
	ldr	r0, [r8]
	stmib	sp, {r1, r5}
	str	r2, [sp]
	mov	r1, r4
	ldr	r2, .L17+28
	bl	ql_log
	ldr	r3, [r7]
	mov	r1, r4
	ldr	r2, .L17+32
	str	r3, [sp]
	ldr	r0, [r8]
	ldr	r3, .L17+36
	bl	ql_log
	mov	r2, r7
	ldr	r3, .L17+40
	ldr	r1, [r2], #4
	ldr	r3, [r3]
	ldr	r0, [r7, #8]
	bl	dma_alloc_coherent
	cmp	r0, #0
	str	r0, [r7, #12]
	beq	.L16
.L6:
	mov	r0, r4
	ldr	r1, [r7, #4]
	bl	qla_set_exlogin_mem_cfg
	subs	r5, r0, #0
	beq	.L1
	ldr	r3, .L17+44
	mov	r1, r4
	ldr	r0, [r3]
	ldr	r2, .L17+48
	ldr	r3, .L17+52
	bl	ql_log
	mov	r0, r7
	bl	qla2x00_free_exlogin_buffer
	b	.L1
.L15:
	ldr	r3, .L17+44
	ldr	r1, [r7, #8]
	ldr	r0, [r3]
	ldr	r2, .L17+56
	ldr	r3, .L17+60
	bl	ql_log_pci
	b	.L1
.L16:
	ldr	r3, .L17+44
	ldr	r1, [r7, #8]
	ldr	r0, [r3]
	ldr	r2, .L17+64
	ldr	r3, .L17+68
	bl	ql_log_pci
	ldr	r3, .L17+72
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	ql2xexlogins
	.word	.LC6
	.word	QLA_SUCCESS
	.word	ql_log_info
	.word	53281
	.word	.LC0
	.word	.LC2
	.word	53284
	.word	53285
	.word	.LC3
	.word	GFP_KERNEL
	.word	ql_log_fatal
	.word	53299
	.word	.LC5
	.word	53289
	.word	.LC1
	.word	53290
	.word	.LC4
	.word	ENOMEM
	.size	qla2x00_set_exlogins_buffer, .-qla2x00_set_exlogins_buffer
	.comm	ql_log_info,4,4
	.comm	ql_log_fatal,4,4
	.comm	ql2xexlogins,4,4
	.comm	QLA_SUCCESS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
