	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_card_register              ## -- Begin function snd_card_register
	.p2align	4, 0x90
_snd_card_register:                     ## @snd_card_register
	.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	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	cmpq	$0, 16(%r14)
	jne	LBB0_5
## %bb.3:
	movq	_sound_class@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	24(%r14), %r15d
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_MKDEV
	movq	(%r14), %r9
	leaq	L_.str(%rip), %r8
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movq	%r14, %rcx
	callq	_device_create
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	$0, 16(%r14)
LBB0_5:
	movq	%r14, %rdi
	callq	_snd_device_register_all
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	movq	_snd_card_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_snd_cards@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%r14), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_8
## %bb.7:
	movq	_snd_card_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_8:
	movq	8(%r14), %rax
	xorl	%ebx, %ebx
	cmpb	$0, (%rax)
	movl	$0, %esi
	cmovneq	%rax, %rsi
	movq	%r14, %rdi
	callq	_snd_card_set_id_no_lock
	movq	(%r15), %rax
	movq	(%r14), %rcx
	movq	%r14, (%rax,%rcx,8)
	movq	_snd_card_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_init_info_for_card
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.9:
	movq	_card_id_attrs@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	js	LBB0_11
## %bb.10:
	movq	16(%r14), %rdi
	movq	_card_number_attrs@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	jns	LBB0_12
LBB0_11:
	movl	%eax, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_sound_class,4,2                ## @sound_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"card%i"

	.comm	_snd_card_mutex,4,2             ## @snd_card_mutex
	.comm	_snd_cards,8,3                  ## @snd_cards
	.comm	_card_id_attrs,4,2              ## @card_id_attrs
	.comm	_card_number_attrs,4,2          ## @card_number_attrs
	.comm	_SND_MIXER_OSS_NOTIFY_REGISTER,4,2 ## @SND_MIXER_OSS_NOTIFY_REGISTER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_card_register              ; -- Begin function snd_card_register
	.p2align	2
_snd_card_register:                     ; @snd_card_register
	.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	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _sound_class@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sound_class@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	ldr	w21, [x19, #24]
	mov	w0, #0
	mov	w1, #0
	bl	_MKDEV
	mov	x2, x0
	ldr	x5, [x19]
Lloh6:
	adrp	x4, l_.str@PAGE
Lloh7:
	add	x4, x4, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	x3, x19
	bl	_device_create
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	str	xzr, [x19, #16]
LBB0_5:
	mov	x0, x19
	bl	_snd_device_register_all
	tbnz	w0, #31, LBB0_9
; %bb.6:
Lloh8:
	adrp	x0, _snd_card_mutex@GOTPAGE
Lloh9:
	ldr	x0, [x0, _snd_card_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh10:
	adrp	x20, _snd_cards@GOTPAGE
Lloh11:
	ldr	x20, [x20, _snd_cards@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_10
; %bb.7:
Lloh12:
	adrp	x0, _snd_card_mutex@GOTPAGE
Lloh13:
	ldr	x0, [x0, _snd_card_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_8:
	mov	w0, #0
LBB0_9:
	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_10:
	ldr	x8, [x19, #8]
	ldrb	w9, [x8]
	cmp	w9, #0
	csel	x1, xzr, x8, eq
	mov	x0, x19
	bl	_snd_card_set_id_no_lock
	ldr	x8, [x20]
	ldr	x9, [x19]
	str	x19, [x8, x9, lsl #3]
Lloh14:
	adrp	x0, _snd_card_mutex@GOTPAGE
Lloh15:
	ldr	x0, [x0, _snd_card_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_init_info_for_card
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.11:
Lloh16:
	adrp	x1, _card_id_attrs@GOTPAGE
Lloh17:
	ldr	x1, [x1, _card_id_attrs@GOTPAGEOFF]
	bl	_device_create_file
	tbnz	w0, #31, LBB0_9
; %bb.12:
	ldr	x0, [x19, #16]
Lloh18:
	adrp	x1, _card_number_attrs@GOTPAGE
Lloh19:
	ldr	x1, [x1, _card_number_attrs@GOTPAGEOFF]
	bl	_device_create_file
	tbz	w0, #31, LBB0_8
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_sound_class,4,2                ; @sound_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"card%i"

	.comm	_snd_card_mutex,4,2             ; @snd_card_mutex
	.comm	_snd_cards,8,3                  ; @snd_cards
	.comm	_card_id_attrs,4,2              ; @card_id_attrs
	.comm	_card_number_attrs,4,2          ; @card_number_attrs
	.comm	_SND_MIXER_OSS_NOTIFY_REGISTER,4,2 ; @SND_MIXER_OSS_NOTIFY_REGISTER
.subsections_via_symbols
