	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nsim_dev_create
_nsim_dev_create:                       ## @nsim_dev_create
	.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	%rdi, %r12
	movq	_nsim_dev_devlink_ops@GOTPCREL(%rip), %rdi
	movl	$40, %esi
	callq	_devlink_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_devlink_priv
	movq	%rax, %rbx
	movq	%r12, 32(%rax)
	movl	$4, 20(%rax)
	movl	24(%rax), %edi
	movl	$4, %esi
	callq	_get_random_bytes
	leaq	16(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	12(%rbx), %rdi
	callq	_mutex_init
	movl	$1, (%rbx)
	movq	_NSIM_DEV_MAX_MACS_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_NSIM_DEV_TEST1_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	callq	_nsim_dev_resources_register
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_devlink_register
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:
	movq	_nsim_devlink_params@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_devlink_params_register
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nsim_devlink_set_params_init_values
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nsim_dev_dummy_region_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	%r14, %rdi
	callq	_nsim_dev_traps_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movq	%rbx, %rdi
	callq	_nsim_dev_debugfs_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_nsim_bpf_dev_init
	testl	%eax, %eax
	je	LBB0_17
## %bb.10:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_nsim_dev_debugfs_exit
LBB0_11:
	movq	%r14, %rdi
	callq	_nsim_dev_traps_exit
LBB0_12:
	movq	%rbx, %rdi
	callq	_nsim_dev_dummy_region_exit
LBB0_13:
	movl	(%r12), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devlink_params_unregister
LBB0_14:
	movq	%r14, %rdi
	callq	_devlink_unregister
LBB0_15:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devlink_resources_unregister
LBB0_16:
	movq	%r14, %rdi
	callq	_devlink_free
	movl	%r15d, %edi
	jmp	LBB0_2
LBB0_1:
	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
LBB0_17:
	movq	%r14, %rdi
	callq	_devlink_params_publish
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nsim_dev_devlink_ops,4,2       ## @nsim_dev_devlink_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NSIM_DEV_MAX_MACS_DEFAULT,4,2  ## @NSIM_DEV_MAX_MACS_DEFAULT
	.comm	_NSIM_DEV_TEST1_DEFAULT,4,2     ## @NSIM_DEV_TEST1_DEFAULT
	.comm	_nsim_devlink_params,4,2        ## @nsim_devlink_params
	.no_dead_strip	_nsim_dev_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nsim_dev_create
_nsim_dev_create:                       ; @nsim_dev_create
	.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, x0
Lloh0:
	adrp	x0, _nsim_dev_devlink_ops@GOTPAGE
Lloh1:
	ldr	x0, [x0, _nsim_dev_devlink_ops@GOTPAGEOFF]
	mov	w1, #40
	bl	_devlink_alloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	bl	_devlink_priv
	mov	x20, x0
	str	x22, [x0, #32]
	mov	w8, #4
	str	w8, [x0, #20]
	ldr	w0, [x0, #24]
	mov	w1, #4
	bl	_get_random_bytes
	add	x0, x20, #16
	bl	_INIT_LIST_HEAD
	add	x0, x20, #12
	bl	_mutex_init
	mov	w8, #1
	str	w8, [x20]
Lloh2:
	adrp	x8, _NSIM_DEV_MAX_MACS_DEFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NSIM_DEV_MAX_MACS_DEFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _NSIM_DEV_TEST1_DEFAULT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NSIM_DEV_TEST1_DEFAULT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #4]
	mov	x0, x19
	bl	_nsim_dev_resources_register
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	bl	_devlink_register
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.3:
Lloh8:
	adrp	x22, _nsim_devlink_params@GOTPAGE
Lloh9:
	ldr	x22, [x22, _nsim_devlink_params@GOTPAGEOFF]
	ldr	w21, [x22]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_devlink_params_register
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_nsim_devlink_set_params_init_values
	mov	x0, x20
	mov	x1, x19
	bl	_nsim_dev_dummy_region_init
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_nsim_dev_traps_init
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.6:
	mov	x0, x20
	bl	_nsim_dev_debugfs_init
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_nsim_bpf_dev_init
	cbz	w0, LBB0_17
; %bb.8:
	mov	x21, x0
	mov	x0, x20
	bl	_nsim_dev_debugfs_exit
LBB0_9:
	mov	x0, x19
	bl	_nsim_dev_traps_exit
LBB0_10:
	mov	x0, x20
	bl	_nsim_dev_dummy_region_exit
LBB0_11:
	ldr	w20, [x22]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_devlink_params_unregister
LBB0_12:
	mov	x0, x19
	bl	_devlink_unregister
LBB0_13:
	mov	x0, x19
	mov	x1, #0
	bl	_devlink_resources_unregister
LBB0_14:
	mov	x0, x19
	bl	_devlink_free
	mov	x0, x21
	b	LBB0_16
LBB0_15:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
LBB0_17:
	mov	x0, x19
	bl	_devlink_params_publish
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_nsim_dev_devlink_ops,4,2       ; @nsim_dev_devlink_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NSIM_DEV_MAX_MACS_DEFAULT,4,2  ; @NSIM_DEV_MAX_MACS_DEFAULT
	.comm	_NSIM_DEV_TEST1_DEFAULT,4,2     ; @NSIM_DEV_TEST1_DEFAULT
	.comm	_nsim_devlink_params,4,2        ; @nsim_devlink_params
	.no_dead_strip	_nsim_dev_create
.subsections_via_symbols
