	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smb_ctx_setcharset             ## -- Begin function smb_ctx_setcharset
	.p2align	4, 0x90
_smb_ctx_setcharset:                    ## @smb_ctx_setcharset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %rbx
	subq	%r15, %rbx
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	cmpl	$4, %ebx
	jge	LBB0_3
## %bb.5:
	incq	%r12
	movq	%r12, %rdi
	callq	_strlen
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	cmpl	$4, %eax
	jge	LBB0_7
## %bb.8:
	movl	4(%r14), %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	%rax, %r15
	movslq	%ebx, %rax
	movb	$0, (%r15,%rax)
	movl	(%r14), %edi
	movq	%r12, %rsi
	callq	_strcpy
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_nls_setrecode
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_smb_error
	movb	$0, (%r15)
	movb	$0, (%r14)
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	xorl	%esi, %esi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_smb_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid local charset specification (%s)"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"invalid server charset specification (%s)"

L_.str.2:                               ## @.str.2
	.asciz	"can't initialize iconv support (%s:%s)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smb_ctx_setcharset             ; -- Begin function smb_ctx_setcharset
	.p2align	2
_smb_ctx_setcharset:                    ; @smb_ctx_setcharset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_7
; %bb.1:
	sub	x21, x0, x19
	cbz	w21, LBB0_7
; %bb.2:
	cmp	w21, #4
	b.ge	LBB0_7
; %bb.3:
	add	x22, x0, #1
	mov	x0, x22
	bl	_strlen
	cbz	w0, LBB0_8
; %bb.4:
	cmp	w0, #4
	b.ge	LBB0_8
; %bb.5:
	ldr	w0, [x20, #4]
	mov	x1, x19
	mov	x2, x21
	bl	_memcpy
	mov	x19, x0
	strb	wzr, [x0, w21, sxtw]
	ldr	w0, [x20]
	mov	x1, x22
	bl	_strcpy
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_nls_setrecode
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.6:
	str	x21, [sp]
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_smb_error
	strb	wzr, [x19]
	strb	wzr, [x21]
	b	LBB0_10
LBB0_7:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	mov	w1, #0
	mov	x2, x19
	bl	_smb_error
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid local charset specification (%s)"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"invalid server charset specification (%s)"

l_.str.2:                               ; @.str.2
	.asciz	"can't initialize iconv support (%s:%s)"

.subsections_via_symbols
