	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_alias
_handle_alias:                          ## @handle_alias
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -60(%rbp)
	movq	_errno@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_alias_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	cmpb	$33, (%rax)
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_9
## %bb.3:
	cmpl	$2, (%r14)
	jl	LBB0_5
## %bb.4:
	movq	_PATH_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	_strbuf_init
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strbuf_addstr
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	addq	$8, %rsi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_sq_quote_argv
	movq	%r15, %rdi
	callq	_free
	movq	-56(%rbp), %r15
LBB0_5:
	leaq	1(%r15), %r13
	movq	%r13, %rdi
	callq	_system
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	%r14d, %edi
	callq	_WEXITSTATUS
	cmpl	$127, %eax
	jne	LBB0_19
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_die
	movq	_errno@GOTPCREL(%rip), %r13
LBB0_9:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_split_cmdline
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_die
LBB0_11:
	leaq	-56(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	callq	_handle_options
	movl	%eax, %ebx
	cmpl	$0, -60(%rbp)
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_die
LBB0_13:
	movq	-56(%rbp), %rsi
	movslq	%ebx, %rbx
	shlq	$3, %rbx
	movq	%rsi, %rdi
	subq	%rbx, %rdi
	movl	-44(%rbp), %edx
	shll	$3, %edx
	callq	_memmove
	movq	-56(%rbp), %r14
	subq	%rbx, %r14
	movq	%r14, -56(%rbp)
	cmpl	$0, -44(%rbp)
	jg	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_die
	movq	-56(%rbp), %r14
LBB0_15:
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_die
	movq	-56(%rbp), %r14
LBB0_17:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	addl	-44(%rbp), %eax
	leal	8(,%rax,8), %esi
	movq	%r14, %rdi
	callq	_realloc
	movq	%rax, -56(%rbp)
	movslq	-44(%rbp), %rcx
	leaq	(%rax,%rcx,8), %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rsi
	addq	$8, %rsi
	movl	(%rbx), %edx
	shll	$3, %edx
	callq	_memcpy
	movq	-56(%rbp), %rax
	movl	-44(%rbp), %ecx
	movl	(%rbx), %edx
	leal	(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movq	$0, (%rax,%rsi,8)
	movq	-56(%rbp), %rax
	movq	%rax, (%r14)
	leal	-1(%rdx,%rcx), %eax
	movl	%eax, (%rbx)
	movl	$1, %eax
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_18
LBB0_1:
	xorl	%eax, %eax
LBB0_18:
	movl	%ebx, (%r13)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	%r14d, %edi
	callq	_WEXITSTATUS
	movl	%eax, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to run '%s' when expanding alias '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"Bad alias.%s string"

L_.str.2:                               ## @.str.2
	.asciz	"alias '%s' changes environment variables\nYou can use '!perf' in the alias to do this."

L_.str.3:                               ## @.str.3
	.asciz	"empty alias for %s"

L_.str.4:                               ## @.str.4
	.asciz	"recursive alias: %s"

	.no_dead_strip	_handle_alias
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_alias
_handle_alias:                          ; @handle_alias
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #28]
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	ldr	w26, [x25]
	ldr	x8, [x1]
	ldr	x21, [x8]
	mov	x0, x21
	bl	_alias_lookup
	cbz	x0, LBB0_17
; %bb.1:
	mov	x22, x0
	ldrb	w8, [x0]
	cmp	w8, #33
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
Lloh2:
	adrp	x23, _PATH_MAX@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PATH_MAX@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x0, sp, #16
	bl	_strbuf_init
	add	x0, sp, #16
	mov	x1, x22
	bl	_strbuf_addstr
	ldr	x8, [x20]
	add	x1, x8, #8
	ldr	w2, [x23]
	add	x0, sp, #16
	bl	_sq_quote_argv
	mov	x0, x22
	bl	_free
	ldr	x22, [sp, #16]
LBB0_4:
	add	x23, x22, #1
	mov	x0, x23
	bl	_system
	tbnz	w0, #31, LBB0_7
; %bb.5:
	mov	x24, x0
	bl	_WIFEXITED
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x24
	bl	_WEXITSTATUS
	cmp	w0, #127
	b.ne	LBB0_18
LBB0_7:
	str	x21, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_die
LBB0_8:
	add	x1, sp, #16
	mov	x0, x22
	bl	_split_cmdline
	str	w0, [sp, #24]
	tbz	w0, #31, LBB0_10
; %bb.9:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_die
LBB0_10:
	add	x0, sp, #16
	add	x1, sp, #24
	add	x2, sp, #28
	bl	_handle_options
	mov	x22, x0
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_12
; %bb.11:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_die
LBB0_12:
	ldr	x1, [sp, #16]
	sbfiz	x22, x22, #3, #32
	sub	x0, x1, x22
	ldr	w8, [sp, #24]
	lsl	w2, w8, #3
	bl	_memmove
	ldr	x8, [sp, #16]
	sub	x22, x8, x22
	str	x22, [sp, #16]
	ldr	w8, [sp, #24]
	cmp	w8, #0
	b.gt	LBB0_14
; %bb.13:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_die
	ldr	x22, [sp, #16]
LBB0_14:
	ldr	x1, [x22]
	mov	x0, x21
	bl	_strcmp
	cbnz	w0, LBB0_16
; %bb.15:
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_die
	ldr	x22, [sp, #16]
LBB0_16:
	ldr	w8, [sp, #24]
	ldr	w9, [x19]
	add	w8, w9, w8
	lsl	w8, w8, #3
	add	w1, w8, #8
	mov	x0, x22
	bl	_realloc
	str	x0, [sp, #16]
	ldrsw	x8, [sp, #24]
	add	x0, x0, x8, lsl #3
	ldr	x8, [x20]
	add	x1, x8, #8
	ldr	w8, [x19]
	lsl	w2, w8, #3
	bl	_memcpy
	ldr	x8, [sp, #16]
	ldr	w9, [sp, #24]
	ldr	w10, [x19]
	add	w9, w10, w9
	str	xzr, [x8, w9, sxtw #3]
	ldr	x8, [sp, #16]
	str	x8, [x20]
	sub	w8, w9, #1
	str	w8, [x19]
	mov	w0, #1
LBB0_17:
	str	w26, [x25]
	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
	add	sp, sp, #112
	ret
LBB0_18:
	mov	x0, x24
	bl	_WEXITSTATUS
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to run '%s' when expanding alias '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"Bad alias.%s string"

l_.str.2:                               ; @.str.2
	.asciz	"alias '%s' changes environment variables\nYou can use '!perf' in the alias to do this."

l_.str.3:                               ; @.str.3
	.asciz	"empty alias for %s"

l_.str.4:                               ; @.str.4
	.asciz	"recursive alias: %s"

	.no_dead_strip	_handle_alias
.subsections_via_symbols
