	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rewrite_sgr
_rewrite_sgr:                           ## @rewrite_sgr
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_PRESENT
	movq	_TRUE@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_strlen
	cmpl	%eax, %r13d
	jbe	LBB0_8
## %bb.4:
	movslq	%eax, %r15
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movslq	%r13d, %r13
	movq	_TRACE_DATABASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_TR
	subq	%r15, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r15), %rax
	movzbl	(%r12,%rax), %eax
	movb	%al, (%r12,%rbx)
	incl	%ebx
	cmpq	%rbx, %r13
	ja	LBB0_6
## %bb.7:
	addq	%r12, %rbx
	movq	%r12, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	__nc_STRCPY
	movq	_TRACE_DATABASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_TR
	movq	_TRUE@GOTPCREL(%rip), %rbx
	jmp	LBB0_8
LBB0_1:
	movq	_FALSE@GOTPCREL(%rip), %rbx
LBB0_8:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE_DATABASE,4,2             ## @TRACE_DATABASE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_rewrite_sgr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rewrite_sgr
_rewrite_sgr:                           ; @rewrite_sgr
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_PRESENT
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_strlen
	mov	x22, x0
	mov	x0, x20
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w22, w0
	b.ls	LBB0_7
; %bb.3:
	sxtw	x21, w0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_strncmp
	cbnz	w0, LBB0_7
; %bb.4:
	sxtw	x23, w22
Lloh0:
	adrp	x22, _TRACE_DATABASE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TRACE_DATABASE@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_TR
	mov	x8, #0
	sub	x9, x23, x21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x10, x8, x21
	ldrb	w10, [x19, x10]
	strb	w10, [x19, x8]
	add	w8, w8, #1
	cmp	x9, x8
	b.hi	LBB0_5
; %bb.6:
	add	x21, x19, x8
	mov	x0, x19
	bl	_strlen
	add	w2, w0, #1
	mov	x0, x21
	mov	x1, x20
	bl	__nc_STRCPY
	ldr	w0, [x22]
	mov	x1, x19
	bl	_TR
LBB0_7:
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x8, _FALSE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE_DATABASE,4,2             ; @TRACE_DATABASE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_rewrite_sgr
.subsections_via_symbols
