	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EDIT_GetResultStr
_EDIT_GetResultStr:                     ## @EDIT_GetResultStr
	.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
	movq	%rsi, %r14
	movl	%edi, %r12d
	movq	_GCS_RESULTSTR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ImmGetCompositionStringW
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_heap_alloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r15
	movl	(%r13), %esi
	movl	%r12d, %edi
	movq	%rax, %rdx
	movl	%ebx, %ecx
	callq	_ImmGetCompositionStringW
	movq	(%r14), %rcx
	movq	8(%r14), %rax
	cmpq	%rax, %rcx
	jge	LBB0_4
## %bb.3:
	movq	%rcx, 8(%r14)
	movq	%rcx, %rax
LBB0_4:
	movq	%rax, 16(%r14)
	addq	24(%r14), %rax
	movq	%rax, (%r14)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$2, %ebx
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	movl	%esi, %r8d
	movl	%esi, %r9d
	callq	_EDIT_EM_ReplaceSel
	movq	(%r14), %rax
	movq	%rax, 8(%r14)
	movq	$0, 24(%r14)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_heap_free                      ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GCS_RESULTSTR,4,2              ## @GCS_RESULTSTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to alloc buffer for IME string\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_EDIT_GetResultStr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EDIT_GetResultStr
_EDIT_GetResultStr:                     ; @EDIT_GetResultStr
	.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
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _GCS_RESULTSTR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GCS_RESULTSTR@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x2, #0
	mov	w3, #0
	bl	_ImmGetCompositionStringW
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x0
	bl	_heap_alloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	ldr	w1, [x23]
	mov	x0, x22
	mov	x2, x20
	mov	x3, x21
	bl	_ImmGetCompositionStringW
	ldp	x9, x8, [x19]
	cmp	x9, x8
	b.ge	LBB0_4
; %bb.3:
	str	x9, [x19, #8]
	mov	x8, x9
LBB0_4:
	str	x8, [x19, #16]
	ldr	x9, [x19, #24]
	add	x8, x9, x8
	str	x8, [x19]
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	lsr	w3, w21, #2
	mov	x0, x19
	mov	x2, x20
	mov	x4, x1
	mov	x5, x1
	bl	_EDIT_EM_ReplaceSel
	ldr	x8, [x19]
	str	x8, [x19, #8]
	str	xzr, [x19, #24]
	mov	x0, x20
	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
	b	_heap_free
LBB0_5:
	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
LBB0_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_ERR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GCS_RESULTSTR,4,2              ; @GCS_RESULTSTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to alloc buffer for IME string\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_EDIT_GetResultStr
.subsections_via_symbols
