	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocrdma_set_create_qp_ird_cmd
_ocrdma_set_create_qp_ird_cmd:          ## @ocrdma_set_create_qp_ird_cmd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rsi), %rax
	movl	(%rax), %edi
	callq	_get_ocrdma_dev
	movq	%rax, %rbx
	movq	24(%rax), %rdi
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.1:
	movl	(%rbx), %r14d
	movl	4(%rbx), %r13d
	imull	%r14d, %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r13d, %esi
	callq	_dma_alloc_coherent
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	(%r12), %rdi
	movl	4(%rbx), %esi
	movl	-44(%rbp), %edx
	movl	%r14d, %ecx
	callq	_ocrdma_build_q_pages
	movslq	16(%rbx), %rsi
	movl	%r13d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movq	(%r15), %rdx
	movl	%eax, %eax
	movq	_OCRDMA_TYPE_LKEY@GOTPCREL(%rip), %r8
	movq	_OCRDMA_WQE_TYPE_SHIFT@GOTPCREL(%rip), %r9
	movq	_OCRDMA_WQE_SIZE_SHIFT@GOTPCREL(%rip), %r10
	movq	_OCRDMA_WQE_NXT_WQE_SIZE_SHIFT@GOTPCREL(%rip), %r11
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$2, (%rdx)
	movl	(%r8), %edi
	movzbl	(%r9), %ecx
	shll	%cl, %edi
	orl	$2, %edi
	movl	%edi, (%rdx)
	movzbl	(%r10), %ecx
	movl	$8, %ebx
	shll	%cl, %ebx
	orl	%edi, %ebx
	movl	%ebx, (%rdx)
	movzbl	(%r11), %ecx
	movl	$8, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	movl	%edi, (%rdx)
	addq	%rsi, %rdx
	decq	%rax
	jne	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCRDMA_TYPE_LKEY,4,2           ## @OCRDMA_TYPE_LKEY
	.comm	_OCRDMA_WQE_TYPE_SHIFT,4,2      ## @OCRDMA_WQE_TYPE_SHIFT
	.comm	_OCRDMA_WQE_SIZE_SHIFT,4,2      ## @OCRDMA_WQE_SIZE_SHIFT
	.comm	_OCRDMA_WQE_NXT_WQE_SIZE_SHIFT,4,2 ## @OCRDMA_WQE_NXT_WQE_SIZE_SHIFT
	.no_dead_strip	_ocrdma_set_create_qp_ird_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_set_create_qp_ird_cmd
_ocrdma_set_create_qp_ird_cmd:          ; @ocrdma_set_create_qp_ird_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x1, #8]
	ldr	w0, [x8]
	bl	_get_ocrdma_dev
	mov	x20, x0
	ldr	x0, [x0, #24]
	str	wzr, [sp, #12]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldp	w23, w8, [x20]
	mul	w22, w8, w23
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x1, x22
	bl	_dma_alloc_coherent
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x0, [x21]
	ldr	w1, [x20, #4]
	ldr	w2, [sp, #12]
	mov	x3, x23
	bl	_ocrdma_build_q_pages
	ldrsw	x8, [x20, #16]
	sdiv	w9, w22, w8
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	x10, [x19]
Lloh3:
	adrp	x11, _OCRDMA_TYPE_LKEY@GOTPAGE
Lloh4:
	ldr	x11, [x11, _OCRDMA_TYPE_LKEY@GOTPAGEOFF]
Lloh5:
	adrp	x12, _OCRDMA_WQE_TYPE_SHIFT@GOTPAGE
Lloh6:
	ldr	x12, [x12, _OCRDMA_WQE_TYPE_SHIFT@GOTPAGEOFF]
	mov	w13, #2
Lloh7:
	adrp	x14, _OCRDMA_WQE_SIZE_SHIFT@GOTPAGE
Lloh8:
	ldr	x14, [x14, _OCRDMA_WQE_SIZE_SHIFT@GOTPAGEOFF]
	mov	w15, #8
Lloh9:
	adrp	x16, _OCRDMA_WQE_NXT_WQE_SIZE_SHIFT@GOTPAGE
Lloh10:
	ldr	x16, [x16, _OCRDMA_WQE_NXT_WQE_SIZE_SHIFT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	w13, [x10]
	ldr	w17, [x11]
	ldr	w0, [x12]
	lsl	w17, w17, w0
	orr	w17, w17, #0x2
	str	w17, [x10]
	ldr	w0, [x14]
	lsl	w0, w15, w0
	orr	w17, w0, w17
	str	w17, [x10]
	ldr	w0, [x16]
	lsl	w0, w15, w0
	orr	w17, w0, w17
	str	w17, [x10]
	add	x10, x10, x8
	subs	x9, x9, #1
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCRDMA_TYPE_LKEY,4,2           ; @OCRDMA_TYPE_LKEY
	.comm	_OCRDMA_WQE_TYPE_SHIFT,4,2      ; @OCRDMA_WQE_TYPE_SHIFT
	.comm	_OCRDMA_WQE_SIZE_SHIFT,4,2      ; @OCRDMA_WQE_SIZE_SHIFT
	.comm	_OCRDMA_WQE_NXT_WQE_SIZE_SHIFT,4,2 ; @OCRDMA_WQE_NXT_WQE_SIZE_SHIFT
	.no_dead_strip	_ocrdma_set_create_qp_ird_cmd
.subsections_via_symbols
