	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_open
_i40iw_open:                            ## @i40iw_open
	.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	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_i40iw_find_netdev
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_24
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$112, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	leaq	8(%rax), %r14
	movq	%rax, 104(%rax)
	movq	%r14, %rdi
	callq	_i40iw_setup_cm_core
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	104(%r15), %rdi
	callq	_kfree
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_5:
	movq	%r14, 72(%r15)
	movq	%r15, 96(%r15)
	movq	%r12, 88(%r15)
	leaq	80(%r15), %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	callq	_i40iw_add_handler
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_i40iw_setup_init_state
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.6:
	movq	_INITIAL_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	cmpq	$0, 64(%r15)
	je	LBB0_8
## %bb.7:
	movl	56(%r15), %edi
	callq	_i40iw_wait_pe_ready
LBB0_8:
	movq	%r14, %rdi
	callq	_i40iw_create_cqp
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.9:
	movq	_CQP_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	callq	_i40iw_hmc_setup
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.10:
	movq	%r14, %rdi
	callq	_i40iw_create_ccq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.11:
	movq	_CCQ_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	callq	_i40iw_initialize_ilq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.12:
	movq	_ILQ_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	callq	_i40iw_initialize_ieq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.13:
	movq	_IEQ_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	callq	_i40iw_setup_aeq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.14:
	movq	_AEQ_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_i40iw_setup_ceqs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.15:
	movq	_CEQ_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	callq	_i40iw_initialize_hw_resources
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.16:
	movq	%r15, %rbx
	addq	$40, %rbx
	movq	%r14, %rdi
	callq	_i40iw_get_used_rsrc
	movq	48(%r15), %rax
	movl	40(%r15), %edi
	callq	*(%rax)
	movl	32(%r15), %esi
	movq	%rbx, %rdi
	callq	_i40iw_hmc_init_pble
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.17:
	movq	_PBLE_CHUNK_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	_WQ_MEM_RECLAIM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_alloc_ordered_workqueue
	movq	%rax, 24(%r15)
	movq	%r14, %rdi
	callq	_i40iw_add_mac_ip
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.18:
	movq	_IP_ADDR_REGISTERED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r14, %rdi
	callq	_i40iw_register_rdma_device
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_i40iw_pr_err
LBB0_22:
	movl	12(%r15), %edx
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_i40iw_pr_err
	movq	%r14, %rdi
	callq	_i40iw_deinit_device
	movq	_ERESTART@GOTPCREL(%rip), %rax
LBB0_23:
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_RDMA_DEV_REGISTERED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movl	$1, 8(%r15)
	movq	%r14, %rdi
	callq	_i40iw_port_ibevent
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_alloc_ordered_workqueue
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_21
## %bb.25:
	leaq	L_.str.3(%rip), %rdi
	callq	_i40iw_pr_info
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_21:
	xorl	%r12d, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INITIAL_STATE,4,2              ## @INITIAL_STATE
	.comm	_CQP_CREATED,4,2                ## @CQP_CREATED
	.comm	_CCQ_CREATED,4,2                ## @CCQ_CREATED
	.comm	_ILQ_CREATED,4,2                ## @ILQ_CREATED
	.comm	_IEQ_CREATED,4,2                ## @IEQ_CREATED
	.comm	_AEQ_CREATED,4,2                ## @AEQ_CREATED
	.comm	_CEQ_CREATED,4,2                ## @CEQ_CREATED
	.comm	_PBLE_CHUNK_MEM,4,2             ## @PBLE_CHUNK_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iwvch"

	.comm	_WQ_MEM_RECLAIM,4,2             ## @WQ_MEM_RECLAIM
	.comm	_IP_ADDR_REGISTERED,4,2         ## @IP_ADDR_REGISTERED
L_.str.1:                               ## @.str.1
	.asciz	"register rdma device fail\n"

	.comm	_RDMA_DEV_REGISTERED,4,2        ## @RDMA_DEV_REGISTERED
L_.str.2:                               ## @.str.2
	.asciz	"l2params"

L_.str.3:                               ## @.str.3
	.asciz	"i40iw_open completed\n"

L_.str.4:                               ## @.str.4
	.asciz	"status = %d last completion = %d\n"

	.comm	_ERESTART,4,2                   ## @ERESTART
	.no_dead_strip	_i40iw_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_open
