	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usnic_vnic_alloc               ## -- Begin function usnic_vnic_alloc
	.p2align	4, 0x90
_usnic_vnic_alloc:                      ## @usnic_vnic_alloc
	.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, %rbx
	callq	_pci_is_enabled
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_usnic_vnic_discover_resources
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_pci_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_usnic_err
	movq	%r14, %rdi
	callq	_kfree
	movl	%r15d, %edi
	jmp	LBB0_4
LBB0_1:
	movq	%rbx, %rdi
	callq	_pci_name
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_usnic_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	%r14, %rdi
	callq	_usnic_vnic_pci_name
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_usnic_dbg
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI dev %s is disabled\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to discover %s resources with err %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Allocated vnic for %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usnic_vnic_alloc               ; -- Begin function usnic_vnic_alloc
	.p2align	2
_usnic_vnic_alloc:                      ; @usnic_vnic_alloc
	.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	x20, x0
	bl	_pci_is_enabled
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x19, x0
	bl	_spin_lock_init
	mov	x0, x20
	mov	x1, x19
	bl	_usnic_vnic_discover_resources
	cbz	w0, LBB0_8
; %bb.3:
	mov	x21, x0
	mov	x0, x20
	bl	_pci_name
	mov	x1, x0
	str	x21, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_usnic_err
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	b	LBB0_7
LBB0_4:
	mov	x0, x20
	bl	_pci_name
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_usnic_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	b	_ERR_PTR
LBB0_8:
	mov	x0, x19
	bl	_usnic_vnic_pci_name
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_usnic_dbg
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI dev %s is disabled\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to discover %s resources with err %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Allocated vnic for %s\n"

.subsections_via_symbols
