	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mbcs_algo_start
_mbcs_algo_start:                       ## @mbcs_algo_start
	.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	%rdi, %rbx
	movq	8(%rdi), %r15
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	leaq	4(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_atomic_set
	movl	32(%rbx), %esi
	movl	28(%rbx), %edx
	movl	24(%rbx), %ecx
	movl	16(%rbx), %r9d
	movl	20(%rbx), %r8d
	movq	%r15, %rdi
	callq	_mbcs_algo_set
	movq	_MBCS_CM_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_MBCS_MMR_GET
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_MBCS_MMR_SET
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_MBCS_CM_CONTROL,4,2            ## @MBCS_CM_CONTROL
	.no_dead_strip	_mbcs_algo_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mbcs_algo_start
_mbcs_algo_start:                       ; @mbcs_algo_start
	.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	x19, x0
	ldr	x20, [x0, #8]
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	add	x0, x19, #4
	mov	w1, #0
	bl	_atomic_set
	ldp	w2, w1, [x19, #28]
	ldp	w4, w3, [x19, #20]
	ldr	w5, [x19, #16]
	mov	x0, x20
	bl	_mbcs_algo_set
Lloh3:
	adrp	x21, _MBCS_CM_CONTROL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MBCS_CM_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_MBCS_MMR_GET
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #1
	bl	_MBCS_MMR_SET
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_3:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_MBCS_CM_CONTROL,4,2            ; @MBCS_CM_CONTROL
	.no_dead_strip	_mbcs_algo_start
.subsections_via_symbols
