	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_user_sdma_process_request ## -- Begin function hfi1_user_sdma_process_request
	.p2align	4, 0x90
_hfi1_user_sdma_process_request:        ## @hfi1_user_sdma_process_request
	.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	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %r8
	movq	16(%rdi), %rax
	movq	32(%rax), %r14
	movl	(%rsi), %r9d
	cmpl	$143, %r9d
	ja	LBB0_4
## %bb.1:
	movq	_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	movq	(%r8), %rcx
	movq	(%r12), %r8
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	pushq	$144
LBB0_2:
	callq	_hfi1_cdbg
	addq	$16, %rsp
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	%rsi, %r13
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -256(%rbp)                ## 8-byte Spill
	movq	8(%r12), %rbx
	movq	_initial_pkt_count@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	16(%rsi), %rsi
	leaq	-232(%rbp), %rdi
	movl	$72, %edx
	callq	_copy_from_user
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	_SDMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	8(%r14), %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	(%r12), %r8
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_hfi1_cdbg
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	movl	%r15d, -84(%rbp)                ## 4-byte Spill
	movq	%r13, -136(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rsi
	movq	(%r12), %rdx
	leaq	-232(%rbp), %rcx
	movq	%r14, %rdi
	callq	_trace_hfi1_sdma_user_reqinfo
	movl	-228(%rbp), %r9d
	movq	_hfi1_sdma_comp_ring_size@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r9d
	jge	LBB0_12
## %bb.9:
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movl	-172(%rbp), %edi
	callq	_req_iovcnt
	testl	%eax, %eax
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	jle	LBB0_11
## %bb.10:
	movl	-172(%rbp), %edi
	callq	_req_iovcnt
	cltq
	cmpq	%rbx, %rax
	jbe	LBB0_14
LBB0_11:
	movq	_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	8(%rax), %r15d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%r12), %r12
	movl	-228(%rbp), %eax
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	movl	-172(%rbp), %edi
	callq	_req_iovcnt
	movl	%eax, %r10d
	leaq	L_.str.3(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edi
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r8
	movl	-120(%rbp), %r9d                ## 4-byte Reload
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r10
	jmp	LBB0_2
LBB0_12:
	movq	_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	movq	(%r13), %rcx
	movq	(%r12), %r8
	leaq	L_.str.2(%rip), %rsi
LBB0_13:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_hfi1_cdbg
	jmp	LBB0_3
LBB0_14:
	cmpl	$0, -168(%rbp)
	movq	-112(%rbp), %r15                ## 8-byte Reload
	je	LBB0_17
## %bb.15:
	movl	-228(%rbp), %edi
	movq	-120(%rbp), %r13                ## 8-byte Reload
	movl	24(%r13), %esi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	(%r12), %r8
	movl	-228(%rbp), %r9d
	leaq	L_.str.5(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_hfi1_cdbg
	movq	_EBADSLT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_17:
	movq	_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	(%r12), %r8
	movl	-228(%rbp), %r9d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_18:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	(%r12), %rdx
	movl	-228(%rbp), %ecx
	movq	%r15, %rdi
	callq	_trace_hfi1_sdma_user_process_request
	movq	16(%r13), %rbx
	movslq	-228(%rbp), %rax
	imulq	$208, %rax, %r15
	leaq	(%rbx,%r15), %r14
	movl	-172(%rbp), %edi
	callq	_req_iovcnt
	decl	%eax
	movl	%eax, (%rbx,%r15)
	movq	$0, 136(%rbx,%r15)
	movq	%r13, 200(%rbx,%r15)
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 192(%rbx,%r15)
	movl	$-1, 4(%rbx,%r15)
	leaq	12(%rbx,%r15), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	leaq	156(%rbx,%r15), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx,%r15)
	movups	%xmm0, 160(%rbx,%r15)
	movups	%xmm0, 176(%rbx,%r15)
	callq	_INIT_LIST_HEAD
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	addq	%rbx, %r15
	addq	$32, %r15
	leaq	-232(%rbp), %rsi
	movq	%r15, %rdi
	movl	$72, %edx
	callq	_memcpy
	leaq	12(%r13), %rdi
	callq	_atomic_inc
	movl	-172(%rbp), %edi
	callq	_req_opcode
	movq	_EXPECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_22
## %bb.19:
	movl	(%r14), %eax
	cmpl	$1, %eax
	jg	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_SDMA_DBG
	jmp	LBB0_27
LBB0_21:
	decl	%eax
	movl	%eax, (%r14)
LBB0_22:
	cmpl	$0, -176(%rbp)
	movl	(%r14), %edx
	movq	_MAX_VECTORS_PER_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	je	LBB0_26
## %bb.23:
	cmpl	%ecx, %edx
	jg	LBB0_26
## %bb.24:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdi
	addq	$56, %rdi
	movq	16(%rsi), %rsi
	addq	$72, %rsi
	movl	$72, %edx
	callq	_copy_from_user
	testl	%eax, %eax
	je	LBB0_33
## %bb.25:
	movq	%r14, %rdi
	leaq	L_.str.8(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_SDMA_DBG
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_26:
	movq	%r14, %rdi
	leaq	L_.str.7(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_SDMA_DBG
LBB0_27:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_28:
	subl	(%rax), %r13d
LBB0_29:
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	cmpl	(%r15), %eax
	jge	LBB0_7
## %bb.30:
	testl	%eax, %eax
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_32
## %bb.31:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	%rdx, %rcx
	addq	$8, %rcx
	movl	8(%rbx), %edi
	decl	%eax
	xorl	%esi, %esi
	cmpl	%eax, (%rcx)
	sete	%sil
	callq	_wait_event
LBB0_32:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_user_sdma_free_request
	movq	%rbx, %rdi
	callq	_pq_update
	movl	-228(%rbp), %edx
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	movl	%r13d, %r8d
	callq	_set_comp_state
	jmp	LBB0_7
LBB0_33:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_STATIC_RATE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_IS_USET
	testq	%rax, %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_35
## %bb.34:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	104(%rax,%r15), %rax
	movq	$0, 16(%rax)
LBB0_35:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	96(%r13,%r15), %rax
	movl	(%rax), %edi
	callq	_be32_to_cpu
	shrl	$24, %eax
	movq	_USER_OPCODE_CHECK_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_USER_OPCODE_CHECK_VAL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_41
## %bb.36:
	movq	104(%r13,%r15), %rax
	movq	(%rax), %rdi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	shrl	$12, %r14d
	andl	$15, %r14d
	movq	64(%r13,%r15), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	movq	%r13, %rcx
	movl	%eax, %r13d
	shrl	$12, %r13d
	andl	$15, %r13d
	movq	104(%rcx,%r15), %rax
	movq	8(%rax), %rdi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	shrl	$10, %ebx
	andl	$16, %ebx
	orl	%r13d, %ebx
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movq	(%r15), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_42
## %bb.37:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, -100(%rbp)               ## 4-byte Spill
	callq	_sc_to_vlt
	cmpl	%eax, -100(%rbp)                ## 4-byte Folded Reload
	movl	-100(%rbp), %r14d               ## 4-byte Reload
	jne	LBB0_42
## %bb.38:
	movq	%r12, -144(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %r14
	addq	$96, %r14
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	movq	-32(%r14), %rax
	movl	12(%rax), %edi
	callq	_be16_to_cpu
	movq	(%r15), %rdi
	movq	_PKEY_CHECK_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%eax, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_egress_pkey_check
	testq	%rax, %rax
	je	LBB0_45
LBB0_39:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_40:
	xorl	%r13d, %r13d
	jmp	LBB0_44
LBB0_41:
	leaq	L_.str.9(%rip), %rsi
	xorl	%r13d, %r13d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_SDMA_DBG
	jmp	LBB0_43
LBB0_42:
	leaq	L_.str.10(%rip), %rsi
	xorl	%r13d, %r13d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_SDMA_DBG
LBB0_43:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_44:
	subl	(%rax), %r13d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_29
LBB0_45:
	movq	%r14, -240(%rbp)                ## 8-byte Spill
	movq	-32(%r14), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	andl	$3, %eax
	movq	_HFI1_LRH_GRH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_47
## %bb.46:
	leaq	L_.str.11(%rip), %rsi
	xorl	%r13d, %r13d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_SDMA_DBG
	jmp	LBB0_43
LBB0_47:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	88(%r13,%r15), %rax
	movl	24(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, 152(%r13,%r15)
	movl	80(%r13,%r15), %edi
	movq	_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_KDETH_GET
	movl	%eax, %ebx
	movl	80(%r13,%r15), %edi
	movq	_OM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_KDETH_GET
	testl	%eax, %eax
	jne	LBB0_49
## %bb.48:
	movq	_KDETH_OM_SMALL@GOTPCREL(%rip), %rax
	jmp	LBB0_50
LBB0_49:
	movq	_KDETH_OM_LARGE@GOTPCREL(%rip), %rax
LBB0_50:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rcx,%rdx), %rsi
	addq	$136, %rsi
	movq	%rsi, -160(%rbp)                ## 8-byte Spill
	imull	(%rax), %ebx
	movl	%ebx, 24(%rcx,%rdx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	-144(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdx
	movl	-228(%rbp), %ecx
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movl	%ebx, %r8d
	callq	_trace_hfi1_sdma_user_initial_tidoffset
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	jle	LBB0_55
## %bb.51:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %r13
	addq	$144, %r13
	movq	144(%rax,%rcx), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	leaq	72(%rcx), %rbx
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
LBB0_52:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, 24(%rax,%r12)
	leaq	(%rax,%r12), %rdi
	addq	$16, %rdi
	callq	_INIT_LIST_HEAD
	movq	(%r13), %rdi
	addq	%r12, %rdi
	movq	%rbx, -248(%rbp)                ## 8-byte Spill
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	%r13, %r14
	movq	(%r13), %rsi
	movq	%r12, %r15
	addq	%r12, %rsi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_pin_vector_pages
	testl	%eax, %eax
	jne	LBB0_61
## %bb.53:                              ##   in Loop: Header=BB0_52 Depth=1
	movq	%r14, %r13
	movq	(%r14), %rax
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %r8
	movq	%r15, %r12
	addq	8(%rax,%r15), %r8
	movq	%r8, (%rcx)
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	incq	%rdi
	movslq	(%rbx), %rcx
	addq	$32, %r12
	movq	-248(%rbp), %rbx                ## 8-byte Reload
	addq	$72, %rbx
	movq	%rdi, %rsi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	cmpq	%rcx, %rdi
	jl	LBB0_52
## %bb.54:
	incq	-96(%rbp)                       ## 8-byte Folded Spill
	jmp	LBB0_56
LBB0_55:
	movq	-160(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %r8
	movl	$1, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
LBB0_56:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	-144(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdx
	movl	-228(%rbp), %ecx
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_trace_hfi1_sdma_user_data_length
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	36(%rax,%rcx), %edi
	callq	_req_opcode
	movq	_EXPECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_63
## %bb.57:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rax,8), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx,%rax,8), %esi
	cmpl	$4, %esi
	jb	LBB0_39
## %bb.58:
	movl	%esi, %ebx
	sarl	$2, %ebx
	movq	_MAX_TID_PAIR_ENTRIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jg	LBB0_39
## %bb.59:
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movq	16(%rcx,%rax,8), %rdi
	andl	$-4, %esi
	callq	_memdup_user
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_62
## %bb.60:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	leaq	L_.str.12(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_SDMA_DBG
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_29
LBB0_61:
	movl	%eax, %r13d
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_29
LBB0_62:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rcx,%rdx), %rax
	addq	$16, %rax
	movq	%r14, (%rax)
	movl	%ebx, 28(%rcx,%rdx)
	movq	$0, 128(%rcx,%rdx)
	incq	-96(%rbp)                       ## 8-byte Folded Spill
LBB0_63:
	movq	-240(%rbp), %rax                ## 8-byte Reload
	movq	-32(%rax), %rax
	movl	4(%rax), %edi
	callq	_be16_to_cpu
	movl	%eax, %edi
	callq	_dlid_to_selector
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx), %esi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addl	(%rcx), %esi
	addl	%eax, %esi
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movl	-100(%rbp), %edx                ## 4-byte Reload
	callq	_sdma_select_user_engine
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 48(%rcx,%rdx)
	testl	%eax, %eax
	je	LBB0_71
## %bb.64:
	movl	%eax, %edi
	callq	_sdma_running
	testl	%eax, %eax
	je	LBB0_71
## %bb.65:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, (%rax)
	jl	LBB0_68
## %bb.66:
	movq	_SDMA_AHG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_IS_USET
	testq	%rax, %rax
	je	LBB0_68
## %bb.67:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %r14
	addq	$4, %r14
	movl	44(%r14), %edi
	callq	_sdma_ahg_alloc
	movl	%eax, (%r14)
LBB0_68:
	movl	-228(%rbp), %edx
	movq	_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	_set_comp_state
	movq	_SDMA_PKT_Q_ACTIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_user_sdma_send_pkts
	movl	%eax, %r13d
	testl	%eax, %eax
	sets	%al
	movq	_EBUSY@GOTPCREL(%rip), %r12
	movl	%r13d, %ecx
	addl	(%r12), %ecx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_29
## %bb.69:
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	cmpl	(%r15), %eax
	jne	LBB0_72
LBB0_70:
	movq	-256(%rbp), %rax                ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, (%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_71:
	movq	_ECOMM@GOTPCREL(%rip), %rax
	jmp	LBB0_40
LBB0_72:
	movq	_SDMA_IOWAIT_TIMEOUT@GOTPCREL(%rip), %rbx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_75
LBB0_73:                                ##   in Loop: Header=BB0_75 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	8(%rax), %r14d
	movq	(%rax), %rax
	xorl	%r13d, %r13d
	movq	_SDMA_PKT_Q_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%r13b
	movl	(%rbx), %edi
	callq	_msecs_to_jiffies
	movl	%r14d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_wait_event_interruptible_timeout
LBB0_74:                                ##   in Loop: Header=BB0_75 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rcx), %eax
	je	LBB0_70
LBB0_75:                                ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_user_sdma_send_pkts
	testl	%eax, %eax
	jns	LBB0_74
## %bb.76:                              ##   in Loop: Header=BB0_75 Depth=1
	movl	%eax, %r13d
	movl	(%r12), %eax
	addl	%r13d, %eax
	je	LBB0_73
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_initial_pkt_count,4,2          ## @initial_pkt_count
	.comm	_SDMA,4,2                       ## @SDMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%u:%u:%u] First vector not big enough for header %lu/%lu"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"[%u:%u:%u] Failed to copy info QW (%d)"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_hfi1_sdma_comp_ring_size,4,2   ## @hfi1_sdma_comp_ring_size
L_.str.2:                               ## @.str.2
	.asciz	"[%u:%u:%u:%u] Invalid comp index"

L_.str.3:                               ## @.str.3
	.asciz	"[%u:%u:%u:%u] Invalid iov count %d, dim %ld"

L_.str.4:                               ## @.str.4
	.asciz	"[%u:%u:%u:%u] Request does not specify fragsize"

L_.str.5:                               ## @.str.5
	.asciz	"[%u:%u:%u] Entry %u is in use"

	.comm	_EBADSLT,4,2                    ## @EBADSLT
	.comm	_EXPECTED,8,3                   ## @EXPECTED
L_.str.6:                               ## @.str.6
	.asciz	"Not enough vectors for expected request"

	.comm	_MAX_VECTORS_PER_REQ,4,2        ## @MAX_VECTORS_PER_REQ
L_.str.7:                               ## @.str.7
	.asciz	"Too many vectors (%u/%u)"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to copy header template (%d)"

	.comm	_STATIC_RATE_CTRL,4,2           ## @STATIC_RATE_CTRL
	.comm	_USER_OPCODE_CHECK_MASK,4,2     ## @USER_OPCODE_CHECK_MASK
	.comm	_USER_OPCODE_CHECK_VAL,4,2      ## @USER_OPCODE_CHECK_VAL
L_.str.9:                               ## @.str.9
	.asciz	"Invalid opcode (%d)"

L_.str.10:                              ## @.str.10
	.asciz	"Invalid SC(%u)/VL(%u)"

	.comm	_PKEY_CHECK_INVALID,4,2         ## @PKEY_CHECK_INVALID
	.comm	_HFI1_LRH_GRH,4,2               ## @HFI1_LRH_GRH
L_.str.11:                              ## @.str.11
	.asciz	"User tried to pass in a GRH"

	.comm	_OFFSET,4,2                     ## @OFFSET
	.comm	_OM,4,2                         ## @OM
	.comm	_KDETH_OM_LARGE,4,2             ## @KDETH_OM_LARGE
	.comm	_KDETH_OM_SMALL,4,2             ## @KDETH_OM_SMALL
	.comm	_MAX_TID_PAIR_ENTRIES,4,2       ## @MAX_TID_PAIR_ENTRIES
L_.str.12:                              ## @.str.12
	.asciz	"Failed to copy %d TIDs (%d)"

	.comm	_ECOMM,4,2                      ## @ECOMM
	.comm	_SDMA_AHG,4,2                   ## @SDMA_AHG
	.comm	_QUEUED,4,2                     ## @QUEUED
	.comm	_SDMA_PKT_Q_ACTIVE,8,3          ## @SDMA_PKT_Q_ACTIVE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SDMA_IOWAIT_TIMEOUT,4,2        ## @SDMA_IOWAIT_TIMEOUT
	.comm	_ERROR,4,2                      ## @ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_user_sdma_process_request ; -- Begin function hfi1_user_sdma_process_request
	.p2align	2
_hfi1_user_sdma_process_request:        ; @hfi1_user_sdma_process_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #304
	.cfi_def_cfa_offset 304
	stp	x28, x27, [sp, #208]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #224]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #240]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #256]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #272]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #288]            ; 16-byte Folded Spill
	add	x29, sp, #288
	.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	x24, x0
	ldp	x19, x27, [x0, #16]
	ldr	x25, [x19, #32]
	ldr	w5, [x1]
	cmp	w5, #143
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _SDMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x25, #8]
	ldr	x3, [x27]
	ldr	x4, [x24]
	mov	w8, #144
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_hfi1_cdbg
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	mov	x23, x3
	mov	x21, x2
	mov	x26, x1
	ldr	x20, [x24, #8]
Lloh7:
	adrp	x8, _initial_pkt_count@GOTPAGE
Lloh8:
	ldr	x8, [x8, _initial_pkt_count@GOTPAGEOFF]
Lloh9:
	ldr	w22, [x8]
	ldr	x1, [x1, #16]
	add	x0, sp, #128
	mov	w2, #72
	bl	_copy_from_user
	cbz	w0, LBB0_7
; %bb.4:
	mov	x5, x0
Lloh10:
	adrp	x8, _SDMA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	w2, [x25, #8]
	ldr	x3, [x27]
	ldr	x4, [x24]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hfi1_cdbg
Lloh15:
	adrp	x8, _EFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w28, w8
LBB0_6:
	mov	x0, x28
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #256]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #240]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #224]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #208]            ; 16-byte Folded Reload
	add	sp, sp, #304
	ret
LBB0_7:
	ldr	x1, [x27]
	ldr	x2, [x24]
	add	x3, sp, #128
	mov	x0, x25
	bl	_trace_hfi1_sdma_user_reqinfo
	ldr	w5, [sp, #132]
Lloh17:
	adrp	x8, _hfi1_sdma_comp_ring_size@GOTPAGE
Lloh18:
	ldr	x8, [x8, _hfi1_sdma_comp_ring_size@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w5, w8
	b.ge	LBB0_11
; %bb.8:
	ldr	w0, [sp, #188]
	bl	_req_iovcnt
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.9:
	ldr	w0, [sp, #188]
	bl	_req_iovcnt
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x21
	b.ls	LBB0_12
LBB0_10:
Lloh20:
	adrp	x8, _SDMA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
	ldr	w20, [x25, #8]
	ldr	x22, [x27]
	ldr	x23, [x24]
	ldr	w24, [sp, #132]
	ldr	w0, [sp, #188]
	bl	_req_iovcnt
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x21, [sp]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	b	LBB0_2
LBB0_11:
Lloh25:
	adrp	x8, _SDMA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	w2, [x25, #8]
	ldr	x3, [x27]
	ldr	x4, [x24]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_12:
	ldr	w8, [sp, #192]
	cbz	w8, LBB0_15
; %bb.13:
	ldr	w0, [sp, #132]
	ldr	w1, [x19, #24]
	bl	_test_and_set_bit
	cbz	x0, LBB0_16
; %bb.14:
Lloh30:
	adrp	x8, _SDMA@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	w2, [x25, #8]
	ldr	x3, [x27]
	ldr	x4, [x24]
	ldr	w5, [sp, #132]
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_hfi1_cdbg
Lloh35:
	adrp	x8, _EBADSLT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EBADSLT@GOTPAGEOFF]
	b	LBB0_5
LBB0_15:
Lloh37:
	adrp	x8, _SDMA@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	ldr	w2, [x25, #8]
	ldr	x3, [x27]
	ldr	x4, [x24]
	ldr	w5, [sp, #132]
Lloh40:
	adrp	x1, l_.str.4@PAGE
Lloh41:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_16:
	ldr	x1, [x27]
	ldr	x2, [x24]
	ldr	w3, [sp, #132]
	mov	x0, x25
	bl	_trace_hfi1_sdma_user_process_request
	ldr	x9, [x19, #16]
	mov	w8, #208
	ldrsw	x10, [sp, #132]
	ldr	w0, [sp, #188]
	stp	x9, x10, [sp, #96]              ; 16-byte Folded Spill
	madd	x21, x10, x8, x9
	bl	_req_iovcnt
	sub	w8, w0, #1
	mov	x9, x21
	str	xzr, [x9, #136]!
	str	x9, [sp, #80]                   ; 8-byte Folded Spill
	str	w8, [x21]
	mov	w8, #-1
	mov	x9, x21
	str	w8, [x9, #4]!
	stp	x20, x19, [x21, #192]
	mov	x28, x21
	str	xzr, [x28, #8]!
	add	x8, x21, #12
	str	x8, [sp, #112]                  ; 8-byte Folded Spill
	mov	x8, x21
	str	xzr, [x8, #16]!
	stp	x9, x8, [sp, #64]               ; 16-byte Folded Spill
	add	x0, x21, #156
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x21, #160]
	bl	_INIT_LIST_HEAD
	add	x0, x21, #32
	add	x1, sp, #128
	str	x0, [sp, #120]                  ; 8-byte Folded Spill
	mov	w2, #72
	bl	_memcpy
	add	x0, x19, #12
	bl	_atomic_inc
	ldr	w0, [sp, #188]
	bl	_req_opcode
Lloh42:
	adrp	x8, _EXPECTED@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EXPECTED@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	cmp	x0, x8
	str	x28, [sp, #88]                  ; 8-byte Folded Spill
	b.ne	LBB0_20
; %bb.17:
	ldr	w8, [x21]
	subs	w8, w8, #1
	b.gt	LBB0_19
; %bb.18:
Lloh45:
	adrp	x1, l_.str.6@PAGE
Lloh46:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_25
LBB0_19:
	str	w8, [x21]
LBB0_20:
	ldr	w10, [sp, #184]
	ldr	w8, [x21]
Lloh47:
	adrp	x9, _MAX_VECTORS_PER_REQ@GOTPAGE
Lloh48:
	ldr	x9, [x9, _MAX_VECTORS_PER_REQ@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	cbz	w10, LBB0_24
; %bb.21:
	cmp	w8, w9
	b.gt	LBB0_24
; %bb.22:
	mov	w8, #208
	ldp	x9, x10, [sp, #96]              ; 16-byte Folded Reload
	madd	x8, x10, x8, x9
	add	x0, x8, #56
	ldr	x8, [x26, #16]
	add	x1, x8, #72
	mov	w2, #72
	bl	_copy_from_user
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_32
; %bb.23:
	str	x0, [sp]
Lloh50:
	adrp	x1, l_.str.8@PAGE
Lloh51:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x21
	bl	_SDMA_DBG
Lloh52:
	adrp	x8, _EFAULT@GOTPAGE
Lloh53:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_27
LBB0_24:
	stp	x8, x9, [sp]
Lloh54:
	adrp	x1, l_.str.7@PAGE
Lloh55:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_25:
	mov	x0, x21
	bl	_SDMA_DBG
LBB0_26:
Lloh56:
	adrp	x8, _EINVAL@GOTPAGE
Lloh57:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_27:
	ldr	w8, [x8]
	neg	w28, w8
LBB0_28:
	ldp	x8, x9, [sp, #112]              ; 16-byte Folded Reload
	ldr	w8, [x8]
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.29:
	cbz	w8, LBB0_31
; %bb.30:
	ldr	w0, [x19, #8]
	ldr	x9, [sp, #88]                   ; 8-byte Folded Reload
	ldr	w9, [x9]
	sub	w8, w8, #1
	cmp	w9, w8
	cset	w1, eq
	bl	_wait_event
LBB0_31:
	mov	x0, x21
	mov	w1, #1
	bl	_user_sdma_free_request
	mov	x0, x19
	bl	_pq_update
	ldr	w2, [sp, #132]
Lloh58:
	adrp	x8, _ERROR@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh60:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x4, x28
	bl	_set_comp_state
	b	LBB0_6
LBB0_32:
Lloh61:
	adrp	x8, _STATIC_RATE_CTRL@GOTPAGE
Lloh62:
	ldr	x8, [x8, _STATIC_RATE_CTRL@GOTPAGEOFF]
Lloh63:
	ldr	w0, [x8]
	bl	_HFI1_CAP_IS_USET
	ldr	x10, [sp, #104]                 ; 8-byte Folded Reload
	cbnz	x0, LBB0_34
; %bb.33:
	mov	w8, #208
	ldr	x9, [sp, #96]                   ; 8-byte Folded Reload
	madd	x8, x10, x8, x9
	ldr	x8, [x8, #104]
	str	xzr, [x8, #16]
LBB0_34:
	mov	w8, #208
	ldr	x28, [sp, #96]                  ; 8-byte Folded Reload
	madd	x9, x10, x8, x28
	ldr	x8, [x9, #96]!
	str	x9, [sp, #56]                   ; 8-byte Folded Spill
	ldr	w0, [x8]
	bl	_be32_to_cpu
	lsr	w8, w0, #24
Lloh64:
	adrp	x9, _USER_OPCODE_CHECK_MASK@GOTPAGE
Lloh65:
	ldr	x9, [x9, _USER_OPCODE_CHECK_MASK@GOTPAGEOFF]
Lloh66:
	ldr	w9, [x9]
	and	w9, w8, w9
Lloh67:
	adrp	x10, _USER_OPCODE_CHECK_VAL@GOTPAGE
Lloh68:
	ldr	x10, [x10, _USER_OPCODE_CHECK_VAL@GOTPAGEOFF]
Lloh69:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_40
; %bb.35:
	mov	w8, #208
	ldr	x9, [sp, #104]                  ; 8-byte Folded Reload
	madd	x28, x9, x8, x28
	ldr	x8, [x28, #104]
	ldr	x0, [x8]
	bl	_le16_to_cpu
	ubfx	w8, w0, #12, #4
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	mov	x9, x28
	ldr	x8, [x9, #64]!
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	ldr	w0, [x8]
	bl	_be16_to_cpu
	str	w0, [sp, #40]                   ; 4-byte Folded Spill
	ldr	x8, [x28, #104]
	ldr	x28, [sp, #48]                  ; 8-byte Folded Reload
	ldr	x0, [x8, #8]
	bl	_le16_to_cpu
	lsr	w8, w0, #10
	and	w9, w8, #0x10
	ldr	w8, [sp, #40]                   ; 4-byte Folded Reload
	bfxil	w9, w8, #12, #4
	ldr	x8, [x25]
	ldr	w8, [x8]
	cmp	w28, w8
	b.ge	LBB0_41
; %bb.36:
	mov	x0, x25
	str	x9, [sp, #40]                   ; 8-byte Folded Spill
	mov	x1, x9
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_sc_to_vlt
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	cmp	w28, w0
	b.ne	LBB0_41
; %bb.37:
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_be32_to_cpu
	str	w0, [sp, #56]                   ; 4-byte Folded Spill
	ldr	x28, [sp, #32]                  ; 8-byte Folded Reload
	ldr	x8, [x28]
	ldr	w0, [x8, #12]
	bl	_be16_to_cpu
	mov	x1, x0
	ldr	x0, [x25]
Lloh70:
	adrp	x8, _PKEY_CHECK_INVALID@GOTPAGE
Lloh71:
	ldr	x8, [x8, _PKEY_CHECK_INVALID@GOTPAGEOFF]
Lloh72:
	ldr	w4, [x8]
	ldr	w2, [sp, #56]                   ; 4-byte Folded Reload
	ldr	x3, [sp, #40]                   ; 8-byte Folded Reload
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_egress_pkey_check
	cbnz	x0, LBB0_26
; %bb.38:
	ldr	x8, [x28]
	ldr	w0, [x8]
	bl	_be16_to_cpu
	and	w8, w0, #0x3
Lloh73:
	adrp	x9, _HFI1_LRH_GRH@GOTPAGE
Lloh74:
	ldr	x9, [x9, _HFI1_LRH_GRH@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_42
; %bb.39:
Lloh76:
	adrp	x1, l_.str.11@PAGE
Lloh77:
	add	x1, x1, l_.str.11@PAGEOFF
	b	LBB0_25
LBB0_40:
	str	x8, [sp]
Lloh78:
	adrp	x1, l_.str.9@PAGE
Lloh79:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_25
LBB0_41:
	stp	x9, x28, [sp]
Lloh80:
	adrp	x1, l_.str.10@PAGE
Lloh81:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_25
LBB0_42:
	mov	w8, #208
	ldp	x9, x10, [sp, #96]              ; 16-byte Folded Reload
	madd	x28, x10, x8, x9
	ldr	x8, [x28, #88]
	ldr	w0, [x8, #24]
	bl	_le32_to_cpu
	str	w0, [x28, #152]
	ldr	w0, [x28, #80]
Lloh82:
	adrp	x8, _OFFSET@GOTPAGE
Lloh83:
	ldr	x8, [x8, _OFFSET@GOTPAGEOFF]
Lloh84:
	ldr	w1, [x8]
	bl	_KDETH_GET
	str	w0, [sp, #56]                   ; 4-byte Folded Spill
	ldr	w0, [x28, #80]
Lloh85:
	adrp	x8, _OM@GOTPAGE
Lloh86:
	ldr	x8, [x8, _OM@GOTPAGEOFF]
Lloh87:
	ldr	w1, [x8]
	bl	_KDETH_GET
Lloh88:
	adrp	x8, _KDETH_OM_LARGE@GOTPAGE
Lloh89:
	ldr	x8, [x8, _KDETH_OM_LARGE@GOTPAGEOFF]
Lloh90:
	adrp	x9, _KDETH_OM_SMALL@GOTPAGE
Lloh91:
	ldr	x9, [x9, _KDETH_OM_SMALL@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	ldr	w9, [sp, #56]                   ; 4-byte Folded Reload
	mul	w4, w8, w9
	str	w4, [x28, #24]
	ldr	x1, [x27]
	ldr	x2, [x24]
	ldr	w3, [sp, #132]
	mov	x0, x25
	bl	_trace_hfi1_sdma_user_initial_tidoffset
	ldr	w8, [x21]
	cmp	w8, #0
	b.le	LBB0_47
; %bb.43:
	mov	x28, #0
	str	xzr, [sp, #24]                  ; 8-byte Folded Spill
	mov	w8, #208
	ldp	x9, x10, [sp, #96]              ; 16-byte Folded Reload
	madd	x9, x10, x8, x9
	ldr	x8, [x9, #144]!
	str	x9, [sp, #56]                   ; 8-byte Folded Spill
	add	x9, x26, #72
	str	x9, [sp, #40]                   ; 8-byte Folded Spill
LBB0_44:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x28
	str	xzr, [x8, #24]
	add	x0, x8, #16
	bl	_INIT_LIST_HEAD
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	add	x0, x8, x28
	ldr	x1, [sp, #40]                   ; 8-byte Folded Reload
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	str	x28, [sp, #16]                  ; 8-byte Folded Spill
	add	x1, x8, x28
	mov	x0, x21
	bl	_pin_vector_pages
	cbnz	w0, LBB0_52
; %bb.45:                               ;   in Loop: Header=BB0_44 Depth=1
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	x28, [sp, #16]                  ; 8-byte Folded Reload
	add	x9, x8, x28
	ldr	x9, [x9, #8]
	ldr	x11, [sp, #80]                  ; 8-byte Folded Reload
	ldr	x10, [x11]
	add	x4, x10, x9
	str	x4, [x11]
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	add	x10, x10, #1
	ldrsw	x9, [x21]
	add	x28, x28, #32
	ldr	x11, [sp, #40]                  ; 8-byte Folded Reload
	add	x11, x11, #72
	str	x11, [sp, #40]                  ; 8-byte Folded Spill
	str	x10, [sp, #24]                  ; 8-byte Folded Spill
	cmp	x10, x9
	b.lt	LBB0_44
; %bb.46:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x8, x8, #1
	b	LBB0_48
LBB0_47:
	ldr	x8, [sp, #80]                   ; 8-byte Folded Reload
	ldr	x4, [x8]
	mov	w8, #1
LBB0_48:
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldr	x1, [x27]
	ldr	x2, [x24]
	ldr	w3, [sp, #132]
	mov	x0, x25
	bl	_trace_hfi1_sdma_user_data_length
	ldr	x8, [sp, #120]                  ; 8-byte Folded Reload
	ldr	w8, [x8]
	cmp	w22, w8
	csel	w8, w22, w8, lt
	str	w8, [sp, #80]                   ; 4-byte Folded Spill
	mov	w8, #208
	ldp	x9, x10, [sp, #96]              ; 16-byte Folded Reload
	madd	x8, x10, x8, x9
	ldr	w0, [x8, #36]
	bl	_req_opcode
Lloh92:
	adrp	x8, _EXPECTED@GOTPAGE
Lloh93:
	ldr	x8, [x8, _EXPECTED@GOTPAGEOFF]
Lloh94:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_54
; %bb.49:
	mov	w8, #72
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	mul	x8, x9, x8
	ldr	w8, [x26, x8]
	asr	w22, w8, #2
Lloh95:
	adrp	x9, _MAX_TID_PAIR_ENTRIES@GOTPAGE
Lloh96:
	ldr	x9, [x9, _MAX_TID_PAIR_ENTRIES@GOTPAGEOFF]
Lloh97:
	ldr	w9, [x9]
	cmp	w8, #4
	ccmp	w22, w9, #0, hs
	b.gt	LBB0_26
; %bb.50:
	mov	w9, #72
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	madd	x9, x10, x9, x26
	ldr	x0, [x9, #16]
	and	w1, w8, #0xfffffffc
	bl	_memdup_user
	mov	x26, x0
	bl	_IS_ERR
	cbz	x0, LBB0_53
; %bb.51:
	mov	x0, x26
	bl	_PTR_ERR
	mov	x28, x0
	stp	x22, x28, [sp]
Lloh98:
	adrp	x1, l_.str.12@PAGE
Lloh99:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x21
	bl	_SDMA_DBG
	b	LBB0_28
LBB0_52:
	mov	x28, x0
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w8, [x21]
	b	LBB0_28
LBB0_53:
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	str	x26, [x8]
	mov	w8, #208
	ldp	x9, x10, [sp, #96]              ; 16-byte Folded Reload
	madd	x8, x10, x8, x9
	str	w22, [x8, #28]
	str	xzr, [x8, #128]
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	add	x8, x8, #1
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
LBB0_54:
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	bl	_be16_to_cpu
	bl	_dlid_to_selector
	ldr	w8, [x27]
	ldr	w9, [x24]
	add	w8, w9, w8
	add	w1, w0, w8
	mov	x0, x25
	ldr	x2, [sp, #48]                   ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_sdma_select_user_engine
	mov	w8, #208
	ldp	x9, x10, [sp, #96]              ; 16-byte Folded Reload
	madd	x22, x10, x8, x9
	str	w0, [x22, #48]!
	cbz	w0, LBB0_62
; %bb.55:
	bl	_sdma_running
	cbz	w0, LBB0_62
; %bb.56:
	ldr	x8, [sp, #120]                  ; 8-byte Folded Reload
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_59
; %bb.57:
Lloh100:
	adrp	x8, _SDMA_AHG@GOTPAGE
Lloh101:
	ldr	x8, [x8, _SDMA_AHG@GOTPAGEOFF]
Lloh102:
	ldr	w0, [x8]
	bl	_HFI1_CAP_IS_USET
	cbz	x0, LBB0_59
; %bb.58:
	ldr	w0, [x22]
	bl	_sdma_ahg_alloc
	ldr	x8, [sp, #64]                   ; 8-byte Folded Reload
	str	w0, [x8]
LBB0_59:
	ldr	w2, [sp, #132]
Lloh103:
	adrp	x8, _QUEUED@GOTPAGE
Lloh104:
	ldr	x8, [x8, _QUEUED@GOTPAGEOFF]
Lloh105:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	bl	_set_comp_state
Lloh106:
	adrp	x22, _SDMA_PKT_Q_ACTIVE@GOTPAGE
Lloh107:
	ldr	x22, [x22, _SDMA_PKT_Q_ACTIVE@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x19]
	mov	x0, x21
	ldr	w1, [sp, #80]                   ; 4-byte Folded Reload
	bl	_user_sdma_send_pkts
	mov	x28, x0
Lloh108:
	adrp	x26, _EBUSY@GOTPAGE
Lloh109:
	ldr	x26, [x26, _EBUSY@GOTPAGEOFF]
	ldr	w8, [x26]
	cmn	w0, w8
	ccmp	w0, #0, #0, ne
	cset	w0, lt
	bl	_unlikely
	cbnz	x0, LBB0_28
; %bb.60:
	ldp	x8, x9, [sp, #112]              ; 16-byte Folded Reload
	ldr	w8, [x8]
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_63
LBB0_61:
	mov	w28, #0
	ldr	x8, [x23]
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	add	x8, x8, x9
	str	x8, [x23]
	b	LBB0_6
LBB0_62:
Lloh110:
	adrp	x8, _ECOMM@GOTPAGE
Lloh111:
	ldr	x8, [x8, _ECOMM@GOTPAGEOFF]
	b	LBB0_27
LBB0_63:
Lloh112:
	adrp	x27, _SDMA_IOWAIT_TIMEOUT@GOTPAGE
Lloh113:
	ldr	x27, [x27, _SDMA_IOWAIT_TIMEOUT@GOTPAGEOFF]
	b	LBB0_66
LBB0_64:                                ;   in Loop: Header=BB0_66 Depth=1
	ldr	w24, [x19, #8]
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w25, eq
	ldr	w0, [x27]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x24
	mov	x1, x25
	bl	_wait_event_interruptible_timeout
LBB0_65:                                ;   in Loop: Header=BB0_66 Depth=1
	ldp	x8, x9, [sp, #112]              ; 16-byte Folded Reload
	ldr	w8, [x8]
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_61
LBB0_66:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	ldr	w1, [sp, #80]                   ; 4-byte Folded Reload
	bl	_user_sdma_send_pkts
	tbz	w0, #31, LBB0_65
; %bb.67:                               ;   in Loop: Header=BB0_66 Depth=1
	mov	x28, x0
	ldr	w8, [x26]
	cmn	w0, w8
	b.eq	LBB0_64
	b	LBB0_28
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpLdrGot	Lloh90, Lloh91
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpAdd	Lloh98, Lloh99
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpLdrGot	Lloh108, Lloh109
	.loh AdrpLdrGot	Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh103, Lloh104, Lloh105
	.loh AdrpLdrGot	Lloh110, Lloh111
	.loh AdrpLdrGot	Lloh112, Lloh113
	.cfi_endproc
                                        ; -- End function
	.comm	_initial_pkt_count,4,2          ; @initial_pkt_count
	.comm	_SDMA,4,2                       ; @SDMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%u:%u:%u] First vector not big enough for header %lu/%lu"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"[%u:%u:%u] Failed to copy info QW (%d)"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_hfi1_sdma_comp_ring_size,4,2   ; @hfi1_sdma_comp_ring_size
l_.str.2:                               ; @.str.2
	.asciz	"[%u:%u:%u:%u] Invalid comp index"

l_.str.3:                               ; @.str.3
	.asciz	"[%u:%u:%u:%u] Invalid iov count %d, dim %ld"

l_.str.4:                               ; @.str.4
	.asciz	"[%u:%u:%u:%u] Request does not specify fragsize"

l_.str.5:                               ; @.str.5
	.asciz	"[%u:%u:%u] Entry %u is in use"

	.comm	_EBADSLT,4,2                    ; @EBADSLT
	.comm	_EXPECTED,8,3                   ; @EXPECTED
l_.str.6:                               ; @.str.6
	.asciz	"Not enough vectors for expected request"

	.comm	_MAX_VECTORS_PER_REQ,4,2        ; @MAX_VECTORS_PER_REQ
l_.str.7:                               ; @.str.7
	.asciz	"Too many vectors (%u/%u)"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to copy header template (%d)"

	.comm	_STATIC_RATE_CTRL,4,2           ; @STATIC_RATE_CTRL
	.comm	_USER_OPCODE_CHECK_MASK,4,2     ; @USER_OPCODE_CHECK_MASK
	.comm	_USER_OPCODE_CHECK_VAL,4,2      ; @USER_OPCODE_CHECK_VAL
l_.str.9:                               ; @.str.9
	.asciz	"Invalid opcode (%d)"

l_.str.10:                              ; @.str.10
	.asciz	"Invalid SC(%u)/VL(%u)"

	.comm	_PKEY_CHECK_INVALID,4,2         ; @PKEY_CHECK_INVALID
	.comm	_HFI1_LRH_GRH,4,2               ; @HFI1_LRH_GRH
l_.str.11:                              ; @.str.11
	.asciz	"User tried to pass in a GRH"

	.comm	_OFFSET,4,2                     ; @OFFSET
	.comm	_OM,4,2                         ; @OM
	.comm	_KDETH_OM_LARGE,4,2             ; @KDETH_OM_LARGE
	.comm	_KDETH_OM_SMALL,4,2             ; @KDETH_OM_SMALL
	.comm	_MAX_TID_PAIR_ENTRIES,4,2       ; @MAX_TID_PAIR_ENTRIES
l_.str.12:                              ; @.str.12
	.asciz	"Failed to copy %d TIDs (%d)"

	.comm	_ECOMM,4,2                      ; @ECOMM
	.comm	_SDMA_AHG,4,2                   ; @SDMA_AHG
	.comm	_QUEUED,4,2                     ; @QUEUED
	.comm	_SDMA_PKT_Q_ACTIVE,8,3          ; @SDMA_PKT_Q_ACTIVE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SDMA_IOWAIT_TIMEOUT,4,2        ; @SDMA_IOWAIT_TIMEOUT
	.comm	_ERROR,4,2                      ; @ERROR
.subsections_via_symbols
