	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_start_hw
_cnic_start_hw:                         ## @cnic_start_hw
	.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, %r15
	movq	24(%rdi), %r12
	movq	48(%r12), %rbx
	movq	_CNIC_F_CNIC_UP@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	8(%r15), %r14
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EALREADY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movl	8(%rbx), %eax
	movl	%eax, 16(%r15)
	movq	(%r15), %rdi
	callq	_pci_dev_get
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_PCI_FUNC
	movl	%eax, 40(%r12)
	movq	(%rbx), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 36(%r12)
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	%r15, %rdi
	callq	*(%r12)
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	movl	12(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	callq	*8(%r12)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:
	movq	%r15, %rdi
	callq	_cnic_cm_open
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_4:
	movq	%r15, %rdi
	callq	*16(%r12)
	movq	(%r15), %rdi
	callq	_pci_dev_put
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	%r15, %rdi
	callq	*24(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CNIC_F_CNIC_UP,4,2             ## @CNIC_F_CNIC_UP
	.comm	_EALREADY,4,2                   ## @EALREADY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocate resource failure\n"

	.no_dead_strip	_cnic_start_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_start_hw
_cnic_start_hw:                         ; @cnic_start_hw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x22, [x0, #24]
	ldr	x21, [x22, #48]
Lloh0:
	adrp	x23, _CNIC_F_CNIC_UP@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CNIC_F_CNIC_UP@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x20, x19, #8
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EALREADY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_2:
	ldr	w8, [x21, #8]
	str	w8, [x19, #16]
	ldr	x0, [x19]
	bl	_pci_dev_get
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_PCI_FUNC
	str	w0, [x22, #40]
	ldr	x8, [x21]
	ldr	d0, [x8]
	str	d0, [x22, #32]
	ldr	x8, [x22]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	ldr	w0, [x19, #12]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_6
LBB0_4:
	ldr	x8, [x22, #8]
	mov	x0, x19
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_cnic_cm_open
	mov	x21, x0
	cbz	w0, LBB0_8
LBB0_6:
	ldr	x8, [x22, #16]
	mov	x0, x19
	blr	x8
	ldr	x0, [x19]
	bl	_pci_dev_put
LBB0_7:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x23]
	mov	x1, x20
	bl	_set_bit
	ldr	x8, [x22, #24]
	mov	x0, x19
	blr	x8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CNIC_F_CNIC_UP,4,2             ; @CNIC_F_CNIC_UP
	.comm	_EALREADY,4,2                   ; @EALREADY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocate resource failure\n"

	.no_dead_strip	_cnic_start_hw
.subsections_via_symbols
