	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function qib_user_sdma_page_to_frags
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_qib_user_sdma_page_to_frags:           ## @qib_user_sdma_page_to_frags
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	16(%rbp), %rcx
	movq	(%rdi), %rdi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rsi
	movq	%r9, %rdx
	callq	_dma_map_page
	movq	%rax, %r13
	movq	(%rbx), %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_put_user_page
	jmp	LBB0_8
LBB0_1:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %r11
	movl	$1, %r10d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r13
	movq	%r15, %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 64(%r12)
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rcx
	movq	72(%r12), %rsi
	shlq	$4, %rcx
	movq	(%rsi,%rcx), %rsi
	movslq	8(%r12), %rbx
	cmpq	%rsi, %r13
	jle	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rsi,%rbx), %r8
	movq	16(%r12), %rcx
	movq	%rsi, %rdi
	cmpq	%rcx, %r8
	jl	LBB0_13
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	8(%r12), %rbx
	leaq	(%rbx,%r13), %rsi
	movq	16(%r12), %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	24(%r12), %r13
	sete	%bl
	setne	%cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rcx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13), %r8
	movq	16(%r12), %rcx
	movq	%r13, %rdi
	cmpq	%rcx, %r8
	jge	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rsi, %rdi
	sete	%bl
	setne	%cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rcx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	subq	%rbx, %rcx
	movb	$1, %bl
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movzbl	%bl, %r9d
	movq	32(%r12), %rsi
	movq	%r12, %rdi
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	xorl	%r8d, %r8d
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	pushq	%r13
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	movq	%r11, -136(%rbp)                ## 8-byte Spill
	pushq	%r11
	pushq	%r14
	pushq	%r10
	movq	%rax, %r15
	pushq	%rax
	callq	_qib_user_sdma_init_frag
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	$48, %rsp
	movq	24(%r12), %rax
	movq	32(%r12), %rcx
	movq	%rax, %rdx
	subq	%rsi, %rdx
	movq	%rdx, 24(%r12)
	addl	%esi, 8(%r12)
	incq	%rcx
	movq	%rcx, 32(%r12)
	cmpq	40(%r12), %rcx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rsi, %rax
	je	LBB0_19
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 64(%r12)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	movq	72(%r12), %rcx
	movq	%rax, %rdx
	shlq	$4, %rdx
	subq	%rsi, (%rcx,%rdx)
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	movq	%rax, (%r12)
	cmpq	56(%r12), %rax
	jne	LBB0_27
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	addl	%esi, 8(%rcx,%rdx)
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_22
## %bb.28:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%r12), %rax
	movq	80(%r12), %rcx
	leaq	(%rax,%rax,4), %rax
	movq	8(%rcx,%rax,8), %r13
	movq	%r13, %rsi
	leaq	-152(%rbp), %rdx
	callq	_qib_user_sdma_alloc_header
	testq	%rax, %rax
	je	LBB0_8
