	.file	"extr_ibmvscsi.c_map_sg_data.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Can't allocate memory for indirect table\n"
	.text
	.p2align 4
	.type	map_sg_data, @function
map_sg_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, 1
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r14, QWORD PTR [rdx]
	call	scsi_dma_map@PLT
	test	eax, eax
	je	.L1
	js	.L8
	mov	r12d, eax
	mov	edx, eax
	mov	rsi, rbp
	mov	rdi, r15
	call	set_srp_direction@PLT
	cmp	r12d, 1
	je	.L11
	mov	QWORD PTR 16[r14], 0
	lea	ebp, 0[0+r12*4]
	mov	edi, ebp
	call	cpu_to_be32@PLT
	cmp	DWORD PTR MAX_INDIRECT_BUFS[rip], r12d
	mov	QWORD PTR 24[r14], 0
	mov	QWORD PTR 8[r14], rax
	jge	.L12
	mov	rdx, QWORD PTR [rbx]
	test	rdx, rdx
	je	.L13
.L5:
	mov	esi, r12d
	mov	rdi, r15
	mov	r12d, 1
	call	map_sg_list@PLT
	mov	edi, eax
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	QWORD PTR 32[r14], rax
	call	cpu_to_be64@PLT
	mov	edi, ebp
	mov	QWORD PTR 16[r14], rax
	call	cpu_to_be32@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, QWORD PTR [r14]
	mov	QWORD PTR 8[r14], rax
	mov	eax, DWORD PTR MAX_INDIRECT_BUFS[rip]
	lea	edx, 0[0+rax*4]
	call	memcpy@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L8:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR SG_ALL[rip]
	lea	rdx, 8[rbx]
	xor	ecx, ecx
	mov	rdi, r13
	lea	esi, 0[0+rax*4]
	call	dma_alloc_coherent@PLT
	mov	QWORD PTR [rbx], rax
	mov	rdx, rax
	test	rax, rax
	jne	.L5
	mov	edi, DWORD PTR FW_FEATURE_CMO[rip]
	call	firmware_has_feature@PLT
	test	eax, eax
	je	.L14
.L6:
	mov	rdi, r15
	xor	r12d, r12d
	call	scsi_dma_unmap@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdx, r14
	mov	esi, 1
	mov	rdi, r15
	call	map_sg_list@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdx, QWORD PTR [r14]
	mov	esi, r12d
	mov	rdi, r15
	mov	r12d, 1
	call	map_sg_list@PLT
	mov	edi, eax
	call	cpu_to_be32@PLT
	mov	QWORD PTR 32[r14], rax
	jmp	.L1
.L14:
	mov	esi, DWORD PTR [r15]
	mov	edi, DWORD PTR KERN_ERR[rip]
	lea	rdx, .LC0[rip]
	call	sdev_printk@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	map_sg_data, .-map_sg_data
	.comm	SG_ALL,4,4
	.comm	MAX_INDIRECT_BUFS,4,4
	.comm	KERN_ERR,4,4
	.comm	FW_FEATURE_CMO,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_ibmvscsi.c_map_sg_data.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Can't allocate memory for indirect table\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	map_sg_data, %function
map_sg_data:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r2
	mov	r6, r1
	mov	r9, r3
	mov	r7, r0
	ldr	r8, [r2]
	bl	scsi_dma_map
	subs	r4, r0, #0
	moveq	r4, #1
	beq	.L1
	movlt	r4, #0
	blt	.L1
	mov	r1, r5
	mov	r2, r4
	mov	r0, r7
	bl	set_srp_direction
	cmp	r4, #1
	beq	.L11
	mov	fp, #0
	lsl	r10, r4, #2
	mov	r0, r10
	str	fp, [r8, #8]
	bl	cpu_to_be32
	ldr	r5, .L15
	str	fp, [r8, #12]
	ldr	r3, [r5]
	str	r0, [r8, #4]
	cmp	r3, r4
	bge	.L12
	ldr	r2, [r6]
	cmp	r2, #0
	beq	.L13
.L5:
	mov	r1, r4
	mov	r0, r7
	bl	map_sg_list
	bl	cpu_to_be32
	mov	r3, r0
	ldr	r0, [r6, #4]
	str	r3, [r8, #16]
	bl	cpu_to_be64
	mov	r3, r0
	mov	r0, r10
	str	r3, [r8, #8]
	bl	cpu_to_be32
	ldr	r2, [r5]
	str	r0, [r8, #4]
	ldr	r1, [r6]
	ldr	r0, [r8]
	lsl	r2, r2, #2
	bl	memcpy
	mov	r4, #1
.L1:
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r1, .L15+4
	mov	r3, r2
	ldr	r1, [r1]
	add	r2, r6, #4
	mov	r0, r9
	lsl	r1, r1, #2
	bl	dma_alloc_coherent
	cmp	r0, #0
	mov	r2, r0
	str	r0, [r6]
	bne	.L5
	ldr	r3, .L15+8
	ldr	r0, [r3]
	bl	firmware_has_feature
	cmp	r0, #0
	beq	.L14
.L6:
	mov	r0, r7
	bl	scsi_dma_unmap
	mov	r4, #0
	b	.L1
.L11:
	mov	r2, r8
	mov	r0, r7
	mov	r1, r4
	bl	map_sg_list
	b	.L1
.L12:
	mov	r1, r4
	ldr	r2, [r8]
	mov	r0, r7
	bl	map_sg_list
	bl	cpu_to_be32
	mov	r4, #1
	str	r0, [r8, #16]
	b	.L1
.L14:
	ldr	r3, .L15+12
	ldr	r2, .L15+16
	ldr	r0, [r3]
	ldr	r1, [r7]
	bl	sdev_printk
	b	.L6
.L16:
	.align	2
.L15:
	.word	MAX_INDIRECT_BUFS
	.word	SG_ALL
	.word	FW_FEATURE_CMO
	.word	KERN_ERR
	.word	.LC0
	.size	map_sg_data, .-map_sg_data
	.comm	SG_ALL,4,4
	.comm	MAX_INDIRECT_BUFS,4,4
	.comm	KERN_ERR,4,4
	.comm	FW_FEATURE_CMO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
