	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_register_device_for_dev    ## -- Begin function snd_register_device_for_dev
	.p2align	4, 0x90
_snd_register_device_for_dev:           ## @snd_register_device_for_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movl	%edx, %r15d
	movq	%rsi, %r14
	movl	%edi, %r12d
	xorl	%edi, %edi
	testq	%r9, %r9
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_3:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	%r14, %rbx
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	movl	(%rbx), %ecx
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movl	$-1, %ecx
LBB0_8:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, 4(%rax)
	movl	%r15d, 8(%rax)
	movq	%r13, 24(%rax)
	movq	%rax, %r14
	movq	%rdx, 16(%rax)
	movq	_sound_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_snd_kernel_minor
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.9:
	movq	_snd_minors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %r13d
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_12
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %ebx
	negl	%ebx
	testl	%ecx, %ecx
	jle	LBB0_11
LBB0_14:
	movq	_sound_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_15
LBB0_11:
	movl	%ebx, %r13d
LBB0_12:
	movq	16(%rbp), %r12
	movq	%r14, (%rax,%r13,8)
	movq	_sound_class@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_major@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_MKDEV
	leaq	L_.str(%rip), %r8
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_device_create
	movl	%eax, 12(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	_snd_minors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax,%r13,8)
	movq	_sound_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	12(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_kfree
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_sound_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sound_mutex,4,2                ## @sound_mutex
	.comm	_snd_minors,8,3                 ## @snd_minors
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_sound_class,4,2                ## @sound_class
	.comm	_major,4,2                      ## @major
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_register_device_for_dev    ; -- Begin function snd_register_device_for_dev
	.p2align	2
_snd_register_device_for_dev:           ; @snd_register_device_for_dev
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x6
	mov	x20, x5
	mov	x21, x4
	mov	x26, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	cmp	x5, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_3:
	mov	x0, x23
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.6:
	mov	x19, x0
	str	w25, [x0]
	cbz	x24, LBB0_9
; %bb.7:
	ldr	w8, [x24]
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
	mov	w8, #-1
LBB0_10:
	stp	w8, w23, [x19, #4]
	stp	x21, x26, [x19, #16]
Lloh7:
	adrp	x0, _sound_mutex@GOTPAGE
Lloh8:
	ldr	x0, [x0, _sound_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	bl	_snd_kernel_minor
	mov	x23, x0
	tbnz	w0, #31, LBB0_13
; %bb.11:
Lloh9:
	adrp	x25, _snd_minors@GOTPAGE
Lloh10:
	ldr	x25, [x25, _snd_minors@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [x8, w23, uxtw #3]
	cbz	x9, LBB0_14
; %bb.12:
Lloh11:
	adrp	x9, _EBUSY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EBUSY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	neg	w23, w9
	cmp	w9, #0
	b.le	LBB0_15
LBB0_13:
Lloh14:
	adrp	x0, _sound_mutex@GOTPAGE
Lloh15:
	ldr	x0, [x0, _sound_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_kfree
	b	LBB0_3
LBB0_14:
	mov	w26, w23
	b	LBB0_16
LBB0_15:
	mov	x26, x23
LBB0_16:
	str	x19, [x8, x26, lsl #3]
Lloh16:
	adrp	x8, _sound_class@GOTPAGE
Lloh17:
	ldr	x8, [x8, _sound_class@GOTPAGEOFF]
Lloh18:
	ldr	w24, [x8]
Lloh19:
	adrp	x8, _major@GOTPAGE
Lloh20:
	ldr	x8, [x8, _major@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_MKDEV
	mov	x2, x0
Lloh22:
	adrp	x4, l_.str@PAGE
Lloh23:
	add	x4, x4, l_.str@PAGEOFF
	mov	x0, x24
	mov	x1, x22
	mov	x3, x21
	mov	x5, x20
	bl	_device_create
	str	w0, [x19, #12]
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.17:
	ldr	x8, [x25]
	str	xzr, [x8, x26, lsl #3]
Lloh24:
	adrp	x0, _sound_mutex@GOTPAGE
Lloh25:
	ldr	x0, [x0, _sound_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x19, #12]
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	b	LBB0_4
LBB0_18:
Lloh26:
	adrp	x0, _sound_mutex@GOTPAGE
Lloh27:
	ldr	x0, [x0, _sound_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w23, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sound_mutex,4,2                ; @sound_mutex
	.comm	_snd_minors,8,3                 ; @snd_minors
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_sound_class,4,2                ; @sound_class
	.comm	_major,4,2                      ; @major
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

.subsections_via_symbols
