	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function c2_alloc_mqsp_chunk
_c2_alloc_mqsp_chunk:                   ## @c2_alloc_mqsp_chunk
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ecx
	movq	(%rdi), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	-28(%rbp), %edx
	movl	%edx, 24(%rax)
	movq	_mapping@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_unmap_addr_set
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movslq	(%rbx), %rdx
	addq	$-36, %rdx
	andq	$-4, %rdx
	xorl	%eax, %eax
	movq	(%r15), %rcx
	cmpq	$4, %rdx
	jne	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_4:
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, %rsi
	incq	%rdx
	movl	%edx, (%rcx,%rsi,4)
	movslq	(%rbx), %rsi
	addq	$-36, %rsi
	shrq	$2, %rsi
	decq	%rsi
	cmpq	%rdx, %rsi
	ja	LBB0_5
## %bb.6:
	movl	%edx, %edx
LBB0_7:
	movl	$65535, (%rcx,%rdx,4)           ## imm = 0xFFFF
	movq	%r15, (%r14)
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mapping,4,2                    ## @mapping
	.no_dead_strip	_c2_alloc_mqsp_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function c2_alloc_mqsp_chunk
_c2_alloc_mqsp_chunk:                   ; @c2_alloc_mqsp_chunk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x3, x1
	ldr	x0, [x0]
Lloh0:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w2, [sp, #12]
	str	w2, [x0, #24]
Lloh2:
	adrp	x8, _mapping@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mapping@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_pci_unmap_addr_set
	mov	x9, #0
	stp	xzr, xzr, [x20, #8]
	ldrsw	x8, [x21]
	sub	x8, x8, #36
	and	x10, x8, #0xfffffffffffffffc
	ldr	x8, [x20]
	cmp	x10, #4
	b.eq	LBB0_5
; %bb.2:
	mov	x10, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x9, x10, #1
	str	w9, [x8, x10, lsl #2]
	ldrsw	x10, [x21]
	sub	x10, x10, #36
	lsr	x10, x10, #2
	sub	x11, x10, #1
	mov	x10, x9
	cmp	x11, x9
	b.hi	LBB0_3
; %bb.4:
	and	x9, x9, #0xffffffff
LBB0_5:
	mov	w0, #0
	mov	w10, #65535
	str	w10, [x8, x9, lsl #2]
	str	x20, [x19]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mapping,4,2                    ; @mapping
	.no_dead_strip	_c2_alloc_mqsp_chunk
.subsections_via_symbols
