	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iser_create_device_ib_res
_iser_create_device_ib_res:             ## @iser_create_device_ib_res
	.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
	movq	%rdi, %r13
	movq	_ISER_MAX_CQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	64(%r13), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, (%r13)
	movq	64(%r13), %rdx
	movl	(%rdx), %ecx
	movl	4(%rdx), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_iser_info
	movl	(%r13), %edi
	shll	$4, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 8(%r13)
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	64(%r13), %rdi
	callq	_ib_alloc_pd
	movq	%rax, 16(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_24
## %bb.2:
	cmpl	$0, (%r13)
	jle	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, 8(%rax,%r15,4)
	movl	%r14d, (%rax,%r15,4)
	movq	64(%r13), %rdi
	movq	_iser_cq_callback@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_iser_cq_event_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISER_MAX_RX_CQ_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rcx
	movl	%r14d, %r9d
	callq	_ib_create_cq
	movq	24(%r13), %rcx
	movq	%rax, (%rcx,%r15,2)
	movq	24(%r13), %rax
	movq	(%rax,%r15,2), %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	64(%r13), %rdi
	movq	_iser_cq_event_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISER_MAX_TX_CQ_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	movq	%r12, %rcx
	movl	%r14d, %r9d
	callq	_ib_create_cq
	movq	32(%r13), %rcx
	movq	%rax, (%rcx,%r15,2)
	movq	32(%r13), %rax
	movq	(%rax,%r15,2), %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r13), %rax
	movq	(%rax,%r15,2), %rdi
	movq	_IB_CQ_NEXT_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ib_req_notify_cq
	testq	%rax, %rax
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	40(%r13), %rdi
	addq	%r15, %rdi
	movq	_iser_cq_tasklet_fn@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_tasklet_init
	incq	%r14
	movslq	(%r13), %rax
	addq	$4, %r15
	addq	$16, %rbx
	addq	$16, %r12
	cmpq	%rax, %r14
	jl	LBB0_5
	jmp	LBB0_9
LBB0_3:
	xorl	%r14d, %r14d
