	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dupargv                        ## -- Begin function dupargv
	.p2align	4, 0x90
_dupargv:                               ## @dupargv
	.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
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r15
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r15,%rdi)
	leaq	8(%rdi), %rdi
	jne	LBB0_2
## %bb.3:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	%rax, %r14
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_malloc
	movq	%rax, (%r14,%rbx,8)
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15,%rbx,8), %rsi
	movq	%rax, %rdi
	callq	_strcpy
	movq	8(%r15,%rbx,8), %rdi
	incq	%rbx
	testq	%rdi, %rdi
	jne	LBB0_6
## %bb.8:
	movl	%ebx, %eax
	jmp	LBB0_12
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	movq	$0, (%r14,%rax,8)
	jmp	LBB0_15
LBB0_13:
	movq	%r14, %rdi
	callq	_freeargv
LBB0_14:
	xorl	%r14d, %r14d
LBB0_15:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dupargv                        ; -- Begin function dupargv
	.p2align	2
_dupargv:                               ; @dupargv
	.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
	cbz	x0, LBB0_12
; %bb.1:
	mov	x20, x0
	mov	x0, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, x0]
	add	x0, x0, #8
	cbnz	x8, LBB0_2
; %bb.3:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.4:
	ldr	x0, [x20]
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	bl	_strlen
	add	w0, w0, #1
	bl	_malloc
	str	x0, [x19, x21, lsl #3]
	cbz	x0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x20, x21, lsl #3
	ldr	x1, [x22]
	bl	_strcpy
	add	x21, x21, #1
	ldr	x0, [x22, #8]
	cbnz	x0, LBB0_6
; %bb.8:
	and	x8, x21, #0xffffffff
	b	LBB0_10
LBB0_9:
	mov	x8, #0
LBB0_10:
	str	xzr, [x19, x8, lsl #3]
	b	LBB0_13
LBB0_11:
	mov	x0, x19
	bl	_freeargv
LBB0_12:
	mov	x19, #0
LBB0_13:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
