	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_stpncpy
_test_stpncpy:                          ## @test_stpncpy
	.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, -80(%rbp)                 ## 8-byte Spill
	callq	_strlen
	cltq
	leaq	1(%rax), %r12
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	$11, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movb	$1, %al
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testb	$1, -52(%rbp)                   ## 1-byte Folded Reload
	movl	$0, %eax
	je	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_3 Depth 3
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=2
	incq	%rbx
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	ja	LBB0_6
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_3 Depth 3
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_makebuf
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_memcpy
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_makebuf
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$88, %esi
	movq	%rbx, %rdx
	callq	_memset
	cmpq	%r12, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	cmovbq	%rbx, %r14
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_stpncpy
	leaq	(%r14,%r13), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	sete	%dil
	callq	_assert
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	cmpq	%rbx, %r14
	jae	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	xorl	%edi, %edi
	cmpb	$0, (%r13,%r14)
	sete	%dil
	callq	_assert
	incq	%r14
	cmpq	%rbx, %r14
	jb	LBB0_3
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	incq	%r14
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	ja	LBB0_11
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_makebuf
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_memcpy
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_makebuf
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$88, %esi
	movq	%r14, %rdx
	callq	_memset
	cmpq	%r12, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	cmovbq	%r14, %rbx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_stpncpy
	leaq	(%rbx,%r13), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	sete	%dil
	callq	_assert
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	cmpq	%r14, %rbx
	jae	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	xorl	%edi, %edi
	cmpb	$0, (%r13,%rbx)
	sete	%dil
	callq	_assert
	incq	%rbx
	cmpq	%r14, %rbx
	jb	LBB0_8
	jmp	LBB0_10
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_test_stpncpy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_stpncpy
_test_stpncpy:                          ; @test_stpncpy
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_strlen
	mov	w20, #0
	add	w8, w0, #1
	sxtw	x21, w8
	add	x26, x21, #10
	sub	x27, x21, #1
	mov	w8, #1
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #0
	mov	w20, #1
	tbz	w28, #0, LBB0_10
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_5 Depth 3
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x22, #0
	mov	x28, x8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	x22, x22, #1
	cmp	x22, x26
	b.hi	LBB0_6
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_5 Depth 3
	mov	x0, x21
	mov	x1, x20
	bl	_makebuf
	mov	x25, x0
	mov	x1, x19
	mov	x2, x21
	bl	_memcpy
	mov	x0, x22
	mov	w1, #0
	bl	_makebuf
	mov	x23, x0
	mov	w1, #88
	mov	x2, x22
	bl	_memset
	cmp	x22, x21
	csel	x24, x22, x27, lo
	mov	x0, x23
	mov	x1, x25
	mov	x2, x22
	bl	_stpncpy
	add	x8, x23, x24
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	mov	x0, x25
	mov	x1, x23
	mov	x2, x24
	bl	_memcmp
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	cmp	x24, x22
	b.hs	LBB0_3
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldrb	w8, [x23, x24]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	add	x24, x24, #1
	cmp	x22, x24
	b.ne	LBB0_5
	b	LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x22, x22, #1
	cmp	x22, x26
	b.hi	LBB0_1
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x0, x21
	mov	x1, x20
	bl	_makebuf
	mov	x25, x0
	mov	x1, x19
	mov	x2, x21
	bl	_memcpy
	mov	x0, x22
	mov	w1, #1
	bl	_makebuf
	mov	x23, x0
	mov	w1, #88
	mov	x2, x22
	bl	_memset
	cmp	x22, x21
	csel	x24, x22, x27, lo
	mov	x0, x23
	mov	x1, x25
	mov	x2, x22
	bl	_stpncpy
	add	x8, x23, x24
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	mov	x0, x25
	mov	x1, x23
	mov	x2, x24
	bl	_memcmp
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	cmp	x24, x22
	b.hs	LBB0_7
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldrb	w8, [x23, x24]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	add	x24, x24, #1
	cmp	x22, x24
	b.ne	LBB0_9
	b	LBB0_7
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_test_stpncpy
.subsections_via_symbols
