	.file	"extr_icm.c_mlx4_free_icm_pages.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mlx4_free_icm_pages, @function
mlx4_free_icm_pages:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR [rsi], 0
	mov	edx, DWORD PTR 8[rsi]
	jle	.L2
	mov	rsi, QWORD PTR 16[rsi]
	mov	ecx, DWORD PTR PCI_DMA_BIDIRECTIONAL[rip]
	mov	edi, DWORD PTR [rdi]
	call	pci_unmap_sg@PLT
	mov	edx, DWORD PTR 8[r13]
.L2:
	xor	ebx, ebx
	test	edx, edx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 16[r13]
	lea	r12, 0[0+rbx*4]
	mov	edi, DWORD PTR [rax+rbx*4]
	add	rbx, 1
	call	get_order@PLT
	mov	rdi, QWORD PTR 16[r13]
	mov	ebp, eax
	add	rdi, r12
	call	sg_page@PLT
	mov	esi, ebp
	mov	edi, eax
	call	__free_pages@PLT
	cmp	DWORD PTR 8[r13], ebx
	jg	.L3
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	mlx4_free_icm_pages, .-mlx4_free_icm_pages
	.comm	PCI_DMA_BIDIRECTIONAL,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_icm.c_mlx4_free_icm_pages.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_free_icm_pages, %function
mlx4_free_icm_pages:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r6, r1
	ldr	r2, [r1, #4]
	ble	.L2
	ldr	r3, .L9
	ldr	r0, [r0]
	ldr	r3, [r3]
	ldr	r1, [r1, #8]
	bl	pci_unmap_sg
	ldr	r2, [r6, #4]
.L2:
	cmp	r2, #0
	pople	{r4, r5, r6, pc}
	mov	r4, #0
.L3:
	ldr	r0, [r6, #8]
	add	r0, r0, r4, lsl #2
	bl	sg_page
	ldr	r3, [r6, #8]
	mov	r5, r0
	ldr	r0, [r3, r4, lsl #2]
	bl	get_order
	mov	r1, r0
	mov	r0, r5
	bl	__free_pages
	ldr	r3, [r6, #4]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L3
	pop	{r4, r5, r6, pc}
.L10:
	.align	2
.L9:
	.word	PCI_DMA_BIDIRECTIONAL
	.size	mlx4_free_icm_pages, .-mlx4_free_icm_pages
	.comm	PCI_DMA_BIDIRECTIONAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
