	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___handle_mouse                 ## -- Begin function __handle_mouse
	.p2align	4, 0x90
___handle_mouse:                        ## @__handle_mouse
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rdi), %r15
	callq	___drag_and_resize
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_1
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_2
LBB0_19:
	movq	_INT8_MAX@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	jne	LBB0_21
## %bb.20:
	movl	$34, (%r14)
	jmp	LBB0_21
LBB0_2:
	leaq	-48(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_r_cons_get_click
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	cmpl	$1, -44(%rbp)
	jne	LBB0_6
## %bb.5:
	movl	-48(%rbp), %esi
	movl	$1, %ebx
	movq	%r13, %rdi
	movl	$1, %edx
	callq	___handle_mouse_on_top
	testq	%rax, %rax
	jne	LBB0_21
LBB0_6:
	movq	(%r15), %rax
	movq	_PANEL_MODE_MENU@GOTPCREL(%rip), %rcx
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	___handle_mouse_on_menu
	movl	$1, %ebx
	jmp	LBB0_21
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_8:
	movq	%r13, %rdi
	callq	___handle_mouse_on_X
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.9:
	movl	-48(%rbp), %esi
	movq	%r13, %rdi
	callq	___check_if_mouse_x_illegal
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	___check_if_mouse_y_illegal
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	movq	$0, 8(%r15)
	jmp	LBB0_21
LBB0_12:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	callq	___check_if_mouse_x_on_edge
	movl	%eax, 8(%r15)
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	callq	___check_if_mouse_y_on_edge
	movl	%eax, 12(%r15)
	orl	8(%r15), %eax
	jne	LBB0_21
## %bb.13:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r14, %r8
	callq	___handle_mouse_on_panel
	testq	%rax, %rax
	jne	LBB0_21
## %bb.14:
	leaq	-52(%rbp), %rdi
	callq	_r_cons_get_size
	movl	-44(%rbp), %ecx
	cmpl	-52(%rbp), %ecx
	jne	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	callq	___get_cur_panel
	movq	(%rax), %rdx
	movl	(%rdx), %ecx
	movl	4(%rdx), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	___split_panel_horizontal
	jmp	LBB0_18
LBB0_16:
	cmpl	%eax, -48(%rbp)
	jne	LBB0_18
## %bb.17:
	movq	%r15, %rdi
	callq	___get_cur_panel
	movq	(%rax), %rdx
	movl	(%rdx), %ecx
	movl	4(%rdx), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	___split_panel_vertical
LBB0_18:
	movl	(%r14), %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_PANEL_MODE_MENU,8,3            ## @PANEL_MODE_MENU
	.comm	_INT8_MAX,4,2                   ## @INT8_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___handle_mouse                 ; -- Begin function __handle_mouse
	.p2align	2
___handle_mouse:                        ; @__handle_mouse
	.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, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x21, [x0]
	bl	___drag_and_resize
	cbz	x0, LBB0_3
LBB0_1:
	mov	w23, #1
LBB0_2:
	mov	x0, x23
	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
LBB0_3:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
LBB0_4:
Lloh0:
	adrp	x9, _INT8_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT8_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.5:
	mov	w23, #0
	mov	w8, #34
	str	w8, [x19]
	b	LBB0_2
LBB0_6:
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_r_cons_get_click
	cbz	x0, LBB0_11
; %bb.7:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:
	ldr	w1, [sp, #12]
	mov	w23, #1
	mov	x0, x20
	mov	w2, #1
	bl	___handle_mouse_on_top
	cbnz	x0, LBB0_2
LBB0_9:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _PANEL_MODE_MENU@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PANEL_MODE_MENU@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldp	w2, w1, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	mov	x0, x20
	bl	___handle_mouse_on_menu
	b	LBB0_1
LBB0_11:
	mov	w23, #0
	b	LBB0_2
LBB0_12:
	mov	x0, x20
	bl	___handle_mouse_on_X
	cbnz	x0, LBB0_1
; %bb.13:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	___check_if_mouse_x_illegal
	cbnz	x0, LBB0_15
; %bb.14:
	ldr	w1, [sp, #8]
	mov	x0, x20
	bl	___check_if_mouse_y_illegal
	cbz	x0, LBB0_16
LBB0_15:
	str	xzr, [x21, #8]
	b	LBB0_1
LBB0_16:
	ldp	w2, w1, [sp, #8]
	mov	x0, x20
	bl	___check_if_mouse_x_on_edge
	str	w0, [x21, #8]
	ldp	w2, w1, [sp, #8]
	mov	x0, x20
	bl	___check_if_mouse_y_on_edge
	str	w0, [x21, #12]
	ldr	w8, [x21, #8]
	orr	w8, w8, w0
	cbnz	w8, LBB0_1
; %bb.17:
	ldp	w3, w2, [sp, #8]
	mov	x0, x20
	mov	x1, x22
	mov	x4, x19
	bl	___handle_mouse_on_panel
	cbnz	x0, LBB0_1
; %bb.18:
	add	x0, sp, #4
	bl	_r_cons_get_size
	ldp	w9, w8, [sp, #4]
	cmp	w8, w9
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x21
	bl	___get_cur_panel
	mov	x1, x0
	ldr	x8, [x0]
	ldp	w3, w2, [x8]
	mov	x0, x20
	bl	___split_panel_horizontal
	b	LBB0_22
LBB0_20:
	ldr	w8, [sp, #12]
	cmp	w8, w0
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x21
	bl	___get_cur_panel
	mov	x1, x0
	ldr	x8, [x0]
	ldp	w3, w2, [x8]
	mov	x0, x20
	bl	___split_panel_vertical
LBB0_22:
	ldr	w8, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PANEL_MODE_MENU,8,3            ; @PANEL_MODE_MENU
	.comm	_INT8_MAX,4,2                   ; @INT8_MAX
.subsections_via_symbols
