	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function h_wctomb
_h_wctomb:                              ## @h_wctomb
	.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	$264, %rsp                      ## imm = 0x108
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -272(%rbp)                ## 8-byte Spill
	movq	_LC_ALL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %r12
	movq	%r12, %rsi
	callq	_setlocale
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_ATF_REQUIRE_STREQ
	movq	_LC_CTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rsi
	callq	_setlocale
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r13, -280(%rbp)                ## 8-byte Spill
	movq	8(%r15), %rsi
	movq	_VIS_WHITE@GOTPCREL(%rip), %rax
	movq	_VIS_OCTAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-256(%rbp), %r12
	movq	%r12, %rdi
	callq	_strvis
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	movq	%rax, -264(%rbp)                ## 8-byte Spill
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_setlocale
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_ATF_REQUIRE
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	_TC_WCRTOMB_ST@GOTPCREL(%rip), %rax
	cmpb	%r14b, (%rax)
	movl	%r14d, %ebx
	jne	LBB0_4
## %bb.3:
	leaq	-292(%rbp), %rdi
	movq	%rdi, -264(%rbp)                ## 8-byte Spill
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_4:
	movq	16(%r15), %rdx
	movl	$88, -128(%rbp,%rdx,4)
	movq	8(%r15), %rax
	movq	%rax, -288(%rbp)
	addl	$2, %edx
	leaq	-128(%rbp), %rdi
	leaq	-288(%rbp), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	_mbsrtowcs
	movl	16(%r15), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rcx
	movl	%esi, %r8d
	callq	_ATF_REQUIRE_EQ_MSG
	movq	16(%r15), %rax
	movl	-128(%rbp,%rax,4), %edi
	xorl	%esi, %esi
	callq	_ATF_REQUIRE_EQ
	cmpq	$-1, 16(%r15)
	je	LBB0_12
