	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EDIT_AdjustFormatRect
_EDIT_AdjustFormatRect:                 ## @EDIT_AdjustFormatRect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	movq	64(%rdi), %rdi
	addq	72(%rbx), %rsi
	callq	_max
	movq	%rax, 64(%rbx)
	movq	_ES_MULTILINE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_get_vertical_line_count
	movq	16(%rbx), %rcx
	imulq	%rax, %rcx
	addq	88(%rbx), %rcx
	movq	%rcx, 80(%rbx)
	movq	72(%rbx), %rdx
	subq	64(%rbx), %rdx
	addq	24(%rbx), %rdx
	xorl	%ecx, %ecx
	testq	%rdx, %rdx
	cmovgq	%rdx, %rcx
	cmpq	%rcx, 32(%rbx)
	jle	LBB0_3
## %bb.2:
	movq	%rcx, 32(%rbx)
LBB0_3:
	movq	40(%rbx), %rcx
	subq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	cmovgq	%rcx, %rax
	cmpq	%rax, 48(%rbx)
	jle	LBB0_5
## %bb.4:
	movq	%rax, 48(%rbx)
LBB0_5:
	movq	%rbx, %rdi
	callq	_EDIT_UpdateScrollInfo
	jmp	LBB0_7
LBB0_6:
	movq	16(%rbx), %rax
	addq	88(%rbx), %rax
	movq	%rax, 80(%rbx)
LBB0_7:
	movl	96(%rbx), %edi
	leaq	-24(%rbp), %rsi
	callq	_GetClientRect
	movq	80(%rbx), %rdi
	movl	-24(%rbp), %esi
	callq	_min
	movq	%rax, 80(%rbx)
	movl	8(%rbx), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.8:
	movq	_ES_AUTOHSCROLL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_get_text_length
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_EDIT_BuildLineDefs_ML
LBB0_10:
	movl	60(%rbx), %esi
	movq	_EF_AFTER_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	56(%rbx), %edx
	movq	%rbx, %rdi
	callq	_EDIT_SetCaretPos
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ES_MULTILINE,4,2               ## @ES_MULTILINE
	.comm	_ES_AUTOHSCROLL,4,2             ## @ES_AUTOHSCROLL
	.comm	_EF_AFTER_WRAP,4,2              ## @EF_AFTER_WRAP
	.no_dead_strip	_EDIT_AdjustFormatRect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EDIT_AdjustFormatRect
_EDIT_AdjustFormatRect:                 ; @EDIT_AdjustFormatRect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x0, [x0, #64]
	ldr	x8, [x19, #72]
	ldr	x9, [x19]
	add	x1, x9, x8
	bl	_max
	str	x0, [x19, #64]
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x20, _ES_MULTILINE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ES_MULTILINE@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_get_vertical_line_count
	ldr	x8, [x19, #88]
	ldp	x9, x10, [x19, #16]
	madd	x8, x9, x0, x8
	str	x8, [x19, #80]
	ldp	x8, x9, [x19, #64]
	sub	x8, x9, x8
	add	x8, x8, x10
	cmp	x8, #0
	csel	x8, x8, xzr, gt
	ldr	x9, [x19, #32]
	cmp	x9, x8
	b.le	LBB0_3
; %bb.2:
	str	x8, [x19, #32]
LBB0_3:
	ldp	x8, x9, [x19, #40]
	sub	x8, x8, x0
	cmp	x8, #0
	csel	x8, x8, xzr, gt
	cmp	x9, x8
	b.le	LBB0_5
; %bb.4:
	str	x8, [x19, #48]
LBB0_5:
	mov	x0, x19
	bl	_EDIT_UpdateScrollInfo
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #88]
	ldr	x9, [x19, #16]
	add	x8, x9, x8
	str	x8, [x19, #80]
LBB0_7:
	ldr	w0, [x19, #96]
	add	x1, sp, #8
	bl	_GetClientRect
	ldr	x0, [x19, #80]
	ldr	w1, [sp, #8]
	bl	_min
	str	x0, [x19, #80]
	ldr	w8, [x19, #8]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
Lloh2:
	adrp	x9, _ES_AUTOHSCROLL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ES_AUTOHSCROLL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_get_text_length
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	mov	w3, #0
	mov	x4, #0
	bl	_EDIT_BuildLineDefs_ML
LBB0_10:
	ldp	w8, w1, [x19, #56]
Lloh5:
	adrp	x9, _EF_AFTER_WRAP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EF_AFTER_WRAP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w2, w9, w8
	mov	x0, x19
	bl	_EDIT_SetCaretPos
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ES_MULTILINE,4,2               ; @ES_MULTILINE
	.comm	_ES_AUTOHSCROLL,4,2             ; @ES_AUTOHSCROLL
	.comm	_EF_AFTER_WRAP,4,2              ; @EF_AFTER_WRAP
	.no_dead_strip	_EDIT_AdjustFormatRect
.subsections_via_symbols
