	.file	"extr_scsi_tgt_if.c_tgt_ring_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"out of memory\n"
	.text
	.p2align 4
	.type	tgt_ring_init, @function
tgt_ring_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	add	rdi, 8
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	spin_lock_init@PLT
	mov	ecx, DWORD PTR TGT_RING_PAGES[rip]
	test	ecx, ecx
	jle	.L6
	mov	rax, QWORD PTR [r12]
	xor	ebx, ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	add	rbx, 1
	cmp	DWORD PTR TGT_RING_PAGES[rip], ebx
	jle	.L6
.L5:
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	lea	rbp, [rax+rbx*4]
	call	get_zeroed_page@PLT
	mov	DWORD PTR 0[rbp], eax
	mov	rax, QWORD PTR [r12]
	mov	edx, DWORD PTR [rax+rbx*4]
	test	edx, edx
	jne	.L4
	lea	rdi, .LC0[rip]
	call	eprintk@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	tgt_ring_init, .-tgt_ring_init
	.comm	TGT_RING_PAGES,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_scsi_tgt_if.c_tgt_ring_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"out of memory\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgt_ring_init, %function
tgt_ring_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L10
	mov	r6, r0
	add	r0, r0, #4
	bl	spin_lock_init
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L6
	mov	r4, #0
	ldr	r5, [r6]
	ldr	r8, .L10+4
	b	.L5
.L4:
	ldr	r3, [r7]
	cmp	r3, r4
	ble	.L6
.L5:
	ldr	r0, [r8]
	bl	get_zeroed_page
	str	r0, [r5, r4, lsl #2]
	ldr	r5, [r6]
	ldr	r3, [r5, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L10+8
	bl	eprintk
	ldr	r3, .L10+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	TGT_RING_PAGES
	.word	GFP_KERNEL
	.word	.LC0
	.word	ENOMEM
	.size	tgt_ring_init, .-tgt_ring_init
	.comm	TGT_RING_PAGES,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
