	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_argv
_copy_argv:                             ## @copy_argv
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	leaq	8(%r14), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_strlen
	addl	%eax, %r15d
	incl	%r15d
	movq	(%rbx), %rdi
	addq	$8, %rbx
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.3:
	movl	%r15d, %edi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_5:
	movq	(%r14), %rcx
	movq	%r15, %rax
	testq	%rcx, %rcx
	je	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rcx), %edx
	incq	%rcx
	movb	%dl, (%rax)
	incq	%rax
	testb	%dl, %dl
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movb	$32, -1(%rax)
	movq	8(%r14), %rcx
	addq	$8, %r14
	testq	%rcx, %rcx
	jne	LBB0_7
LBB0_9:
	movb	$0, -1(%rax)
LBB0_10:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"copy_argv: malloc"

	.no_dead_strip	_copy_argv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_argv
_copy_argv:                             ; @copy_argv
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_8
; %bb.1:
	mov	w20, #0
	mov	w21, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_strlen
	add	w8, w20, w0
	add	w20, w8, #1
	ldr	x0, [x19, x21]
	add	x21, x21, #8
	cbnz	x0, LBB0_2
; %bb.3:
	mov	x0, x20
	bl	_malloc
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.4:
	ldr	x9, [x19]
	cbz	x9, LBB0_10
LBB0_5:
	mov	w10, #32
	mov	x8, x20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x9], #1
	strb	w11, [x8], #1
	cbnz	w11, LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sturb	w10, [x8, #-1]
	ldr	x9, [x19, #8]!
	cbnz	x9, LBB0_6
	b	LBB0_11
LBB0_8:
	mov	x20, #0
	b	LBB0_12
LBB0_9:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
	ldr	x9, [x19]
	cbnz	x9, LBB0_5
LBB0_10:
	mov	x8, x20
LBB0_11:
	sturb	wzr, [x8, #-1]
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"copy_argv: malloc"

	.no_dead_strip	_copy_argv
.subsections_via_symbols
