	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __nsim_dev_port_add
___nsim_dev_port_add:                   ## @__nsim_dev_port_add
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	%ebx, (%rax)
	leaq	16(%rax), %r15
	movq	_DEVLINK_PORT_FLAVOUR_PHYSICAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	1(%rbx), %edx
	movl	4(%r14), %eax
	movl	8(%r14), %r9d
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_devlink_port_attrs_set
	movq	%r14, %rdi
	callq	_priv_to_devlink
	movl	%eax, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_devlink_port_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_nsim_dev_port_debugfs_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_nsim_create
	movq	%rax, 8(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r12), %rdi
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_nsim_dev_port_debugfs_exit
LBB0_6:
	movq	%r15, %rdi
	callq	_devlink_port_unregister
LBB0_7:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%rdi), %esi
	movq	%r15, %rdi
	callq	_devlink_port_type_eth_set
	addq	$4, %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_list_add
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DEVLINK_PORT_FLAVOUR_PHYSICAL,4,2 ## @DEVLINK_PORT_FLAVOUR_PHYSICAL
	.no_dead_strip	___nsim_dev_port_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __nsim_dev_port_add
___nsim_dev_port_add:                   ; @__nsim_dev_port_add
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x21, x0
	str	w22, [x21], #16
Lloh3:
	adrp	x8, _DEVLINK_PORT_FLAVOUR_PHYSICAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEVLINK_PORT_FLAVOUR_PHYSICAL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	w2, w22, #1
	ldp	w6, w5, [x20, #4]
	mov	x0, x21
	mov	w3, #0
	mov	w4, #0
	bl	_devlink_port_attrs_set
	mov	x0, x20
	bl	_priv_to_devlink
	mov	x1, x21
	mov	x2, x22
	bl	_devlink_port_register
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_nsim_dev_port_debugfs_init
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_nsim_create
	str	x0, [x19, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_9
; %bb.4:
	bl	_PTR_ERR
	mov	x22, x0
	mov	x0, x19
	bl	_nsim_dev_port_debugfs_exit
LBB0_5:
	mov	x0, x21
	bl	_devlink_port_unregister
LBB0_6:
	mov	x0, x19
	bl	_kfree
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	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_9:
	ldr	w1, [x0]
	mov	x0, x21
	bl	_devlink_port_type_eth_set
	add	x0, x19, #4
	mov	x1, x20
	bl	_list_add
	mov	w22, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DEVLINK_PORT_FLAVOUR_PHYSICAL,4,2 ; @DEVLINK_PORT_FLAVOUR_PHYSICAL
	.no_dead_strip	___nsim_dev_port_add
.subsections_via_symbols