## %bb.5:
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	movq	16(%r15), %rax
	incq	%rax
	cmpq	%rax, %r13
	movl	%r14d, %ebx
	jae	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-128(%rbp,%r13,4), %esi
	movl	%ebx, %r14d
	movq	_TC_WCTOMB@GOTPCREL(%rip), %rax
	cmpb	%bl, (%rax)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-272(%rbp), %rdi                ## 8-byte Reload
	callq	_wctomb
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-272(%rbp), %rdi                ## 8-byte Reload
	movq	-264(%rbp), %rdx                ## 8-byte Reload
	callq	_wcrtomb
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r12
	movq	24(%r15), %rax
	cmpq	(%rax,%r13,8), %r12
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	24(%r15), %rax
	movq	(%rax,%r13,8), %rsi
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.7(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.8(%rip), %rdi
	callq	_atf_tc_fail
	jmp	LBB0_11
LBB0_12:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	-280(%rbp), %r13                ## 8-byte Reload
	jmp	LBB0_13
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
LBB0_13:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_LEN_MAX,4,2                 ## @MB_LEN_MAX
	.comm	_LC_ALL,4,2                     ## @LC_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"C"

	.comm	_LC_CTYPE,4,2                   ## @LC_CTYPE
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Locale %s not found.\n"

	.comm	_VIS_WHITE,4,2                  ## @VIS_WHITE
	.comm	_VIS_OCTAL,4,2                  ## @VIS_OCTAL
L_.str.2:                               ## @.str.2
	.asciz	"Checking sequence: \"%s\"\n"

L_.str.3:                               ## @.str.3
	.asciz	"Using locale: %s\n"

	.comm	_TC_WCRTOMB_ST,1,0              ## @TC_WCRTOMB_ST
L_.str.4:                               ## @.str.4
	.asciz	"mbsrtowcs() returned: %zu, expected: %zu"

	.comm	_TC_WCTOMB,1,0                  ## @TC_WCTOMB
L_.str.5:                               ## @.str.5
	.asciz	"At position %zd:\n"

L_.str.6:                               ## @.str.6
	.asciz	"  expected: %zd\n"

L_.str.7:                               ## @.str.7
	.asciz	"  got     : %zd\n"

L_.str.8:                               ## @.str.8
	.asciz	"Test failed"

L_str:                                  ## @str
	.asciz	"Ok."

	.no_dead_strip	_h_wctomb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function h_wctomb
_h_wctomb:                              ; @h_wctomb
	.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
	sub	sp, sp, #240
	mov	x21, x1
	mov	x19, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x8, _MB_LEN_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MB_LEN_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x23, _LC_ALL@GOTPAGE
Lloh9:
	ldr	x23, [x23, _LC_ALL@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh10:
	adrp	x22, l_.str@PAGE
Lloh11:
	add	x22, x22, l_.str@PAGEOFF
	mov	x1, x22
	bl	_setlocale
	mov	x1, x22
	bl	_ATF_REQUIRE_STREQ
Lloh12:
	adrp	x8, _LC_CTYPE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LC_CTYPE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x1, [x19]
	bl	_setlocale
	cbz	x0, LBB0_12
; %bb.1:
	sub	x8, x29, #64
	stur	x24, [x8, #-256]                ; 8-byte Folded Spill
	and	w28, w21, #0xff
Lloh15:
	adrp	x8, _VIS_WHITE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VIS_WHITE@GOTPAGEOFF]
	ldr	x1, [x19, #8]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _VIS_OCTAL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VIS_OCTAL@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	sub	x21, x29, #296
	sub	x0, x29, #296
	bl	_strvis
	str	x21, [sp, #-16]!
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	ldr	w0, [x23]
	mov	x1, #0
	bl	_setlocale
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_ATF_REQUIRE
	str	x21, [sp, #-16]!
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	mov	x21, #0
Lloh25:
	adrp	x8, _TC_WCRTOMB_ST@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TC_WCRTOMB_ST@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w28
	b.ne	LBB0_3
; %bb.2:
	sub	x21, x29, #308
	sub	x0, x29, #308
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_3:
	sub	x27, x29, #168
	mov	w8, #88
	ldp	x10, x9, [x19, #8]
	str	w8, [x27, x9, lsl #2]
	sub	x8, x29, #48
	stur	x10, [x8, #-256]
	add	w2, w9, #2
	sub	x0, x29, #168
	sub	x1, x29, #304
	mov	x3, #0
	bl	_mbsrtowcs
	ldr	w1, [x19, #16]
Lloh27:
	adrp	x2, l_.str.4@PAGE
Lloh28:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x3, x0
	mov	x4, x1
	bl	_ATF_REQUIRE_EQ_MSG
	ldr	x8, [x19, #16]
	ldr	w0, [x27, x8, lsl #2]
	mov	w1, #0
	bl	_ATF_REQUIRE_EQ
	ldr	x8, [x19, #16]
	cmn	x8, #1
	b.eq	LBB0_11
; %bb.4:
	mov	x22, #0
Lloh29:
	adrp	x23, _TC_WCTOMB@GOTPAGE
Lloh30:
	ldr	x23, [x23, _TC_WCTOMB@GOTPAGEOFF]
Lloh31:
	adrp	x24, l_.str.7@PAGE
Lloh32:
	add	x24, x24, l_.str.7@PAGEOFF
Lloh33:
	adrp	x25, l_.str.8@PAGE
Lloh34:
	add	x25, x25, l_.str.8@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	cmp	x22, x8
	b.hs	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x23]
	ldr	w1, [x27, x22, lsl #2]
	mov	x0, x20
	cmp	w8, w28
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_wctomb
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x2, x21
	bl	_wcrtomb
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, x0
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x22, lsl #3]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	str	x22, [sp, #-16]!
Lloh35:
	adrp	x0, l_.str.5@PAGE
Lloh36:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x22, lsl #3]
	str	x8, [sp, #-16]!
Lloh37:
	adrp	x0, l_.str.6@PAGE
Lloh38:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	str	x26, [sp, #-16]!
	mov	x0, x24
	bl	_printf
	add	sp, sp, #16
	mov	x0, x25
	bl	_atf_tc_fail
	b	LBB0_5
LBB0_11:
Lloh39:
	adrp	x0, l_str@PAGE
Lloh40:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	sub	x8, x29, #64
	ldur	x24, [x8, #-256]                ; 8-byte Folded Reload
	b	LBB0_13
LBB0_12:
Lloh41:
	adrp	x8, _stderr@GOTPAGE
Lloh42:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	ldr	x2, [x19]
Lloh44:
	adrp	x1, l_.str.1@PAGE
Lloh45:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_13:
	mov	sp, x24
	ldur	x8, [x29, #-96]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #80
	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
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
	.comm	_LC_ALL,4,2                     ; @LC_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"C"

	.comm	_LC_CTYPE,4,2                   ; @LC_CTYPE
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Locale %s not found.\n"

	.comm	_VIS_WHITE,4,2                  ; @VIS_WHITE
	.comm	_VIS_OCTAL,4,2                  ; @VIS_OCTAL
l_.str.2:                               ; @.str.2
	.asciz	"Checking sequence: \"%s\"\n"

l_.str.3:                               ; @.str.3
	.asciz	"Using locale: %s\n"

	.comm	_TC_WCRTOMB_ST,1,0              ; @TC_WCRTOMB_ST
l_.str.4:                               ; @.str.4
	.asciz	"mbsrtowcs() returned: %zu, expected: %zu"

	.comm	_TC_WCTOMB,1,0                  ; @TC_WCTOMB
l_.str.5:                               ; @.str.5
	.asciz	"At position %zd:\n"

l_.str.6:                               ; @.str.6
	.asciz	"  expected: %zd\n"

l_.str.7:                               ; @.str.7
	.asciz	"  got     : %zd\n"

l_.str.8:                               ; @.str.8
	.asciz	"Test failed"

l_str:                                  ; @str
	.asciz	"Ok."

	.no_dead_strip	_h_wctomb
.subsections_via_symbols