LBB0_9:
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	16(%r13), %rdi
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_ib_get_dma_mr
	movq	%rax, 48(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_13
## %bb.10:
	leaq	56(%r13), %r15
	movq	64(%r13), %rsi
	movq	_iser_event_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_INIT_IB_EVENT_HANDLER
	movq	%r15, %rdi
	callq	_ib_register_event_handler
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	48(%r13), %rdi
	callq	_ib_dereg_mr
LBB0_13:
	cmpl	$0, (%r13)
	jle	LBB0_16
## %bb.14:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rdi
	addq	%r15, %rdi
	callq	_tasklet_kill
	incq	%rbx
	movslq	(%r13), %rax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.17:
	movl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_23
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	callq	_ib_destroy_cq
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	24(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	callq	_ib_destroy_cq
	jmp	LBB0_22
LBB0_23:
	movq	16(%r13), %rdi
	callq	_ib_dealloc_pd
LBB0_24:
	movq	8(%r13), %rdi
	callq	_kfree
LBB0_25:
	leaq	L_.str.1(%rip), %rdi
	callq	_iser_err
	movl	$-1, %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_ISER_MAX_CQ,4,2                ## @ISER_MAX_CQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using %d CQs, device %s supports %d vectors\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_iser_cq_callback,8,3           ## @iser_cq_callback
	.comm	_iser_cq_event_callback,4,2     ## @iser_cq_event_callback
	.comm	_ISER_MAX_RX_CQ_LEN,4,2         ## @ISER_MAX_RX_CQ_LEN
	.comm	_ISER_MAX_TX_CQ_LEN,4,2         ## @ISER_MAX_TX_CQ_LEN
	.comm	_IB_CQ_NEXT_COMP,4,2            ## @IB_CQ_NEXT_COMP
	.comm	_iser_cq_tasklet_fn,4,2         ## @iser_cq_tasklet_fn
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_iser_event_handler,4,2         ## @iser_event_handler
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate an IB resource\n"

	.no_dead_strip	_iser_create_device_ib_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iser_create_device_ib_res
_iser_create_device_ib_res:             ; @iser_create_device_ib_res
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _ISER_MAX_CQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISER_MAX_CQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #64]
	ldr	w1, [x8]
	bl	_min
	mov	x1, x0
	str	w0, [x19]
	ldr	x8, [x19, #64]
	ldp	w3, w2, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_iser_info
	ldr	w8, [x19]
	lsl	w0, w8, #4
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_24
; %bb.1:
	mov	x21, x0
	ldr	x0, [x19, #64]
	bl	_ib_alloc_pd
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbnz	x0, LBB0_23
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x23, #0
	mov	x20, #0
Lloh8:
	adrp	x24, _iser_cq_callback@GOTPAGE
Lloh9:
	ldr	x24, [x24, _iser_cq_callback@GOTPAGEOFF]
Lloh10:
	adrp	x25, _iser_cq_event_callback@GOTPAGE
Lloh11:
	ldr	x25, [x25, _iser_cq_event_callback@GOTPAGEOFF]
Lloh12:
	adrp	x26, _ISER_MAX_RX_CQ_LEN@GOTPAGE
Lloh13:
	ldr	x26, [x26, _ISER_MAX_RX_CQ_LEN@GOTPAGEOFF]
Lloh14:
	adrp	x27, _ISER_MAX_TX_CQ_LEN@GOTPAGE
Lloh15:
	ldr	x27, [x27, _ISER_MAX_TX_CQ_LEN@GOTPAGEOFF]
	mov	x22, x21
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	x19, [x21, #8]
	str	w20, [x21]
	ldr	x0, [x19, #64]
	ldr	x1, [x24]
	ldr	w2, [x25]
	ldr	w4, [x26]
	mov	x3, x21
	mov	x5, x20
	bl	_ib_create_cq
	ldr	x8, [x19, #24]
	lsl	x28, x20, #3
	str	x0, [x8, x28]
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x28]
	bl	_IS_ERR
	cbnz	x0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #64]
	ldr	w2, [x25]
	ldr	w4, [x27]
	mov	x1, #0
	mov	x3, x21
	mov	x5, x20
	bl	_ib_create_cq
	ldr	x8, [x19, #32]
	str	x0, [x8, x28]
	ldr	x8, [x19, #32]
	ldr	x0, [x8, x28]
	bl	_IS_ERR
	cbnz	x0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x20, lsl #3]
Lloh16:
	adrp	x8, _IB_CQ_NEXT_COMP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IB_CQ_NEXT_COMP@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_ib_req_notify_cq
	cbnz	x0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #40]
	add	x0, x8, x23
Lloh19:
	adrp	x8, _iser_cq_tasklet_fn@GOTPAGE
Lloh20:
	ldr	x8, [x8, _iser_cq_tasklet_fn@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_tasklet_init
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x23, x23, #4
	add	x22, x22, #16
	add	x21, x21, #16
	cmp	x20, x8
	b.lt	LBB0_4
	b	LBB0_9
LBB0_8:
	mov	w20, #0
LBB0_9:
	ldr	x0, [x19, #16]
Lloh22:
	adrp	x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh28:
	adrp	x9, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_ib_get_dma_mr
	str	x0, [x19, #48]
	bl	_IS_ERR
	cbnz	x0, LBB0_12
; %bb.10:
	add	x21, x19, #56
	ldr	x1, [x19, #64]
Lloh31:
	adrp	x8, _iser_event_handler@GOTPAGE
Lloh32:
	ldr	x8, [x8, _iser_event_handler@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_INIT_IB_EVENT_HANDLER
	mov	x0, x21
	bl	_ib_register_event_handler
	cbz	x0, LBB0_25
; %bb.11:
	ldr	x0, [x19, #48]
	bl	_ib_dereg_mr
LBB0_12:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x21, #0
	mov	x22, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x0, x8, x21
	bl	_tasklet_kill
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_14
LBB0_15:
	cbz	w20, LBB0_22
; %bb.16:
	mov	x21, #0
	mov	w8, w20
	lsl	x20, x8, #3
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x21, x21, #8
	cmp	x20, x21
	b.eq	LBB0_22
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x0, [x8, x21]
	cbz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	bl	_ib_destroy_cq
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21]
	cbz	x0, LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	bl	_ib_destroy_cq
	b	LBB0_17
LBB0_22:
	ldr	x0, [x19, #16]
	bl	_ib_dealloc_pd
LBB0_23:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_24:
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_iser_err
	mov	w0, #-1
LBB0_25:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ISER_MAX_CQ,4,2                ; @ISER_MAX_CQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using %d CQs, device %s supports %d vectors\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_iser_cq_callback,8,3           ; @iser_cq_callback
	.comm	_iser_cq_event_callback,4,2     ; @iser_cq_event_callback
	.comm	_ISER_MAX_RX_CQ_LEN,4,2         ; @ISER_MAX_RX_CQ_LEN
	.comm	_ISER_MAX_TX_CQ_LEN,4,2         ; @ISER_MAX_TX_CQ_LEN
	.comm	_IB_CQ_NEXT_COMP,4,2            ; @IB_CQ_NEXT_COMP
	.comm	_iser_cq_tasklet_fn,4,2         ; @iser_cq_tasklet_fn
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_iser_event_handler,4,2         ; @iser_event_handler
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate an IB resource\n"

	.no_dead_strip	_iser_create_device_ib_res
.subsections_via_symbols
