	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cosm_driver_probe
_cosm_driver_probe:                     ## @cosm_driver_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_g_num_dev@GOTPCREL(%rip), %rsi
	movl	$1, %edi
	callq	_atomic_add_return
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_cosm_scif_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
LBB0_2:
	leaq	36(%rbx), %rdi
	callq	_mutex_init
	leaq	32(%rbx), %rdi
	movq	_cosm_reset_trigger_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	28(%rbx), %rdi
	movq	_cosm_scif_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_cosm_sysfs_init
	movq	_g_cosm_class@GOTPCREL(%rip), %r13
	movl	(%r13), %r14d
	leaq	8(%rbx), %r15
	movl	4(%rbx), %esi
	movl	8(%rbx), %r12d
	xorl	%edi, %edi
	callq	_MKDEV
	movl	4(%rbx), %ecx
	movl	24(%rbx), %r8d
	movl	%ecx, (%rsp)
	leaq	L_.str(%rip), %r9
	movl	%r14d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_device_create_with_groups
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	16(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_6:
	movq	_g_num_dev@GOTPCREL(%rip), %rdi
	callq	_atomic_dec_and_test
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_cosm_scif_exit
	jmp	LBB0_8
LBB0_4:
	movl	(%rdi), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_sysfs_get_dirent
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.9:
	movq	%rbx, %rdi
	callq	_cosm_create_debug_dir
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	movl	(%r13), %r15d
	movl	4(%rbx), %esi
	xorl	%edi, %edi
	callq	_MKDEV
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_device_destroy
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_g_num_dev,4,2                  ## @g_num_dev
	.comm	_cosm_reset_trigger_work,4,2    ## @cosm_reset_trigger_work
	.comm	_cosm_scif_work,4,2             ## @cosm_scif_work
	.comm	_g_cosm_class,4,2               ## @g_cosm_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mic%d"

L_.str.1:                               ## @.str.1
	.asciz	"device_create_with_groups failed rc %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"state"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.3:                               ## @.str.3
	.asciz	"sysfs_get_dirent failed rc %d\n"

	.no_dead_strip	_cosm_driver_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cosm_driver_probe
_cosm_driver_probe:                     ; @cosm_driver_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x1, _g_num_dev@GOTPAGE
Lloh1:
	ldr	x1, [x1, _g_num_dev@GOTPAGEOFF]
	mov	w20, #1
	mov	w0, #1
	bl	_atomic_add_return
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.1:
	bl	_cosm_scif_init
	mov	x21, x0
	cbnz	w0, LBB0_4
LBB0_2:
	add	x0, x19, #36
	bl	_mutex_init
	add	x0, x19, #32
Lloh2:
	adrp	x8, _cosm_reset_trigger_work@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cosm_reset_trigger_work@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #28
Lloh5:
	adrp	x8, _cosm_scif_work@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cosm_scif_work@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_WORK
	str	w20, [x19]
	mov	x0, x19
	bl	_cosm_sysfs_init
Lloh8:
	adrp	x23, _g_cosm_class@GOTPAGE
Lloh9:
	ldr	x23, [x23, _g_cosm_class@GOTPAGEOFF]
	ldr	w21, [x23]
	mov	x20, x19
	ldr	w22, [x20, #8]!
	ldr	w1, [x19, #4]
	mov	w0, #0
	bl	_MKDEV
	mov	x2, x0
	ldr	w4, [x19, #24]
	ldr	w6, [x19, #4]
Lloh10:
	adrp	x5, l_.str@PAGE
Lloh11:
	add	x5, x5, l_.str@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	mov	x3, x19
	bl	_device_create_with_groups
	str	x0, [x19, #16]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #16]
	cbz	x8, LBB0_6
; %bb.3:
	bl	_PTR_ERR
	mov	x21, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
LBB0_4:
Lloh14:
	adrp	x0, _g_num_dev@GOTPAGE
Lloh15:
	ldr	x0, [x0, _g_num_dev@GOTPAGEOFF]
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_8
; %bb.5:
	bl	_cosm_scif_exit
	b	LBB0_8
LBB0_6:
	ldr	w0, [x0]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sysfs_get_dirent
	str	w0, [x19, #12]
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_cosm_create_debug_dir
	mov	w21, #0
LBB0_8:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w21, w8
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	ldr	w20, [x23]
	ldr	w1, [x19, #4]
	mov	w0, #0
	bl	_MKDEV
	mov	x1, x0
	mov	x0, x20
	bl	_device_destroy
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_g_num_dev,4,2                  ; @g_num_dev
	.comm	_cosm_reset_trigger_work,4,2    ; @cosm_reset_trigger_work
	.comm	_cosm_scif_work,4,2             ; @cosm_scif_work
	.comm	_g_cosm_class,4,2               ; @g_cosm_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mic%d"

l_.str.1:                               ; @.str.1
	.asciz	"device_create_with_groups failed rc %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"state"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.3:                               ; @.str.3
	.asciz	"sysfs_get_dirent failed rc %d\n"

	.no_dead_strip	_cosm_driver_probe
.subsections_via_symbols
