	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_create_rcvhdrq             ## -- Begin function qib_create_rcvhdrq
	.p2align	4, 0x90
_qib_create_rcvhdrq:                    ## @qib_create_rcvhdrq
	.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, %r12
	movq	%rdi, %r15
	movq	8(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movl	4(%r12), %r14d
	jmp	LBB0_12
LBB0_2:
	movl	(%r15), %edi
	imull	4(%r15), %edi
	shll	$2, %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ALIGN
	movl	%eax, %r14d
	movl	32(%r12), %eax
	cmpl	24(%r15), %eax
	jge	LBB0_3
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_GFP_USER@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r13d
	movq	16(%r15), %rdi
	callq	_dev_to_node
	movl	%eax, %ebx
	movq	16(%r15), %rdi
	movl	(%r12), %esi
	callq	_set_dev_node
	movq	16(%r15), %rdi
	leaq	16(%r12), %rdx
	movq	___GFP_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	%r13d, %ecx
	movl	%r14d, %esi
	callq	_dma_alloc_coherent
	movq	%rax, 8(%r12)
	movq	16(%r15), %rdi
	movl	%ebx, %esi
	callq	_set_dev_node
	cmpq	$0, 8(%r12)
	movl	32(%r12), %ecx
	je	LBB0_18
## %bb.6:
	cmpl	24(%r15), %ecx
	jl	LBB0_8
## %bb.7:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vmalloc_user
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_15
LBB0_8:
	movq	_QIB_NODMA_RTAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	jne	LBB0_11
## %bb.9:
	movq	16(%r15), %rdi
	movl	(%r12), %esi
	callq	_set_dev_node
	movq	16(%r15), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movl	%r13d, %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 40(%r12)
	movq	16(%r15), %rdi
	movl	%ebx, %esi
	callq	_set_dev_node
	cmpq	$0, 40(%r12)
	je	LBB0_14
## %bb.10:
	movl	-44(%rbp), %eax
	movl	%eax, 48(%r12)
LBB0_11:
	movl	%r14d, 4(%r12)
	movq	8(%r12), %rdi
LBB0_12:
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	40(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.13:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_17
LBB0_18:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_qib_dev_err
	jmp	LBB0_16
LBB0_14:
	movl	32(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_qib_dev_err
	movq	24(%r12), %rdi
	callq	_vfree
	movq	$0, 24(%r12)
LBB0_15:
	movq	16(%r15), %rdi
	movq	8(%r12), %rdx
	movl	16(%r12), %ecx
	movl	%r14d, %esi
	callq	_dma_free_coherent
	movq	$0, 8(%r12)
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_USER,4,2                   ## @GFP_USER
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_COMP,4,2                 ## @__GFP_COMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attempt to allocate %d bytes for ctxt %u rcvhdrq failed\n"

	.comm	_QIB_NODMA_RTAIL,4,2            ## @QIB_NODMA_RTAIL
L_.str.1:                               ## @.str.1
	.asciz	"attempt to allocate 1 page for ctxt %u rcvhdrqtailaddr failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_create_rcvhdrq             ; -- Begin function qib_create_rcvhdrq
	.p2align	2
_qib_create_rcvhdrq:                    ; @qib_create_rcvhdrq
	.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	x0, [x1, #8]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w20, [x19, #4]
	b	LBB0_9
LBB0_2:
	ldp	w8, w9, [x21]
	mul	w8, w8, w9
	lsl	w0, w8, #2
Lloh0:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_ALIGN
	mov	x20, x0
	ldr	w8, [x19, #32]
	ldr	w9, [x21, #24]
Lloh2:
	adrp	x10, _GFP_USER@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GFP_USER@GOTPAGEOFF]
Lloh4:
	adrp	x11, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x11, [x11, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x11, x10, lt
	ldr	w23, [x8]
	ldr	x0, [x21, #16]
	bl	_dev_to_node
	mov	x22, x0
	ldr	x0, [x21, #16]
	ldr	w1, [x19]
	bl	_set_dev_node
	ldr	x0, [x21, #16]
	add	x2, x19, #16
Lloh6:
	adrp	x8, ___GFP_COMP@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___GFP_COMP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w3, w8, w23
	mov	x1, x20
	bl	_dma_alloc_coherent
	str	x0, [x19, #8]
	ldr	x0, [x21, #16]
	mov	x1, x22
	bl	_set_dev_node
	ldr	x9, [x19, #8]
	ldr	w8, [x19, #32]
	cbz	x9, LBB0_11
; %bb.3:
	ldr	w9, [x21, #24]
	cmp	w8, w9
	b.lt	LBB0_5
; %bb.4:
	ldr	w0, [x24]
	bl	_vmalloc_user
	str	x0, [x19, #24]
	cbz	x0, LBB0_13
LBB0_5:
	ldr	w8, [x21, #8]
Lloh9:
	adrp	x9, _QIB_NODMA_RTAIL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QIB_NODMA_RTAIL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.6:
	ldr	x0, [x21, #16]
	ldr	w1, [x19]
	bl	_set_dev_node
	ldr	x0, [x21, #16]
	ldr	w1, [x24]
	add	x2, sp, #12
	mov	x3, x23
	bl	_dma_alloc_coherent
	str	x0, [x19, #40]
	ldr	x0, [x21, #16]
	mov	x1, x22
	bl	_set_dev_node
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_12
; %bb.7:
	ldr	w8, [sp, #12]
	str	w8, [x19, #48]
LBB0_8:
	str	w20, [x19, #4]
	ldr	x0, [x19, #8]
LBB0_9:
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_15
; %bb.10:
Lloh12:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	mov	w0, #0
	b	LBB0_15
LBB0_11:
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_qib_dev_err
	b	LBB0_14
LBB0_12:
	ldr	w2, [x19, #32]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_qib_dev_err
	ldr	x0, [x19, #24]
	bl	_vfree
	str	xzr, [x19, #24]
LBB0_13:
	ldr	x0, [x21, #16]
	ldr	x2, [x19, #8]
	ldr	w3, [x19, #16]
	mov	x1, x20
	bl	_dma_free_coherent
	str	xzr, [x19, #8]
LBB0_14:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_USER,4,2                   ; @GFP_USER
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_COMP,4,2                 ; @__GFP_COMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempt to allocate %d bytes for ctxt %u rcvhdrq failed\n"

	.comm	_QIB_NODMA_RTAIL,4,2            ; @QIB_NODMA_RTAIL
l_.str.1:                               ; @.str.1
	.asciz	"attempt to allocate 1 page for ctxt %u rcvhdrqtailaddr failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
