	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decode_utf16                   ## -- Begin function decode_utf16
	.p2align	4, 0x90
_decode_utf16:                          ## @decode_utf16
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %ecx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	shll	$8, %ecx
	xorl	4(%rdi), %ecx
	jmp	LBB0_3
LBB0_2:
	movl	4(%rdi), %eax
	shll	$8, %eax
	xorl	%ecx, %eax
	movl	%eax, %ecx
LBB0_3:
	leal	-57344(%rcx), %eax
	cmpl	$-2048, %eax                    ## imm = 0xF800
	jb	LBB0_9
## %bb.4:
	movl	$-1, %eax
	cmpl	$56319, %ecx                    ## imm = 0xDBFF
	ja	LBB0_10
## %bb.5:
	movl	8(%rdi), %eax
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:
	shll	$8, %eax
	xorl	12(%rdi), %eax
	jmp	LBB0_8
LBB0_7:
	movl	12(%rdi), %edx
	shll	$8, %edx
	xorl	%edx, %eax
LBB0_8:
	shll	$10, %ecx
	xorl	%eax, %ecx
	xorl	$56679424, %ecx                 ## imm = 0x360DC00
	addl	$65536, %ecx                    ## imm = 0x10000
LBB0_9:
	movl	%ecx, %eax
LBB0_10:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decode_utf16                   ; -- Begin function decode_utf16
	.p2align	2
_decode_utf16:                          ; @decode_utf16
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	ldr	w9, [x0]
	cbz	w1, LBB0_2
; %bb.1:
	ldr	w10, [x8, #4]
	eor	w0, w10, w9, lsl #8
	b	LBB0_3
LBB0_2:
	ldr	w10, [x8, #4]
	eor	w0, w9, w10, lsl #8
LBB0_3:
	sub	w9, w0, #14, lsl #12            ; =57344
	cmn	w9, #2048
	b.lo	LBB0_10
; %bb.4:
	lsr	w9, w0, #10
	cmp	w9, #54
	b.ls	LBB0_6
; %bb.5:
	mov	w0, #-1
	ret
LBB0_6:
	ldr	w9, [x8, #8]
	cbz	w1, LBB0_8
; %bb.7:
	ldr	w8, [x8, #12]
	eor	w8, w8, w9, lsl #8
	b	LBB0_9
LBB0_8:
	ldr	w8, [x8, #12]
	eor	w8, w9, w8, lsl #8
LBB0_9:
	eor	w8, w8, w0, lsl #10
	mov	w9, #56320
	movk	w9, #864, lsl #16
	eor	w8, w8, w9
	add	w0, w8, #16, lsl #12            ; =65536
LBB0_10:
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
