	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm_char_open
_stm_char_open:                         ## @stm_char_open
	.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	%rsi, %r14
	movq	%rdi, %r15
	callq	_imajor
	movl	%eax, -44(%rbp)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_major_match@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_stm_class@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %rdx
	xorl	%esi, %esi
	callq	_class_find_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %rbx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_stm_output_init
	movq	%r12, %rdi
	callq	_to_stm_device
	movq	%rax, (%rbx)
	movl	(%rax), %edi
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%rbx, (%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nonseekable_open
	movl	%eax, %r13d
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %r13d
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_6:
	negl	%r13d
	movq	%r12, %rdi
	callq	_put_device
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_stm_class,4,2                  ## @stm_class
	.comm	_major_match,4,2                ## @major_match
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_stm_char_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm_char_open
_stm_char_open:                         ; @stm_char_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_imajor
	str	w0, [sp, #12]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _major_match@GOTPAGE
Lloh4:
	ldr	x8, [x8, _major_match@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x0, _stm_class@GOTPAGE
Lloh7:
	ldr	x0, [x0, _stm_class@GOTPAGEOFF]
	add	x2, sp, #12
	mov	x1, #0
	bl	_class_find_device
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x22, x0
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	add	x0, x0, #8
	bl	_stm_output_init
	mov	x0, x21
	bl	_to_stm_device
	str	x0, [x22]
	ldr	w0, [x0]
	bl	_try_module_get
	cbz	w0, LBB0_5
; %bb.3:
	str	x22, [x19]
	mov	x0, x20
	mov	x1, x19
	bl	_nonseekable_open
	mov	x19, x0
	b	LBB0_7
LBB0_4:
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x22
	bl	_kfree
LBB0_6:
	neg	w19, w23
	mov	x0, x21
	bl	_put_device
LBB0_7:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_stm_class,4,2                  ; @stm_class
	.comm	_major_match,4,2                ; @major_match
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_stm_char_open
.subsections_via_symbols
