	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EDIT_EM_Undo
_EDIT_EM_Undo:                          ## @EDIT_EM_Undo
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ecx
	movq	_ES_READONLY@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ES_MULTILINE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	sete	%al
	jmp	LBB0_3
LBB0_2:
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_strlenW
	movl	%eax, %r15d
	leal	4(,%r15,4), %edi
	callq	_heap_alloc
	movl	%eax, %r14d
	movl	4(%rbx), %esi
	movl	%eax, %edi
	callq	_strcpyW
	movq	8(%rbx), %r12
	movl	%r14d, %edi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_TRACE
	movq	16(%rbx), %rsi
	movq	8(%rbx), %rdx
	addq	%rsi, %rdx
	movq	_FALSE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	callq	_EDIT_EM_SetSel
	movq	%rbx, %rdi
	callq	_EDIT_EM_EmptyUndoBuffer
	movq	_TRUE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%esi, %r8d
	movl	%esi, %r9d
	callq	_EDIT_EM_ReplaceSel
	movq	16(%rbx), %rsi
	movq	8(%rbx), %rdx
	addq	%rsi, %rdx
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	callq	_EDIT_EM_SetSel
	movq	_EN_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_EDIT_NOTIFY_PARENT
	movq	%rbx, %rdi
	callq	_EDIT_EM_ScrollCaret
	movl	%r14d, %edi
	callq	_heap_free
	movq	8(%rbx), %r14
	movl	4(%rbx), %edi
	callq	_debugstr_w
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_TRACE
	movl	(%r12), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ES_READONLY,4,2                ## @ES_READONLY
	.comm	_ES_MULTILINE,4,2               ## @ES_MULTILINE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"before UNDO:insertion length = %d, deletion buffer = %s\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_EN_CHANGE,4,2                  ## @EN_CHANGE
L_.str.1:                               ## @.str.1
	.asciz	"after UNDO:insertion length = %d, deletion buffer = %s\n"

	.no_dead_strip	_EDIT_EM_Undo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EDIT_EM_Undo
_EDIT_EM_Undo:                          ; @EDIT_EM_Undo
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _ES_READONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ES_READONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _ES_MULTILINE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ES_MULTILINE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_strlenW
	mov	x21, x0
	lsl	w8, w0, #2
	add	w0, w8, #4
	bl	_heap_alloc
	mov	x20, x0
	ldr	w1, [x19, #4]
	bl	_strcpyW
	ldr	x22, [x19, #8]
	mov	x0, x20
	bl	_debugstr_w
	mov	x2, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	ldp	x8, x1, [x19, #8]
	add	x2, x8, x1
Lloh8:
	adrp	x22, _FALSE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_EDIT_EM_SetSel
	mov	x0, x19
	bl	_EDIT_EM_EmptyUndoBuffer
Lloh10:
	adrp	x23, _TRUE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _TRUE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	mov	x4, x1
	mov	x5, x1
	bl	_EDIT_EM_ReplaceSel
	ldp	x8, x1, [x19, #8]
	add	x2, x8, x1
	ldr	w3, [x22]
	mov	x0, x19
	bl	_EDIT_EM_SetSel
Lloh12:
	adrp	x8, _EN_CHANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EN_CHANGE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_EDIT_NOTIFY_PARENT
	mov	x0, x19
	bl	_EDIT_EM_ScrollCaret
	mov	x0, x20
	bl	_heap_free
	ldr	x20, [x19, #8]
	ldr	w0, [x19, #4]
	bl	_debugstr_w
	mov	x2, x0
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	w0, [x23]
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ES_READONLY,4,2                ; @ES_READONLY
	.comm	_ES_MULTILINE,4,2               ; @ES_MULTILINE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"before UNDO:insertion length = %d, deletion buffer = %s\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_EN_CHANGE,4,2                  ; @EN_CHANGE
l_.str.1:                               ; @.str.1
	.asciz	"after UNDO:insertion length = %d, deletion buffer = %s\n"

	.no_dead_strip	_EDIT_EM_Undo
.subsections_via_symbols