## %bb.29:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	48(%r12), %rax
	movq	80(%r12), %rcx
	leaq	(%rax,%rax,4), %rax
	movq	32(%rcx,%rax,8), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	movq	(%r14), %rdi
	callq	_le16_to_cpu
	movq	24(%r12), %rcx
	shrq	$2, %rcx
	subl	%ecx, %eax
	movl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_le16_to_cpu
	movl	%eax, %edi
	callq	_cpu_to_be16
	movq	80(%r14), %rcx
	movq	%rax, 16(%rcx)
	cmpq	$0, 64(%r12)
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	56(%r14), %rdi
	callq	_le16_to_cpu
	orl	$2, %eax
	movl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, 56(%r14)
	movl	$-37, %eax
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%r14), %rax
	movq	(%rax), %rdi
	callq	_be32_to_cpu
	andl	$-3145729, %eax                 ## imm = 0xFFCFFFFF
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	48(%r14), %rcx
	movq	%rax, (%rcx)
	movl	$-5, %eax
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=1
	andl	%eax, 32(%r14)
	movl	72(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movq	_QIB_LRH_BTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	80(%r14), %rax
	movq	16(%rax), %rdi
	callq	_be16_to_cpu
	movl	%eax, %r13d
	movl	%r15d, %eax
	shrl	$16, %eax
	movzwl	%r15w, %ebx
	addl	%eax, %ebx
	movq	56(%r14), %rdi
	callq	_le16_to_cpu
	addl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	addl	%ebx, %eax
	subl	%eax, %r13d
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movq	%rax, 64(%r14)
	movq	48(%r12), %rcx
	movq	80(%r12), %rax
	leaq	(%rcx,%rcx,4), %rcx
	cmpq	$0, 16(%rax,%rcx,8)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_35
## %bb.33:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdi
	movq	32(%rax,%rcx,8), %rsi
	movl	24(%rax,%rcx,8), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	48(%r12), %rcx
	movq	80(%r12), %rdx
	leaq	(%rcx,%rcx,4), %rcx
	movq	%rax, 16(%rdx,%rcx,8)
	movq	(%rbx), %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_8
## %bb.34:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%r12), %rax
	movq	80(%r12), %rcx
	leaq	(%rax,%rax,4), %rax
	movl	$1, (%rcx,%rax,8)
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movq	(%r13), %rdi
	callq	_le16_to_cpu
	movl	8(%r12), %ecx
	sarl	$2, %ecx
	subl	%ecx, %eax
	movl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, (%r13)
	movq	%rax, %rdi
	callq	_le16_to_cpu
	movl	%eax, %edi
	callq	_cpu_to_be16
	movq	80(%r13), %rcx
	movq	%rax, 16(%rcx)
	cmpq	$0, 64(%r12)
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	72(%r13), %edi
	callq	_le32_to_cpu
	andl	$-16777216, %eax                ## imm = 0xFF000000
	movq	(%r12), %rdx
	movq	72(%r12), %rsi
	shlq	$4, %rdx
	movl	12(%rsi,%rdx), %ebx
	movq	_QLOGIC_IB_I_TID_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %ebx
	movl	8(%rsi,%rdx), %edi
	addl	%eax, %ebx
	sarl	$2, %edi
	addl	%ebx, %edi
	callq	_cpu_to_le32
	movl	%eax, %edi
	movl	%eax, 72(%r13)
	jmp	LBB0_38
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r12), %eax
	movq	40(%r13), %rcx
	addl	%eax, 8(%rcx)
	movl	72(%r13), %edi
