	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isst_if_cdev_register          ## -- Begin function isst_if_cdev_register
	.p2align	4, 0x90
_isst_if_cdev_register:                 ## @isst_if_cdev_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	%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	_misc_device_ret@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	%edi, %ebx
	movq	_ISST_IF_DEV_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_2
## %bb.4:
	movq	%rsi, %r14
	movq	_punit_misc_dev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_misc_device_open@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_punit_misc_dev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_misc_usage_count@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_7
LBB0_10:
	movq	_punit_callbacks@GOTPCREL(%rip), %r15
	movslq	%ebx, %rbx
	leaq	(,%rbx,4), %rdi
	addq	(%r15), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	(%r15), %rax
	movl	$1, (%rax,%rbx,4)
	incl	(%r13)
	jmp	LBB0_11
LBB0_7:
	movq	_isst_if_char_driver@GOTPCREL(%rip), %rdi
	callq	_misc_register
	movl	%eax, (%r12)
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	xorl	%eax, %eax
	callq	_isst_if_cpu_info_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r15d
	movq	_isst_if_char_driver@GOTPCREL(%rip), %rdi
	callq	_misc_deregister
	movl	%r15d, (%r12)
LBB0_11:
	movq	_punit_misc_dev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	(%r12), %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_misc_device_ret,4,2            ## @misc_device_ret
	.comm	_ISST_IF_DEV_MAX,4,2            ## @ISST_IF_DEV_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_punit_misc_dev_lock,4,2        ## @punit_misc_dev_lock
	.comm	_misc_device_open,8,3           ## @misc_device_open
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_misc_usage_count,4,2           ## @misc_usage_count
	.comm	_isst_if_char_driver,4,2        ## @isst_if_char_driver
	.comm	_punit_callbacks,8,3            ## @punit_callbacks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isst_if_cdev_register          ; -- Begin function isst_if_cdev_register
	.p2align	2
_isst_if_cdev_register:                 ; @isst_if_cdev_register
	.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	x20, x0
Lloh0:
	adrp	x22, _misc_device_ret@GOTPAGE
Lloh1:
	ldr	x22, [x22, _misc_device_ret@GOTPAGEOFF]
	ldr	w0, [x22]
	cbnz	w0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _ISST_IF_DEV_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISST_IF_DEV_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.le	LBB0_4
; %bb.2:
	mov	x19, x1
Lloh5:
	adrp	x0, _punit_misc_dev_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _punit_misc_dev_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh7:
	adrp	x8, _misc_device_open@GOTPAGE
Lloh8:
	ldr	x8, [x8, _misc_device_open@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.3:
Lloh10:
	adrp	x0, _punit_misc_dev_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _punit_misc_dev_lock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
Lloh16:
	adrp	x23, _misc_usage_count@GOTPAGE
Lloh17:
	ldr	x23, [x23, _misc_usage_count@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_9
LBB0_8:
Lloh18:
	adrp	x21, _punit_callbacks@GOTPAGE
Lloh19:
	ldr	x21, [x21, _punit_callbacks@GOTPAGEOFF]
	ldr	x8, [x21]
	sbfiz	x20, x20, #2, #32
	add	x0, x8, x20
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x21]
	mov	w9, #1
	str	w9, [x8, x20]
	ldr	w8, [x23]
	add	w8, w8, #1
	str	w8, [x23]
	b	LBB0_12
LBB0_9:
Lloh20:
	adrp	x0, _isst_if_char_driver@GOTPAGE
Lloh21:
	ldr	x0, [x0, _isst_if_char_driver@GOTPAGEOFF]
	bl	_misc_register
	str	w0, [x22]
	cbnz	w0, LBB0_12
; %bb.10:
	bl	_isst_if_cpu_info_init
	cbz	w0, LBB0_8
; %bb.11:
	mov	x21, x0
Lloh22:
	adrp	x0, _isst_if_char_driver@GOTPAGE
Lloh23:
	ldr	x0, [x0, _isst_if_char_driver@GOTPAGEOFF]
	bl	_misc_deregister
	str	w21, [x22]
LBB0_12:
Lloh24:
	adrp	x0, _punit_misc_dev_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _punit_misc_dev_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x22]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_misc_device_ret,4,2            ; @misc_device_ret
	.comm	_ISST_IF_DEV_MAX,4,2            ; @ISST_IF_DEV_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_punit_misc_dev_lock,4,2        ; @punit_misc_dev_lock
	.comm	_misc_device_open,8,3           ; @misc_device_open
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_misc_usage_count,4,2           ; @misc_usage_count
	.comm	_isst_if_char_driver,4,2        ; @isst_if_char_driver
	.comm	_punit_callbacks,8,3            ; @punit_callbacks
.subsections_via_symbols
