	.file	"extr_target_core_hba.c_core_alloc_hba.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unable to allocate struct se_hba\n"
	.align 8
.LC1:
	.string	"CORE_HBA[%d] - Attached HBA to Generic Target Core\n"
	.text
	.p2align 4
	.globl	core_alloc_hba
	.type	core_alloc_hba, @function
core_alloc_hba:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, 40
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	test	rax, rax
	je	.L11
	mov	r12, rax
	lea	rdi, 32[rax]
	call	spin_lock_init@PLT
	lea	rdi, 28[r12]
	call	mutex_init@PLT
	mov	edi, DWORD PTR SCSI_INST_INDEX[rip]
	call	scsi_get_new_index@PLT
	or	DWORD PTR 20[r12], ebx
	mov	rdi, rbp
	mov	DWORD PTR 24[r12], eax
	call	core_get_backend@PLT
	mov	ebp, DWORD PTR EINVAL[rip]
	mov	QWORD PTR [r12], rax
	neg	ebp
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR [rax]
	mov	esi, r13d
	mov	rdi, r12
	call	[QWORD PTR [rax]]
	mov	ebp, eax
	test	eax, eax
	js	.L12
	lea	rdi, hba_lock[rip]
	call	spin_lock@PLT
	movsx	rax, DWORD PTR hba_id_counter[rip]
	lea	rdi, 16[r12]
	lea	rsi, hba_list[rip]
	mov	QWORD PTR 8[r12], rax
	lea	edx, 1[rax]
	mov	DWORD PTR hba_id_counter[rip], edx
	call	list_add_tail@PLT
	lea	rdi, hba_lock[rip]
	call	spin_unlock@PLT
	mov	rsi, QWORD PTR 8[r12]
	lea	rdi, .LC1[rip]
	call	pr_debug@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	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
.L12:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR 8[rax]
	call	module_put@PLT
	mov	QWORD PTR [r12], 0
.L4:
	mov	rdi, r12
	call	kfree@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, ebp
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	pr_err@PLT
	mov	edi, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	edi
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.cfi_endproc
.LFE0:
	.size	core_alloc_hba, .-core_alloc_hba
	.comm	hba_lock,4,4
	.comm	hba_list,4,4
	.comm	hba_id_counter,4,4
	.comm	SCSI_INST_INDEX,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_target_core_hba.c_core_alloc_hba.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unable to allocate struct se_hba\012\000"
	.align	2
.LC1:
	.ascii	"CORE_HBA[%d] - Attached HBA to Generic Target Core\012"
	.ascii	"\000"
	.text
	.align	2
	.global	core_alloc_hba
	.syntax unified
	.arm
	.fpu softvfp
	.type	core_alloc_hba, %function
core_alloc_hba:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r7, r1
	mov	r0, #28
	ldr	r1, [r3]
	mov	r6, r2
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L10
	add	r0, r4, #24
	bl	spin_lock_init
	add	r0, r4, #20
	bl	mutex_init
	ldr	r3, .L13+4
	ldr	r0, [r3]
	bl	scsi_get_new_index
	ldr	r2, [r4, #12]
	str	r0, [r4, #16]
	orr	r2, r2, r6
	mov	r0, r5
	str	r2, [r4, #12]
	bl	core_get_backend
	cmp	r0, #0
	str	r0, [r4]
	beq	.L11
	ldr	r3, [r0]
	mov	r1, r7
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	subs	r5, r0, #0
	blt	.L12
	ldr	r0, .L13+8
	bl	spin_lock
	ldr	r2, .L13+12
	ldr	r1, .L13+16
	ldr	r3, [r2]
	add	r0, r4, #8
	str	r3, [r4, #4]
	add	r3, r3, #1
	str	r3, [r2]
	bl	list_add_tail
	ldr	r0, .L13+8
	bl	spin_unlock
	ldr	r1, [r4, #4]
	ldr	r0, .L13+20
	bl	pr_debug
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, [r4]
	ldr	r3, [r3]
	ldr	r0, [r3, #4]
	bl	module_put
	mov	r3, #0
	str	r3, [r4]
.L4:
	mov	r0, r4
	bl	kfree
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	ERR_PTR
.L10:
	ldr	r0, .L13+24
	bl	pr_err
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L13+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L11:
	ldr	r3, .L13+32
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L4
.L14:
	.align	2
.L13:
	.word	GFP_KERNEL
	.word	SCSI_INST_INDEX
	.word	hba_lock
	.word	hba_id_counter
	.word	hba_list
	.word	.LC1
	.word	.LC0
	.word	ENOMEM
	.word	EINVAL
	.size	core_alloc_hba, .-core_alloc_hba
	.comm	hba_lock,4,4
	.comm	hba_list,4,4
	.comm	hba_id_counter,4,4
	.comm	SCSI_INST_INDEX,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
