	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EDIT_EM_SetMargins
_EDIT_EM_SetMargins:                    ## @EDIT_EM_SetMargins
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rdi, %rbx
	xorl	%r8d, %r8d
	cmpq	$0, 24(%rdi)
	je	LBB0_1
## %bb.2:
	movq	_EC_USEFONTINFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r13, %rax
	je	LBB0_4
## %bb.3:
	movl	$0, %r15d
	cmpq	%r12, %rax
	jne	LBB0_13
LBB0_4:
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	16(%rbx), %edi
	callq	_GetDC
	movl	%eax, %r15d
	movq	24(%rbx), %rsi
	movl	%eax, %edi
	callq	_SelectObject
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %rsi
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_GdiGetCharDimensions
	movq	_TMPF_VECTOR@GOTPCREL(%rip), %rcx
	movq	_TMPF_TRUETYPE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	$0, %r15d
	testl	%edx, -72(%rbp)
	je	LBB0_12
## %bb.5:
	movl	%eax, %r14d
	movl	-68(%rbp), %edi
	callq	_is_cjk
	movl	%r14d, %ecx
	shrl	$31, %ecx
	addl	%r14d, %ecx
	sarl	%ecx
	testl	%eax, %eax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.6:
	movl	%ecx, %r15d
	jmp	LBB0_12
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_7:
	movl	16(%rbx), %edi
	leaq	-56(%rbp), %rsi
	callq	_GetClientRect
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	leal	(%rdx,%r14), %ecx
	addl	%ecx, %ecx
	cmpl	%ecx, %eax
	jge	LBB0_8
## %bb.9:
	cmpl	$27, %r14d
	jg	LBB0_11
## %bb.10:
	leaq	-56(%rbp), %rdi
	callq	_IsRectEmpty
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %r15d
	testl	%eax, %eax
	jne	LBB0_12
LBB0_11:
	movl	(%rbx), %r15d
	movl	4(%rbx), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
LBB0_8:
	movl	%edx, %r15d
LBB0_12:
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_SelectObject
	movl	16(%rbx), %edi
	movl	%r14d, %esi
	callq	_ReleaseDC
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
LBB0_13:
	movq	_EC_LEFTMARGIN@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_15
## %bb.14:
	movl	8(%rbx), %ecx
	subl	(%rbx), %ecx
	movq	_EC_USEFONTINFO@GOTPCREL(%rip), %rdx
	cmpq	%r13, (%rdx)
	cmovel	%r15d, %r13d
	movl	%r13d, (%rbx)
	addl	%ecx, %r13d
	movl	%r13d, 8(%rbx)
LBB0_15:
	movq	_EC_RIGHTMARGIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%esi, %ecx
	je	LBB0_17
## %bb.16:
	movl	12(%rbx), %edx
	addl	4(%rbx), %edx
	movq	_EC_USEFONTINFO@GOTPCREL(%rip), %rdi
	cmpq	%r12, (%rdi)
	cmovel	%r8d, %r12d
	movl	%r12d, 4(%rbx)
	subl	%r12d, %edx
	movl	%edx, 12(%rbx)
LBB0_17:
	orl	(%rax), %ecx
	testl	%esi, %ecx
	je	LBB0_20
