	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stm_register_device            ## -- Begin function stm_register_device
	.p2align	4, 0x90
_stm_register_device:                   ## @stm_register_device
	.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
	xorl	%ebx, %ebx
	movq	_stm_core_up@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.1:
	movq	%rsi, %r12
	cmpl	$0, 28(%rsi)
	je	LBB0_9
## %bb.2:
	cmpl	$0, 24(%r12)
	je	LBB0_9
## %bb.3:
	movq	%rdi, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	(%r12), %r13d
	subl	4(%r12), %r13d
	leal	96(,%r13,8), %edi
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:
	movq	%rax, %r14
	movl	8(%r12), %esi
	movq	_stm_fops@GOTPCREL(%rip), %rdx
	xorl	%edi, %edi
	callq	_register_chrdev
	movq	%rax, (%r14)
	testq	%rax, %rax
	js	LBB0_8
## %bb.5:
	incl	%r13d
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_device_initialize
	movq	(%r14), %rdi
	xorl	%esi, %esi
	callq	_MKDEV
	movl	%eax, 40(%r14)
	movq	_stm_class@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r14)
	movq	%r15, 24(%r14)
	movq	%rbx, %r15
	movq	_stm_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	leaq	80(%r14), %rdi
	callq	_mutex_init
	leaq	76(%r14), %rdi
	callq	_spin_lock_init
	leaq	72(%r14), %rdi
	callq	_INIT_LIST_HEAD
	leaq	68(%r14), %rdi
	callq	_spin_lock_init
	movq	%r14, %rdi
	addq	$64, %rdi
	callq	_mutex_init
	movl	%r13d, 8(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 56(%r14)
	movq	%r12, 48(%r14)
	movq	%r14, 16(%r12)
	movl	8(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_kobject_set_name
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_7:
	movq	(%r14), %rdi
	movl	8(%r12), %esi
	callq	_unregister_chrdev
	movq	%r15, %rdi
	callq	_put_device
LBB0_8:
	movq	%r14, %rdi
	callq	_vfree
	jmp	LBB0_12
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_10:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_11:
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%ebx, %ebx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_14:
	movq	%r15, %rdi
	callq	_pm_runtime_no_callbacks
	movq	%r15, %rdi
	callq	_pm_runtime_use_autosuspend
	movq	%r15, %rdi
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_pm_runtime_set_autosuspend_delay
	movq	%r15, %rdi
	callq	_pm_runtime_set_suspended
	movq	%r15, %rdi
	callq	_pm_runtime_enable
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_stm_core_up,4,2                ## @stm_core_up
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_stm_fops,4,2                   ## @stm_fops
	.comm	_stm_class,4,2                  ## @stm_class
	.comm	_stm_device_release,4,2         ## @stm_device_release
	.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	_stm_register_device            ; -- Begin function stm_register_device
	.p2align	2
_stm_register_device:                   ; @stm_register_device
	.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
Lloh0:
	adrp	x8, _stm_core_up@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stm_core_up@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1, #28]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_8
; %bb.3:
	mov	x22, x2
	mov	x23, x0
Lloh3:
	adrp	x25, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ENOMEM@GOTPAGEOFF]
	ldr	w21, [x25]
	ldp	w8, w9, [x19]
	sub	w8, w8, w9
	add	w24, w8, #1
	lsl	w8, w24, #3
	add	w0, w8, #88
	bl	_vzalloc
	cbz	x0, LBB0_13
; %bb.4:
	mov	x20, x0
	ldr	w1, [x19, #8]
Lloh5:
	adrp	x2, _stm_fops@GOTPAGE
Lloh6:
	ldr	x2, [x2, _stm_fops@GOTPAGEOFF]
	mov	w0, #0
	bl	_register_chrdev
	str	x0, [x20]
	tbnz	x0, #63, LBB0_14
; %bb.5:
	add	x21, x20, #16
	mov	x0, x21
	bl	_device_initialize
	ldr	x0, [x20]
	mov	w1, #0
	bl	_MKDEV
	str	w0, [x20, #40]
Lloh7:
	adrp	x8, _stm_class@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stm_class@GOTPAGEOFF]
	stp	x23, x8, [x20, #24]
Lloh9:
	adrp	x8, _stm_device_release@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stm_device_release@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20, #20]
	add	x0, x20, #80
	bl	_mutex_init
	add	x0, x20, #76
	bl	_spin_lock_init
	add	x0, x20, #72
	bl	_INIT_LIST_HEAD
	add	x0, x20, #68
	bl	_spin_lock_init
	add	x0, x20, #64
	bl	_mutex_init
	str	w24, [x20, #8]
	stp	x19, x22, [x20, #48]
	str	x20, [x19, #16]
	ldr	w2, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_kobject_set_name
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_device_add
	mov	x22, x0
	cbz	w0, LBB0_16
LBB0_7:
	ldr	x0, [x20]
	ldr	w1, [x19, #8]
	bl	_unregister_chrdev
	mov	x0, x21
	bl	_put_device
	b	LBB0_15
LBB0_8:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
LBB0_11:
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	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_13:
	ldr	w8, [x25]
	b	LBB0_11
LBB0_14:
	neg	w22, w21
LBB0_15:
	mov	x0, x20
	bl	_vfree
	b	LBB0_12
LBB0_16:
	mov	x0, x21
	bl	_pm_runtime_no_callbacks
	mov	x0, x21
	bl	_pm_runtime_use_autosuspend
	mov	x0, x21
	mov	w1, #2000
	bl	_pm_runtime_set_autosuspend_delay
	mov	x0, x21
	bl	_pm_runtime_set_suspended
	mov	x0, x21
	bl	_pm_runtime_enable
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_stm_core_up,4,2                ; @stm_core_up
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_stm_fops,4,2                   ; @stm_fops
	.comm	_stm_class,4,2                  ; @stm_class
	.comm	_stm_device_release,4,2         ; @stm_device_release
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

.subsections_via_symbols
