	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rds_iw_add_one
_rds_iw_add_one:                        ## @rds_iw_add_one
	.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), %rax
	movq	_RDMA_NODE_RNIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$72, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_ib_query_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_rdsdebug
	jmp	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %esi
	movl	$72, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	%rax, %r15
	leaq	68(%rax), %rdi
	callq	_spin_lock_init
	movq	_IB_DEVICE_LOCAL_DMA_LKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	4(%r14), %eax
	setne	%cl
	movl	%ecx, (%r15)
	movl	60(%r14), %eax
	movl	%eax, 64(%r15)
	movl	56(%r14), %edi
	movq	_RDS_IW_MAX_SGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, 56(%r15)
	movq	%rbx, 48(%r15)
	movq	%rbx, %rdi
	callq	_ib_alloc_pd
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:
	cmpl	$0, (%r15)
	je	LBB0_7
## %bb.8:
	movq	$0, 16(%r15)
LBB0_9:
	movq	%r15, %rdi
	callq	_rds_iw_create_mr_pool
	movq	%rax, 40(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	$0, 40(%r15)
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_ib_dereg_mr
	jmp	LBB0_12
LBB0_7:
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	8(%r15), %rdi
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_ib_get_dma_mr
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
LBB0_12:
	movq	8(%r15), %rdi
	callq	_ib_dealloc_pd
LBB0_13:
	movq	%r15, %rdi
	callq	_kfree
LBB0_14:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_16:
	leaq	32(%r15), %rdi
	callq	_INIT_LIST_HEAD
	leaq	28(%r15), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r15, %rdi
	addq	$24, %rdi
	movq	_rds_iw_devices@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	_rds_iw_client@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_ib_set_client_data
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_RDMA_NODE_RNIC,8,3             ## @RDMA_NODE_RNIC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Query device failed for %s\n"

	.comm	_IB_DEVICE_LOCAL_DMA_LKEY,4,2   ## @IB_DEVICE_LOCAL_DMA_LKEY
	.comm	_RDS_IW_MAX_SGE,4,2             ## @RDS_IW_MAX_SGE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_rds_iw_devices,4,2             ## @rds_iw_devices
	.comm	_rds_iw_client,4,2              ## @rds_iw_client
	.no_dead_strip	_rds_iw_add_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rds_iw_add_one
_rds_iw_add_one:                        ; @rds_iw_add_one
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RDMA_NODE_RNIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RDMA_NODE_RNIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #72
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_ib_query_device
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w1, [x20, #8]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rdsdebug
	b	LBB0_15
LBB0_4:
	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_5:
	ldr	w1, [x21]
	mov	w0, #72
	bl	_kmalloc
	cbz	x0, LBB0_15
; %bb.6:
	mov	x21, x0
	add	x0, x0, #68
	bl	_spin_lock_init
	ldr	w8, [x19, #4]
Lloh7:
	adrp	x9, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x21]
	ldp	w0, w8, [x19, #56]
	str	w8, [x21, #64]
Lloh10:
	adrp	x8, _RDS_IW_MAX_SGE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RDS_IW_MAX_SGE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_min
	str	w0, [x21, #56]
	str	x20, [x21, #48]
	mov	x0, x20
	bl	_ib_alloc_pd
	str	x0, [x21, #8]
	bl	_IS_ERR
	cbnz	x0, LBB0_14
; %bb.7:
	ldr	w8, [x21]
	cbz	w8, LBB0_12
; %bb.8:
	str	xzr, [x21, #16]
LBB0_9:
	mov	x0, x21
	bl	_rds_iw_create_mr_pool
	str	x0, [x21, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.10:
	str	xzr, [x21, #40]
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_13
; %bb.11:
	bl	_ib_dereg_mr
	b	LBB0_13
LBB0_12:
	ldr	x0, [x21, #8]
Lloh13:
	adrp	x8, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_ib_get_dma_mr
	str	x0, [x21, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
LBB0_13:
	ldr	x0, [x21, #8]
	bl	_ib_dealloc_pd
LBB0_14:
	mov	x0, x21
	bl	_kfree
LBB0_15:
	mov	x0, x19
	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
	b	_kfree
LBB0_16:
	add	x0, x21, #32
	bl	_INIT_LIST_HEAD
	add	x0, x21, #28
	bl	_INIT_LIST_HEAD
	add	x0, x21, #24
Lloh22:
	adrp	x1, _rds_iw_devices@GOTPAGE
Lloh23:
	ldr	x1, [x1, _rds_iw_devices@GOTPAGEOFF]
	bl	_list_add_tail
Lloh24:
	adrp	x1, _rds_iw_client@GOTPAGE
Lloh25:
	ldr	x1, [x1, _rds_iw_client@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, x21
	bl	_ib_set_client_data
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_RDMA_NODE_RNIC,8,3             ; @RDMA_NODE_RNIC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Query device failed for %s\n"

	.comm	_IB_DEVICE_LOCAL_DMA_LKEY,4,2   ; @IB_DEVICE_LOCAL_DMA_LKEY
	.comm	_RDS_IW_MAX_SGE,4,2             ; @RDS_IW_MAX_SGE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_rds_iw_devices,4,2             ; @rds_iw_devices
	.comm	_rds_iw_client,4,2              ; @rds_iw_client
	.no_dead_strip	_rds_iw_add_one
.subsections_via_symbols
