	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nic_dev_init
_nic_dev_init:                          ## @nic_dev_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_hinic_init_hwdev
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.24:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	callq	_hinic_hwdev_num_qps
	testl	%eax, %eax
	jle	LBB0_2
## %bb.4:
	movl	$88, %edi
	movl	%eax, %esi
	callq	_alloc_etherdev_mq
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hinic_set_ethtool_ops
	movq	_hinic_netdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r15)
	movq	_ETH_MAX_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r15, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%r15, 16(%rax)
	movq	%r14, 8(%rax)
	movq	_MSG_ENABLE_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r12)
	movq	$0, 72(%r12)
	movq	_tx_weight@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	_rx_weight@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r12)
	leaq	40(%r12), %rdi
	movl	$1, %esi
	callq	_sema_init
	leaq	36(%r12), %rdi
	callq	_u64_stats_init
	leaq	32(%r12), %rdi
	callq	_u64_stats_init
	movq	%r12, %rdi
	callq	_VLAN_BITMAP_SIZE
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_devm_kzalloc
	movl	%eax, 28(%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_HINIC_WQ_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_create_singlethread_workqueue
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movl	8(%r15), %esi
	movq	%r12, %rdi
	callq	_hinic_port_get_mac
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_warn
LBB0_11:
	movl	8(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_hinic_port_add_mac
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_14:
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_hinic_port_set_mtu
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
LBB0_13:
	movq	%r13, %rdi
	callq	_dev_err
LBB0_20:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_set_drvdata
	movl	(%r12), %edi
	callq	_destroy_workqueue
LBB0_21:
	movq	%r15, %rdi
	callq	_free_netdev
LBB0_22:
	movq	%r14, %rdi
	callq	_hinic_free_hwdev
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r12, %rdi
	addq	$24, %rdi
	movq	_set_rx_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_INIT_WORK
	movq	%r15, %rdi
	callq	_netdev_features_init
	movq	%r15, %rdi
	callq	_netif_carrier_off
	movq	8(%r12), %rdi
	movq	_HINIC_MGMT_MSG_CMD_LINK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_link_status_event_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdx
	callq	_hinic_hwdev_cb_register
	movq	16(%r12), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_set_features
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_SET_NETDEV_DEV
	movq	%r15, %rdi
	callq	_register_netdev
	testl	%eax, %eax
	je	LBB0_23
## %bb.18:
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_dev_err
LBB0_19:
	movq	8(%r12), %rdi
	movq	_HINIC_MGMT_MSG_CMD_LINK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hinic_hwdev_cb_unregister
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_cancel_work_sync
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize HW device\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid number of QPS\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate Ethernet device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_hinic_netdev_ops,4,2           ## @hinic_netdev_ops
	.comm	_ETH_MAX_MTU,4,2                ## @ETH_MAX_MTU
	.comm	_MSG_ENABLE_DEFAULT,4,2         ## @MSG_ENABLE_DEFAULT
	.comm	_tx_weight,4,2                  ## @tx_weight
	.comm	_rx_weight,4,2                  ## @rx_weight
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_HINIC_WQ_NAME,4,2              ## @HINIC_WQ_NAME
L_.str.3:                               ## @.str.3
	.asciz	"Failed to get mac address\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to add mac\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to set mtu\n"

	.comm	_set_rx_mode,4,2                ## @set_rx_mode
	.comm	_HINIC_MGMT_MSG_CMD_LINK_STATUS,4,2 ## @HINIC_MGMT_MSG_CMD_LINK_STATUS
	.comm	_link_status_event_handler,4,2  ## @link_status_event_handler
L_.str.6:                               ## @.str.6
	.asciz	"Failed to register netdev\n"

	.no_dead_strip	_nic_dev_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nic_dev_init
_nic_dev_init:                          ; @nic_dev_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	bl	_hinic_init_hwdev
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	mov	x0, x19
	bl	_hinic_hwdev_num_qps
	cmp	w0, #0
	b.le	LBB0_10
; %bb.3:
	mov	x1, x0
	mov	w0, #88
	bl	_alloc_etherdev_mq
	cbz	x0, LBB0_12
; %bb.4:
	mov	x21, x0
	bl	_hinic_set_ethtool_ops
Lloh2:
	adrp	x8, _hinic_netdev_ops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hinic_netdev_ops@GOTPAGEOFF]
	str	x8, [x21, #16]
Lloh4:
	adrp	x8, _ETH_MAX_MTU@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETH_MAX_MTU@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	mov	x0, x21
	bl	_netdev_priv
	mov	x22, x0
	stp	x19, x21, [x0, #8]
Lloh7:
	adrp	x8, _MSG_ENABLE_DEFAULT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSG_ENABLE_DEFAULT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x0, #80]
	stp	xzr, xzr, [x0, #64]
	str	xzr, [x0, #56]
Lloh10:
	adrp	x8, _tx_weight@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tx_weight@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _rx_weight@GOTPAGE
Lloh14:
	ldr	x9, [x9, _rx_weight@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #44]
	add	x0, x0, #40
	mov	w1, #1
	bl	_sema_init
	add	x0, x22, #36
	bl	_u64_stats_init
	add	x0, x22, #32
	bl	_u64_stats_init
	mov	x0, x22
	bl	_VLAN_BITMAP_SIZE
	mov	x1, x0
Lloh16:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_devm_kzalloc
	str	w0, [x22, #28]
	cbz	w0, LBB0_11
; %bb.5:
Lloh19:
	adrp	x8, _HINIC_WQ_NAME@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HINIC_WQ_NAME@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_create_singlethread_workqueue
	str	w0, [x22]
	cbz	w0, LBB0_11
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	bl	_pci_set_drvdata
	ldr	w1, [x21, #8]
	mov	x0, x22
	bl	_hinic_port_get_mac
	cbz	w0, LBB0_8
; %bb.7:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_8:
	ldr	w1, [x21, #8]
	mov	x0, x22
	mov	w2, #0
	bl	_hinic_port_add_mac
	cbz	w0, LBB0_14
; %bb.9:
	mov	x23, x0
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_10:
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_18
LBB0_12:
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_19
LBB0_14:
	ldr	w1, [x21, #4]
	mov	x0, x22
	bl	_hinic_port_set_mtu
	cbz	w0, LBB0_21
; %bb.15:
	mov	x23, x0
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_16:
	mov	x0, x20
	bl	_dev_err
LBB0_17:
	mov	x0, x20
	mov	x1, #0
	bl	_pci_set_drvdata
	ldr	w0, [x22]
	bl	_destroy_workqueue
LBB0_18:
	mov	x0, x21
	bl	_free_netdev
LBB0_19:
	mov	x0, x19
	bl	_hinic_free_hwdev
LBB0_20:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_21:
	add	x24, x22, #24
Lloh39:
	adrp	x8, _set_rx_mode@GOTPAGE
Lloh40:
	ldr	x8, [x8, _set_rx_mode@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_INIT_WORK
	mov	x0, x21
	bl	_netdev_features_init
	mov	x0, x21
	bl	_netif_carrier_off
	ldr	x0, [x22, #8]
Lloh42:
	adrp	x25, _HINIC_MGMT_MSG_CMD_LINK_STATUS@GOTPAGE
Lloh43:
	ldr	x25, [x25, _HINIC_MGMT_MSG_CMD_LINK_STATUS@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh44:
	adrp	x8, _link_status_event_handler@GOTPAGE
Lloh45:
	ldr	x8, [x8, _link_status_event_handler@GOTPAGEOFF]
Lloh46:
	ldr	w3, [x8]
	mov	x2, x22
	bl	_hinic_hwdev_cb_register
	ldr	x8, [x22, #16]
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #1
	bl	_set_features
	mov	x23, x0
	cbnz	w0, LBB0_24
; %bb.22:
	mov	x0, x21
	mov	x1, x20
	bl	_SET_NETDEV_DEV
	mov	x0, x21
	bl	_register_netdev
	mov	x23, x0
	cbz	w0, LBB0_20
; %bb.23:
Lloh47:
	adrp	x1, l_.str.6@PAGE
Lloh48:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_24:
	ldr	x0, [x22, #8]
	ldr	w1, [x25]
	bl	_hinic_hwdev_cb_unregister
	mov	x0, x24
	bl	_cancel_work_sync
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize HW device\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid number of QPS\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate Ethernet device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_hinic_netdev_ops,4,2           ; @hinic_netdev_ops
	.comm	_ETH_MAX_MTU,4,2                ; @ETH_MAX_MTU
	.comm	_MSG_ENABLE_DEFAULT,4,2         ; @MSG_ENABLE_DEFAULT
	.comm	_tx_weight,4,2                  ; @tx_weight
	.comm	_rx_weight,4,2                  ; @rx_weight
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_HINIC_WQ_NAME,4,2              ; @HINIC_WQ_NAME
l_.str.3:                               ; @.str.3
	.asciz	"Failed to get mac address\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to add mac\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to set mtu\n"

	.comm	_set_rx_mode,4,2                ; @set_rx_mode
	.comm	_HINIC_MGMT_MSG_CMD_LINK_STATUS,4,2 ; @HINIC_MGMT_MSG_CMD_LINK_STATUS
	.comm	_link_status_event_handler,4,2  ; @link_status_event_handler
l_.str.6:                               ; @.str.6
	.asciz	"Failed to register netdev\n"

	.no_dead_strip	_nic_dev_init
.subsections_via_symbols
