	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_charset                    ## -- Begin function set_charset
	.p2align	4, 0x90
_set_charset:                           ## @set_charset
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	callq	_modfind
	testq	%rax, %rax
	js	LBB0_1
LBB0_4:
	movq	_ENCODING_UNICODE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_build_iovec_argf
	movq	(%rbx), %rdi
	movq	%r13, %rsi
	callq	_kiconv_add_xlat16_cspairs
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_EEXIST@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_12
LBB0_6:
	testq	%r15, %r15
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_kiconv_add_xlat16_cspairs
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_kldload
	testq	%rax, %rax
	js	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_modfind
	testq	%rax, %rax
	jns	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
	movl	$-1, %eax
	jmp	LBB0_12
LBB0_8:
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r13, %rcx
	callq	_build_iovec_argf
	movq	_KICONV_FROM_UPPER@GOTPCREL(%rip), %rax
	movq	_KICONV_LOWER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r13, %rsi
	callq	_kiconv_add_xlat16_cspair
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_EEXIST@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_12
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"msdosfs_iconv"

L_.str.1:                               ## @.str.1
	.asciz	"cannot find or load \"msdosfs_iconv\" kernel module"

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

	.comm	_ENCODING_UNICODE,8,3           ## @ENCODING_UNICODE
	.comm	_errno,8,3                      ## @errno
	.comm	_EEXIST,8,3                     ## @EEXIST
L_.str.3:                               ## @.str.3
	.asciz	"cs_dos"

	.comm	_KICONV_FROM_UPPER,4,2          ## @KICONV_FROM_UPPER
	.comm	_KICONV_LOWER,4,2               ## @KICONV_LOWER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_charset                    ; -- Begin function set_charset
	.p2align	2
_set_charset:                           ; @set_charset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_modfind
	tbnz	x0, #63, LBB0_5
LBB0_1:
Lloh2:
	adrp	x23, _ENCODING_UNICODE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ENCODING_UNICODE@GOTPAGEOFF]
	ldr	x3, [x23]
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	bl	_build_iovec_argf
	ldr	x0, [x23]
	mov	x1, x19
	bl	_kiconv_add_xlat16_cspairs
	cbz	w0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _EEXIST@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_3:
	cbz	x21, LBB0_8
; %bb.4:
	mov	x0, x21
	mov	x1, x19
	bl	_kiconv_add_xlat16_cspairs
	cbnz	w0, LBB0_9
	b	LBB0_10
LBB0_5:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kldload
	tbnz	x0, #63, LBB0_7
; %bb.6:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_modfind
	tbz	x0, #63, LBB0_1
LBB0_7:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	b	LBB0_11
LBB0_8:
Lloh18:
	adrp	x2, l_.str.3@PAGE
Lloh19:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	mov	x3, x19
	bl	_build_iovec_argf
Lloh20:
	adrp	x8, _KICONV_FROM_UPPER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KICONV_FROM_UPPER@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _KICONV_LOWER@GOTPAGE
Lloh24:
	ldr	x9, [x9, _KICONV_LOWER@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	x1, x19
	bl	_kiconv_add_xlat16_cspair
	cbz	w0, LBB0_10
LBB0_9:
Lloh26:
	adrp	x8, _errno@GOTPAGE
Lloh27:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	adrp	x9, _EEXIST@GOTPAGE
Lloh30:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	mov	w0, #-1
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"msdosfs_iconv"

l_.str.1:                               ; @.str.1
	.asciz	"cannot find or load \"msdosfs_iconv\" kernel module"

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

	.comm	_ENCODING_UNICODE,8,3           ; @ENCODING_UNICODE
	.comm	_errno,8,3                      ; @errno
	.comm	_EEXIST,8,3                     ; @EEXIST
l_.str.3:                               ; @.str.3
	.asciz	"cs_dos"

	.comm	_KICONV_FROM_UPPER,4,2          ; @KICONV_FROM_UPPER
	.comm	_KICONV_LOWER,4,2               ; @KICONV_LOWER
.subsections_via_symbols