_i40iw_open:                            ; @i40iw_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_i40iw_find_netdev
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_23
LBB0_2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #112
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	add	x19, x0, #8
	str	x0, [x0, #104]
	mov	x0, x19
	bl	_i40iw_setup_cm_core
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x0, [x20, #104]
	bl	_kfree
LBB0_5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_22
LBB0_6:
	str	x19, [x20, #72]
	add	x0, x20, #80
	stp	x22, x20, [x20, #88]
	bl	_mutex_init
	mov	x0, x20
	bl	_i40iw_add_handler
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_i40iw_setup_init_state
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.7:
Lloh5:
	adrp	x8, _INITIAL_STATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INITIAL_STATE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	ldr	x8, [x20, #64]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w0, [x20, #56]
	bl	_i40iw_wait_pe_ready
LBB0_9:
	mov	x0, x19
	bl	_i40iw_create_cqp
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.10:
Lloh8:
	adrp	x8, _CQP_CREATED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CQP_CREATED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_i40iw_hmc_setup
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.11:
	mov	x0, x19
	bl	_i40iw_create_ccq
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.12:
Lloh11:
	adrp	x8, _CCQ_CREATED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CCQ_CREATED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_i40iw_initialize_ilq
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.13:
Lloh14:
	adrp	x8, _ILQ_CREATED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ILQ_CREATED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_i40iw_initialize_ieq
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.14:
Lloh17:
	adrp	x8, _IEQ_CREATED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IEQ_CREATED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_i40iw_setup_aeq
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.15:
Lloh20:
	adrp	x8, _AEQ_CREATED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AEQ_CREATED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	mov	x1, x21
	bl	_i40iw_setup_ceqs
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.16:
Lloh23:
	adrp	x8, _CEQ_CREATED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CEQ_CREATED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_i40iw_initialize_hw_resources
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.17:
	add	x21, x20, #40
	mov	x0, x19
	bl	_i40iw_get_used_rsrc
	ldr	x8, [x20, #48]
	ldr	x8, [x8]
	ldr	w0, [x20, #40]
	blr	x8
	ldr	w1, [x20, #32]
	mov	x0, x21
	bl	_i40iw_hmc_init_pble
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.18:
Lloh26:
	adrp	x8, _PBLE_CHUNK_MEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PBLE_CHUNK_MEM@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x20, #12]
Lloh29:
	adrp	x21, _WQ_MEM_RECLAIM@GOTPAGE
Lloh30:
	ldr	x21, [x21, _WQ_MEM_RECLAIM@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	bl	_alloc_ordered_workqueue
	str	x0, [x20, #24]
	mov	x0, x19
	bl	_i40iw_add_mac_ip
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_21
; %bb.19:
Lloh33:
	adrp	x8, _IP_ADDR_REGISTERED@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IP_ADDR_REGISTERED@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_i40iw_register_rdma_device
	cbz	x0, LBB0_24
; %bb.20:
Lloh36:
	adrp	x0, l_.str.1@PAGE
Lloh37:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_i40iw_pr_err
	mov	w0, #0
LBB0_21:
	ldr	w8, [x20, #12]
	stp	x0, x8, [sp]
Lloh38:
	adrp	x0, l_.str.4@PAGE
Lloh39:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_i40iw_pr_err
	mov	x0, x19
	bl	_i40iw_deinit_device
Lloh40:
	adrp	x8, _ERESTART@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ERESTART@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	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
	add	sp, sp, #64
	ret
LBB0_24:
Lloh42:
	adrp	x8, _RDMA_DEV_REGISTERED@GOTPAGE
Lloh43:
	ldr	x8, [x8, _RDMA_DEV_REGISTERED@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x20, #8]
	mov	x0, x19
	bl	_i40iw_port_ibevent
	ldr	w1, [x21]
Lloh45:
	adrp	x0, l_.str.2@PAGE
Lloh46:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_alloc_ordered_workqueue
	str	x0, [x20, #16]
	cbz	x0, LBB0_21
; %bb.25:
Lloh47:
	adrp	x0, l_.str.3@PAGE
Lloh48:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_i40iw_pr_info
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INITIAL_STATE,4,2              ; @INITIAL_STATE
	.comm	_CQP_CREATED,4,2                ; @CQP_CREATED
	.comm	_CCQ_CREATED,4,2                ; @CCQ_CREATED
	.comm	_ILQ_CREATED,4,2                ; @ILQ_CREATED
	.comm	_IEQ_CREATED,4,2                ; @IEQ_CREATED
	.comm	_AEQ_CREATED,4,2                ; @AEQ_CREATED
	.comm	_CEQ_CREATED,4,2                ; @CEQ_CREATED
	.comm	_PBLE_CHUNK_MEM,4,2             ; @PBLE_CHUNK_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iwvch"

	.comm	_WQ_MEM_RECLAIM,4,2             ; @WQ_MEM_RECLAIM
	.comm	_IP_ADDR_REGISTERED,4,2         ; @IP_ADDR_REGISTERED
l_.str.1:                               ; @.str.1
	.asciz	"register rdma device fail\n"

	.comm	_RDMA_DEV_REGISTERED,4,2        ; @RDMA_DEV_REGISTERED
l_.str.2:                               ; @.str.2
	.asciz	"l2params"

l_.str.3:                               ; @.str.3
	.asciz	"i40iw_open completed\n"

l_.str.4:                               ; @.str.4
	.asciz	"status = %d last completion = %d\n"

	.comm	_ERESTART,4,2                   ; @ERESTART
	.no_dead_strip	_i40iw_open
.subsections_via_symbols
