	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocrdma_create_mq
_ocrdma_create_mq:                      ## @ocrdma_create_mq
	.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	%rdi, %r14
	movq	_OCRDMA_MQ_CQ_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rdi, %rsi
	movl	$4, %ecx
	callq	_ocrdma_alloc_q
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	16(%r14), %rdx
	incl	4(%rdx)
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_ocrdma_mbx_mq_cq_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	leaq	8(%r14), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	12(%r14), %rdi
	callq	_init_waitqueue_head
	movq	%rbx, %rdi
	callq	_mutex_init
	leaq	4(%r14), %r15
	movq	_OCRDMA_MQ_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$4, %ecx
	callq	_ocrdma_alloc_q
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ocrdma_mbx_create_mq
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ocrdma_free_q
LBB0_6:
	movq	_QTYPE_CQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_ocrdma_mbx_delete_q
LBB0_7:
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_ocrdma_free_q
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r14), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ocrdma_ring_cq_db
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_OCRDMA_MQ_CQ_LEN,4,2           ## @OCRDMA_MQ_CQ_LEN
	.comm	_OCRDMA_MQ_LEN,4,2              ## @OCRDMA_MQ_LEN
	.comm	_QTYPE_CQ,4,2                   ## @QTYPE_CQ
	.no_dead_strip	_ocrdma_create_mq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_create_mq
_ocrdma_create_mq:                      ; @ocrdma_create_mq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
Lloh0:
	adrp	x8, _OCRDMA_MQ_CQ_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OCRDMA_MQ_CQ_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x0
	mov	w3, #4
	bl	_ocrdma_alloc_q
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x2, [x19, #16]
	ldr	w8, [x2, #4]
	add	w8, w8, #1
	str	w8, [x2, #4]
	mov	x0, x19
	mov	x1, x19
	bl	_ocrdma_mbx_mq_cq_create
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.2:
	add	x20, x19, #8
	mov	x0, x20
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x0, x19, #12
	bl	_init_waitqueue_head
	mov	x0, x20
	bl	_mutex_init
	add	x21, x19, #4
Lloh3:
	adrp	x8, _OCRDMA_MQ_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OCRDMA_MQ_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	w3, #4
	bl	_ocrdma_alloc_q
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x19
	bl	_ocrdma_mbx_create_mq
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_ocrdma_free_q
LBB0_5:
Lloh6:
	adrp	x8, _QTYPE_CQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QTYPE_CQ@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x19
	bl	_ocrdma_mbx_delete_q
LBB0_6:
	mov	x0, x19
	mov	x1, x19
	bl	_ocrdma_free_q
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w1, [x19]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	bl	_ocrdma_ring_cq_db
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OCRDMA_MQ_CQ_LEN,4,2           ; @OCRDMA_MQ_CQ_LEN
	.comm	_OCRDMA_MQ_LEN,4,2              ; @OCRDMA_MQ_LEN
	.comm	_QTYPE_CQ,4,2                   ; @QTYPE_CQ
	.no_dead_strip	_ocrdma_create_mq
.subsections_via_symbols
