	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pegasus_open
_pegasus_open:                          ## @pegasus_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
	callq	_input_get_drvdata
	movq	%rax, %r15
	movl	4(%rax), %edi
	callq	_usb_autopm_get_interface
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	24(%r15), %eax
	movq	16(%r15), %rdi
	movl	%eax, (%rdi)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_PEN_MODE_XY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NOTETAKER_LED_MOUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_pegasus_set_mode
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	16(%r15), %rdi
	callq	_usb_kill_urb
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_cancel_work_sync
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	4(%r15), %edi
	callq	_usb_autopm_put_interface
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, (%r15)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PEN_MODE_XY,4,2                ## @PEN_MODE_XY
	.comm	_NOTETAKER_LED_MOUSE,4,2        ## @NOTETAKER_LED_MOUSE
	.no_dead_strip	_pegasus_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pegasus_open
_pegasus_open:                          ; @pegasus_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
	bl	_input_get_drvdata
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_usb_autopm_get_interface
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.1:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19, #24]
	ldr	x0, [x19, #16]
	str	w8, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _PEN_MODE_XY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PEN_MODE_XY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _NOTETAKER_LED_MOUSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NOTETAKER_LED_MOUSE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pegasus_set_mode
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x0, [x19, #16]
	bl	_usb_kill_urb
	add	x0, x19, #12
	bl	_cancel_work_sync
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19, #4]
	bl	_usb_autopm_put_interface
LBB0_6:
	mov	x0, x21
	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:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PEN_MODE_XY,4,2                ; @PEN_MODE_XY
	.comm	_NOTETAKER_LED_MOUSE,4,2        ; @NOTETAKER_LED_MOUSE
	.no_dead_strip	_pegasus_open
.subsections_via_symbols
