	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function new_nbp
_new_nbp:                               ## @new_nbp
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_find_portno
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r12, 40(%rax)
	movq	%r15, %rdi
	callq	_dev_hold
	movq	%r15, 32(%rbx)
	movq	%r15, %rdi
	callq	_port_cost
	movl	%eax, 24(%rbx)
	movq	_BR_PORT_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$32768, %eax                    ## imm = 0x8000
	shrl	%cl, %eax
	movl	%eax, (%rbx)
	movl	%r14d, 4(%rbx)
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	callq	_br_init_port
	movq	_BR_STATE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_br_stp_port_timer_init
	movq	%rbx, %rdi
	callq	_br_multicast_add_port
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r14d, %edi
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BR_PORT_BITS,4,2               ## @BR_PORT_BITS
	.comm	_BR_STATE_DISABLED,4,2          ## @BR_STATE_DISABLED
	.no_dead_strip	_new_nbp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function new_nbp
_new_nbp:                               ; @new_nbp
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x22, x0
	bl	_find_portno
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x0
	str	x22, [x0, #40]
	mov	x0, x21
	bl	_dev_hold
	str	x21, [x19, #32]
	mov	x0, x21
	bl	_port_cost
	str	w0, [x19, #24]
Lloh3:
	adrp	x8, _BR_PORT_BITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BR_PORT_BITS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #32768
	lsr	w8, w9, w8
	stp	w8, w20, [x19]
	str	xzr, [x19, #16]
	mov	x0, x19
	bl	_br_init_port
Lloh6:
	adrp	x8, _BR_STATE_DISABLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BR_STATE_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_br_stp_port_timer_init
	mov	x0, x19
	bl	_br_multicast_add_port
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x20
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BR_PORT_BITS,4,2               ; @BR_PORT_BITS
	.comm	_BR_STATE_DISABLED,4,2          ; @BR_STATE_DISABLED
	.no_dead_strip	_new_nbp
.subsections_via_symbols
