	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_dev
_add_dev:                               ## @add_dev
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	movl	%edi, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r14
	movq	%r12, 16(%rax)
	movl	%r15d, (%rax)
	movl	%ebx, 4(%rax)
	movq	_topology_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_topology@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.3:
	cmpl	%ebx, 4(%rcx)
	jge	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%ebx, 4(%rcx)
	jl	LBB0_5
	jmp	LBB0_7
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_6:
	xorl	%ecx, %ecx
LBB0_7:
	addq	$8, %rax
LBB0_8:
	movq	%rcx, 8(%r14)
	movq	%r14, (%rax)
	movq	_topology_lock@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_topology_lock,4,2              ## @topology_lock
	.comm	_topology,8,3                   ## @topology
	.no_dead_strip	_add_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_dev
_add_dev:                               ; @add_dev
	.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, x2
	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	_kmalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	str	x22, [x0, #16]
	stp	w21, w20, [x0]
Lloh3:
	adrp	x0, _topology_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _topology_lock@GOTPAGEOFF]
	bl	_spin_lock
Lloh5:
	adrp	x9, _topology@GOTPAGE
Lloh6:
	ldr	x9, [x9, _topology@GOTPAGEOFF]
	ldr	x8, [x9]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	w9, [x8, #4]
	cmp	w9, w20
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x8, #4]
	cmp	w10, w20
	b.lt	LBB0_3
LBB0_5:
	add	x9, x9, #8
	b	LBB0_8
LBB0_6:
	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_7:
Lloh7:
	adrp	x9, _topology@GOTPAGE
Lloh8:
	ldr	x9, [x9, _topology@GOTPAGEOFF]
LBB0_8:
	str	x8, [x19, #8]
	str	x19, [x9]
Lloh9:
	adrp	x0, _topology_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _topology_lock@GOTPAGEOFF]
	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	_spin_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_topology_lock,4,2              ; @topology_lock
	.comm	_topology,8,3                   ; @topology
	.no_dead_strip	_add_dev
.subsections_via_symbols
