	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nsim_dev_probe                 ## -- Begin function nsim_dev_probe
	.p2align	4, 0x90
_nsim_dev_probe:                        ## @nsim_dev_probe
	.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, %r15
	movl	(%rdi), %esi
	callq	_nsim_dev_create
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	leaq	4(%r15), %rdi
	movq	%r14, %rsi
	callq	_dev_set_drvdata
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	___nsim_dev_port_add
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_4
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_nsim_dev_port_del_all
	movq	%r14, %rdi
	callq	_nsim_dev_destroy
LBB0_6:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nsim_dev_probe                 ; -- Begin function nsim_dev_probe
	.p2align	2
_nsim_dev_probe:                        ; @nsim_dev_probe
	.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	x20, x0
	ldr	w1, [x0]
	bl	_nsim_dev_create
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	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
	b	_PTR_ERR
LBB0_2:
	add	x0, x20, #4
	mov	x1, x19
	bl	_dev_set_drvdata
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	___nsim_dev_port_add
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	ldr	w8, [x20]
	cmp	w22, w8
	b.lt	LBB0_4
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x19
	bl	_nsim_dev_port_del_all
	mov	x0, x19
	bl	_nsim_dev_destroy
LBB0_8:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
