	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rdma_counter_alloc
_rdma_counter_alloc:                    ## @rdma_counter_alloc
	.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
	cmpl	$0, 16(%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_9
## %bb.2:
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r12
	movq	%rbx, 32(%rax)
	movq	%r15, (%rax)
	movq	_RDMA_RESTRACK_COUNTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	%r12, %rdi
	callq	*8(%rbx)
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	(%rbx), %r13
	leaq	(%r15,%r15,2), %rbx
	leaq	(,%rbx,4), %r15
	addq	%r13, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_RDMA_COUNTER_MODE_MANUAL@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_6
## %bb.5:
	leaq	8(,%rbx,4), %rdi
	addq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	___counter_set_mode
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	8(%r12), %rdi
	callq	_kfree
LBB0_8:
	movq	%r12, %rdi
	callq	_kfree
LBB0_9:
	xorl	%r12d, %r12d
LBB0_10:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	incl	4(%r13,%rbx,4)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r14d, 24(%r12)
	leaq	20(%r12), %rdi
	callq	_kref_init
	movq	%r12, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RDMA_RESTRACK_COUNTER,4,2      ## @RDMA_RESTRACK_COUNTER
	.comm	_RDMA_COUNTER_MODE_MANUAL,4,2   ## @RDMA_COUNTER_MODE_MANUAL
	.no_dead_strip	_rdma_counter_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rdma_counter_alloc
_rdma_counter_alloc:                    ; @rdma_counter_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x22, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.3:
	str	x22, [x19, #32]
	str	x21, [x19]
Lloh3:
	adrp	x8, _RDMA_RESTRACK_COUNTER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RDMA_RESTRACK_COUNTER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldr	x8, [x22, #8]
	mov	x0, x19
	blr	x8
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x23, [x22]
	mov	w8, #12
	madd	x22, x21, x8, x23
	mov	x0, x22
	bl	_mutex_lock
Lloh6:
	adrp	x8, _RDMA_COUNTER_MODE_MANUAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RDMA_COUNTER_MODE_MANUAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.5:
	mov	w8, #12
	madd	x8, x21, x8, x23
	add	x0, x8, #8
	mov	x1, x20
	mov	w2, #0
	bl	___counter_set_mode
	cbz	w0, LBB0_10
; %bb.6:
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w8, #12
	madd	x8, x21, x8, x23
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	str	w9, [x8, #4]
	mov	x0, x22
	bl	_mutex_unlock
	str	w20, [x19, #24]
	add	x0, x19, #20
	bl	_kref_init
	add	x0, x19, #16
	bl	_mutex_init
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RDMA_RESTRACK_COUNTER,4,2      ; @RDMA_RESTRACK_COUNTER
	.comm	_RDMA_COUNTER_MODE_MANUAL,4,2   ; @RDMA_COUNTER_MODE_MANUAL
	.no_dead_strip	_rdma_counter_alloc
.subsections_via_symbols
