	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serio_raw_open
_serio_raw_open:                        ## @serio_raw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_serio_raw_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	%r15, %rdi
	callq	_iminor
	movl	%eax, %edi
	callq	_serio_raw_locate
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	cmpq	$0, 16(%rax)
	je	LBB0_5
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	_serio_raw_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rbx, 8(%rax)
	movq	%rax, (%r14)
	leaq	8(%rbx), %rdi
	callq	_kref_get
	movl	(%rbx), %edi
	callq	_serio_pause_rx
	movq	%rbx, %rsi
	addq	$4, %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movl	(%rbx), %edi
	callq	_serio_continue_rx
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_serio_raw_mutex,4,2            ## @serio_raw_mutex
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_serio_raw_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serio_raw_open
_serio_raw_open:                        ; @serio_raw_open
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x0, _serio_raw_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _serio_raw_mutex@GOTPAGEOFF]
	bl	_mutex_lock_interruptible
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x21
	bl	_iminor
	bl	_serio_raw_locate
	cbz	x0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_7
LBB0_3:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
Lloh4:
	adrp	x0, _serio_raw_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _serio_raw_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x20
	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_7:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.8:
	mov	x21, x0
	str	x20, [x0, #8]
	str	x0, [x19]
	add	x0, x20, #8
	bl	_kref_get
	ldr	w0, [x20]
	bl	_serio_pause_rx
	add	x1, x20, #4
	mov	x0, x21
	bl	_list_add_tail
	ldr	w0, [x20]
	bl	_serio_continue_rx
	mov	w20, #0
	b	LBB0_5
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_serio_raw_mutex,4,2            ; @serio_raw_mutex
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_serio_raw_open
.subsections_via_symbols