LBB0_38:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movq	_QIB_LRH_BTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	80(%r13), %rax
	movq	16(%rax), %rdi
	callq	_be16_to_cpu
	movl	%eax, %ebx
	movl	%r14d, %eax
	shrl	$16, %eax
	movzwl	%r14w, %r14d
	addl	%eax, %r14d
	movq	56(%r13), %rdi
	callq	_le16_to_cpu
	addl	%r15d, %ebx
	addl	%r14d, %eax
	subl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	%rax, 64(%r13)
	movq	48(%r13), %rax
	movq	16(%rax), %rdi
	callq	_be32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_cpu_to_be32
	movq	48(%r13), %rcx
	movq	%rax, 16(%rcx)
	movq	32(%r12), %rsi
	movq	-152(%rbp), %rax
	subq	$48, %rsp
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, 40(%rsp)
	movq	%rax, 32(%rsp)
	movq	%r13, 24(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	$0, 16(%rsp)
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_qib_user_sdma_init_frag
	addq	$48, %rsp
	movq	32(%r12), %rax
	movq	%rax, 48(%r12)
	movl	$0, 8(%r12)
	incq	%rax
	movq	%rax, 32(%r12)
	cmpq	40(%r12), %rax
	je	LBB0_17
## %bb.39:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-144(%rbp), %r13                ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	subq	%rsi, %r13
	movl	$0, %ebx
	je	LBB0_22
## %bb.40:                              ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, -120(%rbp)                  ## 1-byte Folded Reload
	movq	-136(%rbp), %r11                ## 8-byte Reload
	movl	$0, %ecx
	cmoveq	%rcx, %r11
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmoveq	%rcx, %rax
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	cmoveq	%rcx, %r14
	movq	-128(%rbp), %rdx                ## 8-byte Reload
	addq	%rsi, %rdx
	movb	$1, %cl
	xorl	%r10d, %r10d
	jmp	LBB0_2
LBB0_7:
	movq	%r14, %rdi
	callq	_kunmap
	movq	%r14, %rdi
	callq	___free_page
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_19:
	movq	48(%r12), %rcx
	movq	80(%r12), %rax
	leaq	(%rcx,%rcx,4), %rcx
	xorl	%ebx, %ebx
	cmpq	$0, 16(%rax,%rcx,8)
	jne	LBB0_22
## %bb.20:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdi
	movq	32(%rax,%rcx,8), %rsi
	movl	24(%rax,%rcx,8), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	48(%r12), %rcx
	movq	80(%r12), %rdx
	leaq	(%rcx,%rcx,4), %rcx
	movq	%rax, 16(%rdx,%rcx,8)
	movq	(%r14), %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_8
## %bb.21:
	movq	48(%r12), %rax
	movq	80(%r12), %rcx
	leaq	(%rax,%rax,4), %rax
	movl	$1, (%rcx,%rax,8)
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_QIB_LRH_BTH,4,2                ## @QIB_LRH_BTH
	.comm	_QLOGIC_IB_I_TID_SHIFT,4,2      ## @QLOGIC_IB_I_TID_SHIFT
	.no_dead_strip	_qib_user_sdma_page_to_frags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_user_sdma_page_to_frags
_qib_user_sdma_page_to_frags:           ; @qib_user_sdma_page_to_frags
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x7
	mov	x23, x6
	mov	x24, x4
	mov	x21, x3
	mov	x19, x2
	mov	x26, x1
	mov	x27, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x1, x3
	mov	x2, x5
	mov	x3, x6
	bl	_dma_map_page
	mov	x25, x0
	ldr	x0, [x27]
	mov	x1, x25
	bl	_dma_mapping_error
	cbz	x0, LBB0_3
; %bb.1:
	cbz	x24, LBB0_32
; %bb.2:
	mov	x0, x21
	bl	_put_user_page
	b	LBB0_33
LBB0_3:
	mov	x2, #0
	mov	w9, #0
	mov	w7, #1
	stp	x26, x27, [sp, #40]             ; 16-byte Folded Spill
	str	x25, [sp, #32]                  ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #64]
	str	w9, [sp, #84]                   ; 4-byte Folded Spill
	cbz	x8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #72]
	ldr	x9, [x19]
	lsl	x9, x9, #4
	ldr	x9, [x8, x9]
	ldrsw	x8, [x19, #8]
	cmp	x23, x9
	b.le	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x19, #16]
	add	x11, x9, x8
	cmp	x11, x10
	mov	x28, x9
	b.lt	LBB0_10
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x19, #8]
	ldr	x10, [x19, #16]
	add	x9, x23, x8
	cmp	x9, x10
	b.ge	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #24]
	cmp	x23, x8
	cset	w8, eq
	cset	w20, ne
	mov	x28, x23
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x19, #16]
	add	x11, x23, x8
	cmp	x11, x10
	mov	x28, x23
	b.ge	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x28, x9
	cset	w8, eq
	cset	w20, ne
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w20, #0
	sub	x28, x10, x8
	mov	w8, #1
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w5, w8
	ldr	x1, [x19, #32]
	stp	x25, x23, [sp, #16]
	stp	x21, x22, [sp]
	mov	x0, x19
	str	x2, [sp, #88]                   ; 8-byte Folded Spill
	mov	x3, x28
	mov	w4, #0
	mov	x6, x24
	bl	_qib_user_sdma_init_frag
	ldp	x8, x9, [x19, #24]
	sub	x10, x8, x28
	ldr	w11, [x19, #8]
	add	w11, w11, w28
	str	w11, [x19, #8]
	add	x9, x9, #1
	stp	x10, x9, [x19, #24]
	ldr	x10, [x19, #40]
	cmp	x9, x10
	b.eq	LBB0_36
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, x28
	b.eq	LBB0_37
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	str	x23, [sp, #96]                  ; 8-byte Folded Spill
	ldr	x8, [x19, #64]
	mov	w23, #40
	cbz	x8, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #72]
	ldr	x8, [x19]
	lsl	x10, x8, #4
	ldr	x11, [x9, x10]
	subs	x11, x11, x28
	str	x11, [x9, x10]
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	str	x8, [x19]
	ldr	x9, [x19, #56]
	cmp	x8, x9
	b.ne	LBB0_18
	b	LBB0_36
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x9, x8, lsl #4
	ldr	w9, [x8, #8]
	add	w9, w9, w28
	str	w9, [x8, #8]
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	tbnz	w20, #0, LBB0_38
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	madd	x8, x9, x23, x8
	ldr	x25, [x8, #8]
	sub	x2, x29, #88
	mov	x0, x26
	mov	x1, x25
	bl	_qib_user_sdma_alloc_header
	cbz	x0, LBB0_33
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x0
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	madd	x8, x9, x23, x8
	ldr	x20, [x8, #32]
	mov	x1, x20
	mov	x2, x25
	bl	_memcpy
	ldr	x0, [x20]
	bl	_le16_to_cpu
	ldr	x8, [x19, #24]
	lsr	x8, x8, #2
	sub	w0, w0, w8
	bl	_cpu_to_le16
	str	x0, [x20]
	bl	_le16_to_cpu
	bl	_cpu_to_be16
	ldr	x8, [x20, #80]
	str	x0, [x8, #16]
	ldr	x8, [x19, #64]
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	str	x24, [sp, #56]                  ; 8-byte Folded Spill
	mov	w23, #40
	cbz	x8, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20, #56]
	bl	_le16_to_cpu
	orr	w0, w0, #0x2
	bl	_cpu_to_le16
	str	x0, [x20, #56]
	mov	w8, #-37
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #48]
	ldr	x0, [x8]
	bl	_be32_to_cpu
	and	w0, w0, #0xffcfffff
	bl	_cpu_to_be32
	ldr	x8, [x20, #48]
	str	x0, [x8]
	mov	w8, #-5
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x20, #32]
	and	w8, w9, w8
	str	w8, [x20, #32]
	ldr	w0, [x20, #72]
	bl	_le32_to_cpu
	mov	x27, x0
Lloh3:
	adrp	x8, _QIB_LRH_BTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QIB_LRH_BTH@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	ldr	x8, [x20, #80]
	ldr	x0, [x8, #16]
	bl	_be16_to_cpu
	mov	x22, x0
	lsr	w21, w27, #16
	ldr	x0, [x20, #56]
	bl	_le16_to_cpu
	add	w8, w21, w27, uxth
	add	w9, w24, w22
	add	w8, w8, w0
	sub	w0, w9, w8
	bl	_cpu_to_le16
	str	x0, [x20, #64]
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	madd	x10, x9, x23, x8
	ldr	x10, [x10, #16]
	ldr	x27, [sp, #48]                  ; 8-byte Folded Reload
Lloh6:
	adrp	x11, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	x23, [sp, #96]                  ; 8-byte Folded Reload
	cbnz	x10, LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x27]
	mov	w20, #40
	madd	x8, x9, x20, x8
	ldr	x1, [x8, #32]
	ldr	w2, [x8, #24]
	ldr	w3, [x11]
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	madd	x8, x9, x20, x8
	str	x0, [x8, #16]
	ldr	x0, [x27]
	bl	_dma_mapping_error
	cbnz	x0, LBB0_33
; %bb.25:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	mul	x9, x9, x20
	mov	w10, #1
	str	w10, [x8, x9]
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x26]
	bl	_le16_to_cpu
	ldr	w8, [x19, #8]
	sub	w0, w0, w8, asr #2
	bl	_cpu_to_le16
	str	x0, [x26]
	bl	_le16_to_cpu
	bl	_cpu_to_be16
	ldr	x8, [x26, #80]
	str	x0, [x8, #16]
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x26, #72]
	bl	_le32_to_cpu
	and	w8, w0, #0xff000000
	ldr	x9, [x19, #72]
	ldr	x10, [x19]
	add	x9, x9, x10, lsl #4
Lloh8:
	adrp	x10, _QLOGIC_IB_I_TID_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _QLOGIC_IB_I_TID_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	ldp	w9, w11, [x9, #8]
	lsl	w10, w11, w10
	add	w8, w10, w8
	add	w0, w8, w9, asr #2
	bl	_cpu_to_le32
	str	w0, [x26, #72]
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #8]
	ldr	x9, [x26, #40]
	ldr	w10, [x9, #8]
	add	w8, w10, w8
	str	w8, [x9, #8]
	ldr	w0, [x26, #72]
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_le32_to_cpu
	mov	x20, x0
Lloh11:
	adrp	x8, _QIB_LRH_BTH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QIB_LRH_BTH@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	ldr	x8, [x26, #80]
	ldr	x0, [x8, #16]
	bl	_be16_to_cpu
	mov	x22, x0
	lsr	w24, w20, #16
	ldr	x0, [x26, #56]
	bl	_le16_to_cpu
	add	w8, w24, w20, uxth
	add	w9, w21, w22
	add	w8, w8, w0
	sub	w0, w9, w8
	bl	_cpu_to_le16
	str	x0, [x26, #64]
	ldr	x8, [x26, #48]
	ldr	x0, [x8, #16]
	bl	_be32_to_cpu
	add	w0, w0, #1
	bl	_cpu_to_be32
	ldr	x8, [x26, #48]
	str	x0, [x8, #16]
	ldr	x1, [x19, #32]
	ldur	x8, [x29, #-88]
	stp	x8, x25, [sp, #16]
	stp	xzr, x26, [sp]
	mov	x0, x19
	mov	x2, #0
	mov	x3, x25
	mov	w4, #1
	mov	x5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_qib_user_sdma_init_frag
	ldp	x8, x9, [x19, #32]
	str	x8, [x19, #48]
	str	wzr, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #32]
	cmp	x8, x9
	b.eq	LBB0_36
; %bb.30:                               ;   in Loop: Header=BB0_4 Depth=1
	subs	x23, x23, x28
	b.eq	LBB0_38
; %bb.31:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x7, #0
	ldr	w8, [sp, #84]                   ; 4-byte Folded Reload
	tst	w8, #0x1
	ldp	x24, x22, [sp, #56]             ; 16-byte Folded Reload
	csel	x22, x22, xzr, ne
	csel	x24, x24, xzr, ne
	ldr	x21, [sp, #72]                  ; 8-byte Folded Reload
	csel	x21, x21, xzr, ne
	ldr	x2, [sp, #88]                   ; 8-byte Folded Reload
	add	x2, x28, x2
	mov	w9, #1
	ldp	x25, x26, [sp, #32]             ; 16-byte Folded Reload
	b	LBB0_4
LBB0_32:
	mov	x0, x21
	bl	_kunmap
	mov	x0, x21
	bl	___free_page
LBB0_33:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_35:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_36:
Lloh16:
	adrp	x8, _EFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_34
LBB0_37:
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	mov	w10, #40
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #16]
	cbz	x10, LBB0_39
LBB0_38:
	mov	w0, #0
	b	LBB0_35
LBB0_39:
	ldr	x0, [x27]
	mov	w20, #40
	madd	x8, x9, x20, x8
	ldr	x1, [x8, #32]
	ldr	w2, [x8, #24]
Lloh18:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	madd	x8, x9, x20, x8
	str	x0, [x8, #16]
	ldr	x0, [x27]
	bl	_dma_mapping_error
	cbnz	x0, LBB0_33
; %bb.40:
	ldr	x8, [x19, #80]
	ldr	x9, [x19, #48]
	mov	w10, #40
	mul	x9, x9, x10
	mov	w10, #1
	str	w10, [x8, x9]
	b	LBB0_35
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_QIB_LRH_BTH,4,2                ; @QIB_LRH_BTH
	.comm	_QLOGIC_IB_I_TID_SHIFT,4,2      ; @QLOGIC_IB_I_TID_SHIFT
	.no_dead_strip	_qib_user_sdma_page_to_frags
.subsections_via_symbols
