	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ctl_wc_hook
_ctl_wc_hook:                           ## @ctl_wc_hook
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	$40, -40(%rbp)
	leaq	L_.str(%rip), %rax
	movq	%rax, -32(%rbp)
	movq	_wchar_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movl	$40, %edi
	callq	_malloc
	movq	%rax, -24(%rbp)
	movq	$8, -48(%rbp)
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_iconv_open
	movl	$-1, %r14d
	cmpq	$-1, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	_ICONV_SET_HOOKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_iconvctl
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	leaq	-32(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	leaq	-40(%rbp), %r8
	movq	%rbx, %rdi
	callq	_iconv
	cmpq	$-1, %rax
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_iconv_close
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.4:
	movq	_wc_hook@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpq	$0, (%rax)
	sete	%r14b
LBB0_5:
	movl	%r14d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hello World!"

	.comm	_wchar_hook,4,2                 ## @wchar_hook
L_.str.1:                               ## @.str.1
	.asciz	"SHIFT_JIS"

L_.str.2:                               ## @.str.2
	.asciz	"ASCII"

	.comm	_ICONV_SET_HOOKS,4,2            ## @ICONV_SET_HOOKS
	.comm	_wc_hook,8,3                    ## @wc_hook
	.no_dead_strip	_ctl_wc_hook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ctl_wc_hook
_ctl_wc_hook:                           ; @ctl_wc_hook
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w9, #40
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	stp	x8, x9, [sp, #8]
Lloh2:
	adrp	x8, _wchar_hook@GOTPAGE
Lloh3:
	ldr	x8, [x8, _wchar_hook@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	str	xzr, [sp, #32]
	mov	w0, #40
	bl	_malloc
	str	x0, [sp]
	mov	w8, #8
	str	x8, [sp, #24]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_iconv_open
	cmn	x0, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh9:
	adrp	x8, _ICONV_SET_HOOKS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ICONV_SET_HOOKS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #32
	bl	_iconvctl
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	add	x1, sp, #8
	add	x2, sp, #24
	mov	x3, sp
	add	x4, sp, #16
	mov	x0, x19
	bl	_iconv
	cmn	x0, #1
	b.eq	LBB0_2
; %bb.5:
	mov	x0, x19
	bl	_iconv_close
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.6:
Lloh12:
	adrp	x8, _wc_hook@GOTPAGE
Lloh13:
	ldr	x8, [x8, _wc_hook@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hello World!"

	.comm	_wchar_hook,4,2                 ; @wchar_hook
l_.str.1:                               ; @.str.1
	.asciz	"SHIFT_JIS"

l_.str.2:                               ; @.str.2
	.asciz	"ASCII"

	.comm	_ICONV_SET_HOOKS,4,2            ; @ICONV_SET_HOOKS
	.comm	_wc_hook,8,3                    ; @wc_hook
	.no_dead_strip	_ctl_wc_hook
.subsections_via_symbols
