	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rxe_add_to_pool                ## -- Begin function rxe_add_to_pool
	.p2align	4, 0x90
_rxe_add_to_pool:                       ## @rxe_add_to_pool
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_RXE_POOL_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_might_sleep_if
	leaq	36(%rbx), %r15
	movq	%r15, %rdi
	callq	_read_lock_irqsave
	movq	8(%rbx), %rax
	movq	_RXE_POOL_STATE_VALID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	leaq	40(%rbx), %rdi
	callq	_kref_get
	movq	%r15, %rdi
	callq	_read_unlock_irqrestore
	movq	24(%rbx), %rdi
	callq	_ib_device_try_get
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	_atomic_inc_return
	cmpq	16(%rbx), %rax
	jle	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	callq	_atomic_dec
	movq	24(%rbx), %rdi
	callq	_ib_device_put
LBB0_6:
	movq	%rbx, %rdi
	callq	_rxe_pool_put
	jmp	LBB0_7
LBB0_1:
	movq	%r15, %rdi
	callq	_read_unlock_irqrestore
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, 8(%r14)
	movq	%r14, %rdi
	callq	_kref_init
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_RXE_POOL_ATOMIC,4,2            ## @RXE_POOL_ATOMIC
	.comm	_RXE_POOL_STATE_VALID,8,3       ## @RXE_POOL_STATE_VALID
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rxe_add_to_pool                ; -- Begin function rxe_add_to_pool
	.p2align	2
_rxe_add_to_pool:                       ; @rxe_add_to_pool
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _RXE_POOL_ATOMIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RXE_POOL_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_might_sleep_if
	add	x21, x19, #36
	mov	x0, x21
	bl	_read_lock_irqsave
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _RXE_POOL_STATE_VALID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RXE_POOL_STATE_VALID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	add	x0, x19, #40
	bl	_kref_get
	mov	x0, x21
	bl	_read_unlock_irqrestore
	ldr	x0, [x19, #24]
	bl	_ib_device_try_get
	cbz	w0, LBB0_4
; %bb.2:
	add	x21, x19, #32
	mov	x0, x21
	bl	_atomic_inc_return
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.3:
	mov	x0, x21
	bl	_atomic_dec
	ldr	x0, [x19, #24]
	bl	_ib_device_put
LBB0_4:
	mov	x0, x19
	bl	_rxe_pool_put
	b	LBB0_6
LBB0_5:
	mov	x0, x21
	bl	_read_unlock_irqrestore
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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:
	str	x19, [x20, #8]
	mov	x0, x20
	bl	_kref_init
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RXE_POOL_ATOMIC,4,2            ; @RXE_POOL_ATOMIC
	.comm	_RXE_POOL_STATE_VALID,8,3       ; @RXE_POOL_STATE_VALID
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
