	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_create_xrc_srq            ## -- Begin function mlx4_create_xrc_srq
	.p2align	4, 0x90
_mlx4_create_xrc_srq:                   ## @mlx4_create_xrc_srq
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$65536, (%rsi)                  ## imm = 0x10000
	jg	LBB0_12
## %bb.1:
	movq	%rsi, %r12
	cmpl	$64, 4(%rsi)
	jg	LBB0_12
## %bb.2:
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$56, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	%rax, %r15
	leaq	52(%rax), %rdi
	movq	_PTHREAD_PROCESS_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pthread_spin_init
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:
	movl	(%r12), %edi
	incl	%edi
	callq	_align_queue_size
	movl	%eax, 48(%r15)
	movl	4(%r12), %eax
	movl	%eax, (%r15)
	movq	$0, 40(%r15)
	movl	$1, 4(%r15)
	movl	8(%r12), %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_mlx4_alloc_srq_buf
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:
	movq	%r14, %rdi
	callq	_to_mctx
	movq	_MLX4_DB_TYPE_RQ@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rax, %rdi
	callq	_mlx4_alloc_db
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	$0, (%rax)
	movq	8(%r15), %rcx
	movq	%rcx, -72(%rbp)
	movq	%rax, -64(%rbp)
	leaq	32(%r15), %rbx
	leaq	-56(%rbp), %r8
	leaq	-48(%rbp), %rax
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	movq	%r12, %rcx
	movl	$24, %r9d
	pushq	$4
	pushq	%rax
	callq	_ibv_cmd_create_srq_ex
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_to_mctx
	movl	36(%r15), %esi
	movq	%rax, %rdi
	movq	%r15, %rdx
	callq	_mlx4_store_xsrq
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movq	%rbx, %rdi
	callq	_ibv_cmd_destroy_srq
LBB0_9:
	movq	%r14, %rdi
	callq	_to_mctx
	movl	(%r13), %esi
	movq	24(%r15), %rdx
	movq	%rax, %rdi
	callq	_mlx4_free_db
LBB0_10:
	movq	16(%r15), %rdi
	callq	_free
	movq	%r15, %rdi
	addq	$8, %rdi
	callq	_mlx4_free_buf
LBB0_11:
	movq	%r15, %rdi
	callq	_free
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTHREAD_PROCESS_PRIVATE,4,2    ## @PTHREAD_PROCESS_PRIVATE
	.comm	_MLX4_DB_TYPE_RQ,4,2            ## @MLX4_DB_TYPE_RQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_create_xrc_srq            ; -- Begin function mlx4_create_xrc_srq
	.p2align	2
_mlx4_create_xrc_srq:                   ; @mlx4_create_xrc_srq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x1]
	cmp	w8, #16, lsl #12                ; =65536
	b.gt	LBB0_12
; %bb.1:
	mov	x21, x1
	ldr	w8, [x1, #4]
	cmp	w8, #64
	b.gt	LBB0_12
; %bb.2:
	mov	x20, x0
	mov	w0, #1
	mov	w1, #56
	bl	_calloc
	cbz	x0, LBB0_12
; %bb.3:
	mov	x19, x0
	add	x0, x0, #52
Lloh0:
	adrp	x8, _PTHREAD_PROCESS_PRIVATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_PROCESS_PRIVATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pthread_spin_init
	cbnz	x0, LBB0_11
; %bb.4:
	ldr	w8, [x21]
	add	w0, w8, #1
	bl	_align_queue_size
	str	w0, [x19, #48]
	str	xzr, [x19, #40]
	mov	w8, #1
	ldp	w9, w0, [x21, #4]
	stp	w9, w8, [x19]
	mov	x1, x21
	mov	x2, x19
	bl	_mlx4_alloc_srq_buf
	cbnz	x0, LBB0_11
; %bb.5:
	mov	x0, x20
	bl	_to_mctx
Lloh3:
	adrp	x23, _MLX4_DB_TYPE_RQ@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MLX4_DB_TYPE_RQ@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_mlx4_alloc_db
	str	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.6:
	str	xzr, [x0]
	ldr	x8, [x19, #8]
	stp	x8, x0, [sp, #8]
	add	x22, x19, #32
	add	x8, sp, #8
	add	x4, x8, #16
	mov	x6, sp
	mov	x0, x20
	mov	x1, x22
	mov	w2, #8
	mov	x3, x21
	mov	w5, #24
	mov	w7, #4
	bl	_ibv_cmd_create_srq_ex
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_to_mctx
	ldr	w1, [x19, #36]
	mov	x2, x19
	bl	_mlx4_store_xsrq
	cbz	w0, LBB0_13
; %bb.8:
	mov	x0, x22
	bl	_ibv_cmd_destroy_srq
LBB0_9:
	mov	x0, x20
	bl	_to_mctx
	ldr	w1, [x23]
	ldr	x2, [x19, #24]
	bl	_mlx4_free_db
LBB0_10:
	ldr	x0, [x19, #16]
	bl	_free
	add	x0, x19, #8
	bl	_mlx4_free_buf
LBB0_11:
	mov	x0, x19
	bl	_free
LBB0_12:
	mov	x22, #0
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PTHREAD_PROCESS_PRIVATE,4,2    ; @PTHREAD_PROCESS_PRIVATE
	.comm	_MLX4_DB_TYPE_RQ,4,2            ; @MLX4_DB_TYPE_RQ
.subsections_via_symbols