## %bb.18:
	movq	%rbx, %rdi
	callq	_EDIT_AdjustFormatRect
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_20
## %bb.19:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_EDIT_UpdateText
LBB0_20:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_USEFONTINFO,8,3             ## @EC_USEFONTINFO
	.comm	_TMPF_VECTOR,4,2                ## @TMPF_VECTOR
	.comm	_TMPF_TRUETYPE,4,2              ## @TMPF_TRUETYPE
	.comm	_EC_LEFTMARGIN,4,2              ## @EC_LEFTMARGIN
	.comm	_EC_RIGHTMARGIN,4,2             ## @EC_RIGHTMARGIN
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"left=%d, right=%d\n"

	.no_dead_strip	_EDIT_EM_SetMargins
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EDIT_EM_SetMargins
_EDIT_EM_SetMargins:                    ; @EDIT_EM_SetMargins
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x27, _EC_USEFONTINFO@GOTPAGE
Lloh1:
	ldr	x27, [x27, _EC_USEFONTINFO@GOTPAGEOFF]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	x8, [x27]
	cmp	x8, x23
	ccmp	x8, x22, #4, ne
	b.ne	LBB0_8
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_GetDC
	mov	x24, x0
	ldr	x1, [x19, #24]
	bl	_SelectObject
	mov	x25, x0
	add	x1, sp, #8
	mov	x0, x24
	mov	x2, #0
	bl	_GdiGetCharDimensions
	ldr	w8, [sp, #8]
Lloh2:
	adrp	x9, _TMPF_VECTOR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TMPF_VECTOR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _TMPF_TRUETYPE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TMPF_TRUETYPE@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_10
; %bb.3:
	mov	x26, x0
	ldr	w0, [sp, #12]
	bl	_is_cjk
	cmp	w26, #0
	cinc	w8, w26, lt
	asr	w28, w8, #1
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w0, [x19, #16]
	mov	x1, sp
	bl	_GetClientRect
	ldp	w8, w9, [sp]
	sub	w8, w8, w9
	add	w9, w28, w26
	cmp	w8, w9, lsl #1
	b.ge	LBB0_9
; %bb.5:
	cmp	w26, #27
	b.gt	LBB0_7
; %bb.6:
	mov	x0, sp
	bl	_IsRectEmpty
	mov	x26, x28
	cbnz	w0, LBB0_11
LBB0_7:
	ldp	w26, w28, [x19]
	b	LBB0_11
LBB0_8:
	mov	w28, #0
	mov	w26, #0
	b	LBB0_12
LBB0_9:
	mov	x26, x28
	b	LBB0_11
LBB0_10:
	mov	w28, #0
	mov	w26, #0
LBB0_11:
	mov	x0, x24
	mov	x1, x25
	bl	_SelectObject
	ldr	w0, [x19, #16]
	mov	x1, x24
	bl	_ReleaseDC
LBB0_12:
Lloh8:
	adrp	x8, _EC_LEFTMARGIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EC_LEFTMARGIN@GOTPAGEOFF]
	ldr	w9, [x8]
	tst	w9, w21
	b.eq	LBB0_14
; %bb.13:
	ldr	w9, [x19]
	ldr	w10, [x19, #8]
	ldr	x11, [x27]
	cmp	x11, x23
	csel	w11, w26, w23, eq
	str	w11, [x19]
	sub	w9, w10, w9
	add	w9, w11, w9
	str	w9, [x19, #8]
LBB0_14:
Lloh10:
	adrp	x9, _EC_RIGHTMARGIN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EC_RIGHTMARGIN@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_16
; %bb.15:
	ldr	w10, [x19, #4]
	ldr	w11, [x19, #12]
	ldr	x12, [x27]
	cmp	x12, x22
	csel	w12, w28, w22, eq
	str	w12, [x19, #4]
	add	w10, w11, w10
	sub	w10, w10, w12
	str	w10, [x19, #12]
LBB0_16:
	ldr	w8, [x8]
	orr	w8, w8, w9
	tst	w8, w21
	b.eq	LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_EDIT_AdjustFormatRect
	cbz	x20, LBB0_19
; %bb.18:
Lloh13:
	adrp	x8, _TRUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_EDIT_UpdateText
LBB0_19:
	ldp	w1, w2, [x19]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_USEFONTINFO,8,3             ; @EC_USEFONTINFO
	.comm	_TMPF_VECTOR,4,2                ; @TMPF_VECTOR
	.comm	_TMPF_TRUETYPE,4,2              ; @TMPF_TRUETYPE
	.comm	_EC_LEFTMARGIN,4,2              ; @EC_LEFTMARGIN
	.comm	_EC_RIGHTMARGIN,4,2             ; @EC_RIGHTMARGIN
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"left=%d, right=%d\n"

	.no_dead_strip	_EDIT_EM_SetMargins
.subsections_via_symbols
