	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cl_rename                      ## -- Begin function cl_rename
	.p2align	4, 0x90
_cl_rename:                             ## @cl_rename
	.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	$328, %rsp                      ## imm = 0x148
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r14
	callq	_CLP
	movq	%rax, %r13
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.1:
	movq	%rbx, 8(%r13)
	movq	_CL_RENAME_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_F_ISSET
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	_GO_TERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_OG_STR
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	$5, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_13
## %bb.3:
	cmpq	$0, (%r13)
	je	LBB0_4
LBB0_10:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cl_setname
	movq	_CL_RENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_F_SET
	jmp	LBB0_13
LBB0_11:
	movq	_CL_RENAME@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_F_ISSET
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_cl_setname
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_F_CLR
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	addq	$328, %rsp                      ## imm = 0x148
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	leaq	L_.str.2(%rip), %rdx
	leaq	-368(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$64, %esi
	movq	%rax, %rcx
	callq	_snprintf
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_popen
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %r12
	leaq	-304(%rbp), %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%rax, %rdx
	callq	_fgets
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_pclose
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.7:
	leaq	-304(%rbp), %rdi
	movl	$34, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%rax, %r12
	leaq	-304(%rbp), %rdi
	movl	$34, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	incq	%rdi
	notl	%r12d
	addl	%r12d, %eax
	movl	%eax, %esi
	callq	_strndup
	movq	%rax, (%r13)
	jmp	LBB0_10
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CL_RENAME_OK,4,2               ## @CL_RENAME_OK
	.comm	_GO_TERM,4,2                    ## @GO_TERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xterm"

L_.str.1:                               ## @.str.1
	.asciz	"WINDOWID"

L_.str.2:                               ## @.str.2
	.asciz	"xprop -id %s WM_NAME"

L_.str.3:                               ## @.str.3
	.asciz	"r"

	.comm	_CL_RENAME,4,2                  ## @CL_RENAME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cl_rename                      ; -- Begin function cl_rename
	.p2align	2
_cl_rename:                             ; @cl_rename
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #400
	.cfi_def_cfa_offset 400
	stp	x24, x23, [sp, #336]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #352]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #368]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #384]            ; 16-byte Folded Spill
	add	x29, sp, #384
	.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	x23, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x20, [x0]
	bl	_CLP
	mov	x19, x0
	cbz	w23, LBB0_5
; %bb.1:
	str	x22, [x19, #8]
Lloh3:
	adrp	x8, _CL_RENAME_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CL_RENAME_OK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_F_ISSET
	cbz	x0, LBB0_7
; %bb.2:
Lloh6:
	adrp	x8, _GO_TERM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GO_TERM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_OG_STR
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #5
	bl	_strncmp
	cbnz	x0, LBB0_7
; %bb.3:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	bl	_cl_setname
Lloh11:
	adrp	x8, _CL_RENAME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CL_RENAME@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_F_SET
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x21, _CL_RENAME@GOTPAGE
Lloh15:
	ldr	x21, [x21, _CL_RENAME@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_F_ISSET
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x1, [x19]
	mov	x0, x20
	bl	_cl_setname
	ldr	w1, [x21]
	mov	x0, x19
	bl	_F_CLR
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.8:
	mov	w0, #0
	ldp	x29, x30, [sp, #384]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #368]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #352]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #336]            ; 16-byte Folded Reload
	add	sp, sp, #400
	ret
LBB0_9:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.10:
	mov	x3, x0
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	w1, #64
	bl	_snprintf
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #8
	bl	_popen
	cbz	x0, LBB0_4
; %bb.11:
	mov	x22, x0
	add	x0, sp, #72
	mov	w1, #256
	mov	x2, x22
	bl	_fgets
	mov	x23, x0
	mov	x0, x22
	bl	_pclose
	cbz	x23, LBB0_4
; %bb.12:
	add	x0, sp, #72
	mov	w1, #34
	bl	_strchr
	cbz	x0, LBB0_4
; %bb.13:
	mov	x22, x0
	add	x0, sp, #72
	mov	w1, #34
	bl	_strrchr
	cbz	x0, LBB0_4
; %bb.14:
	add	x8, x22, #1
	mvn	w9, w22
	add	w1, w0, w9
	mov	x0, x8
	bl	_strndup
	str	x0, [x19]
	b	LBB0_4
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_CL_RENAME_OK,4,2               ; @CL_RENAME_OK
	.comm	_GO_TERM,4,2                    ; @GO_TERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xterm"

l_.str.1:                               ; @.str.1
	.asciz	"WINDOWID"

l_.str.2:                               ; @.str.2
	.asciz	"xprop -id %s WM_NAME"

l_.str.3:                               ; @.str.3
	.asciz	"r"

	.comm	_CL_RENAME,4,2                  ; @CL_RENAME
.subsections_via_symbols
