	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_session_run                    ## -- Begin function session_run
	.p2align	4, 0x90
_session_run:                           ## @session_run
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	32(%rdi), %r14
	movq	%r14, %rdi
	callq	_get_hid_device
	movq	%rax, %r15
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movq	24(%rbx), %rsi
	addq	$8, %rsi
	movq	%rax, %rdi
	callq	_FD_SET
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.5:
	movq	%rax, (%rcx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_hid_initialise
	movl	$4, -44(%rbp)
	movl	36(%rbx), %edi
	leaq	-40(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_getsockname
	cmpq	$0, 8(%r15)
	je	LBB0_10
## %bb.7:
	movq	24(%rbx), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_10
## %bb.8:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_uinput_open_mouse
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	js	LBB0_9
LBB0_10:
	xorl	%r12d, %r12d
	cmpq	$0, (%r15)
	je	LBB0_15
## %bb.11:
	movq	24(%rbx), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_15
## %bb.12:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_uinput_open_keyboard
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	js	LBB0_9
## %bb.13:
	movq	24(%rbx), %rsi
	addq	$8, %rsi
	movq	%rax, %rdi
	callq	_FD_SET
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_15
## %bb.14:
	movq	%rax, (%rcx)
	jmp	LBB0_15
LBB0_2:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	movl	%eax, %ebx
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_strerror
	movl	(%r14), %r8d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_9:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	movl	%eax, %ebx
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_strerror
	movl	(%r14), %r8d
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_syslog
	movl	$-1, %r12d
LBB0_15:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/vkbdctl"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"Could not open /dev/vkbdctl for %s. %s (%d)"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"Could not open /dev/uinput for %s. %s (%d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_session_run                    ; -- Begin function session_run
	.p2align	2
_session_run:                           ; @session_run
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	add	x19, x0, #32
	mov	x0, x19
	bl	_get_hid_device
	mov	x21, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	str	x0, [x20]
	tbnz	x0, #63, LBB0_13
; %bb.2:
	ldr	x8, [x20, #24]
	add	x1, x8, #8
	bl	_FD_SET
	ldr	x8, [x20]
	ldr	x9, [x20, #24]
	ldr	x10, [x9]
	cmp	x8, x10
	b.le	LBB0_4
; %bb.3:
	str	x8, [x9]
LBB0_4:
	mov	x0, x20
	bl	_hid_initialise
	mov	w8, #4
	str	w8, [sp, #4]
	ldr	w0, [x20, #36]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_getsockname
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_7
; %bb.6:
	add	x1, sp, #8
	mov	x0, x21
	bl	_uinput_open_mouse
	str	x0, [x20, #8]
	tbnz	x0, #63, LBB0_14
LBB0_7:
	ldr	x8, [x21]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_12
; %bb.9:
	add	x1, sp, #8
	mov	x0, x21
	bl	_uinput_open_keyboard
	str	x0, [x20, #16]
	tbnz	x0, #63, LBB0_14
; %bb.10:
	ldr	x8, [x20, #24]
	add	x1, x8, #8
	bl	_FD_SET
	ldp	x8, x9, [x20, #16]
	ldr	x10, [x9]
	cmp	x8, x10
	b.le	LBB0_12
; %bb.11:
	mov	w0, #0
	str	x8, [x9]
	b	LBB0_16
LBB0_12:
	mov	w0, #0
	b	LBB0_16
LBB0_13:
Lloh5:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x19, x0
Lloh8:
	adrp	x21, _errno@GOTPAGE
Lloh9:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x3, x0
	ldr	w4, [x21]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh12:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x19, x0
Lloh15:
	adrp	x21, _errno@GOTPAGE
Lloh16:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x3, x0
	ldr	w4, [x21]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	mov	x0, x20
	mov	x2, x19
	bl	_syslog
	mov	w0, #-1
LBB0_16:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/vkbdctl"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"Could not open /dev/vkbdctl for %s. %s (%d)"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"Could not open /dev/uinput for %s. %s (%d)"

.subsections_via_symbols
