	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function new_device_store
_new_device_store:                      ## @new_device_store
	.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	%rdx, %rbx
	movq	%rsi, %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	callq	_sscanf
	cmpl	$2, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.2:
	movl	$1, -28(%rbp)
LBB0_3:
	movl	-32(%rbp), %edi
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jbe	LBB0_7
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_5:
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_10
LBB0_7:
	movl	-28(%rbp), %esi
	callq	_nsim_bus_dev_new
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movq	%rax, %rbx
	jmp	LBB0_10
LBB0_9:
	movq	_nsim_bus_dev_list_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_nsim_bus_dev_list@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_10:
	movq	%rbx, %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	"%u %u"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
L_.str.1:                               ## @.str.1
	.asciz	"Value of \"id\" is too big.\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Format for adding new device is \"id port_count\" (uint uint).\n"

	.comm	_nsim_bus_dev_list_lock,4,2     ## @nsim_bus_dev_list_lock
	.comm	_nsim_bus_dev_list,4,2          ## @nsim_bus_dev_list
	.no_dead_strip	_new_device_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function new_device_store
_new_device_store:                      ; @new_device_store
	.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	x19, x2
	mov	x0, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #12
	bl	_sscanf
	cmp	w0, #2
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.2:
	mov	w8, #1
	str	w8, [sp, #12]
LBB0_3:
	ldr	w0, [sp, #8]
Lloh2:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ls	LBB0_7
; %bb.4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_pr_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_10
LBB0_7:
	ldr	w1, [sp, #12]
	bl	_nsim_bus_dev_new
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x19, x0
	b	LBB0_10
LBB0_9:
Lloh12:
	adrp	x21, _nsim_bus_dev_list_lock@GOTPAGE
Lloh13:
	ldr	x21, [x21, _nsim_bus_dev_list_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
Lloh14:
	adrp	x1, _nsim_bus_dev_list@GOTPAGE
Lloh15:
	ldr	x1, [x1, _nsim_bus_dev_list@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x21
	bl	_mutex_unlock
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u %u"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
l_.str.1:                               ; @.str.1
	.asciz	"Value of \"id\" is too big.\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Format for adding new device is \"id port_count\" (uint uint).\n"

	.comm	_nsim_bus_dev_list_lock,4,2     ; @nsim_bus_dev_list_lock
	.comm	_nsim_bus_dev_list,4,2          ; @nsim_bus_dev_list
	.no_dead_strip	_new_device_store
.subsections_via_symbols
