	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	callq	_modfind
	testq	%rax, %rax
	js	LBB0_1
LBB0_4:
	movq	_ICONV_CSNMAXLEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_malloc
	movq	%rax, (%r12)
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	(%r13), %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%r12), %rdi
	movq	_ENCODING_UNICODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%r13), %edx
	callq	_strncpy
	movq	(%r14), %rdi
	movl	(%r13), %edx
	movq	%r15, %rsi
	callq	_strncpy
	movq	(%r12), %rdi
	movq	(%r14), %rsi
	callq	_kiconv_add_xlat16_cspairs
	xorl	%ebx, %ebx
	negl	%eax
	sbbl	%ebx, %ebx
	jmp	LBB0_7
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, %ebx
LBB0_7:
	movl	%ebx, %eax
	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	"udf_iconv"

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

	.comm	_ICONV_CSNMAXLEN,4,2            ## @ICONV_CSNMAXLEN
	.comm	_ENCODING_UNICODE,8,3           ## @ENCODING_UNICODE
.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	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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_modfind
	tbnz	x0, #63, LBB0_4
LBB0_1:
Lloh2:
	adrp	x22, _ICONV_CSNMAXLEN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ICONV_CSNMAXLEN@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w0, [x22]
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x0, [x20]
Lloh4:
	adrp	x8, _ENCODING_UNICODE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENCODING_UNICODE@GOTPAGEOFF]
Lloh6:
	ldr	x1, [x8]
	ldr	w2, [x22]
	bl	_strncpy
	ldr	x0, [x19]
	ldr	w2, [x22]
	mov	x1, x21
	bl	_strncpy
	ldr	x0, [x20]
	ldr	x1, [x19]
	bl	_kiconv_add_xlat16_cspairs
	cmp	w0, #0
	csetm	w0, ne
	b	LBB0_8
LBB0_4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kldload
	tbnz	x0, #63, LBB0_6
; %bb.5:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_modfind
	tbz	x0, #63, LBB0_1
LBB0_6:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"udf_iconv"

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

	.comm	_ICONV_CSNMAXLEN,4,2            ; @ICONV_CSNMAXLEN
	.comm	_ENCODING_UNICODE,8,3           ; @ENCODING_UNICODE
.subsections_via_symbols
